@emerson-eps/color-tables 1.0.12 → 1.0.14
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/BreakPoint/Canvas.js +3 -15
- package/dist/component/BreakPoint/Canvas.js.map +1 -1
- package/dist/component/BreakPoint/ColorScale.js +1 -1
- package/dist/component/BreakPoint/ColorScale.js.map +1 -1
- package/dist/component/BreakPoint/index.d.ts +1 -1
- package/dist/component/BreakPoint/index.js.map +1 -1
- package/dist/component/ColorSelector/BreakPointModule.js +13 -6
- package/dist/component/ColorSelector/BreakPointModule.js.map +1 -1
- package/dist/component/ColorSelector/ColorSelectorAccordion.js +10 -11
- package/dist/component/ColorSelector/ColorSelectorAccordion.js.map +1 -1
- package/dist/component/ColorSelector/ColorSelectorComponent.js +4 -5
- package/dist/component/ColorSelector/ColorSelectorComponent.js.map +1 -1
- package/dist/component/ColorSelector/ColorSelectorWrapper.js +13 -13
- package/dist/component/ColorSelector/ColorSelectorWrapper.js.map +1 -1
- package/dist/component/ColorSelector/index.d.ts +1 -1
- package/dist/component/Legend/ColorLegend.js +7 -9
- package/dist/component/Legend/ColorLegend.js.map +1 -1
- package/dist/component/Legend/ColorLegend.stories.d.ts +13 -14
- package/dist/component/Legend/ColorLegend.stories.js +85 -32
- package/dist/component/Legend/ColorLegend.stories.js.map +1 -1
- package/dist/component/Legend/ContinuousLegend.js +221 -229
- package/dist/component/Legend/ContinuousLegend.js.map +1 -1
- package/dist/component/Legend/ContinuousLegend.stories.d.ts +15 -10
- package/dist/component/Legend/ContinuousLegend.stories.js +147 -18
- package/dist/component/Legend/ContinuousLegend.stories.js.map +1 -1
- package/dist/component/Legend/DiscreteLegend.js +129 -133
- package/dist/component/Legend/DiscreteLegend.js.map +1 -1
- package/dist/component/Legend/DiscreteLegend.stories.d.ts +14 -9
- package/dist/component/Legend/DiscreteLegend.stories.js +178 -16
- package/dist/component/Legend/DiscreteLegend.stories.js.map +1 -1
- package/dist/component/Utils/Utils.stories.d.ts +7 -0
- package/dist/component/Utils/Utils.stories.js +41 -0
- package/dist/component/Utils/Utils.stories.js.map +1 -0
- package/dist/component/Utils/legendCommonFunction.js +40 -48
- package/dist/component/Utils/legendCommonFunction.js.map +1 -1
- package/package.json +11 -17
- package/dist/component/Utils/legendCommonFunction.stories.d.ts +0 -8
- package/dist/component/Utils/legendCommonFunction.stories.js +0 -35
- package/dist/component/Utils/legendCommonFunction.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLegends/MD.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js +0 -34
- package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js +0 -34
- package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js +0 -34
- package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js +0 -36
- package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js +0 -34
- package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js +0 -34
- package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js.map +0 -1
- package/dist/stories/ColorLegends/ContinousLegends/SW.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js +0 -34
- package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js.map +0 -1
- package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js +0 -39
- package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js.map +0 -1
- package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js +0 -31
- package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js.map +0 -1
- package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js +0 -31
- package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js.map +0 -1
- package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js +0 -34
- package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js.map +0 -1
- package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js +0 -45
- package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js.map +0 -1
- package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js +0 -34
- package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js.map +0 -1
- package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js +0 -44
- package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js.map +0 -1
- package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.d.ts +0 -7
- package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.js +0 -33
- package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.js.map +0 -1
|
@@ -1,32 +1,161 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { colorTables } from "..";
|
|
3
|
+
import { ContinuousLegend } from ".";
|
|
4
|
+
// storybook page
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Legends/ContinousLegend",
|
|
4
7
|
component: ContinuousLegend,
|
|
5
|
-
|
|
8
|
+
decorators: [
|
|
9
|
+
(Story) => {
|
|
10
|
+
return React.createElement(Story, null);
|
|
11
|
+
},
|
|
12
|
+
],
|
|
6
13
|
};
|
|
7
|
-
|
|
8
|
-
const max = 1;
|
|
9
|
-
const dataObjectName = "Physics color map";
|
|
10
|
-
const colorName = "Physics";
|
|
14
|
+
export default meta;
|
|
11
15
|
const DEFAULT_ARGS = {
|
|
12
|
-
min:
|
|
13
|
-
max:
|
|
16
|
+
min: 0,
|
|
17
|
+
max: 1,
|
|
14
18
|
isRangeShown: true,
|
|
15
19
|
legendFontSize: 13,
|
|
16
20
|
tickFontSize: 13,
|
|
17
21
|
numberOfTicks: 3,
|
|
18
22
|
legendScaleSize: 300,
|
|
19
23
|
};
|
|
20
|
-
const
|
|
21
|
-
|
|
24
|
+
const cssLegendStyles = { top: "0%", left: "0%" };
|
|
25
|
+
export const StandardColorTableLibrary = {
|
|
26
|
+
args: {
|
|
27
|
+
...DEFAULT_ARGS,
|
|
28
|
+
dataObjectName: "Physics color map",
|
|
29
|
+
colorName: "Physics",
|
|
30
|
+
cssLegendStyles,
|
|
31
|
+
},
|
|
22
32
|
};
|
|
23
|
-
export const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
export const DefaultColorTable = {
|
|
34
|
+
args: {
|
|
35
|
+
...DEFAULT_ARGS,
|
|
36
|
+
dataObjectName: "Default color table (Rainbow)",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export const BackgroundColor = {
|
|
40
|
+
args: {
|
|
41
|
+
...DEFAULT_ARGS,
|
|
42
|
+
dataObjectName: "Physics color map",
|
|
43
|
+
cssLegendStyles: {
|
|
29
44
|
backgroundColor: "red",
|
|
30
|
-
}
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
export const MDTemplate = {
|
|
49
|
+
args: {
|
|
50
|
+
min: 2917,
|
|
51
|
+
max: 4723,
|
|
52
|
+
dataObjectName: "Wells / MD",
|
|
53
|
+
colorName: "Time/Depth",
|
|
54
|
+
colorTables,
|
|
55
|
+
horizontal: true,
|
|
56
|
+
isRangeShown: true,
|
|
57
|
+
legendFontSize: 13,
|
|
58
|
+
tickFontSize: 13,
|
|
59
|
+
numberOfTicks: 3,
|
|
60
|
+
legendScaleSize: 300,
|
|
61
|
+
cssLegendStyles,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
export const NTGTemplate = {
|
|
65
|
+
args: {
|
|
66
|
+
min: 0,
|
|
67
|
+
max: 1,
|
|
68
|
+
dataObjectName: "Wells / NTG",
|
|
69
|
+
colorName: "Rainbow",
|
|
70
|
+
colorTables,
|
|
71
|
+
horizontal: true,
|
|
72
|
+
isRangeShown: true,
|
|
73
|
+
legendFontSize: 13,
|
|
74
|
+
tickFontSize: 13,
|
|
75
|
+
numberOfTicks: 3,
|
|
76
|
+
legendScaleSize: 300,
|
|
77
|
+
cssLegendStyles,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
export const PermeabilityTemplate = {
|
|
81
|
+
args: {
|
|
82
|
+
min: 2782,
|
|
83
|
+
max: 3513,
|
|
84
|
+
dataObjectName: "Wells / PERM",
|
|
85
|
+
colorName: "Permeability",
|
|
86
|
+
colorTables,
|
|
87
|
+
horizontal: true,
|
|
88
|
+
colorMapFunction: (x) => [255 - x * 100, 255 - x * 100, 255 * x],
|
|
89
|
+
isRangeShown: true,
|
|
90
|
+
legendFontSize: 13,
|
|
91
|
+
tickFontSize: 13,
|
|
92
|
+
numberOfTicks: 3,
|
|
93
|
+
legendScaleSize: 300,
|
|
94
|
+
cssLegendStyles,
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
export const PermTotTemplate = {
|
|
98
|
+
args: {
|
|
99
|
+
min: -999,
|
|
100
|
+
max: 14023,
|
|
101
|
+
dataObjectName: "Wells / PERMTOT",
|
|
102
|
+
colorName: "Porosity",
|
|
103
|
+
colorTables,
|
|
104
|
+
horizontal: true,
|
|
105
|
+
isRangeShown: true,
|
|
106
|
+
legendFontSize: 13,
|
|
107
|
+
tickFontSize: 13,
|
|
108
|
+
numberOfTicks: 3,
|
|
109
|
+
legendScaleSize: 300,
|
|
110
|
+
cssLegendStyles,
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
export const PorosityTemplate = {
|
|
114
|
+
args: {
|
|
115
|
+
min: 0,
|
|
116
|
+
max: 0.35,
|
|
117
|
+
dataObjectName: "Wells / PORO",
|
|
118
|
+
colorName: "Porosity",
|
|
119
|
+
colorTables,
|
|
120
|
+
horizontal: true,
|
|
121
|
+
isRangeShown: true,
|
|
122
|
+
legendFontSize: 13,
|
|
123
|
+
tickFontSize: 13,
|
|
124
|
+
numberOfTicks: 3,
|
|
125
|
+
legendScaleSize: 300,
|
|
126
|
+
cssLegendStyles,
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
export const PoroTotTemplate = {
|
|
130
|
+
args: {
|
|
131
|
+
min: 0,
|
|
132
|
+
max: 0.35,
|
|
133
|
+
dataObjectName: "Wells / POROTOT",
|
|
134
|
+
colorName: "Porosity",
|
|
135
|
+
colorTables,
|
|
136
|
+
horizontal: true,
|
|
137
|
+
isRangeShown: true,
|
|
138
|
+
legendFontSize: 13,
|
|
139
|
+
tickFontSize: 13,
|
|
140
|
+
numberOfTicks: 3,
|
|
141
|
+
legendScaleSize: 300,
|
|
142
|
+
cssLegendStyles,
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
export const SWTemplate = {
|
|
146
|
+
args: {
|
|
147
|
+
min: 0,
|
|
148
|
+
max: 1,
|
|
149
|
+
dataObjectName: "Wells / SW",
|
|
150
|
+
colorName: "Rainbow",
|
|
151
|
+
colorTables,
|
|
152
|
+
horizontal: true,
|
|
153
|
+
isRangeShown: true,
|
|
154
|
+
legendFontSize: 13,
|
|
155
|
+
tickFontSize: 13,
|
|
156
|
+
numberOfTicks: 3,
|
|
157
|
+
legendScaleSize: 300,
|
|
158
|
+
cssLegendStyles,
|
|
159
|
+
},
|
|
31
160
|
};
|
|
32
161
|
//# sourceMappingURL=ContinuousLegend.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContinuousLegend.stories.js","sourceRoot":"","sources":["../../../src/component/Legend/ContinuousLegend.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContinuousLegend.stories.js","sourceRoot":"","sources":["../../../src/component/Legend/ContinuousLegend.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAA8B,MAAM,GAAG,CAAC;AAEjE,iBAAiB;AACjB,MAAM,IAAI,GAAkC;IAC1C,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE;YACR,OAAO,oBAAC,KAAK,OAAG,CAAC;QACnB,CAAC;KACF;CACF,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,YAAY,GAA0B;IAC1C,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,YAAY,EAAE,IAAI;IAClB,cAAc,EAAE,EAAE;IAClB,YAAY,E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I,EAAE;QACJ,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,IAAI;QACT,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,UAAU;QACrB,WAAW;QACX,UAAU,EAAE,IAAI;QAChB,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,EAAE;QAClB,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,CAAC;QAChB,eAAe,EAAE,GAAG;QACpB,eAAe;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,cAAc,EAAE,YAAY;QAC5B,SAAS,EAAE,SAAS;QACpB,WAAW;QACX,UAAU,EAAE,IAAI;QAChB,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,EAAE;QAClB,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,CAAC;QAChB,eAAe,EAAE,GAAG;QACpB,eAAe;KAChB;CACF,CAAC"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import * as React from "react";
|
|
11
2
|
import { useRef } from "react";
|
|
12
3
|
import { select } from "d3";
|
|
@@ -44,135 +35,133 @@ export const DiscreteColorLegend = ({ discreteData, dataObjectName, colorName =
|
|
|
44
35
|
select(divRef.current).select("svg").remove();
|
|
45
36
|
discreteLegend();
|
|
46
37
|
}
|
|
47
|
-
function discreteLegend() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
name: key,
|
|
94
|
-
});
|
|
95
|
-
itemName.push(key);
|
|
96
|
-
}
|
|
97
|
-
// for d3 colors
|
|
98
|
-
else {
|
|
99
|
-
const matchedColorsArrays = d3ColorArrays.find((_value, index) => {
|
|
100
|
-
return index === code;
|
|
38
|
+
async function discreteLegend() {
|
|
39
|
+
let dataSet;
|
|
40
|
+
let useSelectorLegend = false;
|
|
41
|
+
let itemName = [];
|
|
42
|
+
const itemColor = [];
|
|
43
|
+
try {
|
|
44
|
+
// fix for dash wrapper
|
|
45
|
+
if (typeof colorTables === "string") {
|
|
46
|
+
const res = await fetch(colorTables);
|
|
47
|
+
dataSet = await res.json();
|
|
48
|
+
}
|
|
49
|
+
const arrayOfColors = typeof colorTables === "string"
|
|
50
|
+
? colorsArray(colorName, dataSet)
|
|
51
|
+
: colorsArray(colorName, colorTables);
|
|
52
|
+
const d3ColorArrays = colorsArray(colorName, d3ColorScales);
|
|
53
|
+
// temporary fix, will be removed later
|
|
54
|
+
const defaultDiscreteData = {
|
|
55
|
+
discrete_1: [[], 0],
|
|
56
|
+
discrete_2: [[], 1],
|
|
57
|
+
discrete_3: [[], 2],
|
|
58
|
+
discrete_4: [[], 3],
|
|
59
|
+
discrete_5: [[], 4],
|
|
60
|
+
discrete_6: [[], 5],
|
|
61
|
+
discrete_7: [[], 6],
|
|
62
|
+
discrete_8: [[], 7],
|
|
63
|
+
discrete_9: [[], 8],
|
|
64
|
+
discrete_10: [[], 9],
|
|
65
|
+
};
|
|
66
|
+
// Main single discrete legend
|
|
67
|
+
if (!getColorScaleData || getColorScaleData.length === 0) {
|
|
68
|
+
const entries = Object.entries(discreteData ? discreteData : defaultDiscreteData);
|
|
69
|
+
const sorted = entries.sort((a, b) => a[1][1] - b[1][1]);
|
|
70
|
+
sorted.forEach((value) => {
|
|
71
|
+
const key = value[0];
|
|
72
|
+
const val = value[1];
|
|
73
|
+
const code = val[1];
|
|
74
|
+
// for colortable colors
|
|
75
|
+
if (arrayOfColors.length > 0) {
|
|
76
|
+
//compare the first value in colorarray(colortable) and code from discreteData
|
|
77
|
+
const matchedColorsArrays = arrayOfColors.find((value) => {
|
|
78
|
+
return value[0] === code;
|
|
79
|
+
});
|
|
80
|
+
if (matchedColorsArrays)
|
|
81
|
+
itemColor.push({
|
|
82
|
+
color: RGBToHex(matchedColorsArrays).color,
|
|
83
|
+
name: key,
|
|
101
84
|
});
|
|
102
|
-
|
|
103
|
-
itemColor.push({ color: matchedColorsArrays });
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
// Discrete legend using Colortable colors (color selector component)
|
|
108
|
-
if (getColorScaleData === null || getColorScaleData === void 0 ? void 0 : getColorScaleData.color) {
|
|
109
|
-
getColorScaleData.color.forEach((key) => {
|
|
110
|
-
itemColor.push({ color: RGBToHex(key).color });
|
|
111
|
-
});
|
|
112
|
-
useSelectorLegend = true;
|
|
113
|
-
}
|
|
114
|
-
// Discrete legend using d3 colors
|
|
115
|
-
if (getColorScaleData === null || getColorScaleData === void 0 ? void 0 : getColorScaleData.colorsObject) {
|
|
116
|
-
getColorScaleData.colorsObject.forEach((key) => {
|
|
117
|
-
itemColor.push({ color: key });
|
|
118
|
-
});
|
|
119
|
-
itemName = getColorScaleData.legendColorName;
|
|
120
|
-
useSelectorLegend = true;
|
|
121
|
-
}
|
|
122
|
-
const colorLegend = discreteLegendUtil(itemColor, useSelectorLegend, horizontal);
|
|
123
|
-
let totalRect;
|
|
124
|
-
// Style for main horizontal legend
|
|
125
|
-
if (!useSelectorLegend) {
|
|
126
|
-
totalRect = itemColor.length;
|
|
127
|
-
}
|
|
128
|
-
// Style for color selector legend
|
|
129
|
-
else {
|
|
130
|
-
// calculate width for legend using colortable colors
|
|
131
|
-
if (getColorScaleData === null || getColorScaleData === void 0 ? void 0 : getColorScaleData.color) {
|
|
132
|
-
totalRect = getColorScaleData.color.length;
|
|
85
|
+
itemName.push(key);
|
|
133
86
|
}
|
|
134
|
-
//
|
|
87
|
+
// for d3 colors
|
|
135
88
|
else {
|
|
136
|
-
|
|
89
|
+
const matchedColorsArrays = d3ColorArrays.find((_value, index) => {
|
|
90
|
+
return index === code;
|
|
91
|
+
});
|
|
92
|
+
if (matchedColorsArrays)
|
|
93
|
+
itemColor.push({ color: matchedColorsArrays });
|
|
137
94
|
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
// Append svg to the div
|
|
155
|
-
const svgLegend = currentDiv
|
|
156
|
-
.style("margin", horizontal ? "5px 0px 0px 15px" : "0px 5px 0px 5px")
|
|
157
|
-
.style("width", legendWidth)
|
|
158
|
-
.append("svg")
|
|
159
|
-
.call(colorLegend);
|
|
160
|
-
svgLegend
|
|
161
|
-
.attr("viewBox", horizontal ? `0 0 ${totalRect} 1.5` : `0 0 2 ${totalRect}`)
|
|
162
|
-
.attr("preserveAspectRatio", "none")
|
|
163
|
-
.style("font-size", ".4")
|
|
164
|
-
.style("margin-left", horizontal ? "0" : "20px")
|
|
165
|
-
.attr("height", legendHeight)
|
|
166
|
-
.attr("width", horizontal
|
|
167
|
-
? legendScaleSize < 200
|
|
168
|
-
? 190
|
|
169
|
-
: legendScaleSize - 10
|
|
170
|
-
: "40px");
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
// Discrete legend using Colortable colors (color selector component)
|
|
98
|
+
if (getColorScaleData?.color) {
|
|
99
|
+
getColorScaleData.color.forEach((key) => {
|
|
100
|
+
itemColor.push({ color: RGBToHex(key).color });
|
|
101
|
+
});
|
|
102
|
+
useSelectorLegend = true;
|
|
103
|
+
}
|
|
104
|
+
// Discrete legend using d3 colors
|
|
105
|
+
if (getColorScaleData?.colorsObject) {
|
|
106
|
+
getColorScaleData.colorsObject.forEach((key) => {
|
|
107
|
+
itemColor.push({ color: key });
|
|
108
|
+
});
|
|
109
|
+
itemName = getColorScaleData.legendColorName;
|
|
110
|
+
useSelectorLegend = true;
|
|
171
111
|
}
|
|
172
|
-
|
|
173
|
-
|
|
112
|
+
const colorLegend = discreteLegendUtil(itemColor, useSelectorLegend, horizontal);
|
|
113
|
+
let totalRect;
|
|
114
|
+
// Style for main horizontal legend
|
|
115
|
+
if (!useSelectorLegend) {
|
|
116
|
+
totalRect = itemColor.length;
|
|
117
|
+
}
|
|
118
|
+
// Style for color selector legend
|
|
119
|
+
else {
|
|
120
|
+
// calculate width for legend using colortable colors
|
|
121
|
+
if (getColorScaleData?.color) {
|
|
122
|
+
totalRect = getColorScaleData.color.length;
|
|
123
|
+
}
|
|
124
|
+
// calculate width for legend using d3 colors
|
|
125
|
+
else {
|
|
126
|
+
totalRect = getColorScaleData.colorsObject.length;
|
|
127
|
+
}
|
|
174
128
|
}
|
|
175
|
-
|
|
129
|
+
const currentDiv = select(divRef.current);
|
|
130
|
+
// append the title
|
|
131
|
+
currentDiv
|
|
132
|
+
.append("div")
|
|
133
|
+
.text(dataObjectName)
|
|
134
|
+
.style("color", "grey")
|
|
135
|
+
.style("white-space", "nowrap")
|
|
136
|
+
.style("overflow", "hidden")
|
|
137
|
+
.style("width", "150px")
|
|
138
|
+
.style("text-overflow", "ellipsis")
|
|
139
|
+
.style("margin-bottom", horizontal ? "5px" : "0px")
|
|
140
|
+
.style("font-size", legendFontSize && legendFontSize > 0
|
|
141
|
+
? `${legendFontSize}px`
|
|
142
|
+
: "16px")
|
|
143
|
+
.style("transform", horizontal ? "none" : "translate(-69px, 80px) rotate(270deg)");
|
|
144
|
+
// Append svg to the div
|
|
145
|
+
const svgLegend = currentDiv
|
|
146
|
+
.style("margin", horizontal ? "5px 0px 0px 15px" : "0px 5px 0px 5px")
|
|
147
|
+
.style("width", legendWidth)
|
|
148
|
+
.append("svg")
|
|
149
|
+
.call(colorLegend);
|
|
150
|
+
svgLegend
|
|
151
|
+
.attr("viewBox", horizontal ? `0 0 ${totalRect} 1.5` : `0 0 2 ${totalRect}`)
|
|
152
|
+
.attr("preserveAspectRatio", "none")
|
|
153
|
+
.style("font-size", ".4")
|
|
154
|
+
.style("margin-left", horizontal ? "0" : "20px")
|
|
155
|
+
.attr("height", legendHeight)
|
|
156
|
+
.attr("width", horizontal
|
|
157
|
+
? legendScaleSize < 200
|
|
158
|
+
? 190
|
|
159
|
+
: legendScaleSize - 10
|
|
160
|
+
: "40px");
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
console.error(error);
|
|
164
|
+
}
|
|
176
165
|
}
|
|
177
166
|
}, [
|
|
178
167
|
discreteData,
|
|
@@ -188,7 +177,14 @@ export const DiscreteColorLegend = ({ discreteData, dataObjectName, colorName =
|
|
|
188
177
|
legendWidth,
|
|
189
178
|
legendHeight,
|
|
190
179
|
]);
|
|
191
|
-
return (React.createElement("div", { style:
|
|
180
|
+
return (React.createElement("div", { style: {
|
|
181
|
+
position: "absolute",
|
|
182
|
+
minHeight: "70px",
|
|
183
|
+
borderRadius: "5px",
|
|
184
|
+
zIndex: 999,
|
|
185
|
+
margin: "10px",
|
|
186
|
+
...cssLegendStyles,
|
|
187
|
+
} },
|
|
192
188
|
React.createElement("div", { id: id ? id : `disc-legend - ${generateUniqueId}`, ref: divRef })));
|
|
193
189
|
};
|
|
194
190
|
//# sourceMappingURL=DiscreteLegend.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscreteLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/DiscreteLegend.tsx"],"names":[],"mappings":"
|
|
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,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAE5B,OAAO,kBAAkC,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA4D5C,MAAM,CAAC,MAAM,mBAAmB,GAAuC,CAAC,EACtE,YAAY,EACZ,cAAc,EACd,SAAS,GAAG,cAAc,EAC1B,UAAU,EACV,iBAAiB,EACjB,EAAE,EACF,WAAW,GAAG,kBAAqC,EACnD,cAAc,EACd,YAAY,EACZ,aAAa,EACb,eAAe,GAAG,GAAG,EACrB,eAAe,GAAG,aAAa,GACN,EAAE,EAAE;IAC7B,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,QA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AAE;QACD,YAAY;QACZ,SAAS;QACT,WAAW;QACX,UAAU;QACV,iBAAiB;QACjB,cAAc;QACd,cAAc;QACd,YAAY;QACZ,aAAa;QACb,eAAe;QACf,WAAW;QACX,YAAY;KACb,CAAC,CAAC;IAEH,OAAO,CACL,6BACE,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,SAAS,EAAE,MAAM;YACjB,YAAY,EAAE,KAAK;YACnB,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,MAAM;YACd,GAAG,eAAe;SACnB;QAED,6BACE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,gBAAgB,EAAE,EACjD,GAAG,EAAE,MAAM,GACN,CACH,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { DiscreteColorLegend } from ".";
|
|
3
|
+
declare const meta: Meta<typeof DiscreteColorLegend>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DiscreteColorLegend>;
|
|
6
|
+
export declare const Facies: Story;
|
|
7
|
+
export declare const BackgroundColor: Story;
|
|
8
|
+
export declare const FaciesNoCalciteTemplate: Story;
|
|
9
|
+
export declare const FaultDistanceHumTemplate: Story;
|
|
10
|
+
export declare const FaultProximityFlagTemplate: Story;
|
|
11
|
+
export declare const RDETemplate: Story;
|
|
12
|
+
export declare const RDEOrigTemplate: Story;
|
|
13
|
+
export declare const ZonelogTemplate: Story;
|
|
14
|
+
export declare const ZoneMainTemplate: Story;
|