@undp/data-viz 2.1.2 → 2.1.4
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 +281 -274
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1795 -1724
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +312 -305
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +367 -356
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +224 -217
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +2 -2
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +406 -399
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +10 -0
- package/dist/DonutChart.js +232 -263
- package/dist/DonutChart.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +320 -313
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +298 -291
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{EmptyState-BZo1BbAn.js → EmptyState-C7ZXkZWd.js} +4 -4
- package/dist/EmptyState-C7ZXkZWd.js.map +1 -0
- package/dist/EmptyState-gLDRXBHm.cjs +2 -0
- package/dist/EmptyState-gLDRXBHm.cjs.map +1 -0
- package/dist/GraphEl-C2Fgg8PA.cjs +2 -0
- package/dist/GraphEl-C2Fgg8PA.cjs.map +1 -0
- package/dist/{GraphEl-sVZvlyWe.js → GraphEl-oZwZiTHI.js} +6 -3
- package/dist/GraphEl-oZwZiTHI.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.js +179 -172
- 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 +370 -363
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +328 -321
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +375 -368
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.js +385 -378
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- 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 +35 -34
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +176 -169
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +367 -360
- 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 +286 -279
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +243 -236
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.js +2 -2
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +293 -286
- package/dist/StripChart.js.map +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +222 -215
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +1 -0
- package/dist/{area-BE2wo7fv.js → area-B6r7cv2o.js} +5 -5
- package/dist/{area-BE2wo7fv.js.map → area-B6r7cv2o.js.map} +1 -1
- package/dist/area-C1gxfNGD.cjs +2 -0
- package/dist/{area-D3Qx7k7K.cjs.map → area-C1gxfNGD.cjs.map} +1 -1
- package/dist/array-DMyR1sql.cjs +2 -0
- package/dist/array-DMyR1sql.cjs.map +1 -0
- package/dist/array-USo-Szhp.js +13 -0
- package/dist/array-USo-Szhp.js.map +1 -0
- package/dist/{ensureCompleteData-DS7gCvVd.js → ensureCompleteData-DH5c52Ub.js} +6 -6
- package/dist/{ensureCompleteData-DS7gCvVd.js.map → ensureCompleteData-DH5c52Ub.js.map} +1 -1
- package/dist/{ensureCompleteData-Oib-vGb0.cjs → ensureCompleteData-pZ9QO6kB.cjs} +2 -2
- package/dist/{ensureCompleteData-Oib-vGb0.cjs.map → ensureCompleteData-pZ9QO6kB.cjs.map} +1 -1
- package/dist/index-Blvf-Q3U.cjs +2 -0
- package/dist/{index-CF5hnGvG.cjs.map → index-Blvf-Q3U.cjs.map} +1 -1
- package/dist/index-D1RrKgK6.js +337 -0
- package/dist/index-D1RrKgK6.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1 -1
- package/dist/line-DFlZsxI1.js +144 -0
- package/dist/line-DFlZsxI1.js.map +1 -0
- package/dist/line-DaEMhXmx.cjs +2 -0
- package/dist/line-DaEMhXmx.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/EmptyState-BZo1BbAn.js.map +0 -1
- package/dist/EmptyState-sAEZ_5rU.cjs +0 -2
- package/dist/EmptyState-sAEZ_5rU.cjs.map +0 -1
- package/dist/GraphEl-YKUlz-37.cjs +0 -2
- package/dist/GraphEl-YKUlz-37.cjs.map +0 -1
- package/dist/GraphEl-sVZvlyWe.js.map +0 -1
- package/dist/area-D3Qx7k7K.cjs +0 -2
- package/dist/array-B7TkkRH0.js +0 -89
- package/dist/array-B7TkkRH0.js.map +0 -1
- package/dist/array-DKbXV8lR.cjs +0 -2
- package/dist/array-DKbXV8lR.cjs.map +0 -1
- package/dist/index-CF5hnGvG.cjs +0 -2
- package/dist/index-DPGq3eIL.js +0 -330
- package/dist/index-DPGq3eIL.js.map +0 -1
- package/dist/line-CPfhohvF.js +0 -68
- package/dist/line-CPfhohvF.js.map +0 -1
- package/dist/line-DHV4JwCR.cjs +0 -2
- package/dist/line-DHV4JwCR.cjs.map +0 -1
package/dist/ButterflyChart.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { g as
|
|
4
|
-
import { f as
|
|
5
|
-
import { i as
|
|
6
|
-
import { n as
|
|
7
|
-
import { T as
|
|
8
|
-
import { X as
|
|
9
|
-
import { A as
|
|
10
|
-
import { Y as
|
|
11
|
-
import { R as
|
|
12
|
-
import { D as
|
|
13
|
-
import { b as
|
|
14
|
-
import { a as
|
|
15
|
-
import { u as
|
|
1
|
+
import { c as Ae, j as i, m as ce } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
+
import { useRef as he, useState as Dt, useEffect as xe } from "react";
|
|
3
|
+
import { g as Be, N as Le } from "./getSliderMarks-HIDJ0_Cd.js";
|
|
4
|
+
import { f as Me, p as Ce } from "./parse-DlCRUFh_.js";
|
|
5
|
+
import { i as pe } from "./index-Bwrro8-q.js";
|
|
6
|
+
import { n as ge } from "./numberFormattingFunction-14YCbkN2.js";
|
|
7
|
+
import { T as ke } from "./Tooltip-Dj5eVppQ.js";
|
|
8
|
+
import { X as ye } from "./XTicksAndGridLines-CObVFSm4.js";
|
|
9
|
+
import { A as be } from "./Axis-CRyfcLjc.js";
|
|
10
|
+
import { Y as Ve } from "./YAxesLabels-a57ZRv-0.js";
|
|
11
|
+
import { R as ve } from "./ReferenceLine-2XCwHXQ4.js";
|
|
12
|
+
import { D as $e } from "./DetailsModal-0Ry5nXiC.js";
|
|
13
|
+
import { b as Ne } from "./band-DHUZ2X7J.js";
|
|
14
|
+
import { a as we } from "./linear-BqltdMeF.js";
|
|
15
|
+
import { u as Oe } from "./use-in-view-Cxa7y1TH.js";
|
|
16
16
|
import { m as Ot } from "./proxy-BxkFHwUw.js";
|
|
17
|
-
import { A as
|
|
18
|
-
import { GraphFooter as
|
|
19
|
-
import { GraphHeader as
|
|
20
|
-
import { ColorLegend as
|
|
21
|
-
import { Colors as
|
|
22
|
-
import { E as
|
|
23
|
-
import { P as
|
|
24
|
-
import { c as
|
|
25
|
-
import { c as
|
|
26
|
-
import { a as
|
|
27
|
-
function
|
|
28
|
-
const t =
|
|
29
|
-
data:
|
|
30
|
-
width:
|
|
17
|
+
import { A as ue } from "./index-BqfRwk1n.js";
|
|
18
|
+
import { GraphFooter as De } from "./GraphFooter.js";
|
|
19
|
+
import { GraphHeader as Te } from "./GraphHeader.js";
|
|
20
|
+
import { ColorLegend as Se } from "./ColorLegend.js";
|
|
21
|
+
import { Colors as je } from "./Colors.js";
|
|
22
|
+
import { E as Fe } from "./EmptyState-C7ZXkZWd.js";
|
|
23
|
+
import { P as Ie, e as Ge } from "./index-D491FEn1.js";
|
|
24
|
+
import { c as fe } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
25
|
+
import { c as Re } from "./ensureCompleteData-DH5c52Ub.js";
|
|
26
|
+
import { a as Pe, G as Ee } from "./GraphContainer-CRqzdKu2.js";
|
|
27
|
+
function Xe(a) {
|
|
28
|
+
const t = Ae.c(140), {
|
|
29
|
+
data: l,
|
|
30
|
+
width: B,
|
|
31
31
|
height: v,
|
|
32
|
-
barColors:
|
|
32
|
+
barColors: u,
|
|
33
33
|
centerGap: w,
|
|
34
34
|
refValues: p,
|
|
35
35
|
maxValue: rt,
|
|
@@ -44,28 +44,28 @@ function Re(a) {
|
|
|
44
44
|
onSeriesMouseOver: dt,
|
|
45
45
|
barPadding: St,
|
|
46
46
|
truncateBy: jt,
|
|
47
|
-
onSeriesMouseClick:
|
|
47
|
+
onSeriesMouseClick: N,
|
|
48
48
|
showTicks: At,
|
|
49
49
|
suffix: ut,
|
|
50
50
|
prefix: ft,
|
|
51
51
|
resetSelectionOnDoubleClick: Bt,
|
|
52
|
-
detailsOnClick:
|
|
53
|
-
styles:
|
|
52
|
+
detailsOnClick: T,
|
|
53
|
+
styles: n,
|
|
54
54
|
classNames: s,
|
|
55
|
-
noOfTicks:
|
|
55
|
+
noOfTicks: L,
|
|
56
56
|
animate: m,
|
|
57
|
-
precision:
|
|
58
|
-
customLayers:
|
|
59
|
-
minValueLeftBar:
|
|
60
|
-
minValueRightBar:
|
|
57
|
+
precision: ht,
|
|
58
|
+
customLayers: S,
|
|
59
|
+
minValueLeftBar: F,
|
|
60
|
+
minValueRightBar: I,
|
|
61
61
|
naLabel: Ft
|
|
62
|
-
} = a,
|
|
62
|
+
} = a, le = he(null);
|
|
63
63
|
let It;
|
|
64
64
|
t[0] !== m.amount || t[1] !== m.once ? (It = {
|
|
65
65
|
once: m.once,
|
|
66
66
|
amount: m.amount
|
|
67
67
|
}, t[0] = m.amount, t[1] = m.once, t[2] = It) : It = t[2];
|
|
68
|
-
const M =
|
|
68
|
+
const M = Oe(le, It), [Gt, xt] = Dt(void 0), [O, Lt] = Dt(void 0), [Mt, f] = Dt(void 0), [d, pt] = Dt(void 0);
|
|
69
69
|
let Rt;
|
|
70
70
|
t[3] !== Kt || t[4] !== Jt || t[5] !== Ut || t[6] !== Y ? (Rt = {
|
|
71
71
|
top: Y,
|
|
@@ -73,85 +73,85 @@ function Re(a) {
|
|
|
73
73
|
left: Jt,
|
|
74
74
|
right: Ut
|
|
75
75
|
}, t[3] = Kt, t[4] = Jt, t[5] = Ut, t[6] = Y, t[7] = Rt) : Rt = t[7];
|
|
76
|
-
const
|
|
77
|
-
let gt,
|
|
78
|
-
if (t[8] !== m || t[9] !==
|
|
79
|
-
const yt =
|
|
80
|
-
|
|
81
|
-
const
|
|
76
|
+
const h = Rt, C = B - h.left - h.right, j = v - h.top - h.bottom;
|
|
77
|
+
let gt, G, k, W, z, q, U, J, V, A, K, Q, Z, _;
|
|
78
|
+
if (t[8] !== m || t[9] !== u[0] || t[10] !== u[1] || t[11] !== St || t[12] !== w || t[13] !== s?.graphObjectValues || t[14] !== s?.xAxis?.gridLines || t[15] !== s?.xAxis?.labels || t[16] !== s?.yAxis?.axis || t[17] !== s?.yAxis?.labels || t[18] !== S || t[19] !== l || t[20] !== T || t[21] !== j || t[22] !== C || t[23] !== v || t[24] !== M || t[25] !== h.bottom || t[26] !== h.left || t[27] !== h.top || t[28] !== rt || t[29] !== wt || t[30] !== F || t[31] !== I || t[32] !== O || t[33] !== Ft || t[34] !== L || t[35] !== N || t[36] !== dt || t[37] !== ht || t[38] !== ft || t[39] !== p || t[40] !== Bt || t[41] !== At || t[42] !== ct || t[43] !== n?.graphObjectValues || t[44] !== n?.xAxis?.gridLines || t[45] !== n?.xAxis?.labels || t[46] !== n?.yAxis?.axis || t[47] !== n?.yAxis?.labels || t[48] !== ut || t[49] !== Y || t[50] !== jt || t[51] !== B) {
|
|
79
|
+
const yt = l.map(Ze), D = Ne().domain(yt.map(Qe)).range([j, 0]).paddingInner(St), r = we().domain([wt, rt]).range([0, (C - w) / 2]).nice(), ne = r.ticks(L), x = we().domain([wt, rt]).range([(C - w) / 2, 0]).nice(), c = x.ticks(L);
|
|
80
|
+
k = Ot.svg, Z = `${B}px`, _ = `${v}px`, W = `0 0 ${B} ${v}`, z = "ltr", q = le, V = `translate(${h.left},${h.top})`, t[66] !== S ? (A = S.filter(Ke).map(Je), t[66] = S, t[67] = A) : A = t[67];
|
|
81
|
+
const $ = s?.yAxis?.axis;
|
|
82
82
|
let Vt;
|
|
83
|
-
t[68] !==
|
|
84
|
-
axis:
|
|
85
|
-
}, t[68] =
|
|
86
|
-
const Wt =
|
|
83
|
+
t[68] !== $ ? (Vt = {
|
|
84
|
+
axis: $
|
|
85
|
+
}, t[68] = $, t[69] = Vt) : Vt = t[69];
|
|
86
|
+
const Wt = n?.yAxis?.axis;
|
|
87
87
|
let zt;
|
|
88
88
|
t[70] !== Wt ? (zt = {
|
|
89
89
|
axis: Wt
|
|
90
90
|
}, t[70] = Wt, t[71] = zt) : zt = t[71], K = /* @__PURE__ */ i.jsxs("g", { transform: "translate(0,0)", children: [
|
|
91
|
-
At ? /* @__PURE__ */ i.jsx(
|
|
92
|
-
gridLines:
|
|
93
|
-
labels:
|
|
91
|
+
At ? /* @__PURE__ */ i.jsx(ye, { values: c.filter(Ue), x: c.filter(qe).map((e) => x(e)), y1: 0 - Y, y2: j + h.bottom, styles: {
|
|
92
|
+
gridLines: n?.xAxis?.gridLines,
|
|
93
|
+
labels: n?.xAxis?.labels
|
|
94
94
|
}, classNames: {
|
|
95
95
|
gridLines: s?.xAxis?.gridLines,
|
|
96
96
|
labels: s?.xAxis?.labels
|
|
97
|
-
}, suffix: ut, prefix: ft, labelType: "secondary", showGridLines: !0, leftLabel: !0, precision:
|
|
98
|
-
/* @__PURE__ */ i.jsxs(
|
|
97
|
+
}, suffix: ut, prefix: ft, labelType: "secondary", showGridLines: !0, leftLabel: !0, precision: ht }) : null,
|
|
98
|
+
/* @__PURE__ */ i.jsxs(ue, { children: [
|
|
99
99
|
yt.map((e, g) => /* @__PURE__ */ i.jsxs(Ot.g, { className: "undp-viz-g-with-hover", opacity: 0.85, onMouseEnter: (b) => {
|
|
100
|
-
|
|
100
|
+
xt(e), pt(b.clientY), f(b.clientX), dt?.(e);
|
|
101
101
|
}, onClick: () => {
|
|
102
|
-
(
|
|
102
|
+
(N || T) && (pe(O, e) && Bt ? (Lt(void 0), N?.(void 0)) : (Lt(e), N?.(e)));
|
|
103
103
|
}, onMouseMove: (b) => {
|
|
104
|
-
|
|
104
|
+
xt(e), pt(b.clientY), f(b.clientX);
|
|
105
105
|
}, onMouseLeave: () => {
|
|
106
|
-
|
|
106
|
+
xt(void 0), f(void 0), pt(void 0), dt?.(void 0);
|
|
107
107
|
}, children: [
|
|
108
|
-
e.leftBar ? /* @__PURE__ */ i.jsx(Ot.rect, { y:
|
|
109
|
-
fill:
|
|
110
|
-
}, height:
|
|
108
|
+
e.leftBar ? /* @__PURE__ */ i.jsx(Ot.rect, { y: D(`${g}`), style: {
|
|
109
|
+
fill: u[0]
|
|
110
|
+
}, height: D.bandwidth(), variants: {
|
|
111
111
|
initial: {
|
|
112
|
-
x:
|
|
112
|
+
x: x(0),
|
|
113
113
|
width: 0
|
|
114
114
|
},
|
|
115
115
|
whileInView: {
|
|
116
|
-
x: e.leftBar < 0 ?
|
|
117
|
-
width: e.leftBar < 0 ?
|
|
116
|
+
x: e.leftBar < 0 ? x(0) : x(e.leftBar),
|
|
117
|
+
width: e.leftBar < 0 ? x(e.leftBar) - x(0) : x(0) - x(e.leftBar),
|
|
118
118
|
transition: {
|
|
119
119
|
duration: m.duration
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
}, initial: "initial", animate: M ? "whileInView" : "initial", exit: {
|
|
123
|
-
x:
|
|
123
|
+
x: x(0),
|
|
124
124
|
width: 0,
|
|
125
125
|
transition: {
|
|
126
126
|
duration: m.duration
|
|
127
127
|
}
|
|
128
128
|
} }) : null,
|
|
129
|
-
ct ? /* @__PURE__ */ i.jsx(Ot.text, { y:
|
|
129
|
+
ct ? /* @__PURE__ */ i.jsx(Ot.text, { y: D(`${g}`) + D.bandwidth() / 2, style: {
|
|
130
130
|
textAnchor: e.rightBar && e.rightBar > 0 ? "end" : "start",
|
|
131
|
-
...
|
|
132
|
-
}, dx: e.rightBar && e.rightBar > 0 ? -5 : 5, dy: "0.33em", className:
|
|
131
|
+
...n?.graphObjectValues || {}
|
|
132
|
+
}, dx: e.rightBar && e.rightBar > 0 ? -5 : 5, dy: "0.33em", className: ce("graph-value text-sm", s?.graphObjectValues), exit: {
|
|
133
133
|
opacity: 0,
|
|
134
134
|
transition: {
|
|
135
135
|
duration: m.duration
|
|
136
136
|
}
|
|
137
137
|
}, variants: {
|
|
138
138
|
initial: {
|
|
139
|
-
x:
|
|
139
|
+
x: x(0),
|
|
140
140
|
opacity: 0,
|
|
141
|
-
fill:
|
|
141
|
+
fill: u[0]
|
|
142
142
|
},
|
|
143
143
|
whileInView: {
|
|
144
|
-
x: e.leftBar ?
|
|
144
|
+
x: e.leftBar ? x(e.leftBar) : x(F < 0 ? 0 : F),
|
|
145
145
|
opacity: 1,
|
|
146
|
-
fill:
|
|
146
|
+
fill: u[0],
|
|
147
147
|
transition: {
|
|
148
148
|
duration: m.duration
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
}, initial: "initial", animate: M ? "whileInView" : "initial", children:
|
|
151
|
+
}, initial: "initial", animate: M ? "whileInView" : "initial", children: ge(e.rightBar, Ft, ht, ft, ut) }) : null
|
|
152
152
|
] }, e.label)),
|
|
153
|
-
/* @__PURE__ */ i.jsx(
|
|
154
|
-
p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e, g) => /* @__PURE__ */ i.jsx(
|
|
153
|
+
/* @__PURE__ */ i.jsx(be, { y1: -2.5, y2: j + h.bottom, x1: x(F < 0 ? 0 : F), x2: x(F < 0 ? 0 : F), classNames: Vt, styles: zt }),
|
|
154
|
+
p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e, g) => /* @__PURE__ */ i.jsx(ve, { text: e.text, color: e.color, x: x(e.value), y1: 0 - h.top, y2: j + h.bottom, textSide: "left", classNames: e.classNames, styles: e.styles, animate: m, isInView: M }, g)) }) : null
|
|
155
155
|
] })
|
|
156
156
|
] });
|
|
157
157
|
const $t = s?.yAxis?.axis;
|
|
@@ -159,106 +159,106 @@ function Re(a) {
|
|
|
159
159
|
t[72] !== $t ? (bt = {
|
|
160
160
|
axis: $t
|
|
161
161
|
}, t[72] = $t, t[73] = bt) : bt = t[73];
|
|
162
|
-
const Nt =
|
|
162
|
+
const Nt = n?.yAxis?.axis;
|
|
163
163
|
let vt;
|
|
164
164
|
t[74] !== Nt ? (vt = {
|
|
165
165
|
axis: Nt
|
|
166
166
|
}, t[74] = Nt, t[75] = vt) : vt = t[75], Q = /* @__PURE__ */ i.jsxs("g", { transform: `translate(${(C + w) / 2},0)`, children: [
|
|
167
|
-
At ? /* @__PURE__ */ i.jsx(
|
|
168
|
-
gridLines:
|
|
169
|
-
labels:
|
|
167
|
+
At ? /* @__PURE__ */ i.jsx(ye, { values: ne.filter(ze), x: ne.filter(We).map((e) => r(e)), y1: 0 - Y, y2: j + h.bottom, styles: {
|
|
168
|
+
gridLines: n?.xAxis?.gridLines,
|
|
169
|
+
labels: n?.xAxis?.labels
|
|
170
170
|
}, classNames: {
|
|
171
171
|
gridLines: s?.xAxis?.gridLines,
|
|
172
172
|
labels: s?.xAxis?.labels
|
|
173
|
-
}, suffix: ut, prefix: ft, labelType: "secondary", showGridLines: !0, precision:
|
|
174
|
-
/* @__PURE__ */ i.jsxs(
|
|
173
|
+
}, suffix: ut, prefix: ft, labelType: "secondary", showGridLines: !0, precision: ht }) : null,
|
|
174
|
+
/* @__PURE__ */ i.jsxs(ue, { children: [
|
|
175
175
|
yt.map((e, g) => /* @__PURE__ */ i.jsxs(Ot.g, { className: "undp-viz-g-with-hover", opacity: 0.85, onMouseEnter: (b) => {
|
|
176
|
-
|
|
176
|
+
xt(e), pt(b.clientY), f(b.clientX), dt?.(e);
|
|
177
177
|
}, onClick: () => {
|
|
178
|
-
(
|
|
178
|
+
(N || T) && (pe(O, e) && Bt ? (Lt(void 0), N?.(void 0)) : (Lt(e), N?.(e)));
|
|
179
179
|
}, onMouseMove: (b) => {
|
|
180
|
-
|
|
180
|
+
xt(e), pt(b.clientY), f(b.clientX);
|
|
181
181
|
}, onMouseLeave: () => {
|
|
182
|
-
|
|
182
|
+
xt(void 0), f(void 0), pt(void 0), dt?.(void 0);
|
|
183
183
|
}, children: [
|
|
184
|
-
e.rightBar ? /* @__PURE__ */ i.jsx(Ot.rect, { y:
|
|
185
|
-
fill:
|
|
186
|
-
}, height:
|
|
187
|
-
x:
|
|
184
|
+
e.rightBar ? /* @__PURE__ */ i.jsx(Ot.rect, { y: D(`${g}`), style: {
|
|
185
|
+
fill: u[1]
|
|
186
|
+
}, height: D.bandwidth(), exit: {
|
|
187
|
+
x: r(0),
|
|
188
188
|
width: 0,
|
|
189
189
|
transition: {
|
|
190
190
|
duration: m.duration
|
|
191
191
|
}
|
|
192
192
|
}, variants: {
|
|
193
193
|
initial: {
|
|
194
|
-
x:
|
|
194
|
+
x: r(0),
|
|
195
195
|
width: 0
|
|
196
196
|
},
|
|
197
197
|
whileInView: {
|
|
198
|
-
x: e.rightBar >= 0 ?
|
|
199
|
-
width: e.rightBar >= 0 ?
|
|
198
|
+
x: e.rightBar >= 0 ? r(0) : r(e.rightBar),
|
|
199
|
+
width: e.rightBar >= 0 ? r(e.rightBar) - r(0) : r(0) - r(e.rightBar),
|
|
200
200
|
transition: {
|
|
201
201
|
duration: m.duration
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}, initial: "initial", animate: M ? "whileInView" : "initial" }) : null,
|
|
205
|
-
ct ? /* @__PURE__ */ i.jsx(Ot.text, { y:
|
|
205
|
+
ct ? /* @__PURE__ */ i.jsx(Ot.text, { y: D(`${g}`) + D.bandwidth() / 2, style: {
|
|
206
206
|
textAnchor: e.rightBar && e.rightBar < 0 ? "end" : "start",
|
|
207
|
-
...
|
|
208
|
-
}, className:
|
|
207
|
+
...n?.graphObjectValues || {}
|
|
208
|
+
}, className: ce("graph-value text-sm", s?.graphObjectValues), dx: e.rightBar && e.rightBar < 0 ? -5 : 5, dy: "0.33em", exit: {
|
|
209
209
|
opacity: 0,
|
|
210
210
|
transition: {
|
|
211
211
|
duration: m.duration
|
|
212
212
|
}
|
|
213
213
|
}, variants: {
|
|
214
214
|
initial: {
|
|
215
|
-
x:
|
|
215
|
+
x: r(0),
|
|
216
216
|
opacity: 0,
|
|
217
|
-
fill:
|
|
217
|
+
fill: u[1]
|
|
218
218
|
},
|
|
219
219
|
whileInView: {
|
|
220
|
-
x: e.rightBar ?
|
|
220
|
+
x: e.rightBar ? r(e.rightBar) : r(I < 0 ? 0 : I),
|
|
221
221
|
opacity: 1,
|
|
222
|
-
fill:
|
|
222
|
+
fill: u[1],
|
|
223
223
|
transition: {
|
|
224
224
|
duration: m.duration
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
}, initial: "initial", animate: M ? "whileInView" : "initial", children:
|
|
227
|
+
}, initial: "initial", animate: M ? "whileInView" : "initial", children: ge(e.rightBar, Ft, ht, ft, ut) }) : null
|
|
228
228
|
] }, g)),
|
|
229
|
-
/* @__PURE__ */ i.jsx(
|
|
230
|
-
p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e, g) => /* @__PURE__ */ i.jsx(
|
|
229
|
+
/* @__PURE__ */ i.jsx(be, { y1: -2.5, y2: j + h.bottom, x1: r(I < 0 ? 0 : I), x2: r(I < 0 ? 0 : I), classNames: bt, styles: vt }),
|
|
230
|
+
p ? /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e, g) => /* @__PURE__ */ i.jsx(ve, { text: e.text, color: e.color, x: r(e.value), y1: 0 - h.top, y2: j + h.bottom, textSide: "right", classNames: e.classNames, styles: e.styles, animate: m, isInView: M }, g)) }) : null
|
|
231
231
|
] })
|
|
232
|
-
] }),
|
|
232
|
+
] }), G = ue, gt = Ot.g, U = `translate(${C / 2},0)`, J = yt.map((e, g) => /* @__PURE__ */ i.jsx(Ve, { value: `${e.label}`.length < jt ? `${e.label}` : `${`${e.label}`.substring(0, jt)}...`, y: D(`${e.id}`), x: 0 - w / 2, width: w, height: D.bandwidth(), alignment: "center", style: n?.yAxis?.labels, className: s?.yAxis?.labels, animate: m, isInView: M }, g)), t[8] = m, t[9] = u[0], t[10] = u[1], t[11] = St, t[12] = w, t[13] = s?.graphObjectValues, t[14] = s?.xAxis?.gridLines, t[15] = s?.xAxis?.labels, t[16] = s?.yAxis?.axis, t[17] = s?.yAxis?.labels, t[18] = S, t[19] = l, t[20] = T, t[21] = j, t[22] = C, t[23] = v, t[24] = M, t[25] = h.bottom, t[26] = h.left, t[27] = h.top, t[28] = rt, t[29] = wt, t[30] = F, t[31] = I, t[32] = O, t[33] = Ft, t[34] = L, t[35] = N, t[36] = dt, t[37] = ht, t[38] = ft, t[39] = p, t[40] = Bt, t[41] = At, t[42] = ct, t[43] = n?.graphObjectValues, t[44] = n?.xAxis?.gridLines, t[45] = n?.xAxis?.labels, t[46] = n?.yAxis?.axis, t[47] = n?.yAxis?.labels, t[48] = ut, t[49] = Y, t[50] = jt, t[51] = B, t[52] = gt, t[53] = G, t[54] = k, t[55] = W, t[56] = z, t[57] = q, t[58] = U, t[59] = J, t[60] = V, t[61] = A, t[62] = K, t[63] = Q, t[64] = Z, t[65] = _;
|
|
233
233
|
} else
|
|
234
|
-
gt = t[52],
|
|
234
|
+
gt = t[52], G = t[53], k = t[54], W = t[55], z = t[56], q = t[57], U = t[58], J = t[59], V = t[60], A = t[61], K = t[62], Q = t[63], Z = t[64], _ = t[65];
|
|
235
235
|
let R;
|
|
236
236
|
t[76] !== gt || t[77] !== U || t[78] !== J ? (R = /* @__PURE__ */ i.jsx(gt, { transform: U, children: J }), t[76] = gt, t[77] = U, t[78] = J, t[79] = R) : R = t[79];
|
|
237
237
|
let tt;
|
|
238
|
-
t[80] !==
|
|
239
|
-
const Pt = `translate(0,${j})`, Et =
|
|
238
|
+
t[80] !== G || t[81] !== R ? (tt = /* @__PURE__ */ i.jsx(G, { children: R }), t[80] = G, t[81] = R, t[82] = tt) : tt = t[82];
|
|
239
|
+
const Pt = `translate(0,${j})`, Et = n?.yAxis?.title;
|
|
240
240
|
let et;
|
|
241
|
-
t[83] !==
|
|
242
|
-
fill:
|
|
241
|
+
t[83] !== u[0] || t[84] !== Et ? (et = {
|
|
242
|
+
fill: u[0],
|
|
243
243
|
textAnchor: "end",
|
|
244
244
|
...Et
|
|
245
|
-
}, t[83] =
|
|
245
|
+
}, t[83] = u[0], t[84] = Et, t[85] = et) : et = t[85];
|
|
246
246
|
const Xt = s?.yAxis?.title;
|
|
247
247
|
let P;
|
|
248
|
-
t[86] !== Xt ? (P =
|
|
249
|
-
const
|
|
248
|
+
t[86] !== Xt ? (P = ce("text-base", Xt), t[86] = Xt, t[87] = P) : P = t[87];
|
|
249
|
+
const Ct = C / 2 - w / 2;
|
|
250
250
|
let it;
|
|
251
|
-
t[88] !== mt[0] || t[89] !== et || t[90] !== P || t[91] !==
|
|
252
|
-
const Ht =
|
|
251
|
+
t[88] !== mt[0] || t[89] !== et || t[90] !== P || t[91] !== Ct ? (it = /* @__PURE__ */ i.jsx("text", { style: et, className: P, x: Ct, y: 0, dx: -5, dy: 20, children: mt[0] }), t[88] = mt[0], t[89] = et, t[90] = P, t[91] = Ct, t[92] = it) : it = t[92];
|
|
252
|
+
const Ht = n?.yAxis?.title;
|
|
253
253
|
let at;
|
|
254
|
-
t[93] !==
|
|
255
|
-
fill:
|
|
254
|
+
t[93] !== u[1] || t[94] !== Ht ? (at = {
|
|
255
|
+
fill: u[1],
|
|
256
256
|
textAnchor: "start",
|
|
257
257
|
...Ht
|
|
258
|
-
}, t[93] =
|
|
258
|
+
}, t[93] = u[1], t[94] = Ht, t[95] = at) : at = t[95];
|
|
259
259
|
const Yt = s?.yAxis?.title;
|
|
260
260
|
let st;
|
|
261
|
-
t[96] !== Yt ? (st =
|
|
261
|
+
t[96] !== Yt ? (st = ce("text-base", Yt), t[96] = Yt, t[97] = st) : st = t[97];
|
|
262
262
|
const kt = C / 2 + w / 2;
|
|
263
263
|
let ot;
|
|
264
264
|
t[98] !== mt[1] || t[99] !== at || t[100] !== st || t[101] !== kt ? (ot = /* @__PURE__ */ i.jsx("text", { style: at, className: st, x: kt, y: 0, dx: 5, dy: 20, children: mt[1] }), t[98] = mt[1], t[99] = at, t[100] = st, t[101] = kt, t[102] = ot) : ot = t[102];
|
|
@@ -268,22 +268,22 @@ function Re(a) {
|
|
|
268
268
|
ot
|
|
269
269
|
] }), t[103] = Pt, t[104] = it, t[105] = ot, t[106] = E) : E = t[106];
|
|
270
270
|
let lt;
|
|
271
|
-
t[107] !==
|
|
271
|
+
t[107] !== S ? (lt = S.filter(Ye).map(He), t[107] = S, t[108] = lt) : lt = t[108];
|
|
272
272
|
let X;
|
|
273
|
-
t[109] !== tt || t[110] !== E || t[111] !== lt || t[112] !==
|
|
274
|
-
|
|
273
|
+
t[109] !== tt || t[110] !== E || t[111] !== lt || t[112] !== V || t[113] !== A || t[114] !== K || t[115] !== Q ? (X = /* @__PURE__ */ i.jsxs("g", { transform: V, children: [
|
|
274
|
+
A,
|
|
275
275
|
K,
|
|
276
276
|
Q,
|
|
277
277
|
tt,
|
|
278
278
|
E,
|
|
279
279
|
lt
|
|
280
|
-
] }), t[109] = tt, t[110] = E, t[111] = lt, t[112] =
|
|
280
|
+
] }), t[109] = tt, t[110] = E, t[111] = lt, t[112] = V, t[113] = A, t[114] = K, t[115] = Q, t[116] = X) : X = t[116];
|
|
281
281
|
let o;
|
|
282
|
-
t[117] !==
|
|
282
|
+
t[117] !== k || t[118] !== W || t[119] !== z || t[120] !== q || t[121] !== X || t[122] !== Z || t[123] !== _ ? (o = /* @__PURE__ */ i.jsx(k, { width: Z, height: _, viewBox: W, direction: z, ref: q, children: X }), t[117] = k, t[118] = W, t[119] = z, t[120] = q, t[121] = X, t[122] = Z, t[123] = _, t[124] = o) : o = t[124];
|
|
283
283
|
let nt;
|
|
284
|
-
t[125] !== s?.tooltip || t[126] !==
|
|
284
|
+
t[125] !== s?.tooltip || t[126] !== Mt || t[127] !== d || t[128] !== Gt || t[129] !== n?.tooltip || t[130] !== Tt ? (nt = Gt && Tt && Mt && d ? /* @__PURE__ */ i.jsx(ke, { data: Gt, body: Tt, xPos: Mt, yPos: d, backgroundStyle: n?.tooltip, className: s?.tooltip }) : null, t[125] = s?.tooltip, t[126] = Mt, t[127] = d, t[128] = Gt, t[129] = n?.tooltip, t[130] = Tt, t[131] = nt) : nt = t[131];
|
|
285
285
|
let H;
|
|
286
|
-
t[132] !== s?.modal || t[133] !==
|
|
286
|
+
t[132] !== s?.modal || t[133] !== T || t[134] !== O ? (H = T && O !== void 0 ? /* @__PURE__ */ i.jsx($e, { body: T, data: O, setData: Lt, className: s?.modal }) : null, t[132] = s?.modal, t[133] = T, t[134] = O, t[135] = H) : H = t[135];
|
|
287
287
|
let Qt;
|
|
288
288
|
return t[136] !== o || t[137] !== nt || t[138] !== H ? (Qt = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
289
289
|
o,
|
|
@@ -291,52 +291,52 @@ function Re(a) {
|
|
|
291
291
|
H
|
|
292
292
|
] }), t[136] = o, t[137] = nt, t[138] = H, t[139] = Qt) : Qt = t[139], Qt;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function He(a) {
|
|
295
295
|
return a.layer;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Ye(a) {
|
|
298
298
|
return a.position === "after";
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function We(a) {
|
|
301
301
|
return a !== 0;
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function ze(a) {
|
|
304
304
|
return a !== 0;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function qe(a) {
|
|
307
307
|
return a !== 0;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Ue(a) {
|
|
310
310
|
return a !== 0;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Je(a) {
|
|
313
313
|
return a.layer;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Ke(a) {
|
|
316
316
|
return a.position === "before";
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Qe(a) {
|
|
319
319
|
return `${a.id}`;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Ze(a, t) {
|
|
322
322
|
return {
|
|
323
323
|
...a,
|
|
324
324
|
id: `${t}`
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
const v = a.map((p) => p[t]).filter((p) => !
|
|
327
|
+
function oe(a, t, l, B) {
|
|
328
|
+
const v = a.map((p) => p[t]).filter((p) => !fe(p)), u = fe(l) ? Math.min(...v) >= 0 ? 0 : Math.min(...v) : l, w = fe(B) ? Math.max(...v) < 0 ? 0 : Math.max(...v) : B;
|
|
329
329
|
return {
|
|
330
|
-
min:
|
|
330
|
+
min: u,
|
|
331
331
|
max: w
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
const t =
|
|
336
|
-
data:
|
|
337
|
-
graphTitle:
|
|
334
|
+
function Oi(a) {
|
|
335
|
+
const t = Ae.c(118), {
|
|
336
|
+
data: l,
|
|
337
|
+
graphTitle: B,
|
|
338
338
|
sources: v,
|
|
339
|
-
graphDescription:
|
|
339
|
+
graphDescription: u,
|
|
340
340
|
height: w,
|
|
341
341
|
width: p,
|
|
342
342
|
footNote: rt,
|
|
@@ -351,44 +351,44 @@ function Vi(a) {
|
|
|
351
351
|
leftBarTitle: dt,
|
|
352
352
|
tooltip: St,
|
|
353
353
|
relativeHeight: jt,
|
|
354
|
-
onSeriesMouseOver:
|
|
354
|
+
onSeriesMouseOver: N,
|
|
355
355
|
graphID: At,
|
|
356
356
|
barPadding: ut,
|
|
357
357
|
truncateBy: ft,
|
|
358
358
|
onSeriesMouseClick: Bt,
|
|
359
|
-
centerGap:
|
|
360
|
-
showValues:
|
|
359
|
+
centerGap: T,
|
|
360
|
+
showValues: n,
|
|
361
361
|
maxValue: s,
|
|
362
|
-
minValue:
|
|
362
|
+
minValue: L,
|
|
363
363
|
refValues: m,
|
|
364
|
-
suffix:
|
|
365
|
-
prefix:
|
|
366
|
-
showTicks:
|
|
367
|
-
showColorScale:
|
|
364
|
+
suffix: ht,
|
|
365
|
+
prefix: S,
|
|
366
|
+
showTicks: F,
|
|
367
|
+
showColorScale: I,
|
|
368
368
|
graphDownload: Ft,
|
|
369
|
-
dataDownload:
|
|
369
|
+
dataDownload: le,
|
|
370
370
|
language: It,
|
|
371
371
|
colorLegendTitle: M,
|
|
372
372
|
minHeight: Gt,
|
|
373
|
-
theme:
|
|
374
|
-
ariaLabel:
|
|
375
|
-
resetSelectionOnDoubleClick:
|
|
376
|
-
detailsOnClick:
|
|
377
|
-
styles:
|
|
378
|
-
classNames:
|
|
373
|
+
theme: xt,
|
|
374
|
+
ariaLabel: O,
|
|
375
|
+
resetSelectionOnDoubleClick: Lt,
|
|
376
|
+
detailsOnClick: Mt,
|
|
377
|
+
styles: f,
|
|
378
|
+
classNames: d,
|
|
379
379
|
noOfTicks: pt,
|
|
380
380
|
animate: Rt,
|
|
381
|
-
precision:
|
|
381
|
+
precision: h,
|
|
382
382
|
customLayers: C,
|
|
383
383
|
timeline: j,
|
|
384
384
|
naLabel: gt
|
|
385
385
|
} = a;
|
|
386
|
-
let
|
|
387
|
-
t[0] !== ct ? (
|
|
388
|
-
const
|
|
386
|
+
let G;
|
|
387
|
+
t[0] !== ct ? (G = ct === void 0 ? [je.light.categoricalColors.colors[0], je.light.categoricalColors.colors[1]] : ct, t[0] = ct, t[1] = G) : G = t[1];
|
|
388
|
+
const k = G, W = mt === void 0 ? !1 : mt, z = Ut === void 0 ? 20 : Ut, q = Jt === void 0 ? 20 : Jt, U = Y === void 0 ? 25 : Y, J = Kt === void 0 ? 30 : Kt, V = Tt === void 0 ? "Right bar graph" : Tt, A = dt === void 0 ? "Left bar graph" : dt, K = ut === void 0 ? 0.25 : ut, Q = ft === void 0 ? 999 : ft, Z = T === void 0 ? 100 : T, _ = n === void 0 ? !0 : n;
|
|
389
389
|
let R;
|
|
390
390
|
t[2] !== m ? (R = m === void 0 ? [] : m, t[2] = m, t[3] = R) : R = t[3];
|
|
391
|
-
const tt = R, Pt =
|
|
391
|
+
const tt = R, Pt = ht === void 0 ? "" : ht, Et = S === void 0 ? "" : S, et = F === void 0 ? !0 : F, Xt = I === void 0 ? !1 : I, P = Ft === void 0 ? !1 : Ft, Ct = le === void 0 ? !1 : le, it = It === void 0 ? "en" : It, Ht = Gt === void 0 ? 0 : Gt, at = xt === void 0 ? "light" : xt, Yt = Lt === void 0 ? !0 : Lt, st = pt === void 0 ? 5 : pt, kt = Rt === void 0 ? !1 : Rt, ot = h === void 0 ? 2 : h;
|
|
392
392
|
let E;
|
|
393
393
|
t[4] !== C ? (E = C === void 0 ? [] : C, t[4] = C, t[5] = E) : E = t[5];
|
|
394
394
|
const lt = E;
|
|
@@ -398,102 +398,109 @@ function Vi(a) {
|
|
|
398
398
|
autoplay: !1,
|
|
399
399
|
showOnlyActiveDate: !0
|
|
400
400
|
} : j, t[6] = j, t[7] = X) : X = t[7];
|
|
401
|
-
const o = X, nt = gt === void 0 ? "NA" : gt, [H, Qt] = Dt(0), [yt,
|
|
402
|
-
let
|
|
403
|
-
if (t[8] !==
|
|
401
|
+
const o = X, nt = gt === void 0 ? "NA" : gt, [H, Qt] = Dt(0), [yt, D] = Dt(0), [r, ne] = Dt(o.autoplay);
|
|
402
|
+
let x;
|
|
403
|
+
if (t[8] !== l || t[9] !== o.dateFormat) {
|
|
404
404
|
let y;
|
|
405
|
-
t[11] !== o.dateFormat ? (y = (qt) =>
|
|
405
|
+
t[11] !== o.dateFormat ? (y = (qt) => Ce(`${qt.date}`, o.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[11] = o.dateFormat, t[12] = y) : y = t[12], x = [...new Set(l.filter(oi).map(y))], x.sort(si), t[8] = l, t[9] = o.dateFormat, t[10] = x;
|
|
406
406
|
} else
|
|
407
|
-
|
|
408
|
-
const c =
|
|
407
|
+
x = t[10];
|
|
408
|
+
const c = x, [$, Vt] = Dt(o.autoplay ? 0 : c.length - 1), Wt = he(null), zt = he(null);
|
|
409
409
|
let $t, bt;
|
|
410
410
|
t[13] === Symbol.for("react.memo_cache_sentinel") ? ($t = () => {
|
|
411
411
|
const y = new ResizeObserver((qt) => {
|
|
412
|
-
Qt(qt[0].target.clientWidth || 620),
|
|
412
|
+
Qt(qt[0].target.clientWidth || 620), D(qt[0].target.clientHeight || 480);
|
|
413
413
|
});
|
|
414
414
|
return Wt.current && y.observe(Wt.current), () => y.disconnect();
|
|
415
|
-
}, bt = [], t[13] = $t, t[14] = bt) : ($t = t[13], bt = t[14]),
|
|
415
|
+
}, bt = [], t[13] = $t, t[14] = bt) : ($t = t[13], bt = t[14]), xe($t, bt);
|
|
416
416
|
let Nt, vt;
|
|
417
|
-
t[15] !==
|
|
417
|
+
t[15] !== r || t[16] !== o.speed || t[17] !== c ? (Nt = () => {
|
|
418
418
|
const y = setInterval(() => {
|
|
419
419
|
Vt((qt) => qt < c.length - 1 ? qt + 1 : 0);
|
|
420
420
|
}, (o.speed || 2) * 1e3);
|
|
421
|
-
return
|
|
422
|
-
}, vt = [c,
|
|
421
|
+
return r || clearInterval(y), () => clearInterval(y);
|
|
422
|
+
}, vt = [c, r, o.speed], t[15] = r, t[16] = o.speed, t[17] = c, t[18] = Nt, t[19] = vt) : (Nt = t[18], vt = t[19]), xe(Nt, vt);
|
|
423
423
|
const e = o.dateFormat || "yyyy";
|
|
424
424
|
let g;
|
|
425
|
-
t[20] !==
|
|
426
|
-
const b = g,
|
|
425
|
+
t[20] !== $ || t[21] !== e || t[22] !== o.showOnlyActiveDate || t[23] !== c ? (g = Be(c, $, o.showOnlyActiveDate, e), t[20] = $, t[21] = e, t[22] = o.showOnlyActiveDate, t[23] = c, t[24] = g) : g = t[24];
|
|
426
|
+
const b = g, me = d?.graphContainer, de = f?.graphContainer;
|
|
427
427
|
let Zt;
|
|
428
|
-
t[25] !==
|
|
429
|
-
title:
|
|
430
|
-
description:
|
|
428
|
+
t[25] !== d?.description || t[26] !== d?.title || t[27] !== l || t[28] !== Ct || t[29] !== u || t[30] !== P || t[31] !== B || t[32] !== f?.description || t[33] !== f?.title || t[34] !== p ? (Zt = B || u || P || Ct ? /* @__PURE__ */ i.jsx(Te, { styles: {
|
|
429
|
+
title: f?.title,
|
|
430
|
+
description: f?.description
|
|
431
431
|
}, classNames: {
|
|
432
|
-
title:
|
|
433
|
-
description:
|
|
434
|
-
}, graphTitle:
|
|
432
|
+
title: d?.title,
|
|
433
|
+
description: d?.description
|
|
434
|
+
}, graphTitle: B, graphDescription: u, width: p, graphDownload: P ? zt : void 0, dataDownload: Ct ? l.map(ai).filter(ii).length > 0 ? l.map(ei).filter(ti) : l.filter(_e) : null }) : null, t[25] = d?.description, t[26] = d?.title, t[27] = l, t[28] = Ct, t[29] = u, t[30] = P, t[31] = B, t[32] = f?.description, t[33] = f?.title, t[34] = p, t[35] = Zt) : Zt = t[35];
|
|
435
435
|
let _t;
|
|
436
|
-
t[36] !==
|
|
436
|
+
t[36] !== $ || t[37] !== b || t[38] !== r || t[39] !== o.enabled || t[40] !== c ? (_t = o.enabled && c.length > 0 && b ? /* @__PURE__ */ i.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
437
437
|
/* @__PURE__ */ i.jsx("button", { type: "button", onClick: () => {
|
|
438
|
-
|
|
439
|
-
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label":
|
|
440
|
-
/* @__PURE__ */ i.jsx(
|
|
438
|
+
ne(!r);
|
|
439
|
+
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": r ? "Click to pause animation" : "Click to play animation", children: r ? /* @__PURE__ */ i.jsx(Ie, {}) : /* @__PURE__ */ i.jsx(Ge, {}) }),
|
|
440
|
+
/* @__PURE__ */ i.jsx(Le, { min: c[0], max: c[c.length - 1], marks: b, step: null, defaultValue: c[c.length - 1], value: c[$], onChangeComplete: (y) => {
|
|
441
441
|
Vt(c.indexOf(y));
|
|
442
442
|
}, onChange: (y) => {
|
|
443
443
|
Vt(c.indexOf(y));
|
|
444
444
|
}, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
|
|
445
|
-
] }) : null, t[36] =
|
|
445
|
+
] }) : null, t[36] = $, t[37] = b, t[38] = r, t[39] = o.enabled, t[40] = c, t[41] = _t) : _t = t[41];
|
|
446
446
|
let te;
|
|
447
|
-
t[42] !==
|
|
448
|
-
Xt ? /* @__PURE__ */ i.jsx(Oe, { colorLegendTitle: M, colorDomain: [L, G], colors: I, showNAColor: !1, className: x?.colorLegend }) : null,
|
|
449
|
-
/* @__PURE__ */ i.jsx(Ie, { ref: Wt, children: H && yt ? /* @__PURE__ */ i.jsx(Re, { data: Fe(r, o.dateFormat || "yyyy").filter((y) => o.enabled ? y.date === Ae(new Date(c[k]), o.dateFormat || "yyyy") : y), barColors: I, width: H, centerGap: Z, height: yt, truncateBy: Q, leftMargin: z, rightMargin: q, topMargin: U, bottomMargin: J, axisTitles: [L, G], tooltip: St, onSeriesMouseOver: V, barPadding: K, refValues: tt, maxValue: Math.max(ie(r, "leftBar", B, s).max, ie(r, "rightBar", B, s).max), minValue: Math.min(ie(r, "leftBar", B, s).min, ie(r, "rightBar", B, s).min), minValueLeftBar: ie(r, "leftBar", B, s).min, minValueRightBar: ie(r, "rightBar", B, s).min, showValues: _, onSeriesMouseClick: Bt, showTicks: et, suffix: Pt, prefix: Et, resetSelectionOnDoubleClick: Yt, detailsOnClick: Ct, styles: u, classNames: x, noOfTicks: st, animate: kt === !0 ? {
|
|
450
|
-
duration: 0.5,
|
|
451
|
-
once: !0,
|
|
452
|
-
amount: 0.5
|
|
453
|
-
} : kt || {
|
|
454
|
-
duration: 0,
|
|
455
|
-
once: !0,
|
|
456
|
-
amount: 0
|
|
457
|
-
}, precision: ot, customLayers: lt, naLabel: nt }) : null })
|
|
458
|
-
] }), t[42] = kt, t[43] = I, t[44] = K, t[45] = J, t[46] = Z, t[47] = x, t[48] = M, t[49] = lt, t[50] = r, t[51] = Ct, t[52] = k, t[53] = L, t[54] = z, t[55] = s, t[56] = B, t[57] = nt, t[58] = st, t[59] = Bt, t[60] = V, t[61] = ot, t[62] = Et, t[63] = tt, t[64] = Yt, t[65] = G, t[66] = q, t[67] = Xt, t[68] = et, t[69] = _, t[70] = u, t[71] = Pt, t[72] = yt, t[73] = H, t[74] = o.dateFormat, t[75] = o.enabled, t[76] = St, t[77] = U, t[78] = Q, t[79] = c, t[80] = te) : te = t[80];
|
|
447
|
+
t[42] !== k || t[43] !== d?.colorLegend || t[44] !== M || t[45] !== l.length || t[46] !== A || t[47] !== V || t[48] !== Xt ? (te = Xt && l.length > 0 ? /* @__PURE__ */ i.jsx(Se, { colorLegendTitle: M, colorDomain: [A, V], colors: k, showNAColor: !1, className: d?.colorLegend }) : null, t[42] = k, t[43] = d?.colorLegend, t[44] = M, t[45] = l.length, t[46] = A, t[47] = V, t[48] = Xt, t[49] = te) : te = t[49];
|
|
459
448
|
let ee;
|
|
460
|
-
t[
|
|
461
|
-
|
|
462
|
-
|
|
449
|
+
t[50] !== l.length ? (ee = l.length === 0 && /* @__PURE__ */ i.jsx(Fe, {}), t[50] = l.length, t[51] = ee) : ee = t[51];
|
|
450
|
+
let ie;
|
|
451
|
+
t[52] !== kt || t[53] !== k || t[54] !== K || t[55] !== J || t[56] !== Z || t[57] !== d || t[58] !== lt || t[59] !== l || t[60] !== Mt || t[61] !== $ || t[62] !== A || t[63] !== z || t[64] !== s || t[65] !== L || t[66] !== nt || t[67] !== st || t[68] !== Bt || t[69] !== N || t[70] !== ot || t[71] !== Et || t[72] !== tt || t[73] !== Yt || t[74] !== V || t[75] !== q || t[76] !== et || t[77] !== _ || t[78] !== f || t[79] !== Pt || t[80] !== yt || t[81] !== H || t[82] !== o.dateFormat || t[83] !== o.enabled || t[84] !== St || t[85] !== U || t[86] !== Q || t[87] !== c ? (ie = H && yt && l.length > 0 ? /* @__PURE__ */ i.jsx(Xe, { data: Re(l, o.dateFormat || "yyyy").filter((y) => o.enabled ? y.date === Me(new Date(c[$]), o.dateFormat || "yyyy") : y), barColors: k, width: H, centerGap: Z, height: yt, truncateBy: Q, leftMargin: z, rightMargin: q, topMargin: U, bottomMargin: J, axisTitles: [A, V], tooltip: St, onSeriesMouseOver: N, barPadding: K, refValues: tt, maxValue: Math.max(oe(l, "leftBar", L, s).max, oe(l, "rightBar", L, s).max), minValue: Math.min(oe(l, "leftBar", L, s).min, oe(l, "rightBar", L, s).min), minValueLeftBar: oe(l, "leftBar", L, s).min, minValueRightBar: oe(l, "rightBar", L, s).min, showValues: _, onSeriesMouseClick: Bt, showTicks: et, suffix: Pt, prefix: Et, resetSelectionOnDoubleClick: Yt, detailsOnClick: Mt, styles: f, classNames: d, noOfTicks: st, animate: kt === !0 ? {
|
|
452
|
+
duration: 0.5,
|
|
453
|
+
once: !0,
|
|
454
|
+
amount: 0.5
|
|
455
|
+
} : kt || {
|
|
456
|
+
duration: 0,
|
|
457
|
+
once: !0,
|
|
458
|
+
amount: 0
|
|
459
|
+
}, precision: ot, customLayers: lt, naLabel: nt }) : null, t[52] = kt, t[53] = k, t[54] = K, t[55] = J, t[56] = Z, t[57] = d, t[58] = lt, t[59] = l, t[60] = Mt, t[61] = $, t[62] = A, t[63] = z, t[64] = s, t[65] = L, t[66] = nt, t[67] = st, t[68] = Bt, t[69] = N, t[70] = ot, t[71] = Et, t[72] = tt, t[73] = Yt, t[74] = V, t[75] = q, t[76] = et, t[77] = _, t[78] = f, t[79] = Pt, t[80] = yt, t[81] = H, t[82] = o.dateFormat, t[83] = o.enabled, t[84] = St, t[85] = U, t[86] = Q, t[87] = c, t[88] = ie) : ie = t[88];
|
|
460
|
+
let ae;
|
|
461
|
+
t[89] !== ee || t[90] !== ie ? (ae = /* @__PURE__ */ i.jsxs(Pe, { ref: Wt, children: [
|
|
462
|
+
ee,
|
|
463
|
+
ie
|
|
464
|
+
] }), t[89] = ee, t[90] = ie, t[91] = ae) : ae = t[91];
|
|
465
|
+
let se;
|
|
466
|
+
t[92] !== d?.footnote || t[93] !== d?.source || t[94] !== rt || t[95] !== v || t[96] !== f?.footnote || t[97] !== f?.source || t[98] !== p ? (se = v || rt ? /* @__PURE__ */ i.jsx(De, { styles: {
|
|
467
|
+
footnote: f?.footnote,
|
|
468
|
+
source: f?.source
|
|
463
469
|
}, classNames: {
|
|
464
|
-
footnote:
|
|
465
|
-
source:
|
|
466
|
-
}, sources: v, footNote: rt, width: p }) : null, t[
|
|
467
|
-
let
|
|
468
|
-
return t[
|
|
470
|
+
footnote: d?.footnote,
|
|
471
|
+
source: d?.source
|
|
472
|
+
}, sources: v, footNote: rt, width: p }) : null, t[92] = d?.footnote, t[93] = d?.source, t[94] = rt, t[95] = v, t[96] = f?.footnote, t[97] = f?.source, t[98] = p, t[99] = se) : se = t[99];
|
|
473
|
+
let re;
|
|
474
|
+
return t[100] !== O || t[101] !== W || t[102] !== At || t[103] !== w || t[104] !== it || t[105] !== Ht || t[106] !== wt || t[107] !== jt || t[108] !== me || t[109] !== de || t[110] !== Zt || t[111] !== _t || t[112] !== te || t[113] !== ae || t[114] !== se || t[115] !== at || t[116] !== p ? (re = /* @__PURE__ */ i.jsxs(Ee, { className: me, style: de, id: At, ref: zt, "aria-label": O, backgroundColor: W, theme: at, language: it, minHeight: Ht, width: p, height: w, relativeHeight: jt, padding: wt, children: [
|
|
469
475
|
Zt,
|
|
470
476
|
_t,
|
|
471
477
|
te,
|
|
472
|
-
|
|
473
|
-
|
|
478
|
+
ae,
|
|
479
|
+
se
|
|
480
|
+
] }), t[100] = O, t[101] = W, t[102] = At, t[103] = w, t[104] = it, t[105] = Ht, t[106] = wt, t[107] = jt, t[108] = me, t[109] = de, t[110] = Zt, t[111] = _t, t[112] = te, t[113] = ae, t[114] = se, t[115] = at, t[116] = p, t[117] = re) : re = t[117], re;
|
|
474
481
|
}
|
|
475
|
-
function
|
|
482
|
+
function _e(a) {
|
|
476
483
|
return a !== void 0;
|
|
477
484
|
}
|
|
478
|
-
function
|
|
485
|
+
function ti(a) {
|
|
479
486
|
return a !== void 0;
|
|
480
487
|
}
|
|
481
|
-
function
|
|
488
|
+
function ei(a) {
|
|
482
489
|
return a.data;
|
|
483
490
|
}
|
|
484
|
-
function
|
|
491
|
+
function ii(a) {
|
|
485
492
|
return a !== void 0;
|
|
486
493
|
}
|
|
487
|
-
function
|
|
494
|
+
function ai(a) {
|
|
488
495
|
return a.data;
|
|
489
496
|
}
|
|
490
|
-
function
|
|
497
|
+
function si(a, t) {
|
|
491
498
|
return a - t;
|
|
492
499
|
}
|
|
493
|
-
function
|
|
500
|
+
function oi(a) {
|
|
494
501
|
return a.date;
|
|
495
502
|
}
|
|
496
503
|
export {
|
|
497
|
-
|
|
504
|
+
Oi as ButterflyChart
|
|
498
505
|
};
|
|
499
506
|
//# sourceMappingURL=ButterflyChart.js.map
|