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