@undp/data-viz 1.4.13 → 1.4.15
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.js +54 -53
- 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-Bz2jatkM.cjs +2 -0
- package/dist/GraphEl-Bz2jatkM.cjs.map +1 -0
- package/dist/{GraphEl-B3xVlimz.js → GraphEl-zNOHBYrK.js} +4 -4
- package/dist/GraphEl-zNOHBYrK.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +2 -2
- 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.js +1 -1
- 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.js +24 -23
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +1 -1
- 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/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.js +2 -2
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- 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/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.js +1 -1
- package/package.json +2 -2
- package/dist/GraphEl-B3xVlimz.js.map +0 -1
- package/dist/GraphEl-DO-juRN8.cjs +0 -2
- package/dist/GraphEl-DO-juRN8.cjs.map +0 -1
|
@@ -30,7 +30,7 @@ function qt(ct) {
|
|
|
30
30
|
height: V,
|
|
31
31
|
lineColors: s,
|
|
32
32
|
labels: u,
|
|
33
|
-
sameAxes:
|
|
33
|
+
sameAxes: o,
|
|
34
34
|
dateFormat: f,
|
|
35
35
|
showValues: R,
|
|
36
36
|
noOfXTicks: mt,
|
|
@@ -50,7 +50,7 @@ function qt(ct) {
|
|
|
50
50
|
minDate: J,
|
|
51
51
|
maxDate: D,
|
|
52
52
|
curveType: C,
|
|
53
|
-
styles:
|
|
53
|
+
styles: l,
|
|
54
54
|
classNames: n,
|
|
55
55
|
precision: b,
|
|
56
56
|
customLayers: E,
|
|
@@ -87,18 +87,18 @@ function qt(ct) {
|
|
|
87
87
|
t.coordinates[0] === null ? null : G(`${t.coordinates[0]}`, f, /* @__PURE__ */ new Date()),
|
|
88
88
|
t.coordinates[1] === null ? null : G(`${t.coordinates[1]}`, f, /* @__PURE__ */ new Date())
|
|
89
89
|
]
|
|
90
|
-
})), x = A - h.left - h.right, r = V - h.top - h.bottom, st = J ? G(`${J}`, f, /* @__PURE__ */ new Date()) : e[0].date, nt = D ? G(`${D}`, f, /* @__PURE__ */ new Date()) : e[e.length - 1].date, H = Math.min(...e.map((t) => t.y1).filter((t) => t != null)) !== 1 / 0 ? Math.min(...e.map((t) => t.y2).filter((t) => t != null)) > 0 ? 0 : Math.min(...e.map((t) => t.y1).filter((t) => t != null)) : 0, j = Math.min(...e.map((t) => t.y2).filter((t) => t != null)) !== 1 / 0 ? Math.min(...e.map((t) => t.y2).filter((t) => t != null)) > 0 ? 0 : Math.min(...e.map((t) => t.y2).filter((t) => t != null)) : 0, $ = Math.max(...e.map((t) => t.y1).filter((t) => t != null)) !== 1 / 0 ? Math.max(...e.map((t) => t.y1).filter((t) => t != null)) : 0,
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
})), x = A - h.left - h.right, r = V - h.top - h.bottom, st = J ? G(`${J}`, f, /* @__PURE__ */ new Date()) : e[0].date, nt = D ? G(`${D}`, f, /* @__PURE__ */ new Date()) : e[e.length - 1].date, H = Math.min(...e.map((t) => t.y1).filter((t) => t != null)) !== 1 / 0 ? Math.min(...e.map((t) => t.y2).filter((t) => t != null)) > 0 ? 0 : Math.min(...e.map((t) => t.y1).filter((t) => t != null)) : 0, j = Math.min(...e.map((t) => t.y2).filter((t) => t != null)) !== 1 / 0 ? Math.min(...e.map((t) => t.y2).filter((t) => t != null)) > 0 ? 0 : Math.min(...e.map((t) => t.y2).filter((t) => t != null)) : 0, $ = Math.max(...e.map((t) => t.y1).filter((t) => t != null)) !== 1 / 0 ? Math.max(...e.map((t) => t.y1).filter((t) => t != null)) : 0, c = Math.max(...e.map((t) => t.y2).filter((t) => t != null)) !== 1 / 0 ? Math.max(...e.map((t) => t.y2).filter((t) => t != null)) : 0, Y = H < j ? H : j, rt = $ > c ? $ : c, m = St().domain([st, nt]).range([0, x]), I = bt().domain([
|
|
91
|
+
o ? Y : H,
|
|
92
|
+
o ? rt > 0 ? rt : 0 : $ > 0 ? $ : 0
|
|
93
93
|
]).range([r, 0]).nice(), p = bt().domain([
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
]).range([r, 0]).nice(), vt = Nt().defined((t) => !g(t.y1)).x((t) =>
|
|
94
|
+
o ? Y : j,
|
|
95
|
+
o ? rt > 0 ? rt : 0 : c > 0 ? c : 0
|
|
96
|
+
]).range([r, 0]).nice(), vt = Nt().defined((t) => !g(t.y1)).x((t) => m(t.date)).y((t) => I(t.y1)).curve(Z), ut = Nt().defined((t) => !g(t.y2)).x((t) => m(t.date)).y((t) => p(t.y2)).curve(Z), Lt = I.ticks(q), Dt = p.ticks(q), wt = m.ticks(mt);
|
|
97
97
|
return ft(() => {
|
|
98
98
|
const t = (pt) => {
|
|
99
99
|
const jt = e[Et(
|
|
100
100
|
e.map((Mt) => Mt.date),
|
|
101
|
-
|
|
101
|
+
m.invert(Yt(pt)[0]),
|
|
102
102
|
0
|
|
103
103
|
)];
|
|
104
104
|
_(jt || e[e.length - 1]), W?.(jt || e[e.length - 1]), at(pt.clientY), it(pt.clientX);
|
|
@@ -106,7 +106,7 @@ function qt(ct) {
|
|
|
106
106
|
_(void 0), it(void 0), at(void 0), W?.(void 0);
|
|
107
107
|
};
|
|
108
108
|
Xt(w.current).on("mousemove", t).on("mouseout", T);
|
|
109
|
-
}, [
|
|
109
|
+
}, [m, e, W]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
110
110
|
/* @__PURE__ */ i.jsx(
|
|
111
111
|
N.svg,
|
|
112
112
|
{
|
|
@@ -122,7 +122,7 @@ function qt(ct) {
|
|
|
122
122
|
areaSettings: dt,
|
|
123
123
|
width: x,
|
|
124
124
|
height: r,
|
|
125
|
-
scale:
|
|
125
|
+
scale: m,
|
|
126
126
|
animate: a,
|
|
127
127
|
isInView: y
|
|
128
128
|
}
|
|
@@ -139,7 +139,7 @@ function qt(ct) {
|
|
|
139
139
|
style: {
|
|
140
140
|
stroke: s[0],
|
|
141
141
|
strokeWidth: 1,
|
|
142
|
-
...
|
|
142
|
+
...l?.yAxis?.gridLines || {}
|
|
143
143
|
},
|
|
144
144
|
className: n?.yAxis?.gridLines
|
|
145
145
|
}
|
|
@@ -154,7 +154,7 @@ function qt(ct) {
|
|
|
154
154
|
style: {
|
|
155
155
|
textAnchor: "end",
|
|
156
156
|
fill: s[0],
|
|
157
|
-
...
|
|
157
|
+
...l?.yAxis?.labels || {}
|
|
158
158
|
},
|
|
159
159
|
children: ot(t, "NA", b, S[0], O[0])
|
|
160
160
|
}
|
|
@@ -168,7 +168,7 @@ function qt(ct) {
|
|
|
168
168
|
x1: -15,
|
|
169
169
|
x2: -15,
|
|
170
170
|
classNames: { axis: n?.xAxis?.axis },
|
|
171
|
-
styles: { axis: { stroke: s[0], ...
|
|
171
|
+
styles: { axis: { stroke: s[0], ...l?.xAxis?.axis || {} } }
|
|
172
172
|
}
|
|
173
173
|
),
|
|
174
174
|
K ? /* @__PURE__ */ i.jsx(
|
|
@@ -176,7 +176,7 @@ function qt(ct) {
|
|
|
176
176
|
{
|
|
177
177
|
x: 10 - h.left,
|
|
178
178
|
y: r / 2,
|
|
179
|
-
style: { fill: s[0], ...
|
|
179
|
+
style: { fill: s[0], ...l?.yAxis?.title || {} },
|
|
180
180
|
className: n?.yAxis?.title,
|
|
181
181
|
text: u[0].length > 100 ? `${u[0].substring(0, 100)}...` : u[0],
|
|
182
182
|
rotate90: !0
|
|
@@ -195,7 +195,7 @@ function qt(ct) {
|
|
|
195
195
|
style: {
|
|
196
196
|
stroke: s[1],
|
|
197
197
|
strokeWidth: 1,
|
|
198
|
-
...
|
|
198
|
+
...l?.yAxis?.gridLines || {}
|
|
199
199
|
},
|
|
200
200
|
className: n?.yAxis?.gridLines
|
|
201
201
|
}
|
|
@@ -210,7 +210,7 @@ function qt(ct) {
|
|
|
210
210
|
style: {
|
|
211
211
|
textAnchor: "start",
|
|
212
212
|
fill: s[1],
|
|
213
|
-
...
|
|
213
|
+
...l?.yAxis?.labels || {}
|
|
214
214
|
},
|
|
215
215
|
className: k("text-xs", n?.yAxis?.labels),
|
|
216
216
|
children: ot(t, "NA", b, S[1], O[1])
|
|
@@ -225,7 +225,7 @@ function qt(ct) {
|
|
|
225
225
|
x1: x + 15,
|
|
226
226
|
x2: x + 15,
|
|
227
227
|
classNames: { axis: n?.xAxis?.axis },
|
|
228
|
-
styles: { axis: { stroke: s[1], ...
|
|
228
|
+
styles: { axis: { stroke: s[1], ...l?.xAxis?.axis || {} } }
|
|
229
229
|
}
|
|
230
230
|
),
|
|
231
231
|
K ? /* @__PURE__ */ i.jsx(
|
|
@@ -233,7 +233,7 @@ function qt(ct) {
|
|
|
233
233
|
{
|
|
234
234
|
x: x + h.right - 15,
|
|
235
235
|
y: r / 2,
|
|
236
|
-
style: { fill: s[1], ...
|
|
236
|
+
style: { fill: s[1], ...l?.yAxis?.title || {} },
|
|
237
237
|
className: n?.yAxis?.title,
|
|
238
238
|
text: u[1].length > 100 ? `${u[1].substring(0, 100)}...` : u[1],
|
|
239
239
|
rotate90: !0
|
|
@@ -249,19 +249,19 @@ function qt(ct) {
|
|
|
249
249
|
x1: -15,
|
|
250
250
|
x2: x + 15,
|
|
251
251
|
classNames: { axis: n?.xAxis?.axis },
|
|
252
|
-
styles: { axis:
|
|
252
|
+
styles: { axis: l?.xAxis?.axis }
|
|
253
253
|
}
|
|
254
254
|
),
|
|
255
255
|
/* @__PURE__ */ i.jsx(
|
|
256
256
|
Vt,
|
|
257
257
|
{
|
|
258
258
|
values: wt.map((t) => $t(t, f)),
|
|
259
|
-
x: wt.map((t) =>
|
|
259
|
+
x: wt.map((t) => m(t)),
|
|
260
260
|
y1: 0,
|
|
261
261
|
y2: r,
|
|
262
262
|
styles: {
|
|
263
|
-
gridLines:
|
|
264
|
-
labels:
|
|
263
|
+
gridLines: l?.xAxis?.gridLines,
|
|
264
|
+
labels: l?.xAxis?.labels
|
|
265
265
|
},
|
|
266
266
|
classNames: {
|
|
267
267
|
gridLines: k("opacity-0", n?.xAxis?.gridLines),
|
|
@@ -356,13 +356,13 @@ function qt(ct) {
|
|
|
356
356
|
{
|
|
357
357
|
y1: 0,
|
|
358
358
|
y2: r,
|
|
359
|
-
x1:
|
|
360
|
-
x2:
|
|
359
|
+
x1: m(M.date),
|
|
360
|
+
x2: m(M.date),
|
|
361
361
|
className: k(
|
|
362
362
|
"undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",
|
|
363
363
|
n?.mouseOverLine
|
|
364
364
|
),
|
|
365
|
-
style:
|
|
365
|
+
style: l?.mouseOverLine
|
|
366
366
|
}
|
|
367
367
|
) : null
|
|
368
368
|
] }),
|
|
@@ -375,14 +375,14 @@ function qt(ct) {
|
|
|
375
375
|
style: { fill: s[0] },
|
|
376
376
|
exit: { opacity: 0, transition: { duration: a.duration } },
|
|
377
377
|
variants: {
|
|
378
|
-
initial: { opacity: 0, cx:
|
|
378
|
+
initial: { opacity: 0, cx: m(t.date), cy: I(t.y1) },
|
|
379
379
|
whileInView: {
|
|
380
380
|
opacity: 1,
|
|
381
381
|
transition: {
|
|
382
382
|
duration: d ? a.duration : 0.5,
|
|
383
383
|
delay: d ? 0 : a.duration
|
|
384
384
|
},
|
|
385
|
-
cx:
|
|
385
|
+
cx: m(t.date),
|
|
386
386
|
cy: I(t.y1)
|
|
387
387
|
}
|
|
388
388
|
},
|
|
@@ -397,7 +397,7 @@ function qt(ct) {
|
|
|
397
397
|
style: {
|
|
398
398
|
fill: s[0],
|
|
399
399
|
textAnchor: "middle",
|
|
400
|
-
...
|
|
400
|
+
...l?.graphObjectValues || {}
|
|
401
401
|
},
|
|
402
402
|
className: k(
|
|
403
403
|
"graph-value graph-value-line-1 text-xs font-bold",
|
|
@@ -405,10 +405,10 @@ function qt(ct) {
|
|
|
405
405
|
),
|
|
406
406
|
exit: { opacity: 0, transition: { duration: a.duration } },
|
|
407
407
|
variants: {
|
|
408
|
-
initial: { opacity: 0, x:
|
|
408
|
+
initial: { opacity: 0, x: m(t.date), y: p(t.y1) },
|
|
409
409
|
whileInView: {
|
|
410
410
|
opacity: 1,
|
|
411
|
-
x:
|
|
411
|
+
x: m(t.date),
|
|
412
412
|
y: p(t.y1),
|
|
413
413
|
transition: {
|
|
414
414
|
duration: d ? a.duration : 0.5,
|
|
@@ -436,14 +436,14 @@ function qt(ct) {
|
|
|
436
436
|
style: { fill: s[1] },
|
|
437
437
|
exit: { opacity: 0, transition: { duration: a.duration } },
|
|
438
438
|
variants: {
|
|
439
|
-
initial: { opacity: 0, cx:
|
|
439
|
+
initial: { opacity: 0, cx: m(t.date), cy: p(t.y2) },
|
|
440
440
|
whileInView: {
|
|
441
441
|
opacity: 1,
|
|
442
442
|
transition: {
|
|
443
443
|
duration: d ? a.duration : 0.5,
|
|
444
444
|
delay: d ? 0 : a.duration
|
|
445
445
|
},
|
|
446
|
-
cx:
|
|
446
|
+
cx: m(t.date),
|
|
447
447
|
cy: p(t.y2)
|
|
448
448
|
}
|
|
449
449
|
},
|
|
@@ -458,7 +458,7 @@ function qt(ct) {
|
|
|
458
458
|
style: {
|
|
459
459
|
fill: s[1],
|
|
460
460
|
textAnchor: "middle",
|
|
461
|
-
...
|
|
461
|
+
...l?.graphObjectValues || {}
|
|
462
462
|
},
|
|
463
463
|
className: k(
|
|
464
464
|
"graph-value graph-value-line-2 text-xs font-bold",
|
|
@@ -466,10 +466,10 @@ function qt(ct) {
|
|
|
466
466
|
),
|
|
467
467
|
exit: { opacity: 0, transition: { duration: a.duration } },
|
|
468
468
|
variants: {
|
|
469
|
-
initial: { opacity: 0, x:
|
|
469
|
+
initial: { opacity: 0, x: m(t.date), y: p(t.y2) },
|
|
470
470
|
whileInView: {
|
|
471
471
|
opacity: 1,
|
|
472
|
-
x:
|
|
472
|
+
x: m(t.date),
|
|
473
473
|
y: p(t.y2),
|
|
474
474
|
transition: {
|
|
475
475
|
duration: d ? a.duration : 0.5,
|
|
@@ -513,7 +513,7 @@ function qt(ct) {
|
|
|
513
513
|
body: v,
|
|
514
514
|
xPos: tt,
|
|
515
515
|
yPos: et,
|
|
516
|
-
backgroundStyle:
|
|
516
|
+
backgroundStyle: l?.tooltip,
|
|
517
517
|
className: n?.tooltip
|
|
518
518
|
}
|
|
519
519
|
) : null
|
|
@@ -526,7 +526,7 @@ function wi(ct) {
|
|
|
526
526
|
sources: V,
|
|
527
527
|
graphDescription: s,
|
|
528
528
|
height: u,
|
|
529
|
-
width:
|
|
529
|
+
width: o,
|
|
530
530
|
footNote: f,
|
|
531
531
|
noOfXTicks: R = 10,
|
|
532
532
|
dateFormat: mt = "yyyy",
|
|
@@ -549,7 +549,7 @@ function wi(ct) {
|
|
|
549
549
|
highlightAreaSettings: J = [],
|
|
550
550
|
relativeHeight: D,
|
|
551
551
|
onSeriesMouseOver: C,
|
|
552
|
-
graphID:
|
|
552
|
+
graphID: l,
|
|
553
553
|
graphDownload: n = !1,
|
|
554
554
|
dataDownload: b = !1,
|
|
555
555
|
animate: E = !1,
|
|
@@ -572,27 +572,28 @@ function wi(ct) {
|
|
|
572
572
|
showAxisLabels: x = !0
|
|
573
573
|
} = ct, [r, st] = P(0), [nt, H] = P(0), j = lt(null), $ = lt(null);
|
|
574
574
|
return ft(() => {
|
|
575
|
-
const
|
|
576
|
-
st(
|
|
575
|
+
const c = new ResizeObserver((Y) => {
|
|
576
|
+
st(o || Y[0].target.clientWidth || 620), H(u || Y[0].target.clientHeight || 480);
|
|
577
577
|
});
|
|
578
|
-
return j.current && (H(j.current.clientHeight || 480), st(j.current.clientWidth || 620),
|
|
579
|
-
}, [
|
|
578
|
+
return j.current && (H(j.current.clientHeight || 480), st(j.current.clientWidth || 620), o || c.observe(j.current)), () => c.disconnect();
|
|
579
|
+
}, [o, u]), /* @__PURE__ */ i.jsx(
|
|
580
580
|
"div",
|
|
581
581
|
{
|
|
582
|
-
className: `${M || "light"} flex ${
|
|
582
|
+
className: `${M || "light"} flex ${o ? "w-fit grow-0" : "w-full grow"}`,
|
|
583
583
|
dir: y === "he" || y === "ar" ? "rtl" : void 0,
|
|
584
584
|
children: /* @__PURE__ */ i.jsx(
|
|
585
585
|
"div",
|
|
586
586
|
{
|
|
587
587
|
className: k(
|
|
588
588
|
`${v ? v === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${y || "en"}`,
|
|
589
|
+
o ? "w-fit" : "w-full",
|
|
589
590
|
w?.graphContainer
|
|
590
591
|
),
|
|
591
592
|
style: {
|
|
592
593
|
...h?.graphContainer || {},
|
|
593
594
|
...v && v !== !0 ? { backgroundColor: v } : {}
|
|
594
595
|
},
|
|
595
|
-
id:
|
|
596
|
+
id: l,
|
|
596
597
|
ref: $,
|
|
597
598
|
"aria-label": _ || `${A ? `The graph shows ${A}. ` : ""}This is a line chart that show trends for two datasets over time.${s ? ` ${s}` : ""}`,
|
|
598
599
|
children: /* @__PURE__ */ i.jsx(
|
|
@@ -614,13 +615,13 @@ function wi(ct) {
|
|
|
614
615
|
},
|
|
615
616
|
graphTitle: A,
|
|
616
617
|
graphDescription: s,
|
|
617
|
-
width:
|
|
618
|
+
width: o,
|
|
618
619
|
graphDownload: n ? $.current : void 0,
|
|
619
|
-
dataDownload: b ? L.map((
|
|
620
|
+
dataDownload: b ? L.map((c) => c.data).filter((c) => c !== void 0).length > 0 ? L.map((c) => c.data).filter((c) => c !== void 0) : L.filter((c) => c !== void 0) : null
|
|
620
621
|
}
|
|
621
622
|
) : null,
|
|
622
623
|
/* @__PURE__ */ i.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: L.length === 0 ? /* @__PURE__ */ i.jsx(Ut, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
623
|
-
d ?
|
|
624
|
+
d ? /* @__PURE__ */ i.jsx(
|
|
624
625
|
zt,
|
|
625
626
|
{
|
|
626
627
|
colorDomain: X,
|
|
@@ -628,23 +629,23 @@ function wi(ct) {
|
|
|
628
629
|
colors: z,
|
|
629
630
|
showNAColor: !1
|
|
630
631
|
}
|
|
631
|
-
),
|
|
632
|
+
) : null,
|
|
632
633
|
/* @__PURE__ */ i.jsx(
|
|
633
634
|
"div",
|
|
634
635
|
{
|
|
635
636
|
className: "flex flex-col grow justify-center leading-0",
|
|
636
637
|
ref: j,
|
|
637
638
|
"aria-label": "Graph area",
|
|
638
|
-
children: (
|
|
639
|
+
children: (o || r) && (u || nt) ? /* @__PURE__ */ i.jsx(
|
|
639
640
|
qt,
|
|
640
641
|
{
|
|
641
642
|
data: L,
|
|
642
643
|
sameAxes: ht,
|
|
643
644
|
lineColors: z,
|
|
644
|
-
width:
|
|
645
|
+
width: o || r,
|
|
645
646
|
height: Math.max(
|
|
646
647
|
F,
|
|
647
|
-
u || (D ? F ? (
|
|
648
|
+
u || (D ? F ? (o || r) * D > F ? (o || r) * D : F : (o || r) * D : nt)
|
|
648
649
|
),
|
|
649
650
|
dateFormat: mt,
|
|
650
651
|
showValues: xt,
|
|
@@ -686,7 +687,7 @@ function wi(ct) {
|
|
|
686
687
|
},
|
|
687
688
|
sources: V,
|
|
688
689
|
footNote: f,
|
|
689
|
-
width:
|
|
690
|
+
width: o
|
|
690
691
|
}
|
|
691
692
|
) : null
|
|
692
693
|
] })
|