@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.
Files changed (84) hide show
  1. package/dist/component/BreakPoint/Canvas.js +3 -15
  2. package/dist/component/BreakPoint/Canvas.js.map +1 -1
  3. package/dist/component/BreakPoint/ColorScale.js +1 -1
  4. package/dist/component/BreakPoint/ColorScale.js.map +1 -1
  5. package/dist/component/BreakPoint/index.d.ts +1 -1
  6. package/dist/component/BreakPoint/index.js.map +1 -1
  7. package/dist/component/ColorSelector/BreakPointModule.js +13 -6
  8. package/dist/component/ColorSelector/BreakPointModule.js.map +1 -1
  9. package/dist/component/ColorSelector/ColorSelectorAccordion.js +10 -11
  10. package/dist/component/ColorSelector/ColorSelectorAccordion.js.map +1 -1
  11. package/dist/component/ColorSelector/ColorSelectorComponent.js +4 -5
  12. package/dist/component/ColorSelector/ColorSelectorComponent.js.map +1 -1
  13. package/dist/component/ColorSelector/ColorSelectorWrapper.js +13 -13
  14. package/dist/component/ColorSelector/ColorSelectorWrapper.js.map +1 -1
  15. package/dist/component/ColorSelector/index.d.ts +1 -1
  16. package/dist/component/Legend/ColorLegend.js +7 -9
  17. package/dist/component/Legend/ColorLegend.js.map +1 -1
  18. package/dist/component/Legend/ColorLegend.stories.d.ts +13 -14
  19. package/dist/component/Legend/ColorLegend.stories.js +85 -32
  20. package/dist/component/Legend/ColorLegend.stories.js.map +1 -1
  21. package/dist/component/Legend/ContinuousLegend.js +221 -229
  22. package/dist/component/Legend/ContinuousLegend.js.map +1 -1
  23. package/dist/component/Legend/ContinuousLegend.stories.d.ts +15 -10
  24. package/dist/component/Legend/ContinuousLegend.stories.js +147 -18
  25. package/dist/component/Legend/ContinuousLegend.stories.js.map +1 -1
  26. package/dist/component/Legend/DiscreteLegend.js +129 -133
  27. package/dist/component/Legend/DiscreteLegend.js.map +1 -1
  28. package/dist/component/Legend/DiscreteLegend.stories.d.ts +14 -9
  29. package/dist/component/Legend/DiscreteLegend.stories.js +178 -16
  30. package/dist/component/Legend/DiscreteLegend.stories.js.map +1 -1
  31. package/dist/component/Utils/Utils.stories.d.ts +7 -0
  32. package/dist/component/Utils/Utils.stories.js +41 -0
  33. package/dist/component/Utils/Utils.stories.js.map +1 -0
  34. package/dist/component/Utils/legendCommonFunction.js +40 -48
  35. package/dist/component/Utils/legendCommonFunction.js.map +1 -1
  36. package/package.json +11 -17
  37. package/dist/component/Utils/legendCommonFunction.stories.d.ts +0 -8
  38. package/dist/component/Utils/legendCommonFunction.stories.js +0 -35
  39. package/dist/component/Utils/legendCommonFunction.stories.js.map +0 -1
  40. package/dist/stories/ColorLegends/ContinousLegends/MD.stories.d.ts +0 -7
  41. package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js +0 -34
  42. package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js.map +0 -1
  43. package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.d.ts +0 -7
  44. package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js +0 -34
  45. package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js.map +0 -1
  46. package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.d.ts +0 -7
  47. package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js +0 -34
  48. package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js.map +0 -1
  49. package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.d.ts +0 -7
  50. package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js +0 -36
  51. package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js.map +0 -1
  52. package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.d.ts +0 -7
  53. package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js +0 -34
  54. package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js.map +0 -1
  55. package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.d.ts +0 -7
  56. package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js +0 -34
  57. package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js.map +0 -1
  58. package/dist/stories/ColorLegends/ContinousLegends/SW.stories.d.ts +0 -7
  59. package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js +0 -34
  60. package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js.map +0 -1
  61. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.d.ts +0 -7
  62. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js +0 -39
  63. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js.map +0 -1
  64. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.d.ts +0 -7
  65. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js +0 -31
  66. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js.map +0 -1
  67. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.d.ts +0 -7
  68. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js +0 -31
  69. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js.map +0 -1
  70. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.d.ts +0 -7
  71. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js +0 -34
  72. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js.map +0 -1
  73. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.d.ts +0 -7
  74. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js +0 -45
  75. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js.map +0 -1
  76. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.d.ts +0 -7
  77. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js +0 -34
  78. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js.map +0 -1
  79. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.d.ts +0 -7
  80. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js +0 -44
  81. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js.map +0 -1
  82. package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.d.ts +0 -7
  83. package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.js +0 -33
  84. package/dist/stories/ColorLegends/LegendWithSelector/LegendSelector.stories.js.map +0 -1
