@undp/data-viz 1.4.12 → 1.4.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/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.js +25 -24
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +638 -632
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +134 -132
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +35 -34
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +226 -224
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +48 -47
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +56 -55
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.cjs +3 -3
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +2 -1
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.js +9 -8
- package/dist/DataTable.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +1 -0
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +77 -76
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +1 -0
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{DropdownSelect-CeHog_ih.js → DropdownSelect-CtOKZHD0.js} +22 -20
- package/dist/{DropdownSelect-CeHog_ih.js.map → DropdownSelect-CtOKZHD0.js.map} +1 -1
- package/dist/{DropdownSelect-BmE5JaeE.cjs → DropdownSelect-DBDM64B5.cjs} +2 -2
- package/dist/{DropdownSelect-BmE5JaeE.cjs.map → DropdownSelect-DBDM64B5.cjs.map} +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +3 -1
- package/dist/DualAxisLineChart.js +265 -261
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +216 -214
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.js +1 -0
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.cjs.map +1 -1
- package/dist/GeoHubMap.js +29 -28
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +34 -33
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/{GraphEl-s3ctz7oA.js → GraphEl-N6vuMRw_.js} +6 -2
- package/dist/GraphEl-N6vuMRw_.js.map +1 -0
- package/dist/GraphEl-Zl0W-LK9.cjs +2 -0
- package/dist/GraphEl-Zl0W-LK9.cjs.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +2 -2
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.js +55 -54
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +22 -21
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboard.js +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +34 -33
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +72 -71
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +4 -0
- package/dist/ParetoChart.js +317 -312
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +27 -26
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +30 -29
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +119 -118
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +16 -15
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +2 -2
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +46 -45
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.cjs.map +1 -1
- package/dist/SparkLine.js +12 -11
- package/dist/SparkLine.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +81 -79
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +1 -0
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +114 -113
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +1 -0
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.js +10 -9
- package/dist/UnitChart.js.map +1 -1
- package/dist/{index-CZLvTu6p.cjs → index-BbNoLJ_w.cjs} +2 -2
- package/dist/{index-CZLvTu6p.cjs.map → index-BbNoLJ_w.cjs.map} +1 -1
- package/dist/{index-DGAaLNu9.js → index-Bc5VF70V.js} +46 -45
- package/dist/{index-DGAaLNu9.js.map → index-Bc5VF70V.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/GraphEl-OzC-icbr.cjs +0 -2
- package/dist/GraphEl-OzC-icbr.cjs.map +0 -1
- package/dist/GraphEl-s3ctz7oA.js.map +0 -1
package/dist/MultiLineChart.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as e, m as q } from "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
2
2
|
import { useRef as ht, useState as Y, useEffect as Dt } from "react";
|
|
3
|
-
import { p as
|
|
3
|
+
import { p as u, f as kt } from "./parse-DlCRUFh_.js";
|
|
4
4
|
import { s as Mt } from "./index-DxagiOHo.js";
|
|
5
5
|
import { n as Nt } from "./numberFormattingFunction-14YCbkN2.js";
|
|
6
6
|
import { T as St } from "./Tooltip-DyM5snqx.js";
|
|
7
|
-
import { c as
|
|
7
|
+
import { c as x } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
8
8
|
import { C as Vt, g as It, A as Ht } from "./customArea-B-dWU0zZ.js";
|
|
9
9
|
import { A as Rt } from "./AxisTitle-BmHLMRJZ.js";
|
|
10
10
|
import { A as Ft } from "./Axis-Ddg-seDi.js";
|
|
@@ -37,7 +37,7 @@ function re(dt) {
|
|
|
37
37
|
noOfXTicks: xt,
|
|
38
38
|
labels: j,
|
|
39
39
|
rightMargin: I,
|
|
40
|
-
topMargin:
|
|
40
|
+
topMargin: m,
|
|
41
41
|
bottomMargin: J,
|
|
42
42
|
suffix: H,
|
|
43
43
|
prefix: R,
|
|
@@ -47,13 +47,13 @@ function re(dt) {
|
|
|
47
47
|
showValues: L,
|
|
48
48
|
showColorLegendAtTop: gt,
|
|
49
49
|
refValues: K,
|
|
50
|
-
highlightAreaSettings:
|
|
50
|
+
highlightAreaSettings: ft,
|
|
51
51
|
minValue: F,
|
|
52
52
|
maxValue: Q,
|
|
53
53
|
highlightedLines: A,
|
|
54
54
|
animate: o,
|
|
55
55
|
rtl: G,
|
|
56
|
-
strokeWidth:
|
|
56
|
+
strokeWidth: ut,
|
|
57
57
|
showDots: pt,
|
|
58
58
|
annotations: yt,
|
|
59
59
|
customHighlightAreaSettings: wt,
|
|
@@ -71,12 +71,12 @@ function re(dt) {
|
|
|
71
71
|
dashSettings: et,
|
|
72
72
|
labelsToBeHidden: jt,
|
|
73
73
|
revealClipId: it
|
|
74
|
-
} = dt, at = ht(null),
|
|
74
|
+
} = dt, at = ht(null), h = te(at, {
|
|
75
75
|
once: o.once,
|
|
76
76
|
amount: o.amount
|
|
77
77
|
}), [b, Ct] = Y(!1);
|
|
78
78
|
Dt(() => {
|
|
79
|
-
if (
|
|
79
|
+
if (h && !b) {
|
|
80
80
|
const t = setTimeout(
|
|
81
81
|
() => {
|
|
82
82
|
Ct(!0);
|
|
@@ -85,56 +85,56 @@ function re(dt) {
|
|
|
85
85
|
);
|
|
86
86
|
return () => clearTimeout(t);
|
|
87
87
|
}
|
|
88
|
-
}, [
|
|
88
|
+
}, [h, b, o.duration]);
|
|
89
89
|
const bt = N === "linear" ? zt : N === "step" ? Ut : N === "stepAfter" ? _t : N === "stepBefore" ? qt : Jt, [y, O] = Y(void 0), [ot, nt] = Y(void 0), [st, rt] = Y(void 0), w = {
|
|
90
|
-
top:
|
|
90
|
+
top: m,
|
|
91
91
|
bottom: J,
|
|
92
92
|
left: Z ? C + 30 : C,
|
|
93
93
|
right: I
|
|
94
94
|
}, _ = ht(null), n = Mt(
|
|
95
95
|
T.map((t) => ({
|
|
96
96
|
...t,
|
|
97
|
-
date:
|
|
97
|
+
date: u(`${t.date}`, l, /* @__PURE__ */ new Date())
|
|
98
98
|
})),
|
|
99
99
|
"date"
|
|
100
100
|
), M = n[0].y.map((t, i) => n.map((a) => ({
|
|
101
101
|
...a,
|
|
102
102
|
y: a.y[i]
|
|
103
|
-
})).filter((a) => !
|
|
103
|
+
})).filter((a) => !x(a.y))), lt = ft.map((t) => ({
|
|
104
104
|
...t,
|
|
105
105
|
coordinates: [
|
|
106
|
-
t.coordinates[0] === null ? null :
|
|
107
|
-
t.coordinates[1] === null ? null :
|
|
106
|
+
t.coordinates[0] === null ? null : u(`${t.coordinates[0]}`, l, /* @__PURE__ */ new Date()),
|
|
107
|
+
t.coordinates[1] === null ? null : u(`${t.coordinates[1]}`, l, /* @__PURE__ */ new Date())
|
|
108
108
|
]
|
|
109
109
|
})), ct = wt.map((t) => ({
|
|
110
110
|
...t,
|
|
111
111
|
coordinates: t.coordinates.map(
|
|
112
|
-
(i, a) => a % 2 === 0 ?
|
|
112
|
+
(i, a) => a % 2 === 0 ? u(`${i}`, l, /* @__PURE__ */ new Date()) : i
|
|
113
113
|
)
|
|
114
|
-
})), g = D - w.left - w.right,
|
|
114
|
+
})), g = D - w.left - w.right, f = V - w.top - w.bottom, mt = B ? u(`${B}`, l, /* @__PURE__ */ new Date()) : n[0].date, d = z ? u(`${z}`, l, /* @__PURE__ */ new Date()) : n[n.length - 1].date, v = x(F) ? Math.min(
|
|
115
115
|
...n.map(
|
|
116
|
-
(t) => Math.min(...t.y.filter((i) => !
|
|
116
|
+
(t) => Math.min(...t.y.filter((i) => !x(i)))
|
|
117
117
|
)
|
|
118
118
|
) ? Math.min(
|
|
119
119
|
...n.map(
|
|
120
|
-
(t) => Math.min(...t.y.filter((i) => !
|
|
120
|
+
(t) => Math.min(...t.y.filter((i) => !x(i)))
|
|
121
121
|
)
|
|
122
122
|
) > 0 ? 0 : Math.min(
|
|
123
123
|
...n.map(
|
|
124
|
-
(t) => Math.min(...t.y.filter((i) => !
|
|
124
|
+
(t) => Math.min(...t.y.filter((i) => !x(i)))
|
|
125
125
|
)
|
|
126
126
|
) : 0 : F, At = Math.max(
|
|
127
127
|
...n.map(
|
|
128
|
-
(t) => Math.max(...t.y.filter((i) => !
|
|
128
|
+
(t) => Math.max(...t.y.filter((i) => !x(i)))
|
|
129
129
|
)
|
|
130
130
|
) ? Math.max(
|
|
131
131
|
...n.map(
|
|
132
|
-
(t) => Math.max(...t.y.filter((i) => !
|
|
132
|
+
(t) => Math.max(...t.y.filter((i) => !x(i)))
|
|
133
133
|
)
|
|
134
|
-
) : 0, s = Et().domain([mt,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
]).range([
|
|
134
|
+
) : 0, s = Et().domain([mt, d]).range([0, g]), r = Gt().domain([
|
|
135
|
+
x(F) ? v : F,
|
|
136
|
+
x(Q) ? At > 0 ? At : 0 : Q
|
|
137
|
+
]).range([f, 0]).nice(), Lt = Bt().x((t) => s(t.date)).y((t) => r(t.y)).curve(bt), Tt = r.ticks(vt), $t = s.ticks(xt);
|
|
138
138
|
return Dt(() => {
|
|
139
139
|
const t = (a) => {
|
|
140
140
|
const P = n[Qt(
|
|
@@ -162,7 +162,7 @@ function re(dt) {
|
|
|
162
162
|
{
|
|
163
163
|
x: 0,
|
|
164
164
|
y: 0,
|
|
165
|
-
height:
|
|
165
|
+
height: f,
|
|
166
166
|
variants: {
|
|
167
167
|
initial: { width: 0 },
|
|
168
168
|
whileInView: {
|
|
@@ -171,7 +171,7 @@ function re(dt) {
|
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
initial: "initial",
|
|
174
|
-
animate:
|
|
174
|
+
animate: h ? "whileInView" : "initial"
|
|
175
175
|
}
|
|
176
176
|
) }) }),
|
|
177
177
|
/* @__PURE__ */ e.jsx(
|
|
@@ -179,10 +179,10 @@ function re(dt) {
|
|
|
179
179
|
{
|
|
180
180
|
areaSettings: lt,
|
|
181
181
|
width: g,
|
|
182
|
-
height:
|
|
182
|
+
height: f,
|
|
183
183
|
scale: s,
|
|
184
184
|
animate: o,
|
|
185
|
-
isInView:
|
|
185
|
+
isInView: h
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
188
|
/* @__PURE__ */ e.jsx(
|
|
@@ -192,7 +192,7 @@ function re(dt) {
|
|
|
192
192
|
scaleX: s,
|
|
193
193
|
scaleY: r,
|
|
194
194
|
animate: o,
|
|
195
|
-
isInView:
|
|
195
|
+
isInView: h
|
|
196
196
|
}
|
|
197
197
|
),
|
|
198
198
|
/* @__PURE__ */ e.jsxs("g", { children: [
|
|
@@ -253,7 +253,7 @@ function re(dt) {
|
|
|
253
253
|
Rt,
|
|
254
254
|
{
|
|
255
255
|
x: 0 - C - 15,
|
|
256
|
-
y:
|
|
256
|
+
y: f / 2,
|
|
257
257
|
style: c?.yAxis?.title,
|
|
258
258
|
className: p?.yAxis?.title,
|
|
259
259
|
text: Z,
|
|
@@ -267,7 +267,7 @@ function re(dt) {
|
|
|
267
267
|
values: $t.map((t) => kt(t, l)),
|
|
268
268
|
x: $t.map((t) => s(t)),
|
|
269
269
|
y1: 0,
|
|
270
|
-
y2:
|
|
270
|
+
y2: f,
|
|
271
271
|
styles: {
|
|
272
272
|
gridLines: c?.xAxis?.gridLines,
|
|
273
273
|
labels: c?.xAxis?.labels
|
|
@@ -302,14 +302,14 @@ function re(dt) {
|
|
|
302
302
|
}
|
|
303
303
|
},
|
|
304
304
|
initial: "initial",
|
|
305
|
-
animate:
|
|
305
|
+
animate: h ? "whileInView" : "initial",
|
|
306
306
|
children: [
|
|
307
307
|
/* @__PURE__ */ e.jsx(
|
|
308
308
|
S.path,
|
|
309
309
|
{
|
|
310
310
|
style: {
|
|
311
311
|
fill: "none",
|
|
312
|
-
strokeWidth:
|
|
312
|
+
strokeWidth: ut
|
|
313
313
|
},
|
|
314
314
|
clipPath: `url(#${it})`,
|
|
315
315
|
exit: { opacity: 0, transition: { duration: o.duration } },
|
|
@@ -317,7 +317,7 @@ function re(dt) {
|
|
|
317
317
|
initial: {
|
|
318
318
|
...U.length === 0 ? { pathLength: 0 } : {},
|
|
319
319
|
d: Lt(
|
|
320
|
-
t.filter((a) => !
|
|
320
|
+
t.filter((a) => !x(a.y))
|
|
321
321
|
) || "",
|
|
322
322
|
opacity: 1,
|
|
323
323
|
stroke: $[i]
|
|
@@ -325,7 +325,7 @@ function re(dt) {
|
|
|
325
325
|
whileInView: {
|
|
326
326
|
...U.length === 0 ? { pathLength: 1 } : {},
|
|
327
327
|
d: Lt(
|
|
328
|
-
t.filter((a) => !
|
|
328
|
+
t.filter((a) => !x(a.y))
|
|
329
329
|
) || "",
|
|
330
330
|
opacity: 1,
|
|
331
331
|
stroke: $[i],
|
|
@@ -334,10 +334,10 @@ function re(dt) {
|
|
|
334
334
|
},
|
|
335
335
|
strokeDasharray: U.includes(j[i]) ? et[i % et.length] : void 0,
|
|
336
336
|
initial: "initial",
|
|
337
|
-
animate:
|
|
337
|
+
animate: h ? "whileInView" : "initial"
|
|
338
338
|
}
|
|
339
339
|
),
|
|
340
|
-
t.map((a, P) => /* @__PURE__ */ e.jsx("g", { children:
|
|
340
|
+
t.map((a, P) => /* @__PURE__ */ e.jsx("g", { children: x(a.y) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
341
341
|
pt ? /* @__PURE__ */ e.jsx(
|
|
342
342
|
S.circle,
|
|
343
343
|
{
|
|
@@ -357,7 +357,7 @@ function re(dt) {
|
|
|
357
357
|
}
|
|
358
358
|
},
|
|
359
359
|
initial: "initial",
|
|
360
|
-
animate:
|
|
360
|
+
animate: h ? "whileInView" : "initial"
|
|
361
361
|
}
|
|
362
362
|
) : null,
|
|
363
363
|
L ? /* @__PURE__ */ e.jsx(
|
|
@@ -387,7 +387,7 @@ function re(dt) {
|
|
|
387
387
|
}
|
|
388
388
|
},
|
|
389
389
|
initial: "initial",
|
|
390
|
-
animate:
|
|
390
|
+
animate: h ? "whileInView" : "initial",
|
|
391
391
|
children: Nt(a.y, "NA", W, R, H)
|
|
392
392
|
}
|
|
393
393
|
) : null
|
|
@@ -417,7 +417,7 @@ function re(dt) {
|
|
|
417
417
|
}
|
|
418
418
|
},
|
|
419
419
|
initial: "initial",
|
|
420
|
-
animate:
|
|
420
|
+
animate: h ? "whileInView" : "initial",
|
|
421
421
|
children: j[i]
|
|
422
422
|
}
|
|
423
423
|
)
|
|
@@ -429,7 +429,7 @@ function re(dt) {
|
|
|
429
429
|
"line",
|
|
430
430
|
{
|
|
431
431
|
y1: 0,
|
|
432
|
-
y2:
|
|
432
|
+
y2: f,
|
|
433
433
|
x1: s(y.date),
|
|
434
434
|
x2: s(y.date),
|
|
435
435
|
className: q(
|
|
@@ -451,34 +451,34 @@ function re(dt) {
|
|
|
451
451
|
classNames: t.classNames,
|
|
452
452
|
styles: t.styles,
|
|
453
453
|
animate: o,
|
|
454
|
-
isInView:
|
|
454
|
+
isInView: h
|
|
455
455
|
},
|
|
456
456
|
i
|
|
457
457
|
)) }) : null,
|
|
458
458
|
/* @__PURE__ */ e.jsx("g", { children: yt.map((t, i) => {
|
|
459
459
|
const a = It(
|
|
460
460
|
{
|
|
461
|
-
x: t.xCoordinate ? s(
|
|
461
|
+
x: t.xCoordinate ? s(u(`${t.xCoordinate}`, l, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0),
|
|
462
462
|
y: t.yCoordinate ? r(t.yCoordinate) + (t.yOffset || 0) - 8 : 0 + (t.yOffset || 0) - 8
|
|
463
463
|
},
|
|
464
464
|
{
|
|
465
|
-
x: t.xCoordinate ? s(
|
|
465
|
+
x: t.xCoordinate ? s(u(`${t.xCoordinate}`, l, /* @__PURE__ */ new Date())) : 0,
|
|
466
466
|
y: t.yCoordinate ? r(t.yCoordinate) : 0
|
|
467
467
|
},
|
|
468
|
-
|
|
468
|
+
x(t.connectorRadius) ? 3.5 : t.connectorRadius
|
|
469
469
|
), P = t.showConnector ? {
|
|
470
470
|
y1: a.y,
|
|
471
471
|
x1: a.x,
|
|
472
472
|
y2: t.yCoordinate ? r(t.yCoordinate) + (t.yOffset || 0) : 0 + (t.yOffset || 0),
|
|
473
|
-
x2: t.xCoordinate ? s(
|
|
473
|
+
x2: t.xCoordinate ? s(u(`${t.xCoordinate}`, l, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0),
|
|
474
474
|
cy: t.yCoordinate ? r(t.yCoordinate) : 0,
|
|
475
|
-
cx: t.xCoordinate ? s(
|
|
476
|
-
circleRadius:
|
|
475
|
+
cx: t.xCoordinate ? s(u(`${t.xCoordinate}`, l, /* @__PURE__ */ new Date())) : 0,
|
|
476
|
+
circleRadius: x(t.connectorRadius) ? 3.5 : t.connectorRadius,
|
|
477
477
|
strokeWidth: t.showConnector === !0 ? 2 : Math.min(t.showConnector || 0, 1)
|
|
478
478
|
} : void 0, Ot = {
|
|
479
479
|
y: t.yCoordinate ? r(t.yCoordinate) + (t.yOffset || 0) - 8 : 0 + (t.yOffset || 0) - 8,
|
|
480
|
-
x: G ? 0 : t.xCoordinate ? s(
|
|
481
|
-
width: G ? t.xCoordinate ? s(
|
|
480
|
+
x: G ? 0 : t.xCoordinate ? s(u(`${t.xCoordinate}`, l, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0),
|
|
481
|
+
width: G ? t.xCoordinate ? s(u(`${t.xCoordinate}`, l, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0) : g + w.right - (t.xCoordinate ? s(u(`${t.xCoordinate}`, l, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0)),
|
|
482
482
|
maxWidth: t.maxWidth,
|
|
483
483
|
fontWeight: t.fontWeight,
|
|
484
484
|
align: t.align
|
|
@@ -493,7 +493,7 @@ function re(dt) {
|
|
|
493
493
|
classNames: t.classNames,
|
|
494
494
|
styles: t.styles,
|
|
495
495
|
animate: o,
|
|
496
|
-
isInView:
|
|
496
|
+
isInView: h
|
|
497
497
|
},
|
|
498
498
|
i
|
|
499
499
|
);
|
|
@@ -508,7 +508,7 @@ function re(dt) {
|
|
|
508
508
|
pointerEvents: "all"
|
|
509
509
|
},
|
|
510
510
|
width: g,
|
|
511
|
-
height:
|
|
511
|
+
height: f
|
|
512
512
|
}
|
|
513
513
|
)
|
|
514
514
|
] })
|
|
@@ -537,7 +537,7 @@ function Re(dt) {
|
|
|
537
537
|
prefix: xt = "",
|
|
538
538
|
graphDescription: j,
|
|
539
539
|
height: I,
|
|
540
|
-
width:
|
|
540
|
+
width: m,
|
|
541
541
|
footNote: J,
|
|
542
542
|
noOfXTicks: H = 10,
|
|
543
543
|
dateFormat: R = "yyyy",
|
|
@@ -547,13 +547,13 @@ function Re(dt) {
|
|
|
547
547
|
backgroundColor: L = !1,
|
|
548
548
|
leftMargin: gt = 30,
|
|
549
549
|
rightMargin: K = 50,
|
|
550
|
-
topMargin:
|
|
550
|
+
topMargin: ft = 20,
|
|
551
551
|
bottomMargin: F = 25,
|
|
552
552
|
tooltip: Q,
|
|
553
553
|
relativeHeight: A,
|
|
554
554
|
onSeriesMouseOver: o,
|
|
555
555
|
showColorLegendAtTop: G = !1,
|
|
556
|
-
refValues:
|
|
556
|
+
refValues: ut = [],
|
|
557
557
|
highlightAreaSettings: pt = [],
|
|
558
558
|
graphID: yt,
|
|
559
559
|
minValue: wt,
|
|
@@ -572,7 +572,7 @@ function Re(dt) {
|
|
|
572
572
|
theme: jt = "light",
|
|
573
573
|
ariaLabel: it,
|
|
574
574
|
yAxisTitle: at,
|
|
575
|
-
noOfYTicks:
|
|
575
|
+
noOfYTicks: h = 5,
|
|
576
576
|
minDate: b,
|
|
577
577
|
maxDate: Ct,
|
|
578
578
|
curveType: bt = "curve",
|
|
@@ -585,22 +585,23 @@ function Re(dt) {
|
|
|
585
585
|
dashSettings: w = ["5 5"],
|
|
586
586
|
labelsToBeHidden: _ = [],
|
|
587
587
|
showColorScale: n = !0
|
|
588
|
-
} = dt, [M, lt] = Y(0), [ct, g] = Y(0),
|
|
588
|
+
} = dt, [M, lt] = Y(0), [ct, g] = Y(0), f = ht(null), mt = ht(null);
|
|
589
589
|
return Dt(() => {
|
|
590
|
-
const
|
|
591
|
-
lt(
|
|
590
|
+
const d = new ResizeObserver((v) => {
|
|
591
|
+
lt(m || v[0].target.clientWidth || 620), g(I || v[0].target.clientHeight || 480);
|
|
592
592
|
});
|
|
593
|
-
return
|
|
594
|
-
}, [
|
|
593
|
+
return f.current && (g(f.current.clientHeight || 480), lt(f.current.clientWidth || 620), m || d.observe(f.current)), () => d.disconnect();
|
|
594
|
+
}, [m, I]), /* @__PURE__ */ e.jsx(
|
|
595
595
|
"div",
|
|
596
596
|
{
|
|
597
|
-
className: `${jt || "light"} flex ${
|
|
597
|
+
className: `${jt || "light"} flex ${m ? "w-fit grow-0" : "w-full grow"}`,
|
|
598
598
|
dir: c === "he" || c === "ar" ? "rtl" : void 0,
|
|
599
599
|
children: /* @__PURE__ */ e.jsx(
|
|
600
600
|
"div",
|
|
601
601
|
{
|
|
602
602
|
className: q(
|
|
603
603
|
`${L ? L === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${c || "en"}`,
|
|
604
|
+
m ? "w-fit" : "w-full",
|
|
604
605
|
O?.graphContainer
|
|
605
606
|
),
|
|
606
607
|
style: {
|
|
@@ -629,9 +630,9 @@ function Re(dt) {
|
|
|
629
630
|
},
|
|
630
631
|
graphTitle: D,
|
|
631
632
|
graphDescription: j,
|
|
632
|
-
width:
|
|
633
|
+
width: m,
|
|
633
634
|
graphDownload: B ? mt.current : void 0,
|
|
634
|
-
dataDownload: z ? T.map((
|
|
635
|
+
dataDownload: z ? T.map((d) => d.data).filter((d) => d !== void 0).length > 0 ? T.map((d) => d.data).filter((d) => d !== void 0) : T.filter((d) => d !== void 0) : null
|
|
635
636
|
}
|
|
636
637
|
) : null,
|
|
637
638
|
/* @__PURE__ */ e.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: T.length === 0 ? /* @__PURE__ */ e.jsx(ne, {}) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -645,21 +646,21 @@ function Re(dt) {
|
|
|
645
646
|
showNAColor: !1
|
|
646
647
|
}
|
|
647
648
|
) : null,
|
|
648
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref:
|
|
649
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-full grow leading-0", ref: f, "aria-label": "Graph area", children: (m || M) && (I || ct) ? /* @__PURE__ */ e.jsx(
|
|
649
650
|
re,
|
|
650
651
|
{
|
|
651
652
|
data: T,
|
|
652
653
|
lineColors: V,
|
|
653
|
-
width:
|
|
654
|
+
width: m || M,
|
|
654
655
|
height: Math.max(
|
|
655
656
|
k,
|
|
656
|
-
I || (A ? k ? (
|
|
657
|
+
I || (A ? k ? (m || M) * A > k ? (m || M) * A : k : (m || M) * A : ct)
|
|
657
658
|
),
|
|
658
659
|
dateFormat: R,
|
|
659
660
|
noOfXTicks: H,
|
|
660
661
|
leftMargin: gt,
|
|
661
662
|
rightMargin: K,
|
|
662
|
-
topMargin:
|
|
663
|
+
topMargin: ft,
|
|
663
664
|
bottomMargin: F,
|
|
664
665
|
labels: C,
|
|
665
666
|
tooltip: Q,
|
|
@@ -669,7 +670,7 @@ function Re(dt) {
|
|
|
669
670
|
suffix: $,
|
|
670
671
|
prefix: xt,
|
|
671
672
|
highlightAreaSettings: pt,
|
|
672
|
-
refValues:
|
|
673
|
+
refValues: ut,
|
|
673
674
|
minValue: wt,
|
|
674
675
|
maxValue: Z,
|
|
675
676
|
highlightedLines: vt,
|
|
@@ -680,7 +681,7 @@ function Re(dt) {
|
|
|
680
681
|
annotations: U,
|
|
681
682
|
customHighlightAreaSettings: et,
|
|
682
683
|
yAxisTitle: at,
|
|
683
|
-
noOfYTicks:
|
|
684
|
+
noOfYTicks: h,
|
|
684
685
|
minDate: b,
|
|
685
686
|
maxDate: Ct,
|
|
686
687
|
curveType: bt,
|
|
@@ -706,7 +707,7 @@ function Re(dt) {
|
|
|
706
707
|
},
|
|
707
708
|
sources: l,
|
|
708
709
|
footNote: J,
|
|
709
|
-
width:
|
|
710
|
+
width: m
|
|
710
711
|
}
|
|
711
712
|
) : null
|
|
712
713
|
] })
|