@datarailsshared/dr_renderer 1.3.32 → 1.3.34
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/package.json
CHANGED
@@ -37,13 +37,13 @@ const GAUGE_OPTIONS_DEFAULT = {
|
|
37
37
|
color: "#BF1D30",
|
38
38
|
},
|
39
39
|
{
|
40
|
-
from:
|
40
|
+
from: 50,
|
41
41
|
to: 90,
|
42
42
|
title: "Medium",
|
43
43
|
color: "#FFA310",
|
44
44
|
},
|
45
45
|
{
|
46
|
-
from:
|
46
|
+
from: 90,
|
47
47
|
to: 100,
|
48
48
|
title: "High",
|
49
49
|
color: "#037C5A",
|
@@ -380,10 +380,9 @@ function DrGaugeChart(pivotData, opts) {
|
|
380
380
|
gauge: { thickness },
|
381
381
|
} = options;
|
382
382
|
|
383
|
-
const bands = segments.map((item
|
384
|
-
const itemFrom = !!index ? item.from - 1 : item.from;
|
383
|
+
const bands = segments.map((item) => {
|
385
384
|
return {
|
386
|
-
from: isAbsoluteValue ?
|
385
|
+
from: isAbsoluteValue ? item.from : (item.from * goalValue) / 100,
|
387
386
|
to: isAbsoluteValue ? item.to : (item.to * goalValue) / 100,
|
388
387
|
color: item.color,
|
389
388
|
thickness: thickness,
|
@@ -160,13 +160,13 @@ describe("DrGaugeChart", () => {
|
|
160
160
|
title: "Title 1",
|
161
161
|
},
|
162
162
|
{
|
163
|
-
from:
|
163
|
+
from: 200,
|
164
164
|
to: 400,
|
165
165
|
color: "blue",
|
166
166
|
title: "Title 2",
|
167
167
|
},
|
168
168
|
{
|
169
|
-
from:
|
169
|
+
from: 400,
|
170
170
|
to: 800,
|
171
171
|
color: "blue",
|
172
172
|
title: "Title 3",
|
@@ -216,13 +216,13 @@ describe("DrGaugeChart", () => {
|
|
216
216
|
title: "Title 1",
|
217
217
|
},
|
218
218
|
{
|
219
|
-
from:
|
219
|
+
from: 200,
|
220
220
|
to: 400,
|
221
221
|
color: "blue",
|
222
222
|
title: "Title 2",
|
223
223
|
},
|
224
224
|
{
|
225
|
-
from:
|
225
|
+
from: 400,
|
226
226
|
to: 800,
|
227
227
|
color: "blue",
|
228
228
|
title: "Title 3",
|
@@ -272,13 +272,13 @@ describe("DrGaugeChart", () => {
|
|
272
272
|
title: "Title 1",
|
273
273
|
},
|
274
274
|
{
|
275
|
-
from:
|
275
|
+
from: 50,
|
276
276
|
to: 100,
|
277
277
|
color: "blue",
|
278
278
|
title: "Title 2",
|
279
279
|
},
|
280
280
|
{
|
281
|
-
from:
|
281
|
+
from: 100,
|
282
282
|
to: 175,
|
283
283
|
color: "blue",
|
284
284
|
title: "Title 3",
|
@@ -1753,13 +1753,13 @@ describe("DrGaugeChart", () => {
|
|
1753
1753
|
color: "#BF1D30",
|
1754
1754
|
},
|
1755
1755
|
{
|
1756
|
-
from:
|
1756
|
+
from: 50,
|
1757
1757
|
to: 160,
|
1758
1758
|
title: "Medium",
|
1759
1759
|
color: "#FFA310",
|
1760
1760
|
},
|
1761
1761
|
{
|
1762
|
-
from:
|
1762
|
+
from: 160,
|
1763
1763
|
to: 200,
|
1764
1764
|
title: "High",
|
1765
1765
|
color: "#037C5A",
|