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