@@ -1,20 +1,10 @@
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
- import { select, scaleLinear, scaleSymlog, axisBottom, axisRight } from "d3";
3
+ import { range, select, scaleLinear, scaleSymlog, axisBottom, axisRight, } from "d3";
13
4
  import { color } from "d3-color";
14
- import { range } from "d3";
15
5
  import { d3ColorScales } from "../Utils/d3ColorScale";
16
6
  import { RGBToHex, colorsArray, getTickValues, } from "../Utils/legendCommonFunction";
17
- import defaultColorTables from "../color-tables.json";
7
+ import { colorTables as defaultColorTables } from "..";
18
8
  import { DEFAULT_STYLE } from "./constants";
19
9
  export const ContinuousLegend = ({ min, max, dataObjectName, colorName = "Rainbow", horizontal, getColorScaleData, id, colorTables = defaultColorTables, colorMapFunction, reverseRange = false, breakPoint, editedBreakPointValues, isLog, isNearest, isRangeShown = true, legendFontSize = 18, tickFontSize = 12, numberOfTicks = 3, legendScaleSize = 200, cssLegendStyles = DEFAULT_STYLE, }) => {
20
10
  const generateUniqueId = Math.ceil(Math.random() * 9999).toString();
@@ -25,235 +15,231 @@ export const ContinuousLegend = ({ min, max, dataObjectName, colorName = "Rainbo
25
15
  select(divRef.current).select("svg").remove();
26
16
  continuousLegend();
27
17
  }
28
- function continuousLegend() {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- var _a, _b;
31
- let itemColor = [];
32
- let parsedColorTables;
33
- try {
34
- // fix for dash wrapper
35
- if (typeof colorTables === "string") {
36
- const res = yield fetch(colorTables);
37
- parsedColorTables = yield res.json();
18
+ async function continuousLegend() {
19
+ let itemColor = [];
20
+ let parsedColorTables;
21
+ try {
22
+ // fix for dash wrapper
23
+ if (typeof colorTables === "string") {
24
+ const res = await fetch(colorTables);
25
+ parsedColorTables = await res.json();
26
+ }
27
+ //Return the matched colors array from color.tables.json file
28
+ let legendColors = typeof colorTables === "string"
29
+ ? colorsArray(colorName, parsedColorTables)
30
+ : colorsArray(colorName, colorTables);
31
+ const nearestData = [];
32
+ // Update color of legend based on color selector scales
33
+ // data is passed on click upon color scales
34
+ if (getColorScaleData && Object.keys(getColorScaleData).length > 0) {
35
+ // legend using color table data
36
+ if (getColorScaleData.color) {
37
+ legendColors = getColorScaleData.color;
38
38
  }
39
- //Return the matched colors array from color.tables.json file
40
- let legendColors = typeof colorTables === "string"
41
- ? colorsArray(colorName, parsedColorTables)
42
- : colorsArray(colorName, colorTables);
43
- const nearestData = [];
44
- // Update color of legend based on color selector scales
45
- // data is passed on click upon color scales
46
- if (getColorScaleData && Object.keys(getColorScaleData).length > 0) {
47
- // legend using color table data
48
- if (getColorScaleData.color) {
49
- legendColors = getColorScaleData.color;
50
- }
51
- // legend using d3 data
52
- else if (getColorScaleData.arrayData) {
53
- legendColors = getColorScaleData.arrayData;
54
- }
39
+ // legend using d3 data
40
+ else if (getColorScaleData.arrayData) {
41
+ legendColors = getColorScaleData.arrayData;
55
42
  }
56
- const isD3Colors = d3ColorScales.find((value) => {
57
- return (value === null || value === void 0 ? void 0 : value.name) === colorName;
58
- });
59
- // main continuous legend for d3 colors
60
- if (isD3Colors && isD3Colors.discrete === false) {
61
- const arrayData = [];
62
- const d3ColorArrays = colorsArray(colorName, d3ColorScales);
63
- const data = range(10).map((d) => ({ color: d3ColorArrays(d / 10) }));
64
- data.forEach((colorsObject, index) => {
65
- var _a, _b, _c;
66
- arrayData.push([
67
- 0 + "." + index,
68
- (_a = color(colorsObject.color)) === null || _a === void 0 ? void 0 : _a.rgb().r,
69
- (_b = color(colorsObject.color)) === null || _b === void 0 ? void 0 : _b.rgb().g,
70
- (_c = color(colorsObject.color)) === null || _c === void 0 ? void 0 : _c.rgb().b,
71
- ]);
72
- });
73
- legendColors = arrayData;
74
- }
75
- // condition to check if the legend is selected from color selector or not
76
- const getColorTableScale = (_a = (typeof colorTables === "string" ? parsedColorTables : colorTables)) === null || _a === void 0 ? void 0 : _a.find((value) => {
77
- if (getColorScaleData) {
78
- return value.name === (getColorScaleData === null || getColorScaleData === void 0 ? void 0 : getColorScaleData.name);
79
- }
80
- else {
81
- return value.name === colorName;
82
- }
43
+ }
44
+ const isD3Colors = d3ColorScales.find((value) => {
45
+ return value?.name === colorName;
46
+ });
47
+ // main continuous legend for d3 colors
48
+ if (isD3Colors && isD3Colors.discrete === false) {
49
+ const arrayData = [];
50
+ const d3ColorArrays = colorsArray(colorName, d3ColorScales);
51
+ const data = range(10).map((d) => ({ color: d3ColorArrays(d / 10) }));
52
+ data.forEach((colorsObject, index) => {
53
+ arrayData.push([
54
+ 0 + "." + index,
55
+ color(colorsObject.color)?.rgb().r,
56
+ color(colorsObject.color)?.rgb().g,
57
+ color(colorsObject.color)?.rgb().b,
58
+ ]);
83
59
  });
84
- const maxValue = legendColors.length - 1;
85
- // condition for nearest interpolation
86
- if (isNearest) {
87
- const nColors = legendColors.length;
88
- const delta = 1 / nColors;
89
- let leftEnd = 0;
90
- let rightEnd = 0 + delta;
91
- legendColors.forEach((val) => {
92
- nearestData.push({
93
- breakPoint: Number(leftEnd.toFixed(2)),
94
- color: RGBToHex([val[0], val[1], val[2], val[3]]).color,
95
- }, {
96
- breakPoint: Number(rightEnd.toFixed(2)),
97
- color: RGBToHex([val[0], val[1], val[2], val[3]]).color,
98
- });
99
- leftEnd += delta;
100
- rightEnd += delta;
101
- });
60
+ legendColors = arrayData;
61
+ }
62
+ // condition to check if the legend is selected from color selector or not
63
+ const getColorTableScale = (typeof colorTables === "string" ? parsedColorTables : colorTables)?.find((value) => {
64
+ if (getColorScaleData) {
65
+ return value.name === getColorScaleData?.name;
102
66
  }
103
- // if colorMapFunction prop is passed
104
- if (colorMapFunction) {
105
- const rgbValue = [];
106
- for (var i = 0; i <= 1; i += 0.05) {
107
- const value = colorMapFunction(i);
108
- rgbValue.push([i.toFixed(2), value[0], value[1], value[2]]);
109
- }
110
- legendColors = rgbValue;
67
+ else {
68
+ return value.name === colorName;
111
69
  }
112
- const arrOfNum = breakPoint === null || breakPoint === void 0 ? void 0 : breakPoint.map((str) => {
113
- return Number(str);
114
- });
115
- const userDefinedDomain = arrOfNum ? arrOfNum : [];
116
- legendColors.forEach((value, index) => {
117
- let domainIndex;
118
- if (userDefinedDomain[index]) {
119
- domainIndex = userDefinedDomain[index];
120
- }
121
- else {
122
- domainIndex = value[0];
123
- }
124
- // return the color and breakPoint needed to draw the legend
125
- itemColor.push({
126
- // to support discrete color for continous data
127
- breakPoint: (getColorTableScale === null || getColorTableScale === void 0 ? void 0 : getColorTableScale.discrete) === true
128
- ? RGBToHex(value, maxValue).offset
129
- : (breakPoint === null || breakPoint === void 0 ? void 0 : breakPoint.length) > 0
130
- ? domainIndex * 100.0
131
- : value[0] * 100.0,
132
- color: RGBToHex(value).color,
70
+ });
71
+ const maxValue = legendColors.length - 1;
72
+ // condition for nearest interpolation
73
+ if (isNearest) {
74
+ const nColors = legendColors.length;
75
+ const delta = 1 / nColors;
76
+ let leftEnd = 0;
77
+ let rightEnd = 0 + delta;
78
+ legendColors.forEach((val) => {
79
+ nearestData.push({
80
+ breakPoint: Number(leftEnd.toFixed(2)),
81
+ color: RGBToHex([val[0], val[1], val[2], val[3]]).color,
82
+ }, {
83
+ breakPoint: Number(rightEnd.toFixed(2)),
84
+ color: RGBToHex([val[0], val[1], val[2], val[3]]).color,
133
85
  });
86
+ leftEnd += delta;
87
+ rightEnd += delta;
134
88
  });
135
- if (legendColors.length === 0) {
136
- return [0, 0, 0];
137
- }
138
- // get the position and color from the breakpoint modal
139
- // updates main legend onclicking the custom scales
140
- if (((_b = editedBreakPointValues === null || editedBreakPointValues === void 0 ? void 0 : editedBreakPointValues.colorArray) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
141
- (editedBreakPointValues === null || editedBreakPointValues === void 0 ? void 0 : editedBreakPointValues.customizeFlag) === true) {
142
- const options = editedBreakPointValues.colorArray.map(function (row) {
143
- return { breakPoint: row.position * 100.0, color: row.color };
144
- });
145
- itemColor = options;
89
+ }
90
+ // if colorMapFunction prop is passed
91
+ if (colorMapFunction) {
92
+ const rgbValue = [];
93
+ for (var i = 0; i <= 1; i += 0.05) {
94
+ const value = colorMapFunction(i);
95
+ rgbValue.push([i.toFixed(2), value[0], value[1], value[2]]);
146
96
  }
147
- itemColor.sort((a, b) => {
148
- return a.breakPoint - b.breakPoint;
149
- });
150
- //const colorScale = scaleSymlog().domain([min, max]).range([0, 150]);
151
- // append a defs (for definition) element to your SVG
152
- const svgLegend = select(divRef.current)
153
- .style("margin-right", "2px")
154
- .style("margin-left", "2px")
155
- .append("svg")
156
- .style("cursor", getColorScaleData ? "pointer" : "auto")
157
- .style("border-radius", "5px");
158
- const defs = svgLegend.append("defs");
159
- svgLegend
160
- .attr("width", horizontal ? (legendScaleSize < 200 ? 200 : legendScaleSize) : "100")
161
- .attr("height", horizontal
162
- ? "70"
163
- : legendScaleSize < 200
164
- ? 200
165
- : legendScaleSize - 17);
166
- const currentIndex = "linear-gradient-" + id + "0";
167
- const linearGradient = defs
168
- .append("linearGradient")
169
- .attr("id", currentIndex);
170
- // append a linearGradient element to the defs and give it a unique id
171
- if ((horizontal && !reverseRange) || (!horizontal && reverseRange)) {
172
- linearGradient
173
- .attr("x1", "0%")
174
- .attr("x2", horizontal ? "100%" : "0%")
175
- .attr("y1", "0%")
176
- .attr("y2", horizontal ? "0%" : "100%");
97
+ legendColors = rgbValue;
98
+ }
99
+ const arrOfNum = breakPoint?.map((str) => {
100
+ return Number(str);
101
+ });
102
+ const userDefinedDomain = arrOfNum ? arrOfNum : [];
103
+ legendColors.forEach((value, index) => {
104
+ let domainIndex;
105
+ if (userDefinedDomain[index]) {
106
+ domainIndex = userDefinedDomain[index];
177
107
  }
178
- else if ((!horizontal && !reverseRange) ||
179
- (horizontal && reverseRange)) {
180
- linearGradient
181
- .attr("x1", horizontal ? "100%" : "0%")
182
- .attr("x2", "0%")
183
- .attr("y1", horizontal ? "0%" : "100%")
184
- .attr("y2", "0%");
108
+ else {
109
+ domainIndex = value[0];
185
110
  }
186
- const colorScale = scaleLinear().domain([0, 1]).range([0, 400]);
187
- // append multiple color stops by using D3's data/enter step
188
- linearGradient
189
- .selectAll("stop")
190
- .data(nearestData.length > 0 ? nearestData : itemColor)
191
- .enter()
192
- .append("stop")
193
- .attr("offset", function (data) {
194
- return nearestData.length > 0
195
- ? colorScale(data.breakPoint) / 4 + "%"
196
- : data.breakPoint + "%";
197
- })
198
- .attr("stop-color", function (data) {
199
- return data.color;
111
+ // return the color and breakPoint needed to draw the legend
112
+ itemColor.push({
113
+ // to support discrete color for continous data
114
+ breakPoint: getColorTableScale?.discrete === true
115
+ ? RGBToHex(value, maxValue).offset
116
+ : breakPoint?.length > 0
117
+ ? domainIndex * 100.0
118
+ : value[0] * 100.0,
119
+ color: RGBToHex(value).color,
200
120
  });
201
- // draw the rectangle and fill with gradient
202
- svgLegend
203
- .append("rect")
204
- .attr("x", 25)
205
- .attr("y", horizontal ? 30 : 18)
206
- .attr("width", horizontal
207
- ? legendScaleSize < 200
208
- ? 159
209
- : legendScaleSize - 40
210
- : 20)
211
- .attr("height", horizontal ? 20 : legendScaleSize < 200 ? 159 : legendScaleSize - 40)
212
- .style("fill", "url(#" + currentIndex + ")");
213
- // append title
214
- svgLegend
215
- .append("text")
216
- .attr("x", horizontal ? 25 : -168)
217
- .attr("y", horizontal ? 20 : 15)
218
- .style("text-anchor", "left")
219
- .style("transform", horizontal ? "none" : "left")
220
- .style("transform", horizontal ? "none" : "rotate(270deg)")
221
- .style("fill", "grey")
222
- .style("font-size", legendFontSize && legendFontSize > 0
223
- ? `${legendFontSize}px`
224
- : "16px")
225
- .text(dataObjectName);
226
- // create tick marks
227
- // range varies the size of the axis
228
- const xLeg = (isLog ? scaleSymlog() : scaleLinear())
229
- .domain(reverseRange ? [max, min] : [min, max])
230
- /*@ts-ignore*/
231
- .range([10, legendScaleSize < 200 ? 168 : legendScaleSize - 32]);
232
- const yLeg = (isLog ? scaleSymlog() : scaleLinear())
233
- .domain(reverseRange ? [min, max] : [max, min])
234
- /*@ts-ignore*/
235
- .range([10, legendScaleSize < 200 ? 168 : legendScaleSize - 32]);
236
- const horizontalAxisLeg = axisBottom(xLeg).tickValues(xLeg
237
- .ticks(0)
238
- .concat(xLeg.domain(), getTickValues(xLeg.domain(), numberOfTicks)));
239
- const VerticalAxisLeg = axisRight(yLeg).tickValues(yLeg
240
- .ticks(0)
241
- .concat(yLeg.domain(), getTickValues(xLeg.domain(), numberOfTicks)));
242
- if (isRangeShown) {
243
- svgLegend
244
- .attr("class", "axis")
245
- .append("g")
246
- .attr("transform", horizontal ? "translate(16, 50)" : "translate(45, 7.5)")
247
- .style("font-size", tickFontSize && tickFontSize > 0 ? `${tickFontSize}px` : "12px")
248
- .style("font-weight", "700")
249
- .call(horizontal ? horizontalAxisLeg : VerticalAxisLeg)
250
- .style("height", 15);
251
- }
121
+ });
122
+ if (legendColors.length === 0) {
123
+ return [0, 0, 0];
252
124
  }
253
- catch (error) {
254
- console.error(error);
125
+ // get the position and color from the breakpoint modal
126
+ // updates main legend onclicking the custom scales
127
+ if (editedBreakPointValues?.colorArray?.length > 0 &&
128
+ editedBreakPointValues?.customizeFlag === true) {
129
+ const options = editedBreakPointValues.colorArray.map(function (row) {
130
+ return { breakPoint: row.position * 100.0, color: row.color };
131
+ });
132
+ itemColor = options;
133
+ }
134
+ itemColor.sort((a, b) => {
135
+ return a.breakPoint - b.breakPoint;
136
+ });
137
+ //const colorScale = scaleSymlog().domain([min, max]).range([0, 150]);
138
+ // append a defs (for definition) element to your SVG
139
+ const svgLegend = select(divRef.current)
140
+ .style("margin-right", "2px")
141
+ .style("margin-left", "2px")
142
+ .append("svg")
143
+ .style("cursor", getColorScaleData ? "pointer" : "auto")
144
+ .style("border-radius", "5px");
145
+ const defs = svgLegend.append("defs");
146
+ svgLegend
147
+ .attr("width", horizontal ? (legendScaleSize < 200 ? 200 : legendScaleSize) : "100")
148
+ .attr("height", horizontal
149
+ ? "70"
150
+ : legendScaleSize < 200
151
+ ? 200
152
+ : legendScaleSize - 17);
153
+ const currentIndex = "linear-gradient-" + id + "0";
154
+ const linearGradient = defs
155
+ .append("linearGradient")
156
+ .attr("id", currentIndex);
157
+ // append a linearGradient element to the defs and give it a unique id
158
+ if ((horizontal && !reverseRange) || (!horizontal && reverseRange)) {
159
+ linearGradient
160
+ .attr("x1", "0%")
161
+ .attr("x2", horizontal ? "100%" : "0%")
162
+ .attr("y1", "0%")
163
+ .attr("y2", horizontal ? "0%" : "100%");
164
+ }
165
+ else if ((!horizontal && !reverseRange) ||
166
+ (horizontal && reverseRange)) {
167
+ linearGradient
168
+ .attr("x1", horizontal ? "100%" : "0%")
169
+ .attr("x2", "0%")
170
+ .attr("y1", horizontal ? "0%" : "100%")
171
+ .attr("y2", "0%");
172
+ }
173
+ const colorScale = scaleLinear().domain([0, 1]).range([0, 400]);
174
+ // append multiple color stops by using D3's data/enter step
175
+ linearGradient
176
+ .selectAll("stop")
177
+ .data(nearestData.length > 0 ? nearestData : itemColor)
178
+ .enter()
179
+ .append("stop")
180
+ .attr("offset", function (data) {
181
+ return nearestData.length > 0
182
+ ? colorScale(data.breakPoint) / 4 + "%"
183
+ : data.breakPoint + "%";
184
+ })
185
+ .attr("stop-color", function (data) {
186
+ return data.color;
187
+ });
188
+ // draw the rectangle and fill with gradient
189
+ svgLegend
190
+ .append("rect")
191
+ .attr("x", 25)
192
+ .attr("y", horizontal ? 30 : 18)
193
+ .attr("width", horizontal
194
+ ? legendScaleSize < 200
195
+ ? 159
196
+ : legendScaleSize - 40
197
+ : 20)
198
+ .attr("height", horizontal ? 20 : legendScaleSize < 200 ? 159 : legendScaleSize - 40)
199
+ .style("fill", "url(#" + currentIndex + ")");
200
+ // append title
201
+ svgLegend
202
+ .append("text")
203
+ .attr("x", horizontal ? 25 : -168)
204
+ .attr("y", horizontal ? 20 : 15)
205
+ .style("text-anchor", "left")
206
+ .style("transform", horizontal ? "none" : "left")
207
+ .style("transform", horizontal ? "none" : "rotate(270deg)")
208
+ .style("fill", "grey")
209
+ .style("font-size", legendFontSize && legendFontSize > 0
210
+ ? `${legendFontSize}px`
211
+ : "16px")
212
+ .text(dataObjectName);
213
+ // create tick marks
214
+ // range varies the size of the axis
215
+ const xLeg = (isLog ? scaleSymlog() : scaleLinear())
216
+ .domain(reverseRange ? [max, min] : [min, max])
217
+ /*@ts-ignore*/
218
+ .range([10, legendScaleSize < 200 ? 168 : legendScaleSize - 32]);
219
+ const yLeg = (isLog ? scaleSymlog() : scaleLinear())
220
+ .domain(reverseRange ? [min, max] : [max, min])
221
+ /*@ts-ignore*/
222
+ .range([10, legendScaleSize < 200 ? 168 : legendScaleSize - 32]);
223
+ const horizontalAxisLeg = axisBottom(xLeg).tickValues(xLeg
224
+ .ticks(0)
225
+ .concat(xLeg.domain(), getTickValues(xLeg.domain(), numberOfTicks)));
226
+ const VerticalAxisLeg = axisRight(yLeg).tickValues(yLeg
227
+ .ticks(0)
228
+ .concat(yLeg.domain(), getTickValues(xLeg.domain(), numberOfTicks)));
229
+ if (isRangeShown) {
230
+ svgLegend
231
+ .attr("class", "axis")
232
+ .append("g")
233
+ .attr("transform", horizontal ? "translate(16, 50)" : "translate(45, 7.5)")
234
+ .style("font-size", tickFontSize && tickFontSize > 0 ? `${tickFontSize}px` : "12px")
235
+ .style("font-weight", "700")
236
+ .call(horizontal ? horizontalAxisLeg : VerticalAxisLeg)
237
+ .style("height", 15);
255
238
  }
256
- });
239
+ }
240
+ catch (error) {
241
+ console.error(error);
242
+ }
257
243
  }
258
244
  // eslint-disable-next-line react-hooks/exhaustive-deps
259
245
  }, [
@@ -275,7 +261,13 @@ export const ContinuousLegend = ({ min, max, dataObjectName, colorName = "Rainbo
275
261
  numberOfTicks,
276
262
  legendScaleSize,
277
263
  ]);
278
- return (React.createElement("div", { style: Object.assign({ position: "absolute", minHeight: "70px", zIndex: 999, margin: "10px" }, cssLegendStyles) },
264
+ return (React.createElement("div", { style: {
265
+ position: "absolute",
266
+ minHeight: "70px",
267
+ zIndex: 999,
268
+ margin: "10px",
269
+ ...cssLegendStyles,
270
+ } },
279
271
  React.createElement("div", { id: id ? id : `cont-legend - ${generateUniqueId}`, ref: divRef })));
280
272
  };
281
273
  //# sourceMappingURL=ContinuousLegend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContinuousLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/ContinuousLegend.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,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE7E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAE3B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,QAAQ,EACR,WAAW,EACX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AC;SAAA;QACD,uDAAuD;IACzD,CAAC,EAAE;QACD,GAAG;QACH,GAAG;QACH,SAAS;QACT,WAAW;QACX,UAAU;QACV,iBAAiB;QACjB,gBAAgB;QAChB,cAAc;QACd,EAAE;QACF,YAAY;QACZ,KAAK;QACL,SAAS;QACT,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,aAAa;QACb,eAAe;KAChB,CAAC,CAAC;IACH,OAAO,CACL,6BACE,KAAK,kBACH,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,GAAG,EACX,MAAM,EAAE,MAAM,IACX,eAAe;QAGpB,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
+ {"version":3,"file":"ContinuousLegend.js","sourceRoot":"","sources":["../../../src/component/Legend/ContinuousLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,KAAK,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,UAAU,EACV,SAAS,GACV,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,aAAa,GACd,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,IAAI,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAwF5C,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,GAAG,EACH,GAAG,EACH,cAAc,EACd,SAAS,GAAG,SAAS,EACrB,UAAU,E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EAAE,MAAM,GACN,CACH,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,10 +1,15 @@
1
- import React from "react";
2
- import { ContinuousLegendProps } from "../../component/Legend/ContinuousLegend";
3
- declare const _default: {
4
- component: React.FC<ContinuousLegendProps>;
5
- title: string;
6
- };
7
- export default _default;
8
- export declare const StandardColorTableLibrary: any;
9
- export declare const DefaultColorTable: any;
10
- export declare const BackgroundColor: () => React.JSX.Element;
1
+ import { Meta, StoryObj } from "@storybook/react-vite";
2
+ import { ContinuousLegend } from ".";
3
+ declare const meta: Meta<typeof ContinuousLegend>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ContinuousLegend>;
6
+ export declare const StandardColorTableLibrary: Story;
7
+ export declare const DefaultColorTable: Story;
8
+ export declare const BackgroundColor: Story;
9
+ export declare const MDTemplate: Story;
10
+ export declare const NTGTemplate: Story;
11
+ export declare const PermeabilityTemplate: Story;
12
+ export declare const PermTotTemplate: Story;
13
+ export declare const PorosityTemplate: Story;
14
+ export declare const PoroTotTemplate: Story;
15
+ export declare const SWTemplate: Story;