@emerson-eps/color-tables 0.2.4 → 0.2.5

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 (61) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/dist/component/ColorSelector/ColorSelectorAccordion.js +1 -1
  3. package/dist/component/ColorSelector/ColorSelectorAccordion.js.map +1 -1
  4. package/dist/component/ColorSelector/ColorSelectorComponent.js +46 -45
  5. package/dist/component/ColorSelector/ColorSelectorComponent.js.map +1 -1
  6. package/dist/component/ColorSelector/ColorSelectorWrapper.js +21 -20
  7. package/dist/component/ColorSelector/ColorSelectorWrapper.js.map +1 -1
  8. package/dist/component/Legend/ColorLegend.js +7 -6
  9. package/dist/component/Legend/ColorLegend.js.map +1 -1
  10. package/dist/component/Legend/ContinuousLegend.js +185 -147
  11. package/dist/component/Legend/ContinuousLegend.js.map +1 -1
  12. package/dist/component/Legend/DiscreteLegend.js +154 -113
  13. package/dist/component/Legend/DiscreteLegend.js.map +1 -1
  14. package/dist/component/Utils/continousLegend.js +14 -12
  15. package/dist/component/Utils/continousLegend.js.map +1 -1
  16. package/dist/component/Utils/d3ColorScale.js +1 -1
  17. package/dist/component/Utils/d3ColorScale.js.map +1 -1
  18. package/dist/component/Utils/discreteLegend.js +1 -1
  19. package/dist/component/Utils/discreteLegend.js.map +1 -1
  20. package/dist/stories/ColorLegends/ColorSelector/Selector.stories.js +2 -2
  21. package/dist/stories/ColorLegends/ColorSelector/Selector.stories.js.map +1 -1
  22. package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js +27 -16
  23. package/dist/stories/ColorLegends/ContinousLegends/MD.stories.js.map +1 -1
  24. package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js +27 -16
  25. package/dist/stories/ColorLegends/ContinousLegends/NTG.stories.js.map +1 -1
  26. package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js +27 -16
  27. package/dist/stories/ColorLegends/ContinousLegends/PermTot.stories.js.map +1 -1
  28. package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js +27 -16
  29. package/dist/stories/ColorLegends/ContinousLegends/Permeability.stories.js.map +1 -1
  30. package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js +27 -16
  31. package/dist/stories/ColorLegends/ContinousLegends/PoroTot.stories.js.map +1 -1
  32. package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js +27 -16
  33. package/dist/stories/ColorLegends/ContinousLegends/Porosity.stories.js.map +1 -1
  34. package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js +27 -16
  35. package/dist/stories/ColorLegends/ContinousLegends/SW.stories.js.map +1 -1
  36. package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js +25 -14
  37. package/dist/stories/ColorLegends/DiscreteLegends/Facies.stories.js.map +1 -1
  38. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js +25 -14
  39. package/dist/stories/ColorLegends/DiscreteLegends/FaciesNoCalcite.stories.js.map +1 -1
  40. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js +25 -14
  41. package/dist/stories/ColorLegends/DiscreteLegends/FaultDistanceHum.stories.js.map +1 -1
  42. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js +25 -14
  43. package/dist/stories/ColorLegends/DiscreteLegends/FaultProximityFlag.stories.js.map +1 -1
  44. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js +25 -14
  45. package/dist/stories/ColorLegends/DiscreteLegends/RDE.stories.js.map +1 -1
  46. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js +25 -14
  47. package/dist/stories/ColorLegends/DiscreteLegends/RDE_Orig.stories.js.map +1 -1
  48. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js +25 -14
  49. package/dist/stories/ColorLegends/DiscreteLegends/ZoneMain.stories.js.map +1 -1
  50. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js +25 -14
  51. package/dist/stories/ColorLegends/DiscreteLegends/Zonelog.stories.js.map +1 -1
  52. package/dist/stories/ColorLegends/LegendWithSelector/DiscreteLegendWithSelector.stories.js +25 -14
  53. package/dist/stories/ColorLegends/LegendWithSelector/DiscreteLegendWithSelector.stories.js.map +1 -1
  54. package/dist/stories/ColorLegends/LegendWithSelector/LegendWithSelector.stories.js +27 -16
  55. package/dist/stories/ColorLegends/LegendWithSelector/LegendWithSelector.stories.js.map +1 -1
  56. package/dist/stories/ColorLegends/SingleComponent/Single.stories.js +29 -18
  57. package/dist/stories/ColorLegends/SingleComponent/Single.stories.js.map +1 -1
  58. package/package.json +2 -1
  59. package/src/component/Legend/ContinuousLegend.tsx +5 -2
  60. package/src/component/Legend/DiscreteLegend.tsx +2 -1
  61. package/tsconfig.json +1 -1
