@undp/data-viz 2.0.0 → 2.0.1
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 +957 -957
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.js +45 -47
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +76 -56
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +157 -157
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +185 -185
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +2 -4
- package/dist/CirclePackingGraph.js.map +1 -1
- package/dist/Data/barChart.json +70 -0
- package/dist/Data/basic.csv +20 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +224 -223
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +156 -156
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +326 -325
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.js +183 -183
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/{GraphEl-DzRon4cb.js → GraphEl-BZne2JIx.js} +3 -3
- package/dist/{GraphEl-DzRon4cb.js.map → GraphEl-BZne2JIx.js.map} +1 -1
- package/dist/{GraphEl-BkyLYXG5.cjs → GraphEl-D5MUfp45.cjs} +2 -2
- package/dist/{GraphEl-BkyLYXG5.cjs.map → GraphEl-D5MUfp45.cjs.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +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 +133 -132
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.js +52 -50
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +11 -9
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +149 -148
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +182 -181
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +14 -12
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +123 -122
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.js +83 -79
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.js +49 -45
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +56 -52
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.js +44 -46
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +134 -134
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/getNoOfTicks-C_1CFXv_.cjs +2 -0
- package/dist/getNoOfTicks-C_1CFXv_.cjs.map +1 -0
- package/dist/getNoOfTicks-CpmRjcRF.js +7 -0
- package/dist/getNoOfTicks-CpmRjcRF.js.map +1 -0
- package/dist/index-C6LorfZ-.cjs +2 -0
- package/dist/index-C6LorfZ-.cjs.map +1 -0
- package/dist/index-Ceppbd8C.js +342 -0
- package/dist/index-Ceppbd8C.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/index-DoY3Ga3W.cjs +0 -2
- package/dist/index-DoY3Ga3W.cjs.map +0 -1
- package/dist/index-leTnKT2q.js +0 -329
- package/dist/index-leTnKT2q.js.map +0 -1
package/dist/SimpleLineChart.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as Te, m as ge, j as o } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
-
import { useRef as he, useState as
|
|
2
|
+
import { useRef as he, useState as Xt, useEffect as $e } from "react";
|
|
3
3
|
import { p as w, f as Re } from "./parse-DlCRUFh_.js";
|
|
4
4
|
import { l as He, a as Fe } from "./simple-statistics-flVzqVtt.js";
|
|
5
5
|
import { o as Ie } from "./index-BZQYSqar.js";
|
|
6
6
|
import { n as Se } from "./numberFormattingFunction-14YCbkN2.js";
|
|
7
7
|
import { T as We } from "./Tooltip-CwWUegPB.js";
|
|
8
8
|
import { c as bt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
9
|
-
import { g as Ye, A as
|
|
10
|
-
import { A as
|
|
9
|
+
import { g as Ye, A as Xe, C as Ge } from "./customArea-BUhPiPT6.js";
|
|
10
|
+
import { A as Pe } from "./Axis-CRyfcLjc.js";
|
|
11
11
|
import { A as Ee } from "./AxisTitle-jeI7am8o.js";
|
|
12
12
|
import { X as Be } from "./XTicksAndGridLines-CObVFSm4.js";
|
|
13
13
|
import { a as ze } from "./ReferenceLine-2XCwHXQ4.js";
|
|
@@ -28,12 +28,13 @@ import { GraphHeader as ci } from "./GraphHeader.js";
|
|
|
28
28
|
import { Colors as mi } from "./Colors.js";
|
|
29
29
|
import { E as fi } from "./EmptyState-BZo1BbAn.js";
|
|
30
30
|
import { a as ui, G as pi } from "./GraphContainer-CRqzdKu2.js";
|
|
31
|
-
|
|
31
|
+
import { g as xi } from "./getNoOfTicks-CpmRjcRF.js";
|
|
32
|
+
function di(i) {
|
|
32
33
|
const t = Te.c(110), {
|
|
33
34
|
data: A,
|
|
34
|
-
width:
|
|
35
|
+
width: Y,
|
|
35
36
|
height: nt,
|
|
36
|
-
lineColor:
|
|
37
|
+
lineColor: X,
|
|
37
38
|
suffix: b,
|
|
38
39
|
prefix: T,
|
|
39
40
|
dateFormat: n,
|
|
@@ -46,8 +47,8 @@ function xi(i) {
|
|
|
46
47
|
bottomMargin: at,
|
|
47
48
|
tooltip: rt,
|
|
48
49
|
onSeriesMouseOver: Dt,
|
|
49
|
-
refValues:
|
|
50
|
-
minValue:
|
|
50
|
+
refValues: Gt,
|
|
51
|
+
minValue: Pt,
|
|
51
52
|
maxValue: lt,
|
|
52
53
|
animate: s,
|
|
53
54
|
rtl: Lt,
|
|
@@ -63,15 +64,15 @@ function xi(i) {
|
|
|
63
64
|
curveType: ut,
|
|
64
65
|
styles: d,
|
|
65
66
|
classNames: p,
|
|
66
|
-
precision:
|
|
67
|
-
customLayers:
|
|
67
|
+
precision: N,
|
|
68
|
+
customLayers: M
|
|
68
69
|
} = i, qt = he(null);
|
|
69
70
|
let V;
|
|
70
71
|
t[0] !== s.amount || t[1] !== s.once ? (V = {
|
|
71
72
|
once: s.once,
|
|
72
73
|
amount: s.amount
|
|
73
74
|
}, t[0] = s.amount, t[1] = s.once, t[2] = V) : V = t[2];
|
|
74
|
-
const f = ri(qt, V), [j, Jt] =
|
|
75
|
+
const f = ri(qt, V), [j, Jt] = Xt(!1);
|
|
75
76
|
let pt, P;
|
|
76
77
|
t[3] !== s.duration || t[4] !== j || t[5] !== f ? (pt = () => {
|
|
77
78
|
if (f && !j) {
|
|
@@ -81,71 +82,71 @@ function xi(i) {
|
|
|
81
82
|
return () => clearTimeout(e);
|
|
82
83
|
}
|
|
83
84
|
}, P = [f, j, s.duration], t[3] = s.duration, t[4] = j, t[5] = f, t[6] = pt, t[7] = P) : (pt = t[6], P = t[7]), $e(pt, P);
|
|
84
|
-
const te = ut === "linear" ? _e : ut === "step" ? ti : ut === "stepAfter" ? ei : ut === "stepBefore" ? ii : oi, [D, u] =
|
|
85
|
-
let
|
|
86
|
-
t[8] !== at || t[9] !== jt || t[10] !== xt || t[11] !== Ot ? (
|
|
85
|
+
const te = ut === "linear" ? _e : ut === "step" ? ti : ut === "stepAfter" ? ei : ut === "stepBefore" ? ii : oi, [D, u] = Xt(void 0), [c, Kt] = Xt(void 0), [R, $t] = Xt(void 0), xt = G ? O + 30 : O;
|
|
86
|
+
let E;
|
|
87
|
+
t[8] !== at || t[9] !== jt || t[10] !== xt || t[11] !== Ot ? (E = {
|
|
87
88
|
top: Ot,
|
|
88
89
|
bottom: at,
|
|
89
90
|
left: xt,
|
|
90
91
|
right: jt
|
|
91
|
-
}, t[8] = at, t[9] = jt, t[10] = xt, t[11] = Ot, t[12] =
|
|
92
|
-
const y =
|
|
93
|
-
let
|
|
94
|
-
t[13] !== n ? (
|
|
92
|
+
}, t[8] = at, t[9] = jt, t[10] = xt, t[11] = Ot, t[12] = E) : E = t[12];
|
|
93
|
+
const y = E, B = he(null);
|
|
94
|
+
let z;
|
|
95
|
+
t[13] !== n ? (z = (e) => ({
|
|
95
96
|
...e,
|
|
96
97
|
date: w(`${e.date}`, n, /* @__PURE__ */ new Date())
|
|
97
|
-
}), t[13] = n, t[14] =
|
|
98
|
-
const r = Ie(A.map(
|
|
99
|
-
let
|
|
98
|
+
}), t[13] = n, t[14] = z) : z = t[14];
|
|
99
|
+
const r = Ie(A.map(z), ["date"], ["asc"]);
|
|
100
|
+
let U;
|
|
100
101
|
if (t[15] !== n || t[16] !== st) {
|
|
101
102
|
let e;
|
|
102
103
|
t[18] !== n ? (e = (h) => ({
|
|
103
104
|
...h,
|
|
104
105
|
coordinates: [h.coordinates[0] === null ? null : w(`${h.coordinates[0]}`, n, /* @__PURE__ */ new Date()), h.coordinates[1] === null ? null : w(`${h.coordinates[1]}`, n, /* @__PURE__ */ new Date())]
|
|
105
|
-
}), t[18] = n, t[19] = e) : e = t[19],
|
|
106
|
+
}), t[18] = n, t[19] = e) : e = t[19], U = st.map(e), t[15] = n, t[16] = st, t[17] = U;
|
|
106
107
|
} else
|
|
107
|
-
|
|
108
|
-
const dt =
|
|
109
|
-
let
|
|
108
|
+
U = t[17];
|
|
109
|
+
const dt = U;
|
|
110
|
+
let q;
|
|
110
111
|
if (t[20] !== mt || t[21] !== n) {
|
|
111
112
|
let e;
|
|
112
113
|
t[23] !== n ? (e = (h) => ({
|
|
113
114
|
...h,
|
|
114
|
-
coordinates: h.coordinates.map((
|
|
115
|
-
}), t[23] = n, t[24] = e) : e = t[24],
|
|
115
|
+
coordinates: h.coordinates.map((W, Yt) => Yt % 2 === 0 ? w(`${W}`, n, /* @__PURE__ */ new Date()) : W)
|
|
116
|
+
}), t[23] = n, t[24] = e) : e = t[24], q = mt.map(e), t[20] = mt, t[21] = n, t[22] = q;
|
|
116
117
|
} else
|
|
117
|
-
|
|
118
|
-
const St =
|
|
119
|
-
let
|
|
120
|
-
t[25] !== L || t[26] !== lt ? (
|
|
121
|
-
const l = Qe().domain([x,
|
|
118
|
+
q = t[22];
|
|
119
|
+
const St = q, m = Y - y.left - y.right, g = nt - y.top - y.bottom, Tt = Ut ? w(`${Ut}`, n, /* @__PURE__ */ new Date()) : r[0].date, Nt = zt ? w(`${zt}`, n, /* @__PURE__ */ new Date()) : r[r.length - 1].date, x = bt(Pt) ? Math.min(...r.map(Mi).filter(Ni)) !== 1 / 0 ? Math.min(...r.map(Ti).filter(Si)) > 0 ? 0 : Math.min(...r.map($i).filter(ki)) : 0 : Pt, L = Math.max(...r.map(Li).filter(Di)) !== 1 / 0 ? Math.max(...r.map(Oi).filter(ji)) : 0, a = Ke().domain([Tt, Nt]).range([0, m]);
|
|
120
|
+
let J;
|
|
121
|
+
t[25] !== L || t[26] !== lt ? (J = bt(lt) ? L > 0 ? L : 0 : lt, t[25] = L, t[26] = lt, t[27] = J) : J = t[27];
|
|
122
|
+
const l = Qe().domain([x, J]).range([g, 0]).nice(), Mt = Ze().x((e) => a(e.date)).y((e) => l(e.y)).curve(te), gt = l.ticks(Bt), Vt = a.ticks(Ct);
|
|
122
123
|
$e(() => {
|
|
123
|
-
const e = (
|
|
124
|
-
const Yt = r[si(r.map(
|
|
125
|
-
u(Yt || r[r.length - 1]), Dt?.(Yt || r[r.length - 1]), $t(
|
|
124
|
+
const e = (W) => {
|
|
125
|
+
const Yt = r[si(r.map(Ci), a.invert(ai(W)[0]), 0)];
|
|
126
|
+
u(Yt || r[r.length - 1]), Dt?.(Yt || r[r.length - 1]), $t(W.clientY), Kt(W.clientX);
|
|
126
127
|
}, h = () => {
|
|
127
128
|
u(void 0), Kt(void 0), $t(void 0), Dt?.(void 0);
|
|
128
129
|
};
|
|
129
|
-
ni(
|
|
130
|
+
ni(B.current).on("mousemove", e).on("mouseout", h);
|
|
130
131
|
}, [a, r, Dt]);
|
|
131
|
-
const Rt = He(r.filter(
|
|
132
|
-
let J;
|
|
133
|
-
t[28] !== s || t[29] !== g || t[30] !== m || t[31] !== dt || t[32] !== f || t[33] !== a ? (J = /* @__PURE__ */ o.jsx(Je, { areaSettings: dt, width: m, height: g, scale: a, animate: s, isInView: f }), t[28] = s, t[29] = g, t[30] = m, t[31] = dt, t[32] = f, t[33] = a, t[34] = J) : J = t[34];
|
|
134
|
-
const ht = d?.yAxis?.gridLines, yt = d?.yAxis?.labels;
|
|
132
|
+
const Rt = He(r.filter(bi).map((e) => [a(e.date), l(e.y)])), Ht = Fe(Rt);
|
|
135
133
|
let K;
|
|
136
|
-
t[
|
|
134
|
+
t[28] !== s || t[29] !== g || t[30] !== m || t[31] !== dt || t[32] !== f || t[33] !== a ? (K = /* @__PURE__ */ o.jsx(Je, { areaSettings: dt, width: m, height: g, scale: a, animate: s, isInView: f }), t[28] = s, t[29] = g, t[30] = m, t[31] = dt, t[32] = f, t[33] = a, t[34] = K) : K = t[34];
|
|
135
|
+
const ht = d?.yAxis?.gridLines, yt = d?.yAxis?.labels;
|
|
136
|
+
let Q;
|
|
137
|
+
t[35] !== ht || t[36] !== yt ? (Q = {
|
|
137
138
|
gridLines: ht,
|
|
138
139
|
labels: yt
|
|
139
|
-
}, t[35] = ht, t[36] = yt, t[37] =
|
|
140
|
-
const vt = p?.yAxis?.gridLines,
|
|
141
|
-
let
|
|
142
|
-
t[38] !== vt || t[39] !==
|
|
140
|
+
}, t[35] = ht, t[36] = yt, t[37] = Q) : Q = t[37];
|
|
141
|
+
const vt = p?.yAxis?.gridLines, Z = p?.yAxis?.labels;
|
|
142
|
+
let _;
|
|
143
|
+
t[38] !== vt || t[39] !== Z ? (_ = {
|
|
143
144
|
gridLines: vt,
|
|
144
|
-
labels:
|
|
145
|
-
}, t[38] = vt, t[39] =
|
|
146
|
-
const
|
|
147
|
-
let
|
|
148
|
-
t[41] !==
|
|
145
|
+
labels: Z
|
|
146
|
+
}, t[38] = vt, t[39] = Z, t[40] = _) : _ = t[40];
|
|
147
|
+
const H = l(x < 0 ? 0 : x), Qt = l(x < 0 ? 0 : x), tt = 0 - O, Zt = m + y.right, wt = x < 0 ? 0 : x;
|
|
148
|
+
let F;
|
|
149
|
+
t[41] !== N || t[42] !== T || t[43] !== b || t[44] !== wt ? (F = Se(wt, "NA", N, T, b), t[41] = N, t[42] = T, t[43] = b, t[44] = wt, t[45] = F) : F = t[45];
|
|
149
150
|
const et = 0 - O, it = l(x < 0 ? 0 : x), At = L < 0 ? "1em" : -5;
|
|
150
151
|
let k;
|
|
151
152
|
t[46] !== et || t[47] !== it || t[48] !== At ? (k = {
|
|
@@ -161,19 +162,19 @@ function xi(i) {
|
|
|
161
162
|
label: S
|
|
162
163
|
}, t[50] = $, t[51] = S, t[52] = v) : v = t[52];
|
|
163
164
|
const ot = d?.xAxis?.axis, Ft = d?.yAxis?.labels;
|
|
164
|
-
let
|
|
165
|
-
t[53] !== ot || t[54] !== Ft ? (
|
|
165
|
+
let I;
|
|
166
|
+
t[53] !== ot || t[54] !== Ft ? (I = {
|
|
166
167
|
axis: ot,
|
|
167
168
|
label: Ft
|
|
168
|
-
}, t[53] = ot, t[54] = Ft, t[55] =
|
|
169
|
+
}, t[53] = ot, t[54] = Ft, t[55] = I) : I = t[55];
|
|
169
170
|
let ee;
|
|
170
|
-
t[56] !==
|
|
171
|
+
t[56] !== H || t[57] !== Qt || t[58] !== tt || t[59] !== Zt || t[60] !== F || t[61] !== k || t[62] !== v || t[63] !== I ? (ee = /* @__PURE__ */ o.jsx(Pe, { y1: H, y2: Qt, x1: tt, x2: Zt, label: F, labelPos: k, classNames: v, styles: I }), t[56] = H, t[57] = Qt, t[58] = tt, t[59] = Zt, t[60] = F, t[61] = k, t[62] = v, t[63] = I, t[64] = ee) : ee = t[64];
|
|
171
172
|
const ye = 0 - O - 15, ve = g / 2, we = d?.yAxis?.title, Ae = p?.yAxis?.title;
|
|
172
173
|
let ie;
|
|
173
174
|
t[65] !== ye || t[66] !== ve || t[67] !== we || t[68] !== Ae || t[69] !== G ? (ie = /* @__PURE__ */ o.jsx(Ee, { x: ye, y: ve, style: we, className: Ae, text: G, rotate90: !0 }), t[65] = ye, t[66] = ve, t[67] = we, t[68] = Ae, t[69] = G, t[70] = ie) : ie = t[70];
|
|
174
175
|
let oe;
|
|
175
176
|
t[71] !== n ? (oe = (e) => Re(e, n), t[71] = n, t[72] = oe) : oe = t[72];
|
|
176
|
-
const
|
|
177
|
+
const Ne = Vt.map(oe), Me = Vt.map((e) => a(e)), be = d?.xAxis?.gridLines, Ce = d?.xAxis?.labels;
|
|
177
178
|
let ne;
|
|
178
179
|
t[73] !== be || t[74] !== Ce ? (ne = {
|
|
179
180
|
gridLines: be,
|
|
@@ -191,13 +192,13 @@ function xi(i) {
|
|
|
191
192
|
labels: Wt
|
|
192
193
|
}, t[80] = It, t[81] = Wt, t[82] = se) : se = t[82];
|
|
193
194
|
let ae;
|
|
194
|
-
t[83] !==
|
|
195
|
+
t[83] !== M ? (ae = M.filter(vi).map(yi), t[83] = M, t[84] = ae) : ae = t[84];
|
|
195
196
|
let re;
|
|
196
|
-
t[85] !==
|
|
197
|
-
stroke:
|
|
197
|
+
t[85] !== X || t[86] !== ct ? (re = {
|
|
198
|
+
stroke: X,
|
|
198
199
|
fill: "none",
|
|
199
200
|
strokeWidth: ct
|
|
200
|
-
}, t[85] =
|
|
201
|
+
}, t[85] = X, t[86] = ct, t[87] = re) : re = t[87];
|
|
201
202
|
let le;
|
|
202
203
|
t[88] !== s.duration ? (le = {
|
|
203
204
|
opacity: 0,
|
|
@@ -216,11 +217,11 @@ function xi(i) {
|
|
|
216
217
|
opacity: 0,
|
|
217
218
|
cx: a(e.date),
|
|
218
219
|
cy: l(e.y),
|
|
219
|
-
fill:
|
|
220
|
+
fill: X
|
|
220
221
|
},
|
|
221
222
|
whileInView: {
|
|
222
223
|
opacity: 1,
|
|
223
|
-
fill:
|
|
224
|
+
fill: X,
|
|
224
225
|
transition: {
|
|
225
226
|
duration: j ? s.duration : 0.5,
|
|
226
227
|
delay: j ? 0 : s.duration
|
|
@@ -252,20 +253,20 @@ function xi(i) {
|
|
|
252
253
|
delay: j ? 0 : s.duration
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
|
-
}, initial: "initial", animate: f ? "whileInView" : "initial", children: Se(e.y, "NA",
|
|
256
|
+
}, initial: "initial", animate: f ? "whileInView" : "initial", children: Se(e.y, "NA", N, T, b) }) : null
|
|
256
257
|
] }) }, h));
|
|
257
258
|
let ce;
|
|
258
259
|
t[90] !== De ? (ce = /* @__PURE__ */ o.jsx("g", { children: De }), t[90] = De, t[91] = ce) : ce = t[91];
|
|
259
260
|
const Le = Et.map((e, h) => {
|
|
260
|
-
const
|
|
261
|
+
const W = Ye({
|
|
261
262
|
x: e.xCoordinate ? a(w(`${e.xCoordinate}`, n, /* @__PURE__ */ new Date())) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
|
|
262
263
|
y: e.yCoordinate ? l(e.yCoordinate) + (e.yOffset || 0) - 8 : 0 + (e.yOffset || 0) - 8
|
|
263
264
|
}, {
|
|
264
265
|
x: e.xCoordinate ? a(w(`${e.xCoordinate}`, n, /* @__PURE__ */ new Date())) : 0,
|
|
265
266
|
y: e.yCoordinate ? l(e.yCoordinate) : 0
|
|
266
267
|
}, bt(e.connectorRadius) ? 3.5 : e.connectorRadius), Yt = e.showConnector ? {
|
|
267
|
-
y1:
|
|
268
|
-
x1:
|
|
268
|
+
y1: W.y,
|
|
269
|
+
x1: W.x,
|
|
269
270
|
y2: e.yCoordinate ? l(e.yCoordinate) + (e.yOffset || 0) : 0 + (e.yOffset || 0),
|
|
270
271
|
x2: e.xCoordinate ? a(w(`${e.xCoordinate}`, n, /* @__PURE__ */ new Date())) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
|
|
271
272
|
cy: e.yCoordinate ? l(e.yCoordinate) : 0,
|
|
@@ -280,7 +281,7 @@ function xi(i) {
|
|
|
280
281
|
fontWeight: e.fontWeight,
|
|
281
282
|
align: e.align
|
|
282
283
|
};
|
|
283
|
-
return /* @__PURE__ */ o.jsx(
|
|
284
|
+
return /* @__PURE__ */ o.jsx(Xe, { color: e.color, connectorsSettings: Yt, labelSettings: Ve, text: e.text, classNames: e.classNames, styles: e.styles, animate: s, isInView: f }, h);
|
|
284
285
|
});
|
|
285
286
|
let me;
|
|
286
287
|
t[92] !== Le ? (me = /* @__PURE__ */ o.jsx("g", { children: Le }), t[92] = Le, t[93] = me) : me = t[93];
|
|
@@ -288,36 +289,36 @@ function xi(i) {
|
|
|
288
289
|
let fe;
|
|
289
290
|
t[94] !== ke ? (fe = /* @__PURE__ */ o.jsx("g", { children: ke }), t[94] = ke, t[95] = fe) : fe = t[95];
|
|
290
291
|
let ue;
|
|
291
|
-
t[96] !==
|
|
292
|
+
t[96] !== M ? (ue = M.filter(hi).map(gi), t[96] = M, t[97] = ue) : ue = t[97];
|
|
292
293
|
let pe;
|
|
293
294
|
t[98] === Symbol.for("react.memo_cache_sentinel") ? (pe = {
|
|
294
295
|
fill: "none",
|
|
295
296
|
pointerEvents: "all"
|
|
296
297
|
}, t[98] = pe) : pe = t[98];
|
|
297
298
|
let xe;
|
|
298
|
-
t[99] !==
|
|
299
|
+
t[99] !== B || t[100] !== g || t[101] !== m ? (xe = /* @__PURE__ */ o.jsx("rect", { ref: B, style: pe, width: m, height: g }), t[99] = B, t[100] = g, t[101] = m, t[102] = xe) : xe = t[102];
|
|
299
300
|
let de;
|
|
300
301
|
return t[103] !== p?.tooltip || t[104] !== c || t[105] !== R || t[106] !== D || t[107] !== d?.tooltip || t[108] !== rt ? (de = D && rt && c && R ? /* @__PURE__ */ o.jsx(We, { data: D, body: rt, xPos: c, yPos: R, backgroundStyle: d?.tooltip, className: p?.tooltip }) : null, t[103] = p?.tooltip, t[104] = c, t[105] = R, t[106] = D, t[107] = d?.tooltip, t[108] = rt, t[109] = de) : de = t[109], /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
301
|
-
/* @__PURE__ */ o.jsx(_t.svg, { width: `${
|
|
302
|
-
|
|
303
|
-
/* @__PURE__ */ o.jsx(
|
|
302
|
+
/* @__PURE__ */ o.jsx(_t.svg, { width: `${Y}px`, height: `${nt}px`, viewBox: `0 0 ${Y} ${nt}`, direction: "ltr", ref: qt, children: /* @__PURE__ */ o.jsxs("g", { transform: `translate(${y.left},${y.top})`, children: [
|
|
303
|
+
K,
|
|
304
|
+
/* @__PURE__ */ o.jsx(Ge, { areaSettings: St, scaleX: a, scaleY: l, animate: s, isInView: f }),
|
|
304
305
|
/* @__PURE__ */ o.jsxs("g", { children: [
|
|
305
|
-
/* @__PURE__ */ o.jsx(qe, { values: gt.filter(
|
|
306
|
+
/* @__PURE__ */ o.jsx(qe, { values: gt.filter(Ai), y: gt.filter(wi).map((e) => l(e)), x1: 0 - O, x2: m + y.right, styles: Q, classNames: _, suffix: b, prefix: T, labelType: "secondary", showGridLines: !0, labelPos: "vertical", precision: N }),
|
|
306
307
|
ee,
|
|
307
308
|
ie
|
|
308
309
|
] }),
|
|
309
|
-
/* @__PURE__ */ o.jsx(Be, { values:
|
|
310
|
+
/* @__PURE__ */ o.jsx(Be, { values: Ne, x: Me, y1: 0, y2: g, styles: ne, classNames: se, suffix: b, prefix: T, labelType: "primary", showGridLines: !0, precision: N }),
|
|
310
311
|
ae,
|
|
311
312
|
/* @__PURE__ */ o.jsxs("g", { children: [
|
|
312
313
|
/* @__PURE__ */ o.jsx(_t.path, { style: re, exit: le, variants: {
|
|
313
314
|
initial: {
|
|
314
315
|
pathLength: 0,
|
|
315
|
-
d:
|
|
316
|
+
d: Mt(r) || "",
|
|
316
317
|
opacity: 1
|
|
317
318
|
},
|
|
318
319
|
whileInView: {
|
|
319
320
|
pathLength: 1,
|
|
320
|
-
d:
|
|
321
|
+
d: Mt(r) || "",
|
|
321
322
|
opacity: 1,
|
|
322
323
|
transition: {
|
|
323
324
|
duration: s.duration
|
|
@@ -327,7 +328,7 @@ function xi(i) {
|
|
|
327
328
|
D ? /* @__PURE__ */ o.jsx("line", { y1: 0, y2: g, x1: a(D.date), x2: a(D.date), className: ge("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100", p?.mouseOverLine), style: d?.mouseOverLine }) : null
|
|
328
329
|
] }),
|
|
329
330
|
ce,
|
|
330
|
-
|
|
331
|
+
Gt ? /* @__PURE__ */ o.jsx(o.Fragment, { children: Gt.map((e, h) => /* @__PURE__ */ o.jsx(ze, { text: e.text, color: e.color, y: l(e.value), x1: 0 - O, x2: m + y.right, classNames: e.classNames, styles: e.styles, animate: s, isInView: f }, h)) }) : null,
|
|
331
332
|
me,
|
|
332
333
|
fe,
|
|
333
334
|
ue,
|
|
@@ -336,66 +337,66 @@ function xi(i) {
|
|
|
336
337
|
de
|
|
337
338
|
] });
|
|
338
339
|
}
|
|
339
|
-
function di(i) {
|
|
340
|
-
return i.layer;
|
|
341
|
-
}
|
|
342
340
|
function gi(i) {
|
|
343
|
-
return i.
|
|
341
|
+
return i.layer;
|
|
344
342
|
}
|
|
345
343
|
function hi(i) {
|
|
346
|
-
return i.
|
|
344
|
+
return i.position === "after";
|
|
347
345
|
}
|
|
348
346
|
function yi(i) {
|
|
349
|
-
return i.
|
|
347
|
+
return i.layer;
|
|
350
348
|
}
|
|
351
349
|
function vi(i) {
|
|
352
|
-
return i
|
|
350
|
+
return i.position === "before";
|
|
353
351
|
}
|
|
354
352
|
function wi(i) {
|
|
355
353
|
return i !== 0;
|
|
356
354
|
}
|
|
357
355
|
function Ai(i) {
|
|
358
|
-
return
|
|
356
|
+
return i !== 0;
|
|
359
357
|
}
|
|
360
358
|
function bi(i) {
|
|
361
|
-
return i.date;
|
|
359
|
+
return !bt(i.date) && !bt(i.y);
|
|
362
360
|
}
|
|
363
361
|
function Ci(i) {
|
|
364
|
-
return i
|
|
362
|
+
return i.date;
|
|
365
363
|
}
|
|
366
364
|
function ji(i) {
|
|
367
|
-
return i
|
|
365
|
+
return i != null;
|
|
368
366
|
}
|
|
369
367
|
function Oi(i) {
|
|
370
|
-
return i
|
|
368
|
+
return i.y;
|
|
371
369
|
}
|
|
372
370
|
function Di(i) {
|
|
373
|
-
return i
|
|
371
|
+
return i != null;
|
|
374
372
|
}
|
|
375
373
|
function Li(i) {
|
|
376
|
-
return i
|
|
374
|
+
return i.y;
|
|
377
375
|
}
|
|
378
376
|
function ki(i) {
|
|
379
|
-
return i
|
|
377
|
+
return i != null;
|
|
380
378
|
}
|
|
381
379
|
function $i(i) {
|
|
382
|
-
return i
|
|
380
|
+
return i.y;
|
|
383
381
|
}
|
|
384
382
|
function Si(i) {
|
|
385
|
-
return i
|
|
383
|
+
return i != null;
|
|
386
384
|
}
|
|
387
385
|
function Ti(i) {
|
|
386
|
+
return i.y;
|
|
387
|
+
}
|
|
388
|
+
function Ni(i) {
|
|
388
389
|
return i != null;
|
|
389
390
|
}
|
|
390
391
|
function Mi(i) {
|
|
391
392
|
return i.y;
|
|
392
393
|
}
|
|
393
|
-
function
|
|
394
|
+
function ho(i) {
|
|
394
395
|
const t = Te.c(83), {
|
|
395
396
|
data: A,
|
|
396
|
-
graphTitle:
|
|
397
|
+
graphTitle: Y,
|
|
397
398
|
lineColor: nt,
|
|
398
|
-
suffix:
|
|
399
|
+
suffix: X,
|
|
399
400
|
sources: b,
|
|
400
401
|
prefix: T,
|
|
401
402
|
graphDescription: n,
|
|
@@ -408,8 +409,8 @@ function xo(i) {
|
|
|
408
409
|
padding: at,
|
|
409
410
|
backgroundColor: rt,
|
|
410
411
|
leftMargin: Dt,
|
|
411
|
-
rightMargin:
|
|
412
|
-
topMargin:
|
|
412
|
+
rightMargin: Gt,
|
|
413
|
+
topMargin: Pt,
|
|
413
414
|
bottomMargin: lt,
|
|
414
415
|
relativeHeight: s,
|
|
415
416
|
tooltip: Lt,
|
|
@@ -425,8 +426,8 @@ function xo(i) {
|
|
|
425
426
|
animate: ut,
|
|
426
427
|
language: d,
|
|
427
428
|
refValues: p,
|
|
428
|
-
minHeight:
|
|
429
|
-
strokeWidth:
|
|
429
|
+
minHeight: N,
|
|
430
|
+
strokeWidth: M,
|
|
430
431
|
showDots: qt,
|
|
431
432
|
annotations: V,
|
|
432
433
|
customHighlightAreaSettings: f,
|
|
@@ -440,48 +441,48 @@ function xo(i) {
|
|
|
440
441
|
classNames: c,
|
|
441
442
|
precision: Kt,
|
|
442
443
|
customLayers: R
|
|
443
|
-
} = i, $t =
|
|
444
|
+
} = i, $t = X === void 0 ? "" : X, xt = T === void 0 ? "" : T, E = jt === void 0 ? 10 : jt, y = O === void 0 ? "yyyy" : O, B = Ot === void 0 ? !1 : Ot, z = rt === void 0 ? !1 : rt, r = Dt === void 0 ? 30 : Dt, U = Gt === void 0 ? 30 : Gt, dt = Pt === void 0 ? 20 : Pt, q = lt === void 0 ? 25 : lt;
|
|
444
445
|
let St;
|
|
445
446
|
t[0] !== kt ? (St = kt === void 0 ? [] : kt, t[0] = kt, t[1] = St) : St = t[1];
|
|
446
|
-
const m = St, g = zt === void 0 ? !1 : zt, Tt = Ut === void 0 ? !1 : Ut,
|
|
447
|
+
const m = St, g = zt === void 0 ? !1 : zt, Tt = Ut === void 0 ? !1 : Ut, Nt = ut === void 0 ? !1 : ut, x = d === void 0 ? "en" : d;
|
|
447
448
|
let L;
|
|
448
449
|
t[2] !== p ? (L = p === void 0 ? [] : p, t[2] = p, t[3] = L) : L = t[3];
|
|
449
|
-
const a = L,
|
|
450
|
+
const a = L, J = N === void 0 ? 0 : N, l = M === void 0 ? 2 : M, Mt = qt === void 0 ? !0 : qt;
|
|
450
451
|
let gt;
|
|
451
452
|
t[4] !== V ? (gt = V === void 0 ? [] : V, t[4] = V, t[5] = gt) : gt = t[5];
|
|
452
453
|
const Vt = gt;
|
|
453
454
|
let Rt;
|
|
454
455
|
t[6] !== f ? (Rt = f === void 0 ? [] : f, t[6] = f, t[7] = Rt) : Rt = t[7];
|
|
455
|
-
const Ht = Rt,
|
|
456
|
-
let
|
|
457
|
-
t[8] !== R ? (
|
|
458
|
-
const
|
|
456
|
+
const Ht = Rt, K = j === void 0 ? "light" : j, ht = pt === void 0 ? !1 : pt, yt = te === void 0 ? 5 : te, Q = D === void 0 ? "curve" : D, vt = Kt === void 0 ? 2 : Kt;
|
|
457
|
+
let Z;
|
|
458
|
+
t[8] !== R ? (Z = R === void 0 ? [] : R, t[8] = R, t[9] = Z) : Z = t[9];
|
|
459
|
+
const _ = Z, [H, Qt] = Xt(0), [tt, Zt] = Xt(0), wt = he(null), F = he(null);
|
|
459
460
|
let et, it;
|
|
460
461
|
t[10] === Symbol.for("react.memo_cache_sentinel") ? (et = () => {
|
|
461
|
-
const Ft = new ResizeObserver((
|
|
462
|
-
Qt(
|
|
462
|
+
const Ft = new ResizeObserver((I) => {
|
|
463
|
+
Qt(I[0].target.clientWidth || 620), Zt(I[0].target.clientHeight || 480);
|
|
463
464
|
});
|
|
464
465
|
return wt.current && Ft.observe(wt.current), () => Ft.disconnect();
|
|
465
466
|
}, it = [], t[10] = et, t[11] = it) : (et = t[10], it = t[11]), $e(et, it);
|
|
466
467
|
const At = c?.graphContainer, k = u?.graphContainer;
|
|
467
468
|
let $;
|
|
468
|
-
t[12] !== c?.description || t[13] !== c?.title || t[14] !== A || t[15] !== Tt || t[16] !== n || t[17] !== g || t[18] !==
|
|
469
|
+
t[12] !== c?.description || t[13] !== c?.title || t[14] !== A || t[15] !== Tt || t[16] !== n || t[17] !== g || t[18] !== Y || t[19] !== u?.description || t[20] !== u?.title || t[21] !== C ? ($ = Y || n || g || Tt ? /* @__PURE__ */ o.jsx(ci, { styles: {
|
|
469
470
|
title: u?.title,
|
|
470
471
|
description: u?.description
|
|
471
472
|
}, classNames: {
|
|
472
473
|
title: c?.title,
|
|
473
474
|
description: c?.description
|
|
474
|
-
}, graphTitle:
|
|
475
|
+
}, graphTitle: Y, graphDescription: n, width: C, graphDownload: g ? F : void 0, dataDownload: Tt ? A.map(Ii).filter(Fi).length > 0 ? A.map(Hi).filter(Ri) : A.filter(Vi) : null }) : null, t[12] = c?.description, t[13] = c?.title, t[14] = A, t[15] = Tt, t[16] = n, t[17] = g, t[18] = Y, t[19] = u?.description, t[20] = u?.title, t[21] = C, t[22] = $) : $ = t[22];
|
|
475
476
|
let S;
|
|
476
|
-
t[23] !==
|
|
477
|
+
t[23] !== Nt || t[24] !== Vt || t[25] !== q || t[26] !== c || t[27] !== Q || t[28] !== Ht || t[29] !== _ || t[30] !== A || t[31] !== y || t[32] !== m || t[33] !== x || t[34] !== r || t[35] !== nt || t[36] !== G || t[37] !== ft || t[38] !== Bt || t[39] !== mt || t[40] !== E || t[41] !== yt || t[42] !== ct || t[43] !== vt || t[44] !== xt || t[45] !== a || t[46] !== ht || t[47] !== U || t[48] !== Mt || t[49] !== B || t[50] !== l || t[51] !== u || t[52] !== $t || t[53] !== tt || t[54] !== H || t[55] !== Lt || t[56] !== dt || t[57] !== P ? (S = A.length === 0 ? /* @__PURE__ */ o.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: /* @__PURE__ */ o.jsx(fi, {}) }) : /* @__PURE__ */ o.jsx(ui, { ref: wt, children: H && tt ? /* @__PURE__ */ o.jsx(di, { data: A, lineColor: nt || mi.primaryColors["blue-600"], width: H, height: tt, suffix: $t, prefix: xt, dateFormat: y, showValues: B, noOfXTicks: E ?? xi(H), leftMargin: r, rightMargin: U, topMargin: dt, bottomMargin: q, tooltip: Lt, highlightAreaSettings: m, onSeriesMouseOver: ct, refValues: a, minValue: mt, maxValue: ft, animate: Nt === !0 ? {
|
|
477
478
|
duration: 0.5,
|
|
478
479
|
once: !0,
|
|
479
480
|
amount: 0.5
|
|
480
|
-
} :
|
|
481
|
+
} : Nt || {
|
|
481
482
|
duration: 0,
|
|
482
483
|
once: !0,
|
|
483
484
|
amount: 0
|
|
484
|
-
}, rtl: x === "he" || x === "ar", strokeWidth: l, showDots:
|
|
485
|
+
}, rtl: x === "he" || x === "ar", strokeWidth: l, showDots: Mt, annotations: Vt, customHighlightAreaSettings: Ht, regressionLine: ht, yAxisTitle: P, noOfYTicks: yt, maxDate: G, minDate: Bt, curveType: Q, styles: u, classNames: c, precision: vt, customLayers: _ }) : null }), t[23] = Nt, t[24] = Vt, t[25] = q, t[26] = c, t[27] = Q, t[28] = Ht, t[29] = _, t[30] = A, t[31] = y, t[32] = m, t[33] = x, t[34] = r, t[35] = nt, t[36] = G, t[37] = ft, t[38] = Bt, t[39] = mt, t[40] = E, t[41] = yt, t[42] = ct, t[43] = vt, t[44] = xt, t[45] = a, t[46] = ht, t[47] = U, t[48] = Mt, t[49] = B, t[50] = l, t[51] = u, t[52] = $t, t[53] = tt, t[54] = H, t[55] = Lt, t[56] = dt, t[57] = P, t[58] = S) : S = t[58];
|
|
485
486
|
let v;
|
|
486
487
|
t[59] !== c?.footnote || t[60] !== c?.source || t[61] !== Ct || t[62] !== b || t[63] !== u?.footnote || t[64] !== u?.source || t[65] !== C ? (v = b || Ct ? /* @__PURE__ */ o.jsx(li, { styles: {
|
|
487
488
|
footnote: u?.footnote,
|
|
@@ -491,28 +492,28 @@ function xo(i) {
|
|
|
491
492
|
source: c?.source
|
|
492
493
|
}, sources: b, footNote: Ct, width: C }) : null, t[59] = c?.footnote, t[60] = c?.source, t[61] = Ct, t[62] = b, t[63] = u?.footnote, t[64] = u?.source, t[65] = C, t[66] = v) : v = t[66];
|
|
493
494
|
let ot;
|
|
494
|
-
return t[67] !== Jt || t[68] !==
|
|
495
|
+
return t[67] !== Jt || t[68] !== z || t[69] !== Et || t[70] !== st || t[71] !== x || t[72] !== J || t[73] !== at || t[74] !== s || t[75] !== At || t[76] !== k || t[77] !== $ || t[78] !== S || t[79] !== v || t[80] !== K || t[81] !== C ? (ot = /* @__PURE__ */ o.jsxs(pi, { className: At, style: k, id: Et, ref: F, "aria-label": Jt, backgroundColor: z, theme: K, language: x, minHeight: J, width: C, height: st, relativeHeight: s, padding: at, children: [
|
|
495
496
|
$,
|
|
496
497
|
S,
|
|
497
498
|
v
|
|
498
|
-
] }), t[67] = Jt, t[68] =
|
|
499
|
-
}
|
|
500
|
-
function Ni(i) {
|
|
501
|
-
return i !== void 0;
|
|
499
|
+
] }), t[67] = Jt, t[68] = z, t[69] = Et, t[70] = st, t[71] = x, t[72] = J, t[73] = at, t[74] = s, t[75] = At, t[76] = k, t[77] = $, t[78] = S, t[79] = v, t[80] = K, t[81] = C, t[82] = ot) : ot = t[82], ot;
|
|
502
500
|
}
|
|
503
501
|
function Vi(i) {
|
|
504
502
|
return i !== void 0;
|
|
505
503
|
}
|
|
506
504
|
function Ri(i) {
|
|
507
|
-
return i
|
|
505
|
+
return i !== void 0;
|
|
508
506
|
}
|
|
509
507
|
function Hi(i) {
|
|
510
|
-
return i
|
|
508
|
+
return i.data;
|
|
511
509
|
}
|
|
512
510
|
function Fi(i) {
|
|
511
|
+
return i !== void 0;
|
|
512
|
+
}
|
|
513
|
+
function Ii(i) {
|
|
513
514
|
return i.data;
|
|
514
515
|
}
|
|
515
516
|
export {
|
|
516
|
-
|
|
517
|
+
ho as SimpleLineChart
|
|
517
518
|
};
|
|
518
519
|
//# sourceMappingURL=SimpleLineChart.js.map
|