@undp/data-viz 1.5.1 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.js +3 -2
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +1221 -1247
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +130 -142
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +41 -41
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +483 -487
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +99 -99
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +125 -125
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +2 -2
- package/dist/Data/BureauPerformance.csv +8 -0
- package/dist/Data/EGDashboardData.csv +6 -0
- package/dist/DataCards.cjs +2 -2
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +6 -6
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.js +66 -68
- package/dist/DataTable.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +3 -2
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +205 -205
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +78 -81
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +3 -2
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +64 -65
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/{GraphEl-4RUlclvW.cjs → GraphEl-BcYgMnN2.cjs} +2 -2
- package/dist/{GraphEl-4RUlclvW.cjs.map → GraphEl-BcYgMnN2.cjs.map} +1 -1
- package/dist/{GraphEl-ClIxlWa3.js → GraphEl-CMWeARJ3.js} +2 -2
- package/dist/{GraphEl-ClIxlWa3.js.map → GraphEl-CMWeARJ3.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +4 -4
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.js +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.js +83 -83
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +7 -6
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.js +2 -2
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +82 -91
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +3 -2
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +2 -2
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +124 -130
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +200 -200
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +149 -155
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +44 -43
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +4 -4
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.js +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +107 -113
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.cjs.map +1 -1
- package/dist/SparkLine.js +3 -2
- package/dist/SparkLine.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +159 -159
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +3 -3
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +194 -200
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/ensureCompleteData-DkQYPeDa.cjs +2 -0
- package/dist/ensureCompleteData-DkQYPeDa.cjs.map +1 -0
- package/dist/{ensureCompleteData-BALdOrsS.js → ensureCompleteData-DlmibgaI.js} +28 -8
- package/dist/ensureCompleteData-DlmibgaI.js.map +1 -0
- package/dist/fetchAndParseData-Ba-_CgxS.cjs +16 -0
- package/dist/fetchAndParseData-Ba-_CgxS.cjs.map +1 -0
- package/dist/fetchAndParseData-sapWbnYk.js +583 -0
- package/dist/fetchAndParseData-sapWbnYk.js.map +1 -0
- package/dist/fetchAndParseData.cjs +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/getJenks-BbngDoBQ.js +19 -0
- package/dist/getJenks-BbngDoBQ.js.map +1 -0
- package/dist/getJenks-GYmdwBqm.cjs +2 -0
- package/dist/getJenks-GYmdwBqm.cjs.map +1 -0
- package/dist/getSliderMarks-9cNoRkDx.js +1023 -0
- package/dist/getSliderMarks-9cNoRkDx.js.map +1 -0
- package/dist/getSliderMarks-CRIbTGYV.cjs +6 -0
- package/dist/getSliderMarks-CRIbTGYV.cjs.map +1 -0
- package/dist/getUniqValue-DiCh_MOD.js +13 -0
- package/dist/getUniqValue-DiCh_MOD.js.map +1 -0
- package/dist/getUniqValue-RViz8tTw.cjs +2 -0
- package/dist/getUniqValue-RViz8tTw.cjs.map +1 -0
- package/dist/{index-BMgDMxKJ.js → index-37q0ULNQ.js} +44 -50
- package/dist/index-37q0ULNQ.js.map +1 -0
- package/dist/index-CVlCtJbC.cjs +2 -0
- package/dist/index-CVlCtJbC.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/sort-DfK1b0F5.js +34 -0
- package/dist/sort-DfK1b0F5.js.map +1 -0
- package/dist/sort-O96oMZLb.cjs +2 -0
- package/dist/sort-O96oMZLb.cjs.map +1 -0
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +3 -3
- package/dist/transformDataForAggregation-KXGm6flX.cjs +2 -0
- package/dist/{transformDataForAggregation-BVxVu4yY.cjs.map → transformDataForAggregation-KXGm6flX.cjs.map} +1 -1
- package/dist/{transformDataForAggregation-1BYVFqvF.js → transformDataForAggregation-sBpdlX8n.js} +40 -44
- package/dist/{transformDataForAggregation-1BYVFqvF.js.map → transformDataForAggregation-sBpdlX8n.js.map} +1 -1
- package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js → transformDataForGraphFromFile-ComYvzuz.js} +3 -3
- package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js.map → transformDataForGraphFromFile-ComYvzuz.js.map} +1 -1
- package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs → transformDataForGraphFromFile-DVZodTHd.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs.map → transformDataForGraphFromFile-DVZodTHd.cjs.map} +1 -1
- package/dist/uniqBy-BHy4I8PK.js +8 -0
- package/dist/uniqBy-BHy4I8PK.js.map +1 -0
- package/dist/uniqBy-O05lp2S5.cjs +2 -0
- package/dist/uniqBy-O05lp2S5.cjs.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -2
- package/package.json +1 -7
- package/dist/ensureCompleteData-BALdOrsS.js.map +0 -1
- package/dist/ensureCompleteData-BU5Zlccy.cjs +0 -2
- package/dist/ensureCompleteData-BU5Zlccy.cjs.map +0 -1
- package/dist/fetchAndParseData-DBOl1Icl.js +0 -1196
- package/dist/fetchAndParseData-DBOl1Icl.js.map +0 -1
- package/dist/fetchAndParseData-Dcy7AS_0.cjs +0 -16
- package/dist/fetchAndParseData-Dcy7AS_0.cjs.map +0 -1
- package/dist/getJenks-DW96UYNE.js +0 -23
- package/dist/getJenks-DW96UYNE.js.map +0 -1
- package/dist/getJenks-vofIZmeb.cjs +0 -2
- package/dist/getJenks-vofIZmeb.cjs.map +0 -1
- package/dist/getSliderMarks-C0jptXeP.js +0 -1054
- package/dist/getSliderMarks-C0jptXeP.js.map +0 -1
- package/dist/getSliderMarks-CtsEXiLV.cjs +0 -6
- package/dist/getSliderMarks-CtsEXiLV.cjs.map +0 -1
- package/dist/getUniqValue-CfuE_l9c.cjs +0 -2
- package/dist/getUniqValue-CfuE_l9c.cjs.map +0 -1
- package/dist/getUniqValue-CttuU_wn.js +0 -20
- package/dist/getUniqValue-CttuU_wn.js.map +0 -1
- package/dist/index-AqnpA7_O.js +0 -631
- package/dist/index-AqnpA7_O.js.map +0 -1
- package/dist/index-BJOeaYTk.cjs +0 -2
- package/dist/index-BJOeaYTk.cjs.map +0 -1
- package/dist/index-BMgDMxKJ.js.map +0 -1
- package/dist/index-DYH8g9WA.cjs +0 -2
- package/dist/index-DYH8g9WA.cjs.map +0 -1
- package/dist/index-Da2GUKrr.cjs +0 -2
- package/dist/index-Da2GUKrr.cjs.map +0 -1
- package/dist/index-fwdktvAS.js +0 -707
- package/dist/index-fwdktvAS.js.map +0 -1
- package/dist/transformDataForAggregation-BVxVu4yY.cjs +0 -2
package/dist/BeeSwarmChart.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { j as i, m as he } from "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
2
|
-
import { u as ce } from "./index-AqnpA7_O.js";
|
|
3
2
|
import { useRef as ae, useState as T, useEffect as de } from "react";
|
|
4
|
-
import { i as
|
|
5
|
-
import { o as
|
|
3
|
+
import { i as ue } from "./index-Bwrro8-q.js";
|
|
4
|
+
import { o as ge } from "./index-DvVprvy6.js";
|
|
6
5
|
import { X as me } from "./Modal-DVVwpKhP.js";
|
|
7
6
|
import { y as fe } from "./Spinner-C85UF28E.js";
|
|
8
7
|
import { n as xe } from "./numberFormattingFunction-14YCbkN2.js";
|
|
9
8
|
import { T as pe } from "./Tooltip-CVCGWyzw.js";
|
|
10
9
|
import { c as D } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
11
10
|
import { g as ye } from "./getTextColorBasedOnBgColor-B6Nk2WBf.js";
|
|
12
|
-
import { Colors as
|
|
11
|
+
import { Colors as se } from "./Colors.js";
|
|
13
12
|
import { s as ve } from "./string2HTML-oFCROsus.js";
|
|
14
13
|
import { A as be } from "./Axis-Ddg-seDi.js";
|
|
15
14
|
import { X as Te } from "./XTicksAndGridLines-Bn9u5gOM.js";
|
|
@@ -21,10 +20,11 @@ import { GraphFooter as Ne } from "./GraphFooter.js";
|
|
|
21
20
|
import { GraphHeader as $e } from "./GraphHeader.js";
|
|
22
21
|
import { ColorLegendWithMouseOver as Se } from "./ColorLegendWithMouseOver.js";
|
|
23
22
|
import { E as Le } from "./EmptyState-DdTp-Mdn.js";
|
|
23
|
+
import { u as ce } from "./uniqBy-BHy4I8PK.js";
|
|
24
24
|
import { Y as He } from "./YTicksAndGridLines-B6ah7CRf.js";
|
|
25
|
-
function Fe(
|
|
25
|
+
function Fe(le) {
|
|
26
26
|
const {
|
|
27
|
-
data:
|
|
27
|
+
data: o,
|
|
28
28
|
circleColors: c,
|
|
29
29
|
showTicks: C,
|
|
30
30
|
leftMargin: ie,
|
|
@@ -46,7 +46,7 @@ function Fe(se) {
|
|
|
46
46
|
minValue: U,
|
|
47
47
|
highlightedDataPoints: J,
|
|
48
48
|
onSeriesMouseClick: G,
|
|
49
|
-
rtl:
|
|
49
|
+
rtl: re,
|
|
50
50
|
resetSelectionOnDoubleClick: K,
|
|
51
51
|
detailsOnClick: A,
|
|
52
52
|
suffix: N,
|
|
@@ -57,32 +57,32 @@ function Fe(se) {
|
|
|
57
57
|
dimmedOpacity: F,
|
|
58
58
|
precision: R,
|
|
59
59
|
customLayers: k
|
|
60
|
-
} =
|
|
60
|
+
} = le, z = ae(null), [j, v] = T(void 0), [S, I] = T(void 0), [_, Z] = T(null), [ee, m] = T(void 0), [f, d] = T(void 0), u = {
|
|
61
61
|
top: X,
|
|
62
62
|
bottom: Y,
|
|
63
63
|
left: ie,
|
|
64
64
|
right: oe
|
|
65
|
-
}, q = b -
|
|
66
|
-
|
|
65
|
+
}, q = b - u.left - u.right, te = w - u.top - u.bottom, O = o.filter((e) => !D(e.radius)).length === 0 ? o : ge(
|
|
66
|
+
o.filter((e) => !D(e.radius)),
|
|
67
67
|
"radius",
|
|
68
68
|
"desc"
|
|
69
|
-
), M = D(a) ? Math.max(...
|
|
69
|
+
), M = D(a) ? Math.max(...o.filter((e) => !D(e.position)).map((e) => e.position)) < 0 && !W ? 0 : Math.max(...o.filter((e) => !D(e.position)).map((e) => e.position)) : a, s = D(U) ? Math.min(...o.filter((e) => !D(e.position)).map((e) => e.position)) >= 0 && !W ? 0 : Math.min(...o.filter((e) => !D(e.position)).map((e) => e.position)) : U, l = o.filter((e) => e.radius === void 0 || e.radius === null).length !== o.length ? we().domain([
|
|
70
70
|
0,
|
|
71
|
-
D(B) ? Math.max(...
|
|
72
|
-
]).range([0.25, x]).nice() : void 0, L = je().domain([
|
|
71
|
+
D(B) ? Math.max(...o.map((e) => e.radius).filter((e) => e != null)) : B
|
|
72
|
+
]).range([0.25, x]).nice() : void 0, L = je().domain([s, M]).range([0, q]).nice(), t = L.ticks(Q);
|
|
73
73
|
return de(() => {
|
|
74
74
|
Z(null);
|
|
75
|
-
const e = O.filter((
|
|
76
|
-
Me(e).force("x", Ce((
|
|
75
|
+
const e = O.filter((g) => g.position);
|
|
76
|
+
Me(e).force("x", Ce((g) => L(g.position)).strength(5)).force("y", Oe((g) => te / 2).strength(1)).force(
|
|
77
77
|
"collide",
|
|
78
78
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
|
-
De((
|
|
79
|
+
De((g) => l ? l(g.radius || 0) + 1 : x + 1)
|
|
80
80
|
).force("charge", ke().strength(-15)).alphaDecay(0.05).tick(1e4).on("tick", () => {
|
|
81
81
|
Z(e);
|
|
82
82
|
}).on("end", () => {
|
|
83
83
|
Z(e);
|
|
84
84
|
});
|
|
85
|
-
}, [
|
|
85
|
+
}, [o, x, te, q, s, M, O, L, l]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
86
86
|
_ ? /* @__PURE__ */ i.jsx(
|
|
87
87
|
"svg",
|
|
88
88
|
{
|
|
@@ -91,24 +91,24 @@ function Fe(se) {
|
|
|
91
91
|
viewBox: `0 0 ${b} ${w}`,
|
|
92
92
|
direction: "ltr",
|
|
93
93
|
ref: z,
|
|
94
|
-
children: /* @__PURE__ */ i.jsxs("g", { transform: `translate(${
|
|
94
|
+
children: /* @__PURE__ */ i.jsxs("g", { transform: `translate(${u.left},${u.top})`, children: [
|
|
95
95
|
C ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
96
96
|
/* @__PURE__ */ i.jsx(
|
|
97
97
|
be,
|
|
98
98
|
{
|
|
99
|
-
x1: L(
|
|
100
|
-
x2: L(
|
|
101
|
-
y1: 0 -
|
|
102
|
-
y2: te +
|
|
99
|
+
x1: L(s < 0 ? 0 : s),
|
|
100
|
+
x2: L(s < 0 ? 0 : s),
|
|
101
|
+
y1: 0 - u.top,
|
|
102
|
+
y2: te + u.bottom,
|
|
103
103
|
label: xe(
|
|
104
|
-
|
|
104
|
+
s < 0 ? 0 : s,
|
|
105
105
|
"NA",
|
|
106
106
|
R,
|
|
107
107
|
$,
|
|
108
108
|
N
|
|
109
109
|
),
|
|
110
110
|
labelPos: {
|
|
111
|
-
x: L(
|
|
111
|
+
x: L(s < 0 ? 0 : s),
|
|
112
112
|
y: 0 - X,
|
|
113
113
|
dy: "0.75em",
|
|
114
114
|
dx: 3
|
|
@@ -129,7 +129,7 @@ function Fe(se) {
|
|
|
129
129
|
values: t.filter((e) => e !== 0),
|
|
130
130
|
x: t.filter((e) => e !== 0).map((e) => L(e)),
|
|
131
131
|
y1: 0 - X,
|
|
132
|
-
y2: te +
|
|
132
|
+
y2: te + u.bottom,
|
|
133
133
|
styles: {
|
|
134
134
|
gridLines: y?.xAxis?.gridLines,
|
|
135
135
|
labels: y?.xAxis?.labels
|
|
@@ -153,14 +153,14 @@ function Fe(se) {
|
|
|
153
153
|
className: "undp-viz-g-with-hover",
|
|
154
154
|
transform: `translate(${e.x},${e.y})`,
|
|
155
155
|
opacity: E ? e.color && c[n.indexOf(e.color)] === E ? 1 : F : J.length !== 0 ? J.indexOf(e.label) !== -1 ? 0.85 : F : 0.85,
|
|
156
|
-
onMouseEnter: (
|
|
157
|
-
v(e), d(
|
|
156
|
+
onMouseEnter: (g) => {
|
|
157
|
+
v(e), d(g.clientY), m(g.clientX), V?.(e);
|
|
158
158
|
},
|
|
159
|
-
onMouseMove: (
|
|
160
|
-
v(e), d(
|
|
159
|
+
onMouseMove: (g) => {
|
|
160
|
+
v(e), d(g.clientY), m(g.clientX);
|
|
161
161
|
},
|
|
162
162
|
onClick: () => {
|
|
163
|
-
(G || A) && (
|
|
163
|
+
(G || A) && (ue(S, e) && K ? (I(void 0), G?.(void 0)) : (I(e), G?.(e)));
|
|
164
164
|
},
|
|
165
165
|
onMouseLeave: () => {
|
|
166
166
|
v(void 0), m(void 0), d(void 0), V?.(void 0);
|
|
@@ -171,17 +171,17 @@ function Fe(se) {
|
|
|
171
171
|
{
|
|
172
172
|
cx: 0,
|
|
173
173
|
cy: 0,
|
|
174
|
-
fill:
|
|
175
|
-
radius:
|
|
174
|
+
fill: o.filter((g) => g.color).length === 0 ? c[0] : e.color ? c[n.indexOf(e.color)] : se.gray,
|
|
175
|
+
radius: l ? l(e.radius || 0) : x
|
|
176
176
|
}
|
|
177
177
|
),
|
|
178
|
-
(
|
|
178
|
+
(l ? l(e.radius || 0) : x) > 10 && P ? /* @__PURE__ */ i.jsx("g", { children: /* @__PURE__ */ i.jsx(
|
|
179
179
|
"foreignObject",
|
|
180
180
|
{
|
|
181
|
-
y: 0 - (
|
|
182
|
-
x: 0 - (
|
|
183
|
-
width: 2 * (
|
|
184
|
-
height: 2 * (
|
|
181
|
+
y: 0 - (l ? l(e.radius || 0) : x),
|
|
182
|
+
x: 0 - (l ? l(e.radius || 0) : x),
|
|
183
|
+
width: 2 * (l ? l(e.radius || 0) : x),
|
|
184
|
+
height: 2 * (l ? l(e.radius || 0) : x),
|
|
185
185
|
children: /* @__PURE__ */ i.jsx("div", { className: "flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-1.5", children: P ? /* @__PURE__ */ i.jsx(
|
|
186
186
|
"p",
|
|
187
187
|
{
|
|
@@ -193,20 +193,20 @@ function Fe(se) {
|
|
|
193
193
|
fontSize: `${Math.min(
|
|
194
194
|
Math.max(
|
|
195
195
|
Math.round(
|
|
196
|
-
(
|
|
196
|
+
(l ? l(e.radius || 0) : x) / 4
|
|
197
197
|
),
|
|
198
198
|
10
|
|
199
199
|
),
|
|
200
200
|
Math.max(
|
|
201
201
|
Math.round(
|
|
202
|
-
(
|
|
202
|
+
(l ? l(e.radius || 0) : x) * 12 / `${e.label}`.length
|
|
203
203
|
),
|
|
204
204
|
10
|
|
205
205
|
),
|
|
206
206
|
20
|
|
207
207
|
)}px`,
|
|
208
208
|
color: ye(
|
|
209
|
-
|
|
209
|
+
o.filter((g) => g.color).length === 0 ? c[0] : e.color ? c[n.indexOf(e.color)] : se.gray
|
|
210
210
|
),
|
|
211
211
|
hyphens: "auto",
|
|
212
212
|
...y?.graphObjectValues || {}
|
|
@@ -220,20 +220,20 @@ function Fe(se) {
|
|
|
220
220
|
},
|
|
221
221
|
e.label
|
|
222
222
|
)),
|
|
223
|
-
h ? /* @__PURE__ */ i.jsx(i.Fragment, { children: h.map((e,
|
|
223
|
+
h ? /* @__PURE__ */ i.jsx(i.Fragment, { children: h.map((e, g) => /* @__PURE__ */ i.jsx(
|
|
224
224
|
Ve,
|
|
225
225
|
{
|
|
226
226
|
text: e.text,
|
|
227
227
|
color: e.color,
|
|
228
228
|
x: L(e.value),
|
|
229
|
-
y1: 0 -
|
|
230
|
-
y2: te +
|
|
231
|
-
textSide: L(e.value) > q * 0.75 ||
|
|
229
|
+
y1: 0 - u.top,
|
|
230
|
+
y2: te + u.bottom,
|
|
231
|
+
textSide: L(e.value) > q * 0.75 || re ? "left" : "right",
|
|
232
232
|
classNames: e.classNames,
|
|
233
233
|
styles: e.styles,
|
|
234
234
|
isInView: !0
|
|
235
235
|
},
|
|
236
|
-
|
|
236
|
+
g
|
|
237
237
|
)) }) : null,
|
|
238
238
|
k.filter((e) => e.position === "after").map((e) => e.layer)
|
|
239
239
|
] })
|
|
@@ -269,9 +269,9 @@ function Fe(se) {
|
|
|
269
269
|
) : null
|
|
270
270
|
] });
|
|
271
271
|
}
|
|
272
|
-
function Pe(
|
|
272
|
+
function Pe(le) {
|
|
273
273
|
const {
|
|
274
|
-
data:
|
|
274
|
+
data: o,
|
|
275
275
|
graphTitle: c,
|
|
276
276
|
backgroundColor: C = !1,
|
|
277
277
|
topMargin: ie = 25,
|
|
@@ -293,7 +293,7 @@ function Pe(se) {
|
|
|
293
293
|
tooltip: U,
|
|
294
294
|
onSeriesMouseOver: J,
|
|
295
295
|
refValues: G,
|
|
296
|
-
showColorScale:
|
|
296
|
+
showColorScale: re,
|
|
297
297
|
graphID: K,
|
|
298
298
|
radius: A = 5,
|
|
299
299
|
maxRadiusValue: N,
|
|
@@ -315,15 +315,15 @@ function Pe(se) {
|
|
|
315
315
|
styles: m,
|
|
316
316
|
classNames: f,
|
|
317
317
|
noOfTicks: d,
|
|
318
|
-
dimmedOpacity:
|
|
318
|
+
dimmedOpacity: u = 0.3,
|
|
319
319
|
precision: q = 2,
|
|
320
320
|
customLayers: te = []
|
|
321
|
-
} =
|
|
321
|
+
} = le, [O, M] = T(0), [s, l] = T(0), [L, t] = T(void 0), e = ae(null), g = ae(null);
|
|
322
322
|
return de(() => {
|
|
323
|
-
const
|
|
324
|
-
M(h || ne[0].target.clientWidth || 620),
|
|
323
|
+
const r = new ResizeObserver((ne) => {
|
|
324
|
+
M(h || ne[0].target.clientWidth || 620), l(V || ne[0].target.clientHeight || 480);
|
|
325
325
|
});
|
|
326
|
-
return e.current && (
|
|
326
|
+
return e.current && (l(e.current.clientHeight || 480), M(e.current.clientWidth || 620), h || r.observe(e.current)), () => r.disconnect();
|
|
327
327
|
}, [h, V]), /* @__PURE__ */ i.jsx(
|
|
328
328
|
"div",
|
|
329
329
|
{
|
|
@@ -342,7 +342,7 @@ function Pe(se) {
|
|
|
342
342
|
...C && C !== !0 ? { backgroundColor: C } : {}
|
|
343
343
|
},
|
|
344
344
|
id: K,
|
|
345
|
-
ref:
|
|
345
|
+
ref: g,
|
|
346
346
|
"aria-label": S || `${c ? `The graph shows ${c}. ` : ""}This is a bee swarm chart showing the distribution along the x-axes. ${p ? ` ${p}` : ""}`,
|
|
347
347
|
children: /* @__PURE__ */ i.jsx(
|
|
348
348
|
"div",
|
|
@@ -364,21 +364,18 @@ function Pe(se) {
|
|
|
364
364
|
graphTitle: c,
|
|
365
365
|
graphDescription: p,
|
|
366
366
|
width: h,
|
|
367
|
-
graphDownload: F ?
|
|
368
|
-
dataDownload: R ?
|
|
367
|
+
graphDownload: F ? g.current : void 0,
|
|
368
|
+
dataDownload: R ? o.map((r) => r.data).filter((r) => r !== void 0).length > 0 ? o.map((r) => r.data).filter((r) => r !== void 0) : o.filter((r) => r !== void 0) : null
|
|
369
369
|
}
|
|
370
370
|
) : null,
|
|
371
|
-
/* @__PURE__ */ i.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children:
|
|
372
|
-
|
|
371
|
+
/* @__PURE__ */ i.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: o.length === 0 ? /* @__PURE__ */ i.jsx(Le, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
372
|
+
re !== !1 && o.filter((r) => r.color).length !== 0 ? /* @__PURE__ */ i.jsx(
|
|
373
373
|
Se,
|
|
374
374
|
{
|
|
375
375
|
width: h,
|
|
376
376
|
colorLegendTitle: x,
|
|
377
|
-
colors: Y ||
|
|
378
|
-
colorDomain: W || ce(
|
|
379
|
-
l.filter((o) => o.color),
|
|
380
|
-
"color"
|
|
381
|
-
).map((o) => o.color),
|
|
377
|
+
colors: Y || se[v].categoricalColors.colors,
|
|
378
|
+
colorDomain: W || ce(o, "color", !0),
|
|
382
379
|
setSelectedColor: t,
|
|
383
380
|
showNAColor: z ?? !0
|
|
384
381
|
}
|
|
@@ -389,20 +386,17 @@ function Pe(se) {
|
|
|
389
386
|
className: "flex flex-col grow justify-center w-full leading-0",
|
|
390
387
|
ref: e,
|
|
391
388
|
"aria-label": "Graph area",
|
|
392
|
-
children: (h || O) && (V ||
|
|
389
|
+
children: (h || O) && (V || s) ? /* @__PURE__ */ i.jsx(
|
|
393
390
|
Fe,
|
|
394
391
|
{
|
|
395
|
-
data:
|
|
396
|
-
circleColors:
|
|
397
|
-
colorDomain:
|
|
398
|
-
l.filter((o) => o.color),
|
|
399
|
-
"color"
|
|
400
|
-
).map((o) => o.color),
|
|
392
|
+
data: o,
|
|
393
|
+
circleColors: o.filter((r) => r.color).length === 0 ? Y ? [Y] : [se.primaryColors["blue-600"]] : Y || se[v].categoricalColors.colors,
|
|
394
|
+
colorDomain: o.filter((r) => r.color).length === 0 ? [] : W || ce(o, "color", !0),
|
|
401
395
|
width: h || O,
|
|
402
396
|
selectedColor: L,
|
|
403
397
|
height: Math.max(
|
|
404
398
|
j,
|
|
405
|
-
V || (a ? j ? (h || O) * a > j ? (h || O) * a : j : (h || O) * a :
|
|
399
|
+
V || (a ? j ? (h || O) * a > j ? (h || O) * a : j : (h || O) * a : s)
|
|
406
400
|
),
|
|
407
401
|
showTicks: X,
|
|
408
402
|
leftMargin: w,
|
|
@@ -428,7 +422,7 @@ function Pe(se) {
|
|
|
428
422
|
styles: m,
|
|
429
423
|
classNames: f,
|
|
430
424
|
noOfTicks: d || 5,
|
|
431
|
-
dimmedOpacity:
|
|
425
|
+
dimmedOpacity: u,
|
|
432
426
|
precision: q,
|
|
433
427
|
customLayers: te
|
|
434
428
|
}
|
|
@@ -457,9 +451,9 @@ function Pe(se) {
|
|
|
457
451
|
}
|
|
458
452
|
);
|
|
459
453
|
}
|
|
460
|
-
function Re(
|
|
454
|
+
function Re(le) {
|
|
461
455
|
const {
|
|
462
|
-
data:
|
|
456
|
+
data: o,
|
|
463
457
|
circleColors: c,
|
|
464
458
|
showTicks: C,
|
|
465
459
|
leftMargin: ie,
|
|
@@ -481,7 +475,7 @@ function Re(se) {
|
|
|
481
475
|
maxRadiusValue: U,
|
|
482
476
|
maxValue: J,
|
|
483
477
|
minValue: G,
|
|
484
|
-
highlightedDataPoints:
|
|
478
|
+
highlightedDataPoints: re,
|
|
485
479
|
onSeriesMouseClick: K,
|
|
486
480
|
resetSelectionOnDoubleClick: A,
|
|
487
481
|
detailsOnClick: N,
|
|
@@ -491,32 +485,32 @@ function Re(se) {
|
|
|
491
485
|
dimmedOpacity: Q,
|
|
492
486
|
precision: F,
|
|
493
487
|
customLayers: R
|
|
494
|
-
} =
|
|
488
|
+
} = le, k = ae(null), [z, j] = T(void 0), [v, S] = T(void 0), [I, _] = T(null), [Z, ee] = T(void 0), [m, f] = T(void 0), d = {
|
|
495
489
|
top: X,
|
|
496
490
|
bottom: Y,
|
|
497
491
|
left: ie,
|
|
498
492
|
right: oe
|
|
499
|
-
},
|
|
500
|
-
|
|
493
|
+
}, u = b - d.left - d.right, q = w - d.top - d.bottom, te = o.filter((t) => !D(t.radius)).length === 0 ? o : ge(
|
|
494
|
+
o.filter((t) => !D(t.radius)),
|
|
501
495
|
"radius",
|
|
502
496
|
"desc"
|
|
503
|
-
), O = D(J) ? Math.max(...
|
|
497
|
+
), O = D(J) ? Math.max(...o.filter((t) => !D(t.position)).map((t) => t.position)) < 0 && !B ? 0 : Math.max(...o.filter((t) => !D(t.position)).map((t) => t.position)) : J, M = D(G) ? Math.min(...o.filter((t) => !D(t.position)).map((t) => t.position)) >= 0 && !B ? 0 : Math.min(...o.filter((t) => !D(t.position)).map((t) => t.position)) : G, s = o.filter((t) => t.radius === void 0 || t.radius === null).length !== o.length ? we().domain([
|
|
504
498
|
0,
|
|
505
|
-
D(U) ? Math.max(...
|
|
506
|
-
]).range([0.25, a]).nice() : void 0,
|
|
499
|
+
D(U) ? Math.max(...o.map((t) => t.radius).filter((t) => t != null)) : U
|
|
500
|
+
]).range([0.25, a]).nice() : void 0, l = je().domain([M, O]).range([q, 0]).nice(), L = l.ticks(H);
|
|
507
501
|
return de(() => {
|
|
508
502
|
_(null);
|
|
509
503
|
const t = te.filter((e) => e.position);
|
|
510
|
-
Me(t).force("y", Oe((e) =>
|
|
504
|
+
Me(t).force("y", Oe((e) => l(e.position)).strength(5)).force("x", Ce((e) => u / 2).strength(1)).force(
|
|
511
505
|
"collide",
|
|
512
506
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
513
|
-
De((e) =>
|
|
507
|
+
De((e) => s ? s(e.radius || 0) + 1 : a + 1)
|
|
514
508
|
).force("charge", ke().strength(-15)).alphaDecay(0.05).tick(1e4).on("tick", () => {
|
|
515
509
|
_(t);
|
|
516
510
|
}).on("end", () => {
|
|
517
511
|
_(t);
|
|
518
512
|
});
|
|
519
|
-
}, [
|
|
513
|
+
}, [o, a, q, u, M, O, te, l, s]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
520
514
|
I ? /* @__PURE__ */ i.jsx(
|
|
521
515
|
"svg",
|
|
522
516
|
{
|
|
@@ -530,10 +524,10 @@ function Re(se) {
|
|
|
530
524
|
/* @__PURE__ */ i.jsx(
|
|
531
525
|
be,
|
|
532
526
|
{
|
|
533
|
-
y1:
|
|
534
|
-
y2:
|
|
527
|
+
y1: l(M < 0 ? 0 : M),
|
|
528
|
+
y2: l(M < 0 ? 0 : M),
|
|
535
529
|
x1: 0 - d.left,
|
|
536
|
-
x2:
|
|
530
|
+
x2: u + d.right,
|
|
537
531
|
label: xe(
|
|
538
532
|
M < 0 ? 0 : M,
|
|
539
533
|
"NA",
|
|
@@ -543,7 +537,7 @@ function Re(se) {
|
|
|
543
537
|
),
|
|
544
538
|
labelPos: {
|
|
545
539
|
x: 0 - d.left,
|
|
546
|
-
y:
|
|
540
|
+
y: l(M < 0 ? 0 : M),
|
|
547
541
|
dx: 0,
|
|
548
542
|
dy: O < 0 ? "1em" : -5
|
|
549
543
|
},
|
|
@@ -561,9 +555,9 @@ function Re(se) {
|
|
|
561
555
|
He,
|
|
562
556
|
{
|
|
563
557
|
values: L.filter((t) => t !== 0),
|
|
564
|
-
y: L.filter((t) => t !== 0).map((t) =>
|
|
558
|
+
y: L.filter((t) => t !== 0).map((t) => l(t)),
|
|
565
559
|
x1: 0 - d.left,
|
|
566
|
-
x2:
|
|
560
|
+
x2: u + d.right,
|
|
567
561
|
styles: {
|
|
568
562
|
gridLines: $?.yAxis?.gridLines,
|
|
569
563
|
labels: $?.yAxis?.labels
|
|
@@ -587,7 +581,7 @@ function Re(se) {
|
|
|
587
581
|
{
|
|
588
582
|
className: "undp-viz-g-with-hover",
|
|
589
583
|
transform: `translate(${t.x},${t.y})`,
|
|
590
|
-
opacity: x ? t.color && c[n.indexOf(t.color)] === x ? 1 : Q :
|
|
584
|
+
opacity: x ? t.color && c[n.indexOf(t.color)] === x ? 1 : Q : re.length !== 0 ? re.indexOf(t.label) !== -1 ? 0.85 : Q : 0.85,
|
|
591
585
|
onMouseEnter: (e) => {
|
|
592
586
|
j(t), f(e.clientY), ee(e.clientX), E?.(t);
|
|
593
587
|
},
|
|
@@ -595,7 +589,7 @@ function Re(se) {
|
|
|
595
589
|
j(t), f(e.clientY), ee(e.clientX);
|
|
596
590
|
},
|
|
597
591
|
onClick: () => {
|
|
598
|
-
(K || N) && (
|
|
592
|
+
(K || N) && (ue(v, t) && A ? (S(void 0), K?.(void 0)) : (S(t), K?.(t)));
|
|
599
593
|
},
|
|
600
594
|
onMouseLeave: () => {
|
|
601
595
|
j(void 0), ee(void 0), f(void 0), E?.(void 0);
|
|
@@ -606,17 +600,17 @@ function Re(se) {
|
|
|
606
600
|
{
|
|
607
601
|
cx: 0,
|
|
608
602
|
cy: 0,
|
|
609
|
-
r:
|
|
610
|
-
fill:
|
|
603
|
+
r: s ? s(t.radius || 0) : a,
|
|
604
|
+
fill: o.filter((e) => e.color).length === 0 ? c[0] : t.color ? c[n.indexOf(t.color)] : se.gray
|
|
611
605
|
}
|
|
612
606
|
),
|
|
613
|
-
(
|
|
607
|
+
(s ? s(t.radius || 0) : a) > 10 && V ? /* @__PURE__ */ i.jsx("g", { children: /* @__PURE__ */ i.jsx(
|
|
614
608
|
"foreignObject",
|
|
615
609
|
{
|
|
616
|
-
y: 0 - (
|
|
617
|
-
x: 0 - (
|
|
618
|
-
width: 2 * (
|
|
619
|
-
height: 2 * (
|
|
610
|
+
y: 0 - (s ? s(t.radius || 0) : a),
|
|
611
|
+
x: 0 - (s ? s(t.radius || 0) : a),
|
|
612
|
+
width: 2 * (s ? s(t.radius || 0) : a),
|
|
613
|
+
height: 2 * (s ? s(t.radius || 0) : a),
|
|
620
614
|
children: /* @__PURE__ */ i.jsx("div", { className: "flex flex-col justify-center items-center h-inherit py-0 px-1.5", children: V ? /* @__PURE__ */ i.jsx(
|
|
621
615
|
"p",
|
|
622
616
|
{
|
|
@@ -628,13 +622,13 @@ function Re(se) {
|
|
|
628
622
|
fontSize: `${Math.min(
|
|
629
623
|
Math.max(
|
|
630
624
|
Math.round(
|
|
631
|
-
(
|
|
625
|
+
(s ? s(t.radius || 0) : a) / 4
|
|
632
626
|
),
|
|
633
627
|
10
|
|
634
628
|
),
|
|
635
629
|
Math.max(
|
|
636
630
|
Math.round(
|
|
637
|
-
(
|
|
631
|
+
(s ? s(t.radius || 0) : a) * 12 / `${t.label}`.length
|
|
638
632
|
),
|
|
639
633
|
10
|
|
640
634
|
),
|
|
@@ -642,7 +636,7 @@ function Re(se) {
|
|
|
642
636
|
)}px`,
|
|
643
637
|
hyphens: "auto",
|
|
644
638
|
color: ye(
|
|
645
|
-
|
|
639
|
+
o.filter((e) => e.color).length === 0 ? c[0] : t.color ? c[n.indexOf(t.color)] : se.gray
|
|
646
640
|
),
|
|
647
641
|
...$?.graphObjectValues || {}
|
|
648
642
|
},
|
|
@@ -660,9 +654,9 @@ function Re(se) {
|
|
|
660
654
|
{
|
|
661
655
|
text: t.text,
|
|
662
656
|
color: t.color,
|
|
663
|
-
y:
|
|
657
|
+
y: l(t.value),
|
|
664
658
|
x1: 0 - d.left,
|
|
665
|
-
x2:
|
|
659
|
+
x2: u + d.right,
|
|
666
660
|
classNames: t.classNames,
|
|
667
661
|
styles: t.styles,
|
|
668
662
|
isInView: !0
|
|
@@ -703,9 +697,9 @@ function Re(se) {
|
|
|
703
697
|
) : null
|
|
704
698
|
] });
|
|
705
699
|
}
|
|
706
|
-
function Xe(
|
|
700
|
+
function Xe(le) {
|
|
707
701
|
const {
|
|
708
|
-
data:
|
|
702
|
+
data: o,
|
|
709
703
|
graphTitle: c,
|
|
710
704
|
colors: C,
|
|
711
705
|
sources: ie,
|
|
@@ -727,7 +721,7 @@ function Xe(se) {
|
|
|
727
721
|
tooltip: U,
|
|
728
722
|
onSeriesMouseOver: J,
|
|
729
723
|
refValues: G,
|
|
730
|
-
showColorScale:
|
|
724
|
+
showColorScale: re,
|
|
731
725
|
graphID: K,
|
|
732
726
|
radius: A = 5,
|
|
733
727
|
maxRadiusValue: N,
|
|
@@ -749,15 +743,15 @@ function Xe(se) {
|
|
|
749
743
|
styles: m,
|
|
750
744
|
classNames: f,
|
|
751
745
|
noOfTicks: d,
|
|
752
|
-
dimmedOpacity:
|
|
746
|
+
dimmedOpacity: u = 0.3,
|
|
753
747
|
precision: q = 2,
|
|
754
748
|
customLayers: te = []
|
|
755
|
-
} =
|
|
749
|
+
} = le, [O, M] = T(0), [s, l] = T(0), [L, t] = T(void 0), e = ae(null), g = ae(null);
|
|
756
750
|
return de(() => {
|
|
757
|
-
const
|
|
758
|
-
M(n || ne[0].target.clientWidth || 620),
|
|
751
|
+
const r = new ResizeObserver((ne) => {
|
|
752
|
+
M(n || ne[0].target.clientWidth || 620), l(w || ne[0].target.clientHeight || 480);
|
|
759
753
|
});
|
|
760
|
-
return e.current && (
|
|
754
|
+
return e.current && (l(e.current.clientHeight || 480), M(e.current.clientWidth || 620), n || r.observe(e.current)), () => r.disconnect();
|
|
761
755
|
}, [n, w]), /* @__PURE__ */ i.jsx(
|
|
762
756
|
"div",
|
|
763
757
|
{
|
|
@@ -776,7 +770,7 @@ function Xe(se) {
|
|
|
776
770
|
...p && p !== !0 ? { backgroundColor: p } : {}
|
|
777
771
|
},
|
|
778
772
|
id: K,
|
|
779
|
-
ref:
|
|
773
|
+
ref: g,
|
|
780
774
|
"aria-label": S || `${c ? `The graph shows ${c}. ` : ""}This is a bee swarm chart showing the distribution along the y-axes. ${b ? ` ${b}` : ""}`,
|
|
781
775
|
children: /* @__PURE__ */ i.jsx(
|
|
782
776
|
"div",
|
|
@@ -798,21 +792,18 @@ function Xe(se) {
|
|
|
798
792
|
graphTitle: c,
|
|
799
793
|
graphDescription: b,
|
|
800
794
|
width: n,
|
|
801
|
-
graphDownload: F ?
|
|
802
|
-
dataDownload: R ?
|
|
795
|
+
graphDownload: F ? g.current : void 0,
|
|
796
|
+
dataDownload: R ? o.map((r) => r.data).filter((r) => r !== void 0).length > 0 ? o.map((r) => r.data).filter((r) => r !== void 0) : o.filter((r) => r !== void 0) : null
|
|
803
797
|
}
|
|
804
798
|
) : null,
|
|
805
|
-
/* @__PURE__ */ i.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children:
|
|
806
|
-
|
|
799
|
+
/* @__PURE__ */ i.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: o.length === 0 ? /* @__PURE__ */ i.jsx(Le, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
800
|
+
re !== !1 && o.filter((r) => r.color).length !== 0 ? /* @__PURE__ */ i.jsx(
|
|
807
801
|
Se,
|
|
808
802
|
{
|
|
809
803
|
width: n,
|
|
810
804
|
colorLegendTitle: Y,
|
|
811
|
-
colors: C ||
|
|
812
|
-
colorDomain: X || ce(
|
|
813
|
-
l.filter((o) => o.color),
|
|
814
|
-
"color"
|
|
815
|
-
).map((o) => o.color),
|
|
805
|
+
colors: C || se[v].categoricalColors.colors,
|
|
806
|
+
colorDomain: X || ce(o, "color", !0),
|
|
816
807
|
setSelectedColor: t,
|
|
817
808
|
showNAColor: z
|
|
818
809
|
}
|
|
@@ -823,20 +814,17 @@ function Xe(se) {
|
|
|
823
814
|
className: "flex flex-col grow justify-center w-full leading-0",
|
|
824
815
|
ref: e,
|
|
825
816
|
"aria-label": "Graph area",
|
|
826
|
-
children: (n || O) && (w ||
|
|
817
|
+
children: (n || O) && (w || s) ? /* @__PURE__ */ i.jsx(
|
|
827
818
|
Re,
|
|
828
819
|
{
|
|
829
|
-
data:
|
|
830
|
-
circleColors:
|
|
831
|
-
colorDomain:
|
|
832
|
-
l.filter((o) => o.color),
|
|
833
|
-
"color"
|
|
834
|
-
).map((o) => o.color),
|
|
820
|
+
data: o,
|
|
821
|
+
circleColors: o.filter((r) => r.color).length === 0 ? C ? [C] : [se.primaryColors["blue-600"]] : C || se[v].categoricalColors.colors,
|
|
822
|
+
colorDomain: o.filter((r) => r.color).length === 0 ? [] : X || ce(o, "color", !0),
|
|
835
823
|
width: n || O,
|
|
836
824
|
selectedColor: L,
|
|
837
825
|
height: Math.max(
|
|
838
826
|
j,
|
|
839
|
-
w || (a ? j ? (n || O) * a > j ? (n || O) * a : j : (n || O) * a :
|
|
827
|
+
w || (a ? j ? (n || O) * a > j ? (n || O) * a : j : (n || O) * a : s)
|
|
840
828
|
),
|
|
841
829
|
showTicks: B,
|
|
842
830
|
leftMargin: E,
|
|
@@ -861,7 +849,7 @@ function Xe(se) {
|
|
|
861
849
|
suffix: Z,
|
|
862
850
|
prefix: ee,
|
|
863
851
|
noOfTicks: d || 5,
|
|
864
|
-
dimmedOpacity:
|
|
852
|
+
dimmedOpacity: u,
|
|
865
853
|
precision: q,
|
|
866
854
|
customLayers: te
|
|
867
855
|
}
|
|
@@ -890,9 +878,9 @@ function Xe(se) {
|
|
|
890
878
|
}
|
|
891
879
|
);
|
|
892
880
|
}
|
|
893
|
-
function ht(
|
|
881
|
+
function ht(le) {
|
|
894
882
|
const {
|
|
895
|
-
data:
|
|
883
|
+
data: o,
|
|
896
884
|
graphTitle: c,
|
|
897
885
|
backgroundColor: C,
|
|
898
886
|
topMargin: ie,
|
|
@@ -914,7 +902,7 @@ function ht(se) {
|
|
|
914
902
|
tooltip: U,
|
|
915
903
|
onSeriesMouseOver: J,
|
|
916
904
|
refValues: G,
|
|
917
|
-
showColorScale:
|
|
905
|
+
showColorScale: re,
|
|
918
906
|
graphID: K,
|
|
919
907
|
radius: A,
|
|
920
908
|
maxRadiusValue: N,
|
|
@@ -936,13 +924,13 @@ function ht(se) {
|
|
|
936
924
|
styles: m,
|
|
937
925
|
classNames: f,
|
|
938
926
|
dimmedOpacity: d,
|
|
939
|
-
precision:
|
|
927
|
+
precision: u,
|
|
940
928
|
customLayers: q
|
|
941
|
-
} =
|
|
929
|
+
} = le;
|
|
942
930
|
return ee === "vertical" ? /* @__PURE__ */ i.jsx(
|
|
943
931
|
Xe,
|
|
944
932
|
{
|
|
945
|
-
data:
|
|
933
|
+
data: o,
|
|
946
934
|
graphTitle: c,
|
|
947
935
|
backgroundColor: C,
|
|
948
936
|
topMargin: ie,
|
|
@@ -964,7 +952,7 @@ function ht(se) {
|
|
|
964
952
|
tooltip: U,
|
|
965
953
|
onSeriesMouseOver: J,
|
|
966
954
|
refValues: G,
|
|
967
|
-
showColorScale:
|
|
955
|
+
showColorScale: re,
|
|
968
956
|
graphID: K,
|
|
969
957
|
radius: A,
|
|
970
958
|
maxRadiusValue: N,
|
|
@@ -985,13 +973,13 @@ function ht(se) {
|
|
|
985
973
|
classNames: f,
|
|
986
974
|
noOfTicks: Z,
|
|
987
975
|
dimmedOpacity: d,
|
|
988
|
-
precision:
|
|
976
|
+
precision: u,
|
|
989
977
|
customLayers: q
|
|
990
978
|
}
|
|
991
979
|
) : /* @__PURE__ */ i.jsx(
|
|
992
980
|
Pe,
|
|
993
981
|
{
|
|
994
|
-
data:
|
|
982
|
+
data: o,
|
|
995
983
|
graphTitle: c,
|
|
996
984
|
backgroundColor: C,
|
|
997
985
|
topMargin: ie,
|
|
@@ -1013,7 +1001,7 @@ function ht(se) {
|
|
|
1013
1001
|
tooltip: U,
|
|
1014
1002
|
onSeriesMouseOver: J,
|
|
1015
1003
|
refValues: G,
|
|
1016
|
-
showColorScale:
|
|
1004
|
+
showColorScale: re,
|
|
1017
1005
|
graphID: K,
|
|
1018
1006
|
radius: A,
|
|
1019
1007
|
maxRadiusValue: N,
|
|
@@ -1034,7 +1022,7 @@ function ht(se) {
|
|
|
1034
1022
|
classNames: f,
|
|
1035
1023
|
noOfTicks: Z,
|
|
1036
1024
|
dimmedOpacity: d,
|
|
1037
|
-
precision:
|
|
1025
|
+
precision: u,
|
|
1038
1026
|
customLayers: q
|
|
1039
1027
|
}
|
|
1040
1028
|
);
|