@undp/data-viz 1.5.6 → 1.5.8
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/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +650 -648
- package/dist/BarGraph.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +210 -208
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +42 -40
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +122 -120
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +133 -113
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +274 -274
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +194 -174
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +160 -161
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +77 -66
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.js +166 -161
- package/dist/ParetoChart.js.map +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +253 -241
- package/dist/RadarChart.js.map +1 -1
- package/dist/{RegressionLine-mH7UKOPi.js → RegressionLine-C2--oMQq.js} +10 -9
- package/dist/RegressionLine-C2--oMQq.js.map +1 -0
- package/dist/RegressionLine-Dj0GSiAp.cjs +2 -0
- package/dist/RegressionLine-Dj0GSiAp.cjs.map +1 -0
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +130 -129
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +43 -38
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +113 -109
- package/dist/SlopeChart.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +282 -270
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +284 -349
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.js +20 -21
- package/dist/UnitChart.js.map +1 -1
- package/dist/getCentroidCoordinates-Dfk6IqEG.js +70 -0
- package/dist/getCentroidCoordinates-Dfk6IqEG.js.map +1 -0
- package/dist/getCentroidCoordinates-DxTBqzp2.cjs +2 -0
- package/dist/getCentroidCoordinates-DxTBqzp2.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +34 -32
- package/dist/index.js.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +8 -0
- package/dist/utils.js +16 -14
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/RegressionLine-mH7UKOPi.js.map +0 -1
- package/dist/RegressionLine-xKdiJ8sw.cjs +0 -2
- package/dist/RegressionLine-xKdiJ8sw.cjs.map +0 -1
package/dist/ScatterPlot.js
CHANGED
|
@@ -8,7 +8,7 @@ import { l as Ge, a as qe } from "./simple-statistics-flVzqVtt.js";
|
|
|
8
8
|
import { X as Be } from "./Modal-DVVwpKhP.js";
|
|
9
9
|
import { T as _e } from "./Tooltip-CVCGWyzw.js";
|
|
10
10
|
import { c } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
11
|
-
import { Colors as
|
|
11
|
+
import { Colors as M } from "./Colors.js";
|
|
12
12
|
import { n as Te } from "./numberFormattingFunction-14YCbkN2.js";
|
|
13
13
|
import { C as ze, g as Ue, A as Je } from "./customArea-B-dWU0zZ.js";
|
|
14
14
|
import { s as Ke } from "./string2HTML-oFCROsus.js";
|
|
@@ -16,10 +16,10 @@ import { A as Pe } from "./Axis-Ddg-seDi.js";
|
|
|
16
16
|
import { A as Xe } from "./AxisTitle-BmHLMRJZ.js";
|
|
17
17
|
import { X as Qe } from "./XTicksAndGridLines-Bn9u5gOM.js";
|
|
18
18
|
import { a as Ze, R as ei } from "./ReferenceLine-CfAW3vKJ.js";
|
|
19
|
-
import { R as ii } from "./RegressionLine-
|
|
19
|
+
import { R as ii } from "./RegressionLine-C2--oMQq.js";
|
|
20
20
|
import { Y as ti } from "./YTicksAndGridLines-B6ah7CRf.js";
|
|
21
|
-
import { a as
|
|
22
|
-
import { s as
|
|
21
|
+
import { a as oi } from "./index-DKCxu1Gh.js";
|
|
22
|
+
import { s as ai } from "./pow-e8zx3AQJ.js";
|
|
23
23
|
import { a as Ye } from "./linear-DUdu7l2G.js";
|
|
24
24
|
import { D as ri } from "./delaunay-C1uAf38t.js";
|
|
25
25
|
import { u as li } from "./use-in-view-yS6jzJAp.js";
|
|
@@ -36,19 +36,19 @@ import { s as gi } from "./sort-DfK1b0F5.js";
|
|
|
36
36
|
import { c as hi } from "./init-BhZylTFx.js";
|
|
37
37
|
function yi(ye) {
|
|
38
38
|
const {
|
|
39
|
-
data:
|
|
39
|
+
data: o,
|
|
40
40
|
width: L,
|
|
41
41
|
height: D,
|
|
42
|
-
showLabels:
|
|
43
|
-
colors:
|
|
44
|
-
colorDomain:
|
|
42
|
+
showLabels: oe,
|
|
43
|
+
colors: l,
|
|
44
|
+
colorDomain: w,
|
|
45
45
|
radius: O,
|
|
46
46
|
xAxisTitle: u,
|
|
47
|
-
yAxisTitle:
|
|
47
|
+
yAxisTitle: K,
|
|
48
48
|
leftMargin: q,
|
|
49
49
|
rightMargin: de,
|
|
50
50
|
topMargin: pe,
|
|
51
|
-
bottomMargin:
|
|
51
|
+
bottomMargin: ae,
|
|
52
52
|
tooltip: re,
|
|
53
53
|
onSeriesMouseOver: H,
|
|
54
54
|
refXValues: $,
|
|
@@ -62,35 +62,35 @@ function yi(ye) {
|
|
|
62
62
|
maxYValue: Ce,
|
|
63
63
|
minYValue: A,
|
|
64
64
|
onSeriesMouseClick: P,
|
|
65
|
-
rtl:
|
|
65
|
+
rtl: Q,
|
|
66
66
|
annotations: Oe,
|
|
67
67
|
customHighlightAreaSettings: je,
|
|
68
68
|
regressionLine: z,
|
|
69
|
-
resetSelectionOnDoubleClick:
|
|
70
|
-
detailsOnClick:
|
|
69
|
+
resetSelectionOnDoubleClick: Z,
|
|
70
|
+
detailsOnClick: k,
|
|
71
71
|
noOfXTicks: le,
|
|
72
72
|
noOfYTicks: se,
|
|
73
|
-
labelColor:
|
|
73
|
+
labelColor: U,
|
|
74
74
|
xSuffix: ne,
|
|
75
75
|
ySuffix: ce,
|
|
76
76
|
xPrefix: xe,
|
|
77
77
|
yPrefix: me,
|
|
78
78
|
styles: x,
|
|
79
79
|
classNames: m,
|
|
80
|
-
animate:
|
|
81
|
-
dimmedOpacity:
|
|
80
|
+
animate: s,
|
|
81
|
+
dimmedOpacity: N,
|
|
82
82
|
precision: S,
|
|
83
83
|
customLayers: fe
|
|
84
84
|
} = ye, ue = Se(null), p = li(ue, {
|
|
85
|
-
once:
|
|
86
|
-
amount:
|
|
85
|
+
once: s.once,
|
|
86
|
+
amount: s.amount
|
|
87
87
|
}), [X, Y] = V(void 0), [I, W] = V(void 0), [ge, R] = V(void 0), [he, v] = V(void 0), g = {
|
|
88
88
|
top: pe,
|
|
89
|
-
bottom: u ?
|
|
90
|
-
left:
|
|
89
|
+
bottom: u ? ae + 50 : ae,
|
|
90
|
+
left: K ? q + 30 : q,
|
|
91
91
|
right: de
|
|
92
|
-
},
|
|
93
|
-
|
|
92
|
+
}, J = o.map((e, d) => ({ ...e, id: `${d}` })), y = L - g.left - g.right, b = D - g.top - g.bottom, C = o.filter((e) => e.radius === void 0 || e.radius === null).length !== o.length ? ai().domain([0, we]).range([0.25, O]).nice() : void 0, h = J.filter((e) => !c(e.radius)).length === 0 ? J : Ee(
|
|
93
|
+
J.filter((e) => !c(e.radius)),
|
|
94
94
|
"radius",
|
|
95
95
|
"desc"
|
|
96
96
|
), r = Ye().domain([j, _]).range([0, y]).nice(), n = Ye().domain([A, Ce]).range([b, 0]).nice(), ee = r.ticks(le), ie = n.ticks(se), F = ri.from(
|
|
@@ -98,7 +98,7 @@ function yi(ye) {
|
|
|
98
98
|
(e) => r(e.x),
|
|
99
99
|
(e) => n(e.y)
|
|
100
100
|
).voronoi([0, 0, y < 0 ? 0 : y, b < 0 ? 0 : b]), Ae = Ge(
|
|
101
|
-
|
|
101
|
+
o.filter((e) => !c(e.x) && !c(e.y)).map((e) => [r(e.x), n(e.y)])
|
|
102
102
|
), f = qe(Ae);
|
|
103
103
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
104
104
|
/* @__PURE__ */ t.jsx(
|
|
@@ -112,14 +112,14 @@ function yi(ye) {
|
|
|
112
112
|
children: /* @__PURE__ */ t.jsxs("g", { transform: `translate(${g.left},${g.top})`, children: [
|
|
113
113
|
/* @__PURE__ */ t.jsxs(Ie, { children: [
|
|
114
114
|
/* @__PURE__ */ t.jsx(
|
|
115
|
-
|
|
115
|
+
oi,
|
|
116
116
|
{
|
|
117
117
|
areaSettings: be,
|
|
118
118
|
width: y,
|
|
119
119
|
height: b,
|
|
120
120
|
scaleX: r,
|
|
121
121
|
scaleY: n,
|
|
122
|
-
animate:
|
|
122
|
+
animate: s,
|
|
123
123
|
isInView: p
|
|
124
124
|
},
|
|
125
125
|
"highlight-area"
|
|
@@ -130,7 +130,7 @@ function yi(ye) {
|
|
|
130
130
|
areaSettings: je,
|
|
131
131
|
scaleX: r,
|
|
132
132
|
scaleY: n,
|
|
133
|
-
animate:
|
|
133
|
+
animate: s,
|
|
134
134
|
isInView: p
|
|
135
135
|
},
|
|
136
136
|
"custom-area"
|
|
@@ -197,7 +197,7 @@ function yi(ye) {
|
|
|
197
197
|
y: b / 2,
|
|
198
198
|
style: x?.yAxis?.title,
|
|
199
199
|
className: m?.yAxis?.title,
|
|
200
|
-
text:
|
|
200
|
+
text: K,
|
|
201
201
|
rotate90: !0
|
|
202
202
|
}
|
|
203
203
|
)
|
|
@@ -274,19 +274,19 @@ function yi(ye) {
|
|
|
274
274
|
h.filter((e) => !c(e.x) && !c(e.y)).map((e, d) => /* @__PURE__ */ t.jsx(
|
|
275
275
|
"path",
|
|
276
276
|
{
|
|
277
|
-
d: F.renderCell(h.findIndex((
|
|
277
|
+
d: F.renderCell(h.findIndex((a) => a.id === e.id)),
|
|
278
278
|
opacity: 0,
|
|
279
|
-
onMouseEnter: (
|
|
280
|
-
Y(e), v(
|
|
279
|
+
onMouseEnter: (a) => {
|
|
280
|
+
Y(e), v(a.clientY), R(a.clientX), H?.(e);
|
|
281
281
|
},
|
|
282
|
-
onMouseMove: (
|
|
283
|
-
Y(e), v(
|
|
282
|
+
onMouseMove: (a) => {
|
|
283
|
+
Y(e), v(a.clientY), R(a.clientX);
|
|
284
284
|
},
|
|
285
285
|
onMouseLeave: () => {
|
|
286
286
|
Y(void 0), R(void 0), v(void 0), H?.(void 0);
|
|
287
287
|
},
|
|
288
288
|
onClick: () => {
|
|
289
|
-
(P ||
|
|
289
|
+
(P || k) && ($e(I, e) && Z ? (W(void 0), P?.(void 0)) : (W(e), P?.(e)));
|
|
290
290
|
}
|
|
291
291
|
},
|
|
292
292
|
`tesselation_${e.label || d}`
|
|
@@ -298,29 +298,29 @@ function yi(ye) {
|
|
|
298
298
|
initial: {
|
|
299
299
|
x: r(e.x),
|
|
300
300
|
y: n(e.y),
|
|
301
|
-
opacity: B ? e.color &&
|
|
301
|
+
opacity: B ? e.color && l[w.indexOf(`${e.color}`)] === B ? 1 : N : X ? X.id === e.id ? 1 : N : T.length !== 0 ? T.indexOf(e.label || "") !== -1 ? 1 : N : 1
|
|
302
302
|
},
|
|
303
303
|
whileInView: {
|
|
304
304
|
x: r(e.x),
|
|
305
305
|
y: n(e.y),
|
|
306
|
-
opacity: B ? e.color &&
|
|
307
|
-
transition: { duration:
|
|
306
|
+
opacity: B ? e.color && l[w.indexOf(`${e.color}`)] === B ? 1 : N : X ? X.id === e.id ? 1 : N : T.length !== 0 ? T.indexOf(e.label || "") !== -1 ? 1 : N : 1,
|
|
307
|
+
transition: { duration: s.duration }
|
|
308
308
|
}
|
|
309
309
|
},
|
|
310
310
|
initial: "initial",
|
|
311
311
|
animate: p ? "whileInView" : "initial",
|
|
312
|
-
exit: { opacity: 0, transition: { duration:
|
|
313
|
-
onMouseEnter: (
|
|
314
|
-
Y(e), v(
|
|
312
|
+
exit: { opacity: 0, transition: { duration: s.duration } },
|
|
313
|
+
onMouseEnter: (a) => {
|
|
314
|
+
Y(e), v(a.clientY), R(a.clientX), H?.(e);
|
|
315
315
|
},
|
|
316
|
-
onMouseMove: (
|
|
317
|
-
Y(e), v(
|
|
316
|
+
onMouseMove: (a) => {
|
|
317
|
+
Y(e), v(a.clientY), R(a.clientX);
|
|
318
318
|
},
|
|
319
319
|
onMouseLeave: () => {
|
|
320
320
|
Y(void 0), R(void 0), v(void 0), H?.(void 0);
|
|
321
321
|
},
|
|
322
322
|
onClick: () => {
|
|
323
|
-
(P ||
|
|
323
|
+
(P || k) && ($e(I, e) && Z ? (W(void 0), P?.(void 0)) : (W(e), P?.(e)));
|
|
324
324
|
},
|
|
325
325
|
children: [
|
|
326
326
|
/* @__PURE__ */ t.jsx(
|
|
@@ -328,18 +328,18 @@ function yi(ye) {
|
|
|
328
328
|
{
|
|
329
329
|
cx: 0,
|
|
330
330
|
cy: 0,
|
|
331
|
-
exit: { r: 0, transition: { duration:
|
|
331
|
+
exit: { r: 0, transition: { duration: s.duration } },
|
|
332
332
|
variants: {
|
|
333
333
|
initial: {
|
|
334
334
|
r: 0,
|
|
335
|
-
fill:
|
|
336
|
-
stroke:
|
|
335
|
+
fill: o.filter((a) => a.color).length === 0 ? l[0] : e.color ? l[w.indexOf(`${e.color}`)] : M.gray,
|
|
336
|
+
stroke: o.filter((a) => a.color).length === 0 ? l[0] : e.color ? l[w.indexOf(`${e.color}`)] : M.gray
|
|
337
337
|
},
|
|
338
338
|
whileInView: {
|
|
339
|
-
r:
|
|
340
|
-
fill:
|
|
341
|
-
stroke:
|
|
342
|
-
transition: { duration:
|
|
339
|
+
r: C ? C(e.radius || 0) : O,
|
|
340
|
+
fill: o.filter((a) => a.color).length === 0 ? l[0] : e.color ? l[w.indexOf(`${e.color}`)] : M.gray,
|
|
341
|
+
stroke: o.filter((a) => a.color).length === 0 ? l[0] : e.color ? l[w.indexOf(`${e.color}`)] : M.gray,
|
|
342
|
+
transition: { duration: s.duration }
|
|
343
343
|
}
|
|
344
344
|
},
|
|
345
345
|
initial: "initial",
|
|
@@ -349,7 +349,7 @@ function yi(ye) {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
),
|
|
352
|
-
|
|
352
|
+
oe && !c(e.label) ? /* @__PURE__ */ t.jsx(
|
|
353
353
|
te.text,
|
|
354
354
|
{
|
|
355
355
|
style: {
|
|
@@ -357,18 +357,18 @@ function yi(ye) {
|
|
|
357
357
|
},
|
|
358
358
|
className: Ne("graph-value text-sm", m?.graphObjectValues),
|
|
359
359
|
y: 0,
|
|
360
|
-
exit: { opacity: 0, transition: { duration:
|
|
360
|
+
exit: { opacity: 0, transition: { duration: s.duration } },
|
|
361
361
|
variants: {
|
|
362
362
|
initial: {
|
|
363
|
-
x:
|
|
363
|
+
x: C ? C(e.radius || 0) : O,
|
|
364
364
|
opacity: 0,
|
|
365
|
-
fill:
|
|
365
|
+
fill: U || (o.filter((a) => a.color).length === 0 ? l[0] : e.color ? l[w.indexOf(`${e.color}`)] : M.gray)
|
|
366
366
|
},
|
|
367
367
|
whileInView: {
|
|
368
|
-
x:
|
|
368
|
+
x: C ? C(e.radius || 0) : O,
|
|
369
369
|
opacity: 1,
|
|
370
|
-
fill:
|
|
371
|
-
transition: { duration:
|
|
370
|
+
fill: U || (o.filter((a) => a.color).length === 0 ? l[0] : e.color ? l[w.indexOf(`${e.color}`)] : M.gray),
|
|
371
|
+
transition: { duration: s.duration }
|
|
372
372
|
}
|
|
373
373
|
},
|
|
374
374
|
initial: "initial",
|
|
@@ -381,21 +381,22 @@ function yi(ye) {
|
|
|
381
381
|
te.text,
|
|
382
382
|
{
|
|
383
383
|
style: {
|
|
384
|
-
fill: Z || (a.filter((o) => o.color).length === 0 ? s[0] : e.color ? s[C.indexOf(`${e.color}`)] : N.gray),
|
|
385
384
|
...x?.graphObjectValues || {}
|
|
386
385
|
},
|
|
387
386
|
className: Ne("graph-value text-sm", m?.graphObjectValues),
|
|
388
387
|
y: 0,
|
|
389
|
-
exit: { opacity: 0, transition: { duration:
|
|
388
|
+
exit: { opacity: 0, transition: { duration: s.duration } },
|
|
390
389
|
variants: {
|
|
391
390
|
initial: {
|
|
392
|
-
x:
|
|
393
|
-
opacity: 0
|
|
391
|
+
x: C ? C(e.radius || 0) : O,
|
|
392
|
+
opacity: 0,
|
|
393
|
+
fill: U || (o.filter((a) => a.color).length === 0 ? l[0] : e.color ? l[w.indexOf(`${e.color}`)] : M.gray)
|
|
394
394
|
},
|
|
395
395
|
whileInView: {
|
|
396
|
-
x:
|
|
396
|
+
x: C ? C(e.radius || 0) : O,
|
|
397
397
|
opacity: 1,
|
|
398
|
-
|
|
398
|
+
fill: U || (o.filter((a) => a.color).length === 0 ? l[0] : e.color ? l[w.indexOf(`${e.color}`)] : M.gray),
|
|
399
|
+
transition: { duration: s.duration }
|
|
399
400
|
}
|
|
400
401
|
},
|
|
401
402
|
initial: "initial",
|
|
@@ -417,10 +418,10 @@ function yi(ye) {
|
|
|
417
418
|
x: r(e.value),
|
|
418
419
|
y1: 0,
|
|
419
420
|
y2: b,
|
|
420
|
-
textSide: r(e.value) > y * 0.75 ||
|
|
421
|
+
textSide: r(e.value) > y * 0.75 || Q ? "left" : "right",
|
|
421
422
|
classNames: e.classNames,
|
|
422
423
|
styles: e.styles,
|
|
423
|
-
animate:
|
|
424
|
+
animate: s,
|
|
424
425
|
isInView: p
|
|
425
426
|
},
|
|
426
427
|
d
|
|
@@ -435,13 +436,13 @@ function yi(ye) {
|
|
|
435
436
|
x2: y,
|
|
436
437
|
classNames: e.classNames,
|
|
437
438
|
styles: e.styles,
|
|
438
|
-
animate:
|
|
439
|
+
animate: s,
|
|
439
440
|
isInView: p
|
|
440
441
|
},
|
|
441
442
|
d
|
|
442
443
|
)),
|
|
443
444
|
/* @__PURE__ */ t.jsx("g", { children: Oe.map((e, d) => {
|
|
444
|
-
const
|
|
445
|
+
const a = Ue(
|
|
445
446
|
{
|
|
446
447
|
x: e.xCoordinate ? r(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
|
|
447
448
|
y: e.yCoordinate ? n(e.yCoordinate) + (e.yOffset || 0) - 8 : 0 + (e.yOffset || 0) - 8
|
|
@@ -452,8 +453,8 @@ function yi(ye) {
|
|
|
452
453
|
},
|
|
453
454
|
c(e.connectorRadius) ? 3.5 : e.connectorRadius
|
|
454
455
|
), Me = e.showConnector ? {
|
|
455
|
-
y1:
|
|
456
|
-
x1:
|
|
456
|
+
y1: a.y,
|
|
457
|
+
x1: a.x,
|
|
457
458
|
y2: e.yCoordinate ? n(e.yCoordinate) + (e.yOffset || 0) : 0 + (e.yOffset || 0),
|
|
458
459
|
x2: e.xCoordinate ? r(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
|
|
459
460
|
cy: e.yCoordinate ? n(e.yCoordinate) : 0,
|
|
@@ -462,8 +463,8 @@ function yi(ye) {
|
|
|
462
463
|
strokeWidth: e.showConnector === !0 ? 2 : Math.min(e.showConnector || 0, 1)
|
|
463
464
|
} : void 0, E = {
|
|
464
465
|
y: e.yCoordinate ? n(e.yCoordinate) + (e.yOffset || 0) - 8 : 0 + (e.yOffset || 0) - 8,
|
|
465
|
-
x:
|
|
466
|
-
width:
|
|
466
|
+
x: Q ? 0 : e.xCoordinate ? r(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
|
|
467
|
+
width: Q ? e.xCoordinate ? r(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0) : y + g.right - (e.xCoordinate ? r(e.xCoordinate) + (e.xOffset || 0) : 0 + (e.xOffset || 0)),
|
|
467
468
|
maxWidth: e.maxWidth,
|
|
468
469
|
fontWeight: e.fontWeight,
|
|
469
470
|
align: e.align
|
|
@@ -477,7 +478,7 @@ function yi(ye) {
|
|
|
477
478
|
text: e.text,
|
|
478
479
|
classNames: e.classNames,
|
|
479
480
|
styles: e.styles,
|
|
480
|
-
animate:
|
|
481
|
+
animate: s,
|
|
481
482
|
isInView: p
|
|
482
483
|
},
|
|
483
484
|
d
|
|
@@ -495,7 +496,7 @@ function yi(ye) {
|
|
|
495
496
|
className: m?.regLine,
|
|
496
497
|
style: x?.regLine,
|
|
497
498
|
color: typeof z == "string" ? z : void 0,
|
|
498
|
-
animate:
|
|
499
|
+
animate: s,
|
|
499
500
|
isInView: p
|
|
500
501
|
}
|
|
501
502
|
) : null
|
|
@@ -515,7 +516,7 @@ function yi(ye) {
|
|
|
515
516
|
className: m?.tooltip
|
|
516
517
|
}
|
|
517
518
|
) : null,
|
|
518
|
-
|
|
519
|
+
k && I !== void 0 ? /* @__PURE__ */ t.jsx(
|
|
519
520
|
Be,
|
|
520
521
|
{
|
|
521
522
|
open: I !== void 0,
|
|
@@ -526,8 +527,8 @@ function yi(ye) {
|
|
|
526
527
|
"div",
|
|
527
528
|
{
|
|
528
529
|
className: "graph-modal-content m-0",
|
|
529
|
-
dangerouslySetInnerHTML: typeof
|
|
530
|
-
children: typeof
|
|
530
|
+
dangerouslySetInnerHTML: typeof k == "string" ? { __html: Ke(k, I) } : void 0,
|
|
531
|
+
children: typeof k == "function" ? k(I) : null
|
|
531
532
|
}
|
|
532
533
|
)
|
|
533
534
|
}
|
|
@@ -536,19 +537,19 @@ function yi(ye) {
|
|
|
536
537
|
}
|
|
537
538
|
function Zi(ye) {
|
|
538
539
|
const {
|
|
539
|
-
data:
|
|
540
|
+
data: o,
|
|
540
541
|
graphTitle: L,
|
|
541
542
|
colors: D,
|
|
542
|
-
sources:
|
|
543
|
-
graphDescription:
|
|
544
|
-
showLabels:
|
|
543
|
+
sources: oe,
|
|
544
|
+
graphDescription: l,
|
|
545
|
+
showLabels: w = !1,
|
|
545
546
|
height: O,
|
|
546
547
|
width: u,
|
|
547
|
-
footNote:
|
|
548
|
+
footNote: K,
|
|
548
549
|
colorDomain: q,
|
|
549
550
|
colorLegendTitle: de,
|
|
550
551
|
radius: pe = 5,
|
|
551
|
-
xAxisTitle:
|
|
552
|
+
xAxisTitle: ae = "X Axis",
|
|
552
553
|
yAxisTitle: re = "Y Axis",
|
|
553
554
|
padding: H,
|
|
554
555
|
backgroundColor: $ = !1,
|
|
@@ -562,23 +563,23 @@ function Zi(ye) {
|
|
|
562
563
|
refXValues: Ce = [],
|
|
563
564
|
refYValues: A = [],
|
|
564
565
|
highlightAreaSettings: P = [],
|
|
565
|
-
showColorScale:
|
|
566
|
+
showColorScale: Q = !0,
|
|
566
567
|
highlightedDataPoints: Oe = [],
|
|
567
568
|
graphID: je,
|
|
568
569
|
maxRadiusValue: z,
|
|
569
|
-
maxXValue:
|
|
570
|
-
minXValue:
|
|
570
|
+
maxXValue: Z,
|
|
571
|
+
minXValue: k,
|
|
571
572
|
maxYValue: le,
|
|
572
573
|
minYValue: se,
|
|
573
|
-
xSuffix:
|
|
574
|
+
xSuffix: U = "",
|
|
574
575
|
ySuffix: ne = "",
|
|
575
576
|
xPrefix: ce = "",
|
|
576
577
|
yPrefix: xe = "",
|
|
577
578
|
onSeriesMouseClick: me,
|
|
578
579
|
graphDownload: x = !1,
|
|
579
580
|
dataDownload: m = !1,
|
|
580
|
-
language:
|
|
581
|
-
showNAColor:
|
|
581
|
+
language: s = "en",
|
|
582
|
+
showNAColor: N = !0,
|
|
582
583
|
minHeight: S = 0,
|
|
583
584
|
annotations: fe = [],
|
|
584
585
|
customHighlightAreaSettings: ue = [],
|
|
@@ -592,17 +593,17 @@ function Zi(ye) {
|
|
|
592
593
|
labelColor: he,
|
|
593
594
|
styles: v,
|
|
594
595
|
classNames: g,
|
|
595
|
-
animate:
|
|
596
|
+
animate: J = !1,
|
|
596
597
|
dimmedOpacity: y = 0.3,
|
|
597
598
|
precision: b = 2,
|
|
598
|
-
customLayers:
|
|
599
|
+
customLayers: C = [],
|
|
599
600
|
timeline: h = { enabled: !1, autoplay: !1, showOnlyActiveDate: !0 }
|
|
600
601
|
} = ye, [r, n] = V(0), [ee, ie] = V(0), [F, Ae] = V(h.autoplay), f = gi(
|
|
601
|
-
ke(
|
|
602
|
+
ke(o, "date", !0).map(
|
|
602
603
|
(i) => Re(`${i}`, h.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()
|
|
603
604
|
),
|
|
604
605
|
(i, G) => hi(i, G)
|
|
605
|
-
), [e, d] = V(h.autoplay ? 0 : f.length - 1), [
|
|
606
|
+
), [e, d] = V(h.autoplay ? 0 : f.length - 1), [a, Me] = V(void 0), E = Se(null), Ve = Se(null);
|
|
606
607
|
De(() => {
|
|
607
608
|
const i = new ResizeObserver((G) => {
|
|
608
609
|
n(u || G[0].target.clientWidth || 620), ie(O || G[0].target.clientHeight || 480);
|
|
@@ -627,12 +628,12 @@ function Zi(ye) {
|
|
|
627
628
|
"div",
|
|
628
629
|
{
|
|
629
630
|
className: `${p || "light"} flex ${u ? "w-fit grow-0" : "w-full grow"}`,
|
|
630
|
-
dir:
|
|
631
|
+
dir: s === "he" || s === "ar" ? "rtl" : void 0,
|
|
631
632
|
children: /* @__PURE__ */ t.jsx(
|
|
632
633
|
"div",
|
|
633
634
|
{
|
|
634
635
|
className: Ne(
|
|
635
|
-
`${$ ? $ === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${
|
|
636
|
+
`${$ ? $ === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${s || "en"}`,
|
|
636
637
|
u ? "w-fit" : "w-full",
|
|
637
638
|
g?.graphContainer
|
|
638
639
|
),
|
|
@@ -642,14 +643,14 @@ function Zi(ye) {
|
|
|
642
643
|
},
|
|
643
644
|
id: je,
|
|
644
645
|
ref: Ve,
|
|
645
|
-
"aria-label": Y || `${L ? `The graph shows ${L}. ` : ""}This is a scatter plot that shows correlation between two variables.${
|
|
646
|
+
"aria-label": Y || `${L ? `The graph shows ${L}. ` : ""}This is a scatter plot that shows correlation between two variables.${l ? ` ${l}` : ""}`,
|
|
646
647
|
children: /* @__PURE__ */ t.jsx(
|
|
647
648
|
"div",
|
|
648
649
|
{
|
|
649
650
|
className: "flex grow",
|
|
650
651
|
style: { padding: $ ? H || "1rem" : H || 0 },
|
|
651
652
|
children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
|
|
652
|
-
L ||
|
|
653
|
+
L || l || x || m ? /* @__PURE__ */ t.jsx(
|
|
653
654
|
ni,
|
|
654
655
|
{
|
|
655
656
|
styles: {
|
|
@@ -661,10 +662,10 @@ function Zi(ye) {
|
|
|
661
662
|
description: g?.description
|
|
662
663
|
},
|
|
663
664
|
graphTitle: L,
|
|
664
|
-
graphDescription:
|
|
665
|
+
graphDescription: l,
|
|
665
666
|
width: u,
|
|
666
667
|
graphDownload: x ? Ve.current : void 0,
|
|
667
|
-
dataDownload: m ?
|
|
668
|
+
dataDownload: m ? o.map((i) => i.data).filter((i) => i !== void 0).length > 0 ? o.map((i) => i.data).filter((i) => i !== void 0) : o.filter((i) => i !== void 0) : null
|
|
668
669
|
}
|
|
669
670
|
) : null,
|
|
670
671
|
h.enabled && f.length > 0 && Le ? /* @__PURE__ */ t.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
@@ -699,16 +700,16 @@ function Zi(ye) {
|
|
|
699
700
|
}
|
|
700
701
|
)
|
|
701
702
|
] }) : null,
|
|
702
|
-
/* @__PURE__ */ t.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children:
|
|
703
|
-
|
|
703
|
+
/* @__PURE__ */ t.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: o.length === 0 ? /* @__PURE__ */ t.jsx(xi, {}) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
704
|
+
Q && o.filter((i) => i.color).length !== 0 ? /* @__PURE__ */ t.jsx(
|
|
704
705
|
ci,
|
|
705
706
|
{
|
|
706
707
|
width: u,
|
|
707
708
|
colorLegendTitle: de,
|
|
708
|
-
colors: D ||
|
|
709
|
-
colorDomain: q || ke(
|
|
709
|
+
colors: D || M[p].categoricalColors.colors,
|
|
710
|
+
colorDomain: q || ke(o, "color", !0),
|
|
710
711
|
setSelectedColor: Me,
|
|
711
|
-
showNAColor:
|
|
712
|
+
showNAColor: N
|
|
712
713
|
}
|
|
713
714
|
) : null,
|
|
714
715
|
/* @__PURE__ */ t.jsx(
|
|
@@ -721,7 +722,7 @@ function Zi(ye) {
|
|
|
721
722
|
yi,
|
|
722
723
|
{
|
|
723
724
|
data: ui(
|
|
724
|
-
|
|
725
|
+
o,
|
|
725
726
|
h.dateFormat || "yyyy"
|
|
726
727
|
).filter(
|
|
727
728
|
(i) => h.enabled ? i.date === He(
|
|
@@ -734,13 +735,13 @@ function Zi(ye) {
|
|
|
734
735
|
S,
|
|
735
736
|
O || (_ ? S ? (u || r) * _ > S ? (u || r) * _ : S : (u || r) * _ : ee)
|
|
736
737
|
),
|
|
737
|
-
colorDomain:
|
|
738
|
-
colors:
|
|
739
|
-
xAxisTitle:
|
|
738
|
+
colorDomain: o.filter((i) => i.color).length === 0 ? [] : q || ke(o, "color", !0),
|
|
739
|
+
colors: o.filter((i) => i.color).length === 0 ? D ? [D] : [M.primaryColors["blue-600"]] : D || M[p].categoricalColors.colors,
|
|
740
|
+
xAxisTitle: ae,
|
|
740
741
|
yAxisTitle: re,
|
|
741
742
|
refXValues: Ce,
|
|
742
743
|
refYValues: A,
|
|
743
|
-
showLabels:
|
|
744
|
+
showLabels: w,
|
|
744
745
|
radius: pe,
|
|
745
746
|
leftMargin: ve,
|
|
746
747
|
rightMargin: be,
|
|
@@ -749,33 +750,33 @@ function Zi(ye) {
|
|
|
749
750
|
tooltip: we,
|
|
750
751
|
onSeriesMouseOver: j,
|
|
751
752
|
highlightAreaSettings: P,
|
|
752
|
-
highlightedDataPoints:
|
|
753
|
-
selectedColor:
|
|
753
|
+
highlightedDataPoints: o.filter((i) => i.label).length === 0 ? [] : Oe,
|
|
754
|
+
selectedColor: a,
|
|
754
755
|
maxRadiusValue: c(z) ? Math.max(
|
|
755
|
-
...
|
|
756
|
+
...o.map((i) => i.radius).filter((i) => i != null)
|
|
756
757
|
) : z,
|
|
757
|
-
maxXValue: c(
|
|
758
|
-
...
|
|
758
|
+
maxXValue: c(Z) ? Math.max(
|
|
759
|
+
...o.map((i) => i.x).filter((i) => i != null)
|
|
759
760
|
) > 0 ? Math.max(
|
|
760
|
-
...
|
|
761
|
-
) : 0 :
|
|
762
|
-
minXValue: c(
|
|
763
|
-
...
|
|
761
|
+
...o.map((i) => i.x).filter((i) => i != null)
|
|
762
|
+
) : 0 : Z,
|
|
763
|
+
minXValue: c(k) ? Math.min(
|
|
764
|
+
...o.map((i) => i.x).filter((i) => i != null)
|
|
764
765
|
) > 0 ? 0 : Math.min(
|
|
765
|
-
...
|
|
766
|
-
) :
|
|
766
|
+
...o.map((i) => i.x).filter((i) => i != null)
|
|
767
|
+
) : k,
|
|
767
768
|
maxYValue: c(le) ? Math.max(
|
|
768
|
-
...
|
|
769
|
+
...o.map((i) => i.y).filter((i) => i != null)
|
|
769
770
|
) > 0 ? Math.max(
|
|
770
|
-
...
|
|
771
|
+
...o.map((i) => i.y).filter((i) => i != null)
|
|
771
772
|
) : 0 : le,
|
|
772
773
|
minYValue: c(se) ? Math.min(
|
|
773
|
-
...
|
|
774
|
+
...o.map((i) => i.y).filter((i) => i != null)
|
|
774
775
|
) > 0 ? 0 : Math.min(
|
|
775
|
-
...
|
|
776
|
+
...o.map((i) => i.y).filter((i) => i != null)
|
|
776
777
|
) : se,
|
|
777
778
|
onSeriesMouseClick: me,
|
|
778
|
-
rtl:
|
|
779
|
+
rtl: s === "he" || s === "ar",
|
|
779
780
|
annotations: fe,
|
|
780
781
|
customHighlightAreaSettings: ue,
|
|
781
782
|
regressionLine: X,
|
|
@@ -784,22 +785,22 @@ function Zi(ye) {
|
|
|
784
785
|
noOfXTicks: ge,
|
|
785
786
|
noOfYTicks: R,
|
|
786
787
|
labelColor: he,
|
|
787
|
-
xSuffix:
|
|
788
|
+
xSuffix: U,
|
|
788
789
|
ySuffix: ne,
|
|
789
790
|
xPrefix: ce,
|
|
790
791
|
yPrefix: xe,
|
|
791
792
|
styles: v,
|
|
792
793
|
classNames: g,
|
|
793
|
-
animate:
|
|
794
|
+
animate: J === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : J || { duration: 0, once: !0, amount: 0 },
|
|
794
795
|
dimmedOpacity: y,
|
|
795
796
|
precision: b,
|
|
796
|
-
customLayers:
|
|
797
|
+
customLayers: C
|
|
797
798
|
}
|
|
798
799
|
) : null
|
|
799
800
|
}
|
|
800
801
|
)
|
|
801
802
|
] }) }),
|
|
802
|
-
|
|
803
|
+
oe || K ? /* @__PURE__ */ t.jsx(
|
|
803
804
|
si,
|
|
804
805
|
{
|
|
805
806
|
styles: { footnote: v?.footnote, source: v?.source },
|
|
@@ -807,8 +808,8 @@ function Zi(ye) {
|
|
|
807
808
|
footnote: g?.footnote,
|
|
808
809
|
source: g?.source
|
|
809
810
|
},
|
|
810
|
-
sources:
|
|
811
|
-
footNote:
|
|
811
|
+
sources: oe,
|
|
812
|
+
footNote: K,
|
|
812
813
|
width: u
|
|
813
814
|
}
|
|
814
815
|
) : null
|