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