@emerson-eps/color-tables 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/Legend/DiscreteLegend.d.ts +4 -6
- package/dist/component/Legend/DiscreteLegend.js +13 -10
- package/dist/component/Legend/DiscreteLegend.js.map +1 -1
- package/dist/component/Utils/discreteLegend.d.ts +2 -2
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js +2 -4
- package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js.map +1 -1
- package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js +2 -4
- package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js.map +1 -1
- package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js +2 -4
- package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js.map +1 -1
- package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js +2 -4
- package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js.map +1 -1
- package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js +2 -3
- package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js.map +1 -1
- package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js +2 -4
- package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js.map +1 -1
- package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js +2 -4
- package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js.map +1 -1
- package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js +2 -4
- package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js.map +1 -1
- package/package.json +1 -1
- package/src/component/Legend/DiscreteLegend.tsx +17 -23
- package/src/component/Utils/discreteLegend.ts +2 -2
- package/src/index.ts +0 -1
- package/src/stories/ColorLegends/DiscreteLegends/Facies.stories.jsx +2 -3
- package/src/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.jsx +2 -4
- package/src/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.jsx +2 -4
- package/src/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.jsx +2 -4
- package/src/stories/ColorLegends/DiscreteLegends/RDE.stories.jsx +2 -3
- package/src/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.jsx +2 -4
- package/src/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.jsx +2 -4
- package/src/stories/ColorLegends/DiscreteLegends/Zonelog.stories.jsx +2 -4
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { templateArray } from "../WelllayerTemplateTypes";
|
|
3
2
|
import { colorTablesArray } from "../ColorTableTypes";
|
|
4
|
-
|
|
3
|
+
interface colorLegendProps {
|
|
5
4
|
discreteData: {
|
|
6
5
|
objects: Record<string, [number[], number]>;
|
|
7
6
|
};
|
|
8
7
|
dataObjectName: string;
|
|
9
|
-
name: string;
|
|
10
8
|
position: number[];
|
|
11
|
-
|
|
9
|
+
colorName: string;
|
|
12
10
|
colorTables: colorTablesArray;
|
|
13
11
|
horizontal: boolean;
|
|
14
|
-
}
|
|
12
|
+
}
|
|
15
13
|
export declare const DiscreteColorLegend: React.FC<colorLegendProps>;
|
|
16
|
-
export declare function colorTableData(
|
|
14
|
+
export declare function colorTableData(colorName: string, colorTables: colorTablesArray): [number, number, number, number][];
|
|
17
15
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import legendUtil from "../Utils/discreteLegend";
|
|
3
3
|
import { scaleOrdinal, select } from "d3";
|
|
4
|
-
export const DiscreteColorLegend = ({ discreteData,
|
|
4
|
+
export const DiscreteColorLegend = ({ discreteData, dataObjectName, position, colorName, colorTables, horizontal, }) => {
|
|
5
5
|
React.useEffect(() => {
|
|
6
6
|
discreteLegend("#legend");
|
|
7
|
-
}, [discreteData,
|
|
7
|
+
}, [discreteData, colorName, colorTables, horizontal]);
|
|
8
8
|
function discreteLegend(legend) {
|
|
9
9
|
const itemName = [];
|
|
10
10
|
const itemColor = [];
|
|
11
|
-
const colorsArray = colorTableData(
|
|
11
|
+
const colorsArray = colorTableData(colorName, colorTables);
|
|
12
12
|
Object.keys(discreteData).forEach((key) => {
|
|
13
13
|
// eslint-disable-next-line
|
|
14
14
|
let code = discreteData[key][1];
|
|
@@ -34,10 +34,17 @@ export const DiscreteColorLegend = ({ discreteData, name, dataObjectName, positi
|
|
|
34
34
|
}
|
|
35
35
|
const ordinalValues = scaleOrdinal().domain(itemName);
|
|
36
36
|
const colorLegend = legendUtil(itemColor).inputScale(ordinalValues);
|
|
37
|
+
select(legend).select("div").remove();
|
|
37
38
|
select(legend).select("svg").remove();
|
|
38
39
|
const legendLength = itemColor.length;
|
|
39
40
|
const calcLegendHeight = 22 * legendLength + 4 * legendLength;
|
|
40
41
|
const selectedLegend = select(legend);
|
|
42
|
+
selectedLegend
|
|
43
|
+
.append("div")
|
|
44
|
+
.text(dataObjectName)
|
|
45
|
+
.attr("y", 7)
|
|
46
|
+
.style("color", "#6F6F6F")
|
|
47
|
+
.style("margin", "10px 10px");
|
|
41
48
|
if (!horizontal)
|
|
42
49
|
selectedLegend.style("height", 150 + "px");
|
|
43
50
|
const svgLegend = selectedLegend
|
|
@@ -63,16 +70,12 @@ export const DiscreteColorLegend = ({ discreteData, name, dataObjectName, positi
|
|
|
63
70
|
backgroundColor: "#ffffffcc",
|
|
64
71
|
borderRadius: "5px",
|
|
65
72
|
} },
|
|
66
|
-
React.createElement("label", { style: { color: "#6F6F6F", margin: "10px 10px" } }, dataObjectName),
|
|
67
73
|
React.createElement("div", { id: "legend" })));
|
|
68
74
|
};
|
|
69
75
|
// Based on name return the colors array from color.tables.json file
|
|
70
|
-
export function colorTableData(
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
const colorTableData = colorTables.filter((value) => value.name.toLowerCase() ==
|
|
74
|
-
propertiesData[0].colorTable.toLowerCase());
|
|
75
|
-
return colorTableData[0].colors;
|
|
76
|
+
export function colorTableData(colorName, colorTables) {
|
|
77
|
+
const colorTableData = colorTables.filter((value) => value.name.toLowerCase() == colorName.toLowerCase());
|
|
78
|
+
return colorTableData.length > 0 ? colorTableData[0].colors : [];
|
|
76
79
|
}
|
|
77
80
|
DiscreteColorLegend.defaultProps = {
|
|
78
81
|
position: [5, 10],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscreteLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/DiscreteLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"DiscreteLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/DiscreteLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAgB1C,MAAM,CAAC,MAAM,mBAAmB,GAA+B,CAAC,EAC5D,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,SAAS,EACT,WAAW,EACX,UAAU,GACK,EAAE,EAAE;IACnB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9B,CAAC,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IACvD,SAAS,cAAc,CAAC,MAAc;QAClC,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,MAAM,SAAS,GAAgB,EAAE,CAAC;QA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E,gBAAgB,GAAG,IAAI,CAAC,CAAC;SAChD;IACL,CAAC;IACD,OAAO,CACH,6BACI,KAAK,EAAE;YACH,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;YAClB,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;YAChB,eAAe,EAAE,WAAW;YAC5B,YAAY,EAAE,KAAK;SACtB;QAED,6BAAK,EAAE,EAAC,QAAQ,GAAO,CACrB,CACT,CAAC;AACN,CAAC,CAAC;AAEF,oEAAoE;AACpE,MAAM,UAAU,cAAc,CAC1B,SAAiB,EACjB,WAA6B;IAE7B,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CACrC,CAAC,KAAqB,EAAE,EAAE,CACtB,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,SAAS,CAAC,WAAW,EAAE,CAC1D,CAAC;IACF,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AACrE,CAAC;AAED,mBAAmB,CAAC,YAAY,GAAG;IAC/B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;CACpB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { ContinuousLegend } from './component/Legend/ContinuousLegend';
|
|
2
2
|
export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
|
|
3
3
|
export { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
|
|
4
|
-
//export const colorTables = require('./component/color-tables');
|
|
5
4
|
import * as colorTables from './component/color-tables.json';
|
|
6
5
|
export default colorTables;
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AAGpF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AAGpF,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,eAAe,WAAW,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
export default {
|
|
6
5
|
component: DiscreteColorLegend,
|
|
@@ -18,20 +17,19 @@ const discreteData = {
|
|
|
18
17
|
"MSH": [[], 8],
|
|
19
18
|
"CAL": [[], 9]
|
|
20
19
|
};
|
|
21
|
-
const name = "FACIES";
|
|
22
20
|
const dataObjectName = "Wells / FACIES";
|
|
23
21
|
const position = [16, 10];
|
|
24
22
|
const horizontal = true;
|
|
23
|
+
const colorName = "Facies";
|
|
25
24
|
const Template = (args) => {
|
|
26
25
|
return React.createElement(DiscreteColorLegend, Object.assign({}, args));
|
|
27
26
|
};
|
|
28
27
|
export const FaciesTemplate = Template.bind({});
|
|
29
28
|
FaciesTemplate.args = {
|
|
30
29
|
discreteData,
|
|
31
|
-
name,
|
|
32
30
|
dataObjectName,
|
|
33
31
|
position,
|
|
34
|
-
|
|
32
|
+
colorName,
|
|
35
33
|
colorTables,
|
|
36
34
|
horizontal,
|
|
37
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Facies.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/Facies.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"Facies.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/Facies.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAE7E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACjB,CAAC;AACF,MAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,cAAc,CAAC,IAAI,GAAG;IAClB,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
export default {
|
|
6
5
|
component: DiscreteColorLegend,
|
|
@@ -18,20 +17,19 @@ const discreteData = {
|
|
|
18
17
|
"F_MARSH": [[], 8],
|
|
19
18
|
"F_CALCITE": [[], 9]
|
|
20
19
|
};
|
|
21
|
-
const name = "FACIES_NoCalcite";
|
|
22
20
|
const dataObjectName = "Wells / FACIES_NoCalcite";
|
|
23
21
|
const position = [16, 10];
|
|
24
22
|
const horizontal = true;
|
|
23
|
+
const colorName = "Facies";
|
|
25
24
|
const Template = (args) => {
|
|
26
25
|
return React.createElement(DiscreteColorLegend, Object.assign({}, args));
|
|
27
26
|
};
|
|
28
27
|
export const FaciesNoCalciteTemplate = Template.bind({});
|
|
29
28
|
FaciesNoCalciteTemplate.args = {
|
|
30
29
|
discreteData,
|
|
31
|
-
name,
|
|
32
30
|
dataObjectName,
|
|
33
31
|
position,
|
|
34
|
-
|
|
32
|
+
colorName,
|
|
35
33
|
colorTables,
|
|
36
34
|
horizontal,
|
|
37
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FaciesNoCalcite.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"FaciesNoCalcite.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACrB,mBAAmB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,mBAAmB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACtB,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACtB,iBAAiB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1B,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7B,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7B,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAClB,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACvB,CAAC;AACF,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAClD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzD,uBAAuB,CAAC,IAAI,GAAG;IAC3B,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
export default {
|
|
6
5
|
component: DiscreteColorLegend,
|
|
@@ -10,20 +9,19 @@ const discreteData = {
|
|
|
10
9
|
"no": [[], 0],
|
|
11
10
|
"yes": [[], 1]
|
|
12
11
|
};
|
|
13
|
-
const name = "FaultDistance_HUM";
|
|
14
12
|
const dataObjectName = "Wells / FaultDistance_HUM";
|
|
15
13
|
const position = [16, 10];
|
|
16
14
|
const horizontal = true;
|
|
15
|
+
const colorName = "Gas-Oil-Water";
|
|
17
16
|
const Template = (args) => {
|
|
18
17
|
return React.createElement(DiscreteColorLegend, Object.assign({}, args));
|
|
19
18
|
};
|
|
20
19
|
export const FaultDistanceHumTemplate = Template.bind({});
|
|
21
20
|
FaultDistanceHumTemplate.args = {
|
|
22
21
|
discreteData,
|
|
23
|
-
name,
|
|
24
22
|
dataObjectName,
|
|
25
23
|
position,
|
|
26
|
-
|
|
24
|
+
colorName,
|
|
27
25
|
colorTables,
|
|
28
26
|
horizontal,
|
|
29
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FaultDistanceHum.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"FaultDistanceHum.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACjB,CAAC;AACF,MAAM,cAAc,GAAG,2BAA2B,CAAC;AACnD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,eAAe,CAAC;AAElC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1D,wBAAwB,CAAC,IAAI,GAAG;IAC5B,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
export default {
|
|
6
5
|
component: DiscreteColorLegend,
|
|
@@ -10,20 +9,19 @@ const discreteData = {
|
|
|
10
9
|
"no": [[], 0],
|
|
11
10
|
"yes": [[], 1]
|
|
12
11
|
};
|
|
13
|
-
const name = "FAULT_PROXIMITY_FLAG";
|
|
14
12
|
const dataObjectName = "Wells / FAULT_PROXIMITY_FLAG";
|
|
15
13
|
const position = [16, 10];
|
|
16
14
|
const horizontal = true;
|
|
15
|
+
const colorName = "Time/Depth";
|
|
17
16
|
const Template = (args) => {
|
|
18
17
|
return React.createElement(DiscreteColorLegend, Object.assign({}, args));
|
|
19
18
|
};
|
|
20
19
|
export const FaultProximityFlagTemplate = Template.bind({});
|
|
21
20
|
FaultProximityFlagTemplate.args = {
|
|
22
21
|
discreteData,
|
|
23
|
-
name,
|
|
24
22
|
dataObjectName,
|
|
25
23
|
position,
|
|
26
|
-
|
|
24
|
+
colorName,
|
|
27
25
|
colorTables,
|
|
28
26
|
horizontal,
|
|
29
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FaultProximityFlag.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"FaultProximityFlag.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACjB,CAAC;AACF,MAAM,cAAc,GAAG,8BAA8B,CAAC;AACtD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5D,0BAA0B,CAAC,IAAI,GAAG;IAC9B,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
export default {
|
|
6
5
|
component: DiscreteColorLegend,
|
|
@@ -13,10 +12,10 @@ const discreteData = {
|
|
|
13
12
|
"TIDAL": [[], 4],
|
|
14
13
|
"ONSHORE": [[], 5]
|
|
15
14
|
};
|
|
16
|
-
const name = "RDE";
|
|
17
15
|
const dataObjectName = "Wells / RDE";
|
|
18
16
|
const position = [16, 10];
|
|
19
17
|
const horizontal = true;
|
|
18
|
+
const colorName = "Accent";
|
|
20
19
|
const Template = (args) => {
|
|
21
20
|
return React.createElement(DiscreteColorLegend, Object.assign({}, args));
|
|
22
21
|
};
|
|
@@ -26,7 +25,7 @@ RDETemplate.args = {
|
|
|
26
25
|
name,
|
|
27
26
|
dataObjectName,
|
|
28
27
|
position,
|
|
29
|
-
|
|
28
|
+
colorName,
|
|
30
29
|
colorTables,
|
|
31
30
|
horizontal,
|
|
32
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RDE.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/RDE.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"RDE.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/RDE.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACnB,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACrB,CAAC;AACF,MAAM,cAAc,GAAG,aAAa,CAAC;AACrC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IACf,YAAY;IACZ,IAAI;IACJ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
export default {
|
|
6
5
|
component: DiscreteColorLegend,
|
|
@@ -24,20 +23,19 @@ const discreteData = {
|
|
|
24
23
|
"R_USF": [[], 14],
|
|
25
24
|
"R_LSF": [[], 15]
|
|
26
25
|
};
|
|
27
|
-
const name = "RDE_ORIG";
|
|
28
26
|
const dataObjectName = "Wells / RDE_ORIG";
|
|
29
27
|
const position = [16, 10];
|
|
30
28
|
const horizontal = true;
|
|
29
|
+
const colorName = "Stratigraphy";
|
|
31
30
|
const Template = (args) => {
|
|
32
31
|
return React.createElement(DiscreteColorLegend, Object.assign({}, args));
|
|
33
32
|
};
|
|
34
33
|
export const RDEOrigTemplate = Template.bind({});
|
|
35
34
|
RDEOrigTemplate.args = {
|
|
36
35
|
discreteData,
|
|
37
|
-
name,
|
|
38
36
|
dataObjectName,
|
|
39
37
|
position,
|
|
40
|
-
|
|
38
|
+
colorName,
|
|
41
39
|
colorTables,
|
|
42
40
|
horizontal,
|
|
43
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RDE_Orig.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"RDE_Orig.stories.js","sourceRoot":"","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AAC;AACxB,MAAM,SAAS,GAAG,cAAc,CAAC;AAEjC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACnB,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
export default {
|
|
6
5
|
component: DiscreteColorLegend,
|
|
@@ -13,20 +12,19 @@ const discreteData = {
|
|
|
13
12
|
"MID": [[], 2],
|
|
14
13
|
"LOWER": [[], 3]
|
|
15
14
|
};
|
|
16
|
-
const name = "ZONE_MAIN";
|
|
17
15
|
const dataObjectName = "Wells / ZONE_MAIN";
|
|
18
16
|
const position = [16, 10];
|
|
19
17
|
const horizontal = true;
|
|
18
|
+
const colorName = "Stratigraphy";
|
|
20
19
|
const Template = (args) => {
|
|
21
20
|
return React.createElement(DiscreteColorLegend, Object.assign({}, args));
|
|
22
21
|
};
|
|
23
22
|
export const ZoneMainTemplate = Template.bind({});
|
|
24
23
|
ZoneMainTemplate.args = {
|
|
25
24
|
discreteData,
|
|
26
|
-
name,
|
|
27
25
|
dataObjectName,
|
|
28
26
|
position,
|
|
29
|
-
|
|
27
|
+
colorName,
|
|
30
28
|
colorTables,
|
|
31
29
|
horizontal,
|
|
32
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneMain.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"ZoneMain.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,eAAe;IACX,SAAS,EAAE,mBAAmB;IAC9B,KAAK,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG;IACjB,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACZ,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACZ,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;CACnB,CAAC;AACF,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,SAAS,GAAG,cAAc,CAAC;AAEjC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,OAAO,oBAAC,mBAAmB,oBAAK,IAAI,EAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,gBAAgB,CAAC,IAAI,GAAG;IACpB,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DiscreteColorLegend } from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
export default {
|
|
6
5
|
component: DiscreteColorLegend,
|
|
@@ -23,20 +22,19 @@ const discreteData = {
|
|
|
23
22
|
"H1": [[], 13],
|
|
24
23
|
"BELOW": [[], 14]
|
|
25
24
|
};
|
|
26
|
-
const name = "ZONELOG";
|
|
27
25
|
const dataObjectName = "Wells / ZONELOG";
|
|
28
26
|
const position = [16, 10];
|
|
29
27
|
const horizontal = true;
|
|
28
|
+
const colorName = "Stratigraphy";
|
|
30
29
|
const Template = (args) => {
|
|
31
30
|
return React.createElement(DiscreteColorLegend, Object.assign({}, args));
|
|
32
31
|
};
|
|
33
32
|
export const ZonelogTemplate = Template.bind({});
|
|
34
33
|
ZonelogTemplate.args = {
|
|
35
34
|
discreteData,
|
|
36
|
-
name,
|
|
37
35
|
dataObjectName,
|
|
38
36
|
position,
|
|
39
|
-
|
|
37
|
+
colorName,
|
|
40
38
|
colorTables,
|
|
41
39
|
horizontal,
|
|
42
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Zonelog.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/Zonelog.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"Zonelog.stories.js","sourceRoot":"","sources":["../../../../src/stories/ColorLegends/DiscreteLegends/Zonelog.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,WAAW,MAA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AAI,GAAG;IACnB,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;CACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,41 +1,37 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import legendUtil from "../Utils/discreteLegend";
|
|
3
3
|
import { scaleOrdinal, select } from "d3";
|
|
4
|
-
import { templateArray, propertiesObj } from "../WelllayerTemplateTypes";
|
|
5
4
|
import { colorTablesArray, colorTablesObj } from "../ColorTableTypes";
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
interface ItemColor {
|
|
8
7
|
color: string;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
interface colorLegendProps {
|
|
12
11
|
discreteData: { objects: Record<string, [number[], number]> };
|
|
13
12
|
dataObjectName: string;
|
|
14
|
-
name: string;
|
|
15
13
|
position: number[];
|
|
16
|
-
|
|
14
|
+
colorName: string;
|
|
17
15
|
colorTables: colorTablesArray;
|
|
18
16
|
horizontal: boolean;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
export const DiscreteColorLegend: React.FC<colorLegendProps> = ({
|
|
22
20
|
discreteData,
|
|
23
|
-
name,
|
|
24
21
|
dataObjectName,
|
|
25
22
|
position,
|
|
26
|
-
|
|
23
|
+
colorName,
|
|
27
24
|
colorTables,
|
|
28
25
|
horizontal,
|
|
29
26
|
}: colorLegendProps) => {
|
|
30
27
|
React.useEffect(() => {
|
|
31
28
|
discreteLegend("#legend");
|
|
32
|
-
}, [discreteData,
|
|
29
|
+
}, [discreteData, colorName, colorTables, horizontal]);
|
|
33
30
|
function discreteLegend(legend: string) {
|
|
34
31
|
const itemName: string[] = [];
|
|
35
32
|
const itemColor: ItemColor[] = [];
|
|
36
33
|
const colorsArray: [number, number, number, number][] = colorTableData(
|
|
37
|
-
|
|
38
|
-
template,
|
|
34
|
+
colorName,
|
|
39
35
|
colorTables
|
|
40
36
|
);
|
|
41
37
|
Object.keys(discreteData).forEach((key) => {
|
|
@@ -63,10 +59,17 @@ export const DiscreteColorLegend: React.FC<colorLegendProps> = ({
|
|
|
63
59
|
}
|
|
64
60
|
const ordinalValues = scaleOrdinal().domain(itemName);
|
|
65
61
|
const colorLegend = legendUtil(itemColor).inputScale(ordinalValues);
|
|
62
|
+
select(legend).select("div").remove();
|
|
66
63
|
select(legend).select("svg").remove();
|
|
67
64
|
const legendLength = itemColor.length;
|
|
68
65
|
const calcLegendHeight = 22 * legendLength + 4 * legendLength;
|
|
69
66
|
const selectedLegend = select(legend);
|
|
67
|
+
selectedLegend
|
|
68
|
+
.append("div")
|
|
69
|
+
.text(dataObjectName)
|
|
70
|
+
.attr("y", 7)
|
|
71
|
+
.style("color", "#6F6F6F")
|
|
72
|
+
.style("margin", "10px 10px");
|
|
70
73
|
if (!horizontal) selectedLegend.style("height", 150 + "px");
|
|
71
74
|
const svgLegend = selectedLegend
|
|
72
75
|
.append("svg")
|
|
@@ -93,9 +96,6 @@ export const DiscreteColorLegend: React.FC<colorLegendProps> = ({
|
|
|
93
96
|
borderRadius: "5px",
|
|
94
97
|
}}
|
|
95
98
|
>
|
|
96
|
-
<label style={{ color: "#6F6F6F", margin: "10px 10px" }}>
|
|
97
|
-
{dataObjectName}
|
|
98
|
-
</label>
|
|
99
99
|
<div id="legend"></div>
|
|
100
100
|
</div>
|
|
101
101
|
);
|
|
@@ -103,22 +103,16 @@ export const DiscreteColorLegend: React.FC<colorLegendProps> = ({
|
|
|
103
103
|
|
|
104
104
|
// Based on name return the colors array from color.tables.json file
|
|
105
105
|
export function colorTableData(
|
|
106
|
-
|
|
107
|
-
template: templateArray,
|
|
106
|
+
colorName: string,
|
|
108
107
|
colorTables: colorTablesArray
|
|
109
108
|
): [number, number, number, number][] {
|
|
110
|
-
const properties = template[0]["properties"];
|
|
111
|
-
const propertiesData = properties.filter(
|
|
112
|
-
(value: propertiesObj) => value.objectName == name
|
|
113
|
-
);
|
|
114
109
|
const colorTableData = colorTables.filter(
|
|
115
110
|
(value: colorTablesObj) =>
|
|
116
|
-
value.name.toLowerCase() ==
|
|
117
|
-
propertiesData[0].colorTable.toLowerCase()
|
|
111
|
+
value.name.toLowerCase() == colorName.toLowerCase()
|
|
118
112
|
);
|
|
119
|
-
return colorTableData[0].colors;
|
|
113
|
+
return colorTableData.length > 0 ? colorTableData[0].colors : [];
|
|
120
114
|
}
|
|
121
115
|
|
|
122
116
|
DiscreteColorLegend.defaultProps = {
|
|
123
117
|
position: [5, 10],
|
|
124
|
-
};
|
|
118
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,5 @@ export { colorTableData, DiscreteColorLegend } from './component/Legend/Discrete
|
|
|
3
3
|
export { colorsArray, rgbValues, RGBToHex} from './component/Utils/continousLegend';
|
|
4
4
|
export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
|
|
5
5
|
export { propertiesObj, templateArray } from './component/WelllayerTemplateTypes';
|
|
6
|
-
//export const colorTables = require('./component/color-tables');
|
|
7
6
|
import * as colorTables from './component/color-tables.json';
|
|
8
7
|
export default colorTables;
|
|
@@ -20,10 +20,10 @@ const discreteData = {
|
|
|
20
20
|
"MSH": [[], 8],
|
|
21
21
|
"CAL": [[], 9]
|
|
22
22
|
};
|
|
23
|
-
const name = "FACIES";
|
|
24
23
|
const dataObjectName = "Wells / FACIES";
|
|
25
24
|
const position = [16, 10];
|
|
26
25
|
const horizontal = true;
|
|
26
|
+
const colorName = "Facies";
|
|
27
27
|
|
|
28
28
|
const Template = (args) => {
|
|
29
29
|
return <DiscreteColorLegend {...args} />;
|
|
@@ -32,10 +32,9 @@ const Template = (args) => {
|
|
|
32
32
|
export const FaciesTemplate = Template.bind({});
|
|
33
33
|
FaciesTemplate.args = {
|
|
34
34
|
discreteData,
|
|
35
|
-
name,
|
|
36
35
|
dataObjectName,
|
|
37
36
|
position,
|
|
38
|
-
|
|
37
|
+
colorName,
|
|
39
38
|
colorTables,
|
|
40
39
|
horizontal,
|
|
41
40
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
|
|
6
5
|
export default {
|
|
@@ -20,10 +19,10 @@ const discreteData = {
|
|
|
20
19
|
"F_MARSH": [[], 8],
|
|
21
20
|
"F_CALCITE": [[], 9]
|
|
22
21
|
};
|
|
23
|
-
const name = "FACIES_NoCalcite";
|
|
24
22
|
const dataObjectName = "Wells / FACIES_NoCalcite";
|
|
25
23
|
const position = [16, 10];
|
|
26
24
|
const horizontal = true;
|
|
25
|
+
const colorName = "Facies";
|
|
27
26
|
|
|
28
27
|
const Template = (args) => {
|
|
29
28
|
return <DiscreteColorLegend {...args} />;
|
|
@@ -32,10 +31,9 @@ const Template = (args) => {
|
|
|
32
31
|
export const FaciesNoCalciteTemplate = Template.bind({});
|
|
33
32
|
FaciesNoCalciteTemplate.args = {
|
|
34
33
|
discreteData,
|
|
35
|
-
name,
|
|
36
34
|
dataObjectName,
|
|
37
35
|
position,
|
|
38
|
-
|
|
36
|
+
colorName,
|
|
39
37
|
colorTables,
|
|
40
38
|
horizontal,
|
|
41
39
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
|
|
6
5
|
export default {
|
|
@@ -12,10 +11,10 @@ const discreteData = {
|
|
|
12
11
|
"no": [[], 0],
|
|
13
12
|
"yes": [[], 1]
|
|
14
13
|
};
|
|
15
|
-
const name = "FaultDistance_HUM";
|
|
16
14
|
const dataObjectName = "Wells / FaultDistance_HUM";
|
|
17
15
|
const position = [16, 10];
|
|
18
16
|
const horizontal = true;
|
|
17
|
+
const colorName = "Gas-Oil-Water";
|
|
19
18
|
|
|
20
19
|
const Template = (args) => {
|
|
21
20
|
return <DiscreteColorLegend {...args} />;
|
|
@@ -24,10 +23,9 @@ const Template = (args) => {
|
|
|
24
23
|
export const FaultDistanceHumTemplate = Template.bind({});
|
|
25
24
|
FaultDistanceHumTemplate.args = {
|
|
26
25
|
discreteData,
|
|
27
|
-
name,
|
|
28
26
|
dataObjectName,
|
|
29
27
|
position,
|
|
30
|
-
|
|
28
|
+
colorName,
|
|
31
29
|
colorTables,
|
|
32
30
|
horizontal,
|
|
33
31
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
|
|
6
5
|
export default {
|
|
@@ -12,10 +11,10 @@ const discreteData = {
|
|
|
12
11
|
"no": [[], 0],
|
|
13
12
|
"yes": [[], 1]
|
|
14
13
|
};
|
|
15
|
-
const name = "FAULT_PROXIMITY_FLAG";
|
|
16
14
|
const dataObjectName = "Wells / FAULT_PROXIMITY_FLAG";
|
|
17
15
|
const position = [16, 10];
|
|
18
16
|
const horizontal = true;
|
|
17
|
+
const colorName = "Time/Depth";
|
|
19
18
|
|
|
20
19
|
const Template = (args) => {
|
|
21
20
|
return <DiscreteColorLegend {...args} />;
|
|
@@ -24,10 +23,9 @@ const Template = (args) => {
|
|
|
24
23
|
export const FaultProximityFlagTemplate = Template.bind({});
|
|
25
24
|
FaultProximityFlagTemplate.args = {
|
|
26
25
|
discreteData,
|
|
27
|
-
name,
|
|
28
26
|
dataObjectName,
|
|
29
27
|
position,
|
|
30
|
-
|
|
28
|
+
colorName,
|
|
31
29
|
colorTables,
|
|
32
30
|
horizontal,
|
|
33
31
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
|
|
6
5
|
export default {
|
|
@@ -15,10 +14,10 @@ const discreteData = {
|
|
|
15
14
|
"TIDAL": [[], 4],
|
|
16
15
|
"ONSHORE": [[], 5]
|
|
17
16
|
};
|
|
18
|
-
const name = "RDE";
|
|
19
17
|
const dataObjectName = "Wells / RDE";
|
|
20
18
|
const position = [16, 10];
|
|
21
19
|
const horizontal = true;
|
|
20
|
+
const colorName = "Accent";
|
|
22
21
|
|
|
23
22
|
const Template = (args) => {
|
|
24
23
|
return <DiscreteColorLegend {...args} />;
|
|
@@ -30,7 +29,7 @@ RDETemplate.args = {
|
|
|
30
29
|
name,
|
|
31
30
|
dataObjectName,
|
|
32
31
|
position,
|
|
33
|
-
|
|
32
|
+
colorName,
|
|
34
33
|
colorTables,
|
|
35
34
|
horizontal,
|
|
36
35
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
|
|
6
5
|
export default {
|
|
@@ -26,10 +25,10 @@ const discreteData = {
|
|
|
26
25
|
"R_USF": [[], 14],
|
|
27
26
|
"R_LSF": [[], 15]
|
|
28
27
|
};
|
|
29
|
-
const name = "RDE_ORIG";
|
|
30
28
|
const dataObjectName = "Wells / RDE_ORIG";
|
|
31
29
|
const position = [16, 10];
|
|
32
30
|
const horizontal = true;
|
|
31
|
+
const colorName = "Stratigraphy";
|
|
33
32
|
|
|
34
33
|
const Template = (args) => {
|
|
35
34
|
return <DiscreteColorLegend {...args} />;
|
|
@@ -38,10 +37,9 @@ const Template = (args) => {
|
|
|
38
37
|
export const RDEOrigTemplate = Template.bind({});
|
|
39
38
|
RDEOrigTemplate.args = {
|
|
40
39
|
discreteData,
|
|
41
|
-
name,
|
|
42
40
|
dataObjectName,
|
|
43
41
|
position,
|
|
44
|
-
|
|
42
|
+
colorName,
|
|
45
43
|
colorTables,
|
|
46
44
|
horizontal,
|
|
47
45
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
|
|
6
5
|
export default {
|
|
@@ -15,10 +14,10 @@ const discreteData = {
|
|
|
15
14
|
"MID": [[], 2],
|
|
16
15
|
"LOWER": [[], 3]
|
|
17
16
|
};
|
|
18
|
-
const name = "ZONE_MAIN";
|
|
19
17
|
const dataObjectName = "Wells / ZONE_MAIN";
|
|
20
18
|
const position = [16, 10];
|
|
21
19
|
const horizontal = true;
|
|
20
|
+
const colorName = "Stratigraphy";
|
|
22
21
|
|
|
23
22
|
const Template = (args) => {
|
|
24
23
|
return <DiscreteColorLegend {...args} />;
|
|
@@ -27,10 +26,9 @@ const Template = (args) => {
|
|
|
27
26
|
export const ZoneMainTemplate = Template.bind({});
|
|
28
27
|
ZoneMainTemplate.args = {
|
|
29
28
|
discreteData,
|
|
30
|
-
name,
|
|
31
29
|
dataObjectName,
|
|
32
30
|
position,
|
|
33
|
-
|
|
31
|
+
colorName,
|
|
34
32
|
colorTables,
|
|
35
33
|
horizontal,
|
|
36
34
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {DiscreteColorLegend} from "../../../component/Legend/DiscreteLegend";
|
|
3
|
-
import template from "../../../component/welllayer_template.json";
|
|
4
3
|
import colorTables from "../../../component/color-tables.json";
|
|
5
4
|
|
|
6
5
|
export default {
|
|
@@ -25,10 +24,10 @@ const discreteData = {
|
|
|
25
24
|
"H1": [[], 13],
|
|
26
25
|
"BELOW": [[], 14]
|
|
27
26
|
};
|
|
28
|
-
const name = "ZONELOG";
|
|
29
27
|
const dataObjectName = "Wells / ZONELOG";
|
|
30
28
|
const position = [16, 10];
|
|
31
29
|
const horizontal = true;
|
|
30
|
+
const colorName = "Stratigraphy";
|
|
32
31
|
|
|
33
32
|
const Template = (args) => {
|
|
34
33
|
return <DiscreteColorLegend {...args} />;
|
|
@@ -37,10 +36,9 @@ const Template = (args) => {
|
|
|
37
36
|
export const ZonelogTemplate = Template.bind({});
|
|
38
37
|
ZonelogTemplate.args = {
|
|
39
38
|
discreteData,
|
|
40
|
-
name,
|
|
41
39
|
dataObjectName,
|
|
42
40
|
position,
|
|
43
|
-
|
|
41
|
+
colorName,
|
|
44
42
|
colorTables,
|
|
45
43
|
horizontal,
|
|
46
44
|
};
|