@@ -7,13 +7,41 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (_) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
10
37
  import * as React from "react";
11
38
  import { useRef } from "react";
12
39
  import { RGBToHex, colorsArray } from "../Utils/continousLegend";
13
40
  import { select, scaleLinear, scaleSequential, axisBottom, axisRight } from "d3";
14
- export const ContinuousLegend = ({ min, max, dataObjectName, position, colorName, colorTables, horizontal, updateLegend, }) => {
15
- const divRef = useRef(null);
16
- React.useEffect(() => {
41
+ export var ContinuousLegend = function (_a) {
42
+ var min = _a.min, max = _a.max, dataObjectName = _a.dataObjectName, position = _a.position, colorName = _a.colorName, colorTables = _a.colorTables, horizontal = _a.horizontal, updateLegend = _a.updateLegend;
43
+ var divRef = useRef(null);
44
+ React.useEffect(function () {
17
45
  if (divRef.current) {
18
46
  continuousLegend();
19
47
  }
@@ -24,151 +52,161 @@ export const ContinuousLegend = ({ min, max, dataObjectName, position, colorName
24
52
  };
25
53
  }, [min, max, colorName, colorTables, horizontal, updateLegend]);
26
54
  function continuousLegend() {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- const itemColor = [];
29
- let dataSet;
30
- try {
31
- // fix for dash wrapper
32
- if (typeof colorTables === "string") {
33
- let res = yield fetch(colorTables);
34
- dataSet = yield res.json();
35
- }
36
- // Return the matched colors array from color.tables.json file
37
- let legendColors = typeof colorTables === "string" ?
38
- colorsArray(colorName, dataSet)
39
- :
40
- colorsArray(colorName, colorTables);
41
- // Update color of legend based on color selector scales
42
- // data is passed on click upon color scales
43
- if (updateLegend) {
44
- // legend using color table data
45
- if (updateLegend.color) {
46
- legendColors = updateLegend.color;
47
- }
48
- // legend using d3 data
49
- else if (updateLegend.length > 0) {
50
- legendColors = updateLegend;
51
- }
52
- }
53
- // main continuous legend
54
- else {
55
- legendColors;
56
- }
57
- legendColors.forEach((value) => {
58
- // return the color and offset needed to draw the legend
59
- itemColor.push({
60
- offset: RGBToHex(value).offset,
61
- color: RGBToHex(value).color,
62
- });
63
- });
64
- const colorScale = scaleSequential().domain([min, max]);
65
- // append a defs (for definition) element to your SVG
66
- const svgLegend = select(divRef.current)
67
- .append("svg")
68
- .style("background-color", "#ffffffcc")
69
- .style("border-radius", "5px");
70
- const defs = svgLegend.append("defs");
71
- let linearGradient;
72
- // vertical legend
73
- if (!horizontal) {
74
- svgLegend
75
- // .style("transform", "rotate(270deg)")
76
- // .style("margin-top", "80px");
77
- .attr("width", "100")
78
- .attr("height", "150");
79
- linearGradient = defs
80
- .append("linearGradient")
81
- .attr("id", "linear-gradient")
82
- .attr("x1", "0%")
83
- .attr("x2", "0%")
84
- .attr("y1", "0%")
85
- .attr("y2", "100%"); //since it's a vertical linear gradient
86
- }
87
- // horizontal legend
88
- else {
89
- svgLegend
90
- .attr("width", "220")
91
- .attr("height", "165");
92
- // append a linearGradient element to the defs and give it a unique id
93
- linearGradient = defs
94
- .append("linearGradient")
95
- .attr("id", "linear-gradient")
96
- .attr("x1", "0%")
97
- .attr("x2", "100%") //since it's a horizontal linear gradient
98
- .attr("y1", "0%")
99
- .attr("y2", "0%");
55
+ return __awaiter(this, void 0, void 0, function () {
56
+ var itemColor, dataSet, res, legendColors, colorScale, svgLegend, defs, linearGradient, xLeg, yLeg, horizontalAxisLeg, VerticalAxisLeg, error_1;
57
+ return __generator(this, function (_a) {
58
+ switch (_a.label) {
59
+ case 0:
60
+ itemColor = [];
61
+ _a.label = 1;
62
+ case 1:
63
+ _a.trys.push([1, 5, , 6]);
64
+ if (!(typeof colorTables === "string")) return [3 /*break*/, 4];
65
+ return [4 /*yield*/, fetch(colorTables)];
66
+ case 2:
67
+ res = _a.sent();
68
+ return [4 /*yield*/, res.json()];
69
+ case 3:
70
+ dataSet = _a.sent();
71
+ _a.label = 4;
72
+ case 4:
73
+ legendColors = typeof colorTables === "string" ?
74
+ colorsArray(colorName, dataSet)
75
+ :
76
+ colorsArray(colorName, colorTables);
77
+ //let legendColors = colorsArray(colorName, colorTables);
78
+ // Update color of legend based on color selector scales
79
+ // data is passed on click upon color scales
80
+ if (updateLegend) {
81
+ // legend using color table data
82
+ if (updateLegend.color) {
83
+ legendColors = updateLegend.color;
84
+ }
85
+ // legend using d3 data
86
+ else if (updateLegend.length > 0) {
87
+ legendColors = updateLegend;
88
+ }
89
+ }
90
+ // main continuous legend
91
+ else {
92
+ legendColors;
93
+ }
94
+ legendColors.forEach(function (value) {
95
+ // return the color and offset needed to draw the legend
96
+ itemColor.push({
97
+ offset: RGBToHex(value).offset,
98
+ color: RGBToHex(value).color,
99
+ });
100
+ });
101
+ colorScale = scaleSequential().domain([min, max]);
102
+ svgLegend = select(divRef.current)
103
+ .append("svg")
104
+ .style("background-color", "#ffffffcc")
105
+ .style("border-radius", "5px");
106
+ defs = svgLegend.append("defs");
107
+ linearGradient = void 0;
108
+ // vertical legend
109
+ if (!horizontal) {
110
+ svgLegend
111
+ // .style("transform", "rotate(270deg)")
112
+ // .style("margin-top", "80px");
113
+ .attr("width", "100")
114
+ .attr("height", "150");
115
+ linearGradient = defs
116
+ .append("linearGradient")
117
+ .attr("id", "linear-gradient")
118
+ .attr("x1", "0%")
119
+ .attr("x2", "0%")
120
+ .attr("y1", "0%")
121
+ .attr("y2", "100%"); //since it's a vertical linear gradient
122
+ }
123
+ // horizontal legend
124
+ else {
125
+ svgLegend
126
+ .attr("width", "220")
127
+ .attr("height", "165");
128
+ // append a linearGradient element to the defs and give it a unique id
129
+ linearGradient = defs
130
+ .append("linearGradient")
131
+ .attr("id", "linear-gradient")
132
+ .attr("x1", "0%")
133
+ .attr("x2", "100%") //since it's a horizontal linear gradient
134
+ .attr("y1", "0%")
135
+ .attr("y2", "0%");
136
+ }
137
+ // append multiple color stops by using D3's data/enter step
138
+ linearGradient
139
+ .selectAll("stop")
140
+ .data(itemColor)
141
+ .enter()
142
+ .append("stop")
143
+ .attr("offset", function (data) {
144
+ return data.offset + "%";
145
+ })
146
+ .attr("stop-color", function (data) {
147
+ return data.color;
148
+ });
149
+ // append title
150
+ svgLegend
151
+ .append("text")
152
+ .attr("class", "legendTitle")
153
+ .attr("x", 25)
154
+ .attr("y", 20)
155
+ .style("text-anchor", "left")
156
+ .text(dataObjectName);
157
+ // vertical legend
158
+ if (!horizontal) {
159
+ // draw the rectangle and fill with gradient
160
+ svgLegend
161
+ .append("rect")
162
+ .attr("x", 25)
163
+ .attr("y", 30)
164
+ .attr("width", 25)
165
+ .attr("height", "150")
166
+ .style("fill", "url(#linear-gradient)");
167
+ }
168
+ // horizontal legend
169
+ else {
170
+ // draw the rectangle and fill with gradient
171
+ svgLegend
172
+ .append("rect")
173
+ .attr("x", 25)
174
+ .attr("y", 30)
175
+ .attr("width", "150")
176
+ .attr("height", 25)
177
+ .style("fill", "url(#linear-gradient)");
178
+ }
179
+ xLeg = scaleLinear().domain([min, max]).range([10, 158]);
180
+ yLeg = scaleLinear().domain([min, max]).range([10, 127]);
181
+ horizontalAxisLeg = axisBottom(xLeg).tickValues(colorScale.domain());
182
+ VerticalAxisLeg = axisRight(yLeg).tickSize(24).tickValues(colorScale.domain());
183
+ if (horizontal) {
184
+ svgLegend
185
+ .attr("class", "axis")
186
+ .append("g")
187
+ .attr("transform", "translate(15, 55)")
188
+ .style("font-size", "10px")
189
+ .style("font-weight", "700")
190
+ .call(horizontalAxisLeg)
191
+ .style("height", 25);
192
+ }
193
+ else {
194
+ svgLegend
195
+ .attr("class", "axis")
196
+ .append("g")
197
+ .attr("transform", "translate(25, 20)")
198
+ .style("font-size", "10px")
199
+ .style("font-weight", "700")
200
+ .call(VerticalAxisLeg);
201
+ }
202
+ return [3 /*break*/, 6];
203
+ case 5:
204
+ error_1 = _a.sent();
205
+ console.error(error_1);
206
+ return [3 /*break*/, 6];
207
+ case 6: return [2 /*return*/];
100
208
  }
101
- // append multiple color stops by using D3's data/enter step
102
- linearGradient
103
- .selectAll("stop")
104
- .data(itemColor)
105
- .enter()
106
- .append("stop")
107
- .attr("offset", function (data) {
108
- return data.offset + "%";
109
- })
110
- .attr("stop-color", function (data) {
111
- return data.color;
112
- });
113
- // append title
114
- svgLegend
115
- .append("text")
116
- .attr("class", "legendTitle")
117
- .attr("x", 25)
118
- .attr("y", 20)
119
- .style("text-anchor", "left")
120
- .text(dataObjectName);
121
- // vertical legend
122
- if (!horizontal) {
123
- // draw the rectangle and fill with gradient
124
- svgLegend
125
- .append("rect")
126
- .attr("x", 25)
127
- .attr("y", 30)
128
- .attr("width", 25)
129
- .attr("height", "150")
130
- .style("fill", "url(#linear-gradient)");
131
- }
132
- // horizontal legend
133
- else {
134
- // draw the rectangle and fill with gradient
135
- svgLegend
136
- .append("rect")
137
- .attr("x", 25)
138
- .attr("y", 30)
139
- .attr("width", "150")
140
- .attr("height", 25)
141
- .style("fill", "url(#linear-gradient)");
142
- }
143
- //create tick marks
144
- // range varies the size of the axis
145
- const xLeg = scaleLinear().domain([min, max]).range([10, 158]);
146
- const yLeg = scaleLinear().domain([min, max]).range([10, 127]);
147
- const horizontalAxisLeg = axisBottom(xLeg).tickValues(colorScale.domain());
148
- var VerticalAxisLeg = axisRight(yLeg).tickSize(24).tickValues(colorScale.domain());
149
- if (horizontal) {
150
- svgLegend
151
- .attr("class", "axis")
152
- .append("g")
153
- .attr("transform", "translate(15, 55)")
154
- .style("font-size", "10px")
155
- .style("font-weight", "700")
156
- .call(horizontalAxisLeg)
157
- .style("height", 25);
158
- }
159
- else {
160
- svgLegend
161
- .attr("class", "axis")
162
- .append("g")
163
- .attr("transform", "translate(25, 20)")
164
- .style("font-size", "10px")
165
- .style("font-weight", "700")
166
- .call(VerticalAxisLeg);
167
- }
168
- }
169
- catch (error) {
170
- console.error(error);
171
- }
209
+ });
172
210
  });
173
211
  }
174
212
  return (React.createElement("div", { style: {
@@ -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;AAC/B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAmBjF,MAAM,CAAC,MAAM,gBAAgB,GAA0B,CAAC,EACpD,GAAG,EACH,GAAG,EACH,cAAc,EACd,QAAQ,EACR,SAAS,EACT,WAAW,EACX,UAAU,EACV,YAAY,GACF,EAAE,EAAE;IACd,MAAM,MAAM,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE5C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,gBAAgB,EAAE,CAAC;SACtB;QAAA,CAAC;QACF,OAAO,SAAS,OAAO;YACnB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;YAC9C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAClD,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;IAEjE,SAAe,gBAAgB;;YAC3B,MAAM,SAAS,GAAgB,EAAE,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