@undp/data-viz 1.4.13 → 1.4.15

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.
Files changed (162) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +25 -24
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/BarGraph.cjs +1 -1
  6. package/dist/BarGraph.cjs.map +1 -1
  7. package/dist/BarGraph.js +638 -632
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.cjs.map +1 -1
  11. package/dist/BeeSwarmChart.js +134 -132
  12. package/dist/BeeSwarmChart.js.map +1 -1
  13. package/dist/BiVariateChoroplethMap.cjs +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  15. package/dist/BiVariateChoroplethMap.js +35 -34
  16. package/dist/BiVariateChoroplethMap.js.map +1 -1
  17. package/dist/BulletChart.cjs +1 -1
  18. package/dist/BulletChart.cjs.map +1 -1
  19. package/dist/BulletChart.js +226 -224
  20. package/dist/BulletChart.js.map +1 -1
  21. package/dist/ButterflyChart.cjs +1 -1
  22. package/dist/ButterflyChart.cjs.map +1 -1
  23. package/dist/ButterflyChart.js +48 -47
  24. package/dist/ButterflyChart.js.map +1 -1
  25. package/dist/ChoroplethMap.cjs +1 -1
  26. package/dist/ChoroplethMap.cjs.map +1 -1
  27. package/dist/ChoroplethMap.js +56 -55
  28. package/dist/ChoroplethMap.js.map +1 -1
  29. package/dist/CirclePackingGraph.cjs +1 -1
  30. package/dist/CirclePackingGraph.js +1 -1
  31. package/dist/DataCards.cjs +3 -3
  32. package/dist/DataCards.cjs.map +1 -1
  33. package/dist/DataCards.js +2 -1
  34. package/dist/DataCards.js.map +1 -1
  35. package/dist/DataTable.cjs +1 -1
  36. package/dist/DataTable.cjs.map +1 -1
  37. package/dist/DataTable.js +9 -8
  38. package/dist/DataTable.js.map +1 -1
  39. package/dist/DifferenceLineChart.cjs +1 -1
  40. package/dist/DifferenceLineChart.cjs.map +1 -1
  41. package/dist/DifferenceLineChart.js +1 -0
  42. package/dist/DifferenceLineChart.js.map +1 -1
  43. package/dist/DonutChart.cjs +1 -1
  44. package/dist/DonutChart.cjs.map +1 -1
  45. package/dist/DonutChart.js +77 -76
  46. package/dist/DonutChart.js.map +1 -1
  47. package/dist/DotDensityMap.cjs +1 -1
  48. package/dist/DotDensityMap.cjs.map +1 -1
  49. package/dist/DotDensityMap.js +1 -0
  50. package/dist/DotDensityMap.js.map +1 -1
  51. package/dist/{DropdownSelect-CeHog_ih.js → DropdownSelect-CtOKZHD0.js} +22 -20
  52. package/dist/{DropdownSelect-CeHog_ih.js.map → DropdownSelect-CtOKZHD0.js.map} +1 -1
  53. package/dist/{DropdownSelect-BmE5JaeE.cjs → DropdownSelect-DBDM64B5.cjs} +2 -2
  54. package/dist/{DropdownSelect-BmE5JaeE.cjs.map → DropdownSelect-DBDM64B5.cjs.map} +1 -1
  55. package/dist/DualAxisLineChart.cjs +1 -1
  56. package/dist/DualAxisLineChart.cjs.map +1 -1
  57. package/dist/DualAxisLineChart.js +54 -53
  58. package/dist/DualAxisLineChart.js.map +1 -1
  59. package/dist/DumbbellChart.cjs +1 -1
  60. package/dist/DumbbellChart.cjs.map +1 -1
  61. package/dist/DumbbellChart.js +216 -214
  62. package/dist/DumbbellChart.js.map +1 -1
  63. package/dist/GeoHubCompareMaps.cjs +1 -1
  64. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  65. package/dist/GeoHubCompareMaps.js +1 -0
  66. package/dist/GeoHubCompareMaps.js.map +1 -1
  67. package/dist/GeoHubMap.cjs +1 -1
  68. package/dist/GeoHubMap.cjs.map +1 -1
  69. package/dist/GeoHubMap.js +29 -28
  70. package/dist/GeoHubMap.js.map +1 -1
  71. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  72. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
  73. package/dist/GeoHubMapWithLayerSelection.js +34 -33
  74. package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
  75. package/dist/GraphEl-Bz2jatkM.cjs +2 -0
  76. package/dist/GraphEl-Bz2jatkM.cjs.map +1 -0
  77. package/dist/{GraphEl-B3xVlimz.js → GraphEl-zNOHBYrK.js} +4 -4
  78. package/dist/GraphEl-zNOHBYrK.js.map +1 -0
  79. package/dist/GriddedGraphs.cjs +1 -1
  80. package/dist/GriddedGraphs.js +2 -2
  81. package/dist/HeatMap.cjs +1 -1
  82. package/dist/HeatMap.cjs.map +1 -1
  83. package/dist/HeatMap.js +55 -54
  84. package/dist/HeatMap.js.map +1 -1
  85. package/dist/Histogram.cjs +1 -1
  86. package/dist/Histogram.js +1 -1
  87. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  88. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  89. package/dist/LineChartWithConfidenceInterval.js +22 -21
  90. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  91. package/dist/MultiGraphDashboard.cjs +1 -1
  92. package/dist/MultiGraphDashboard.js +1 -1
  93. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  94. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  95. package/dist/MultiLineAltChart.cjs +1 -1
  96. package/dist/MultiLineAltChart.cjs.map +1 -1
  97. package/dist/MultiLineAltChart.js +34 -33
  98. package/dist/MultiLineAltChart.js.map +1 -1
  99. package/dist/MultiLineChart.cjs +1 -1
  100. package/dist/MultiLineChart.cjs.map +1 -1
  101. package/dist/MultiLineChart.js +72 -71
  102. package/dist/MultiLineChart.js.map +1 -1
  103. package/dist/ParetoChart.cjs +1 -1
  104. package/dist/ParetoChart.cjs.map +1 -1
  105. package/dist/ParetoChart.js +24 -23
  106. package/dist/ParetoChart.js.map +1 -1
  107. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  108. package/dist/PerformanceIntensiveMultiGraphDashboard.js +1 -1
  109. package/dist/RadarChart.cjs +1 -1
  110. package/dist/RadarChart.cjs.map +1 -1
  111. package/dist/RadarChart.js +27 -26
  112. package/dist/RadarChart.js.map +1 -1
  113. package/dist/SankeyChart.cjs +1 -1
  114. package/dist/SankeyChart.cjs.map +1 -1
  115. package/dist/SankeyChart.js +30 -29
  116. package/dist/SankeyChart.js.map +1 -1
  117. package/dist/ScatterPlot.cjs +1 -1
  118. package/dist/ScatterPlot.cjs.map +1 -1
  119. package/dist/ScatterPlot.js +119 -118
  120. package/dist/ScatterPlot.js.map +1 -1
  121. package/dist/SimpleLineChart.cjs +1 -1
  122. package/dist/SimpleLineChart.cjs.map +1 -1
  123. package/dist/SimpleLineChart.js +16 -15
  124. package/dist/SimpleLineChart.js.map +1 -1
  125. package/dist/SingleGraphDashboard.cjs +1 -1
  126. package/dist/SingleGraphDashboard.js +2 -2
  127. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  128. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  129. package/dist/SlopeChart.cjs +1 -1
  130. package/dist/SlopeChart.cjs.map +1 -1
  131. package/dist/SlopeChart.js +46 -45
  132. package/dist/SlopeChart.js.map +1 -1
  133. package/dist/SparkLine.cjs +1 -1
  134. package/dist/SparkLine.cjs.map +1 -1
  135. package/dist/SparkLine.js +12 -11
  136. package/dist/SparkLine.js.map +1 -1
  137. package/dist/StripChart.cjs +1 -1
  138. package/dist/StripChart.cjs.map +1 -1
  139. package/dist/StripChart.js +81 -79
  140. package/dist/StripChart.js.map +1 -1
  141. package/dist/ThreeDGlobe.cjs +1 -1
  142. package/dist/ThreeDGlobe.cjs.map +1 -1
  143. package/dist/ThreeDGlobe.js +1 -0
  144. package/dist/ThreeDGlobe.js.map +1 -1
  145. package/dist/TreeMapGraph.cjs +1 -1
  146. package/dist/TreeMapGraph.cjs.map +1 -1
  147. package/dist/TreeMapGraph.js +114 -113
  148. package/dist/TreeMapGraph.js.map +1 -1
  149. package/dist/UnitChart.cjs +1 -1
  150. package/dist/UnitChart.cjs.map +1 -1
  151. package/dist/UnitChart.js +10 -9
  152. package/dist/UnitChart.js.map +1 -1
  153. package/dist/{index-CZLvTu6p.cjs → index-BbNoLJ_w.cjs} +2 -2
  154. package/dist/{index-CZLvTu6p.cjs.map → index-BbNoLJ_w.cjs.map} +1 -1
  155. package/dist/{index-DGAaLNu9.js → index-Bc5VF70V.js} +46 -45
  156. package/dist/{index-DGAaLNu9.js.map → index-Bc5VF70V.js.map} +1 -1
  157. package/dist/index.cjs +1 -1
  158. package/dist/index.js +1 -1
  159. package/package.json +2 -2
  160. package/dist/GraphEl-B3xVlimz.js.map +0 -1
  161. package/dist/GraphEl-DO-juRN8.cjs +0 -2
  162. package/dist/GraphEl-DO-juRN8.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { j as r, m as ni } from "./index-CHPV5EwG-BPSP-7Jg.js";
1
+ import { j as l, m as ni } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
2
  import { u as gi } from "./index-CaAIPGZo.js";
3
3
  import { useRef as si, useState as E, useEffect as ui } from "react";
4
4
  import { i as pi } from "./index-27yTRcko.js";
@@ -67,9 +67,9 @@ function Vi(P) {
67
67
  }, V = d - O.left - O.right, W = p - O.top - O.bottom, oi = o.map((i, t) => ({ ...i, id: `${t}` })), ei = mi(oi, (i) => {
68
68
  const t = (a || []).indexOf(i.label);
69
69
  return t === -1 ? 1 / 0 : t;
70
- }).reverse(), ri = J(_) ? Math.max(...o.filter((i) => !J(i.position)).map((i) => i.position)) < 0 ? 0 : Math.max(...o.filter((i) => !J(i.position)).map((i) => i.position)) : _, C = J(G) ? Math.min(...o.filter((i) => !J(i.position)).map((i) => i.position)) >= 0 ? 0 : Math.min(...o.filter((i) => !J(i.position)).map((i) => i.position)) : G, z = wi().domain([C, ri]).range([0, V]).nice(), li = Ni(w, V);
71
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
72
- /* @__PURE__ */ r.jsx(
70
+ }).reverse(), li = J(_) ? Math.max(...o.filter((i) => !J(i.position)).map((i) => i.position)) < 0 ? 0 : Math.max(...o.filter((i) => !J(i.position)).map((i) => i.position)) : _, C = J(G) ? Math.min(...o.filter((i) => !J(i.position)).map((i) => i.position)) >= 0 ? 0 : Math.min(...o.filter((i) => !J(i.position)).map((i) => i.position)) : G, z = wi().domain([C, li]).range([0, V]).nice(), ri = Ni(w, V);
71
+ return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
72
+ /* @__PURE__ */ l.jsx(
73
73
  ai.svg,
74
74
  {
75
75
  width: `${d}px`,
@@ -77,10 +77,10 @@ function Vi(P) {
77
77
  viewBox: `0 0 ${d} ${p}`,
78
78
  direction: "ltr",
79
79
  ref: q,
80
- children: /* @__PURE__ */ r.jsxs("g", { transform: `translate(${O.left},${O.top})`, children: [
80
+ children: /* @__PURE__ */ l.jsxs("g", { transform: `translate(${O.left},${O.top})`, children: [
81
81
  M.filter((i) => i.position === "before").map((i) => i.layer),
82
- /* @__PURE__ */ r.jsxs(bi, { children: [
83
- ei.map((i) => /* @__PURE__ */ r.jsxs(
82
+ /* @__PURE__ */ l.jsxs(bi, { children: [
83
+ ei.map((i) => /* @__PURE__ */ l.jsxs(
84
84
  ai.g,
85
85
  {
86
86
  className: "undp-viz-g-with-hover",
@@ -113,7 +113,7 @@ function Vi(P) {
113
113
  x(void 0), L(void 0), g(void 0), k?.(void 0);
114
114
  },
115
115
  children: [
116
- Q === "dot" ? /* @__PURE__ */ r.jsx(
116
+ Q === "dot" ? /* @__PURE__ */ l.jsx(
117
117
  ai.circle,
118
118
  {
119
119
  cy: 0,
@@ -132,7 +132,7 @@ function Vi(P) {
132
132
  exit: { opacity: 0, transition: { duration: m.duration } },
133
133
  r: h
134
134
  }
135
- ) : /* @__PURE__ */ r.jsx(
135
+ ) : /* @__PURE__ */ l.jsx(
136
136
  ai.rect,
137
137
  {
138
138
  y: 0 - h,
@@ -153,7 +153,7 @@ function Vi(P) {
153
153
  exit: { opacity: 0, transition: { duration: m.duration } }
154
154
  }
155
155
  ),
156
- a.length !== 0 && a.indexOf(i.label) !== -1 ? /* @__PURE__ */ r.jsx(
156
+ a.length !== 0 && a.indexOf(i.label) !== -1 ? /* @__PURE__ */ l.jsx(
157
157
  ai.text,
158
158
  {
159
159
  x: 0,
@@ -184,13 +184,13 @@ function Vi(P) {
184
184
  },
185
185
  i.label
186
186
  )),
187
- li.map((i, t) => /* @__PURE__ */ r.jsx(
187
+ ri.map((i, t) => /* @__PURE__ */ l.jsx(
188
188
  "text",
189
189
  {
190
190
  x: i,
191
191
  y: W / 2 + h,
192
192
  style: {
193
- textAnchor: t === 0 ? "start" : t === li.length - 1 ? "end" : "middle",
193
+ textAnchor: t === 0 ? "start" : t === ri.length - 1 ? "end" : "middle",
194
194
  ...j?.xAxis?.labels || {}
195
195
  },
196
196
  className: ni(
@@ -207,7 +207,7 @@ function Vi(P) {
207
207
  ] })
208
208
  }
209
209
  ),
210
- H && F && U && u ? /* @__PURE__ */ r.jsx(
210
+ H && F && U && u ? /* @__PURE__ */ l.jsx(
211
211
  yi,
212
212
  {
213
213
  data: H,
@@ -218,14 +218,14 @@ function Vi(P) {
218
218
  className: $?.tooltip
219
219
  }
220
220
  ) : null,
221
- N && f !== void 0 ? /* @__PURE__ */ r.jsx(
221
+ N && f !== void 0 ? /* @__PURE__ */ l.jsx(
222
222
  xi,
223
223
  {
224
224
  open: f !== void 0,
225
225
  onClose: () => {
226
226
  A(void 0);
227
227
  },
228
- children: /* @__PURE__ */ r.jsx(
228
+ children: /* @__PURE__ */ l.jsx(
229
229
  "div",
230
230
  {
231
231
  className: "graph-modal-content m-0",
@@ -286,23 +286,24 @@ function ki(P) {
286
286
  noOfTicks: W = 2,
287
287
  dimmedOpacity: oi = 0.3,
288
288
  precision: ei = 2,
289
- customLayers: ri = []
290
- } = P, [C, z] = E(0), [li, i] = E(0), [t, fi] = E(void 0), Z = si(null), ci = si(null);
289
+ customLayers: li = []
290
+ } = P, [C, z] = E(0), [ri, i] = E(0), [t, fi] = E(void 0), Z = si(null), ci = si(null);
291
291
  return ui(() => {
292
- const l = new ResizeObserver((hi) => {
292
+ const r = new ResizeObserver((hi) => {
293
293
  z(s || hi[0].target.clientWidth || 620), i(h || hi[0].target.clientHeight || 480);
294
294
  });
295
- return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || l.observe(Z.current)), () => l.disconnect();
296
- }, [s, h]), /* @__PURE__ */ r.jsx(
295
+ return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || r.observe(Z.current)), () => r.disconnect();
296
+ }, [s, h]), /* @__PURE__ */ l.jsx(
297
297
  "div",
298
298
  {
299
299
  className: `${f || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
300
300
  dir: M === "he" || M === "ar" ? "rtl" : void 0,
301
- children: /* @__PURE__ */ r.jsx(
301
+ children: /* @__PURE__ */ l.jsx(
302
302
  "div",
303
303
  {
304
304
  className: ni(
305
305
  `${a ? a === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${M || "en"}`,
306
+ s ? "w-fit" : "w-full",
306
307
  g?.graphContainer
307
308
  ),
308
309
  style: {
@@ -312,13 +313,13 @@ function ki(P) {
312
313
  id: ti,
313
314
  ref: ci,
314
315
  "aria-label": A || `${d ? `The graph shows ${d}. ` : ""}This is a strip chart showing distribution of data along the horizontal axis. Each dot represents an individual data point, helping to visualize the spread and clustering of values.${n ? ` ${n}` : ""}`,
315
- children: /* @__PURE__ */ r.jsx(
316
+ children: /* @__PURE__ */ l.jsx(
316
317
  "div",
317
318
  {
318
319
  className: "flex grow",
319
320
  style: { padding: a ? k || "1rem" : k || 0 },
320
- children: /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
321
- d || n || I || m ? /* @__PURE__ */ r.jsx(
321
+ children: /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
322
+ d || n || I || m ? /* @__PURE__ */ l.jsx(
322
323
  ji,
323
324
  {
324
325
  styles: {
@@ -333,44 +334,44 @@ function ki(P) {
333
334
  graphDescription: n,
334
335
  width: s,
335
336
  graphDownload: I ? ci.current : void 0,
336
- dataDownload: m ? o.map((l) => l.data).filter((l) => l !== void 0).length > 0 ? o.map((l) => l.data).filter((l) => l !== void 0) : o.filter((l) => l !== void 0) : null
337
+ dataDownload: m ? 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
337
338
  }
338
339
  ) : null,
339
- /* @__PURE__ */ r.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: o.length === 0 ? /* @__PURE__ */ r.jsx(Di, {}) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
340
- y !== !1 && o.filter((l) => l.color).length !== 0 ? /* @__PURE__ */ r.jsx(
340
+ /* @__PURE__ */ l.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: o.length === 0 ? /* @__PURE__ */ l.jsx(Di, {}) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
341
+ y !== !1 && o.filter((r) => r.color).length !== 0 ? /* @__PURE__ */ l.jsx(
341
342
  Mi,
342
343
  {
343
344
  width: s,
344
345
  colorLegendTitle: ii,
345
346
  colors: p || c[f].categoricalColors.colors,
346
347
  colorDomain: Y || gi(
347
- o.filter((l) => l.color),
348
+ o.filter((r) => r.color),
348
349
  "color"
349
- ).map((l) => l.color),
350
+ ).map((r) => r.color),
350
351
  setSelectedColor: fi,
351
352
  showNAColor: H ?? !0
352
353
  }
353
354
  ) : null,
354
- /* @__PURE__ */ r.jsx(
355
+ /* @__PURE__ */ l.jsx(
355
356
  "div",
356
357
  {
357
358
  className: "flex flex-col grow justify-center w-full leading-0",
358
359
  ref: Z,
359
360
  "aria-label": "Graph area",
360
- children: (s || C) && (h || li) ? /* @__PURE__ */ r.jsx(
361
+ children: (s || C) && (h || ri) ? /* @__PURE__ */ l.jsx(
361
362
  Vi,
362
363
  {
363
364
  data: o,
364
365
  width: s || C,
365
366
  height: Math.max(
366
367
  x,
367
- h || (b ? x ? (s || C) * b > x ? (s || C) * b : x : (s || C) * b : li)
368
+ h || (b ? x ? (s || C) * b > x ? (s || C) * b : x : (s || C) * b : ri)
368
369
  ),
369
- colorDomain: o.filter((l) => l.color).length === 0 ? [] : Y || gi(
370
- o.filter((l) => l.color),
370
+ colorDomain: o.filter((r) => r.color).length === 0 ? [] : Y || gi(
371
+ o.filter((r) => r.color),
371
372
  "color"
372
- ).map((l) => l.color),
373
- colors: o.filter((l) => l.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[f].categoricalColors.colors,
373
+ ).map((r) => r.color),
374
+ colors: o.filter((r) => r.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[f].categoricalColors.colors,
374
375
  selectedColor: t,
375
376
  radius: F,
376
377
  leftMargin: R,
@@ -397,13 +398,13 @@ function ki(P) {
397
398
  noOfTicks: W,
398
399
  dimmedOpacity: oi,
399
400
  precision: ei,
400
- customLayers: ri
401
+ customLayers: li
401
402
  }
402
403
  ) : null
403
404
  }
404
405
  )
405
406
  ] }) }),
406
- e || X ? /* @__PURE__ */ r.jsx(
407
+ e || X ? /* @__PURE__ */ l.jsx(
407
408
  Ci,
408
409
  {
409
410
  styles: { footnote: u?.footnote, source: u?.source },
@@ -469,9 +470,9 @@ function Si(P) {
469
470
  }, V = d - O.left - O.right, W = p - O.top - O.bottom, oi = o.map((i, t) => ({ ...i, id: `${t}` })), ei = mi(oi, (i) => {
470
471
  const t = (a || []).indexOf(i.label);
471
472
  return t === -1 ? 1 / 0 : t;
472
- }).reverse(), ri = J(_) ? Math.max(...o.filter((i) => !J(i.position)).map((i) => i.position)) < 0 ? 0 : Math.max(...o.filter((i) => !J(i.position)).map((i) => i.position)) : _, C = J(G) ? Math.min(...o.filter((i) => !J(i.position)).map((i) => i.position)) >= 0 ? 0 : Math.min(...o.filter((i) => !J(i.position)).map((i) => i.position)) : G, z = wi().domain([C, ri]).range([W, 0]).nice(), li = Ni(K, W);
473
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
474
- /* @__PURE__ */ r.jsx(
473
+ }).reverse(), li = J(_) ? Math.max(...o.filter((i) => !J(i.position)).map((i) => i.position)) < 0 ? 0 : Math.max(...o.filter((i) => !J(i.position)).map((i) => i.position)) : _, C = J(G) ? Math.min(...o.filter((i) => !J(i.position)).map((i) => i.position)) >= 0 ? 0 : Math.min(...o.filter((i) => !J(i.position)).map((i) => i.position)) : G, z = wi().domain([C, li]).range([W, 0]).nice(), ri = Ni(K, W);
474
+ return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
475
+ /* @__PURE__ */ l.jsx(
475
476
  ai.svg,
476
477
  {
477
478
  width: `${d}px`,
@@ -479,10 +480,10 @@ function Si(P) {
479
480
  viewBox: `0 0 ${d} ${p}`,
480
481
  direction: "ltr",
481
482
  ref: q,
482
- children: /* @__PURE__ */ r.jsxs("g", { transform: `translate(${O.left},${O.top})`, children: [
483
+ children: /* @__PURE__ */ l.jsxs("g", { transform: `translate(${O.left},${O.top})`, children: [
483
484
  M.filter((i) => i.position === "before").map((i) => i.layer),
484
- /* @__PURE__ */ r.jsxs(bi, { children: [
485
- ei.map((i) => /* @__PURE__ */ r.jsxs(
485
+ /* @__PURE__ */ l.jsxs(bi, { children: [
486
+ ei.map((i) => /* @__PURE__ */ l.jsxs(
486
487
  ai.g,
487
488
  {
488
489
  className: "undp-viz-g-with-hover",
@@ -515,7 +516,7 @@ function Si(P) {
515
516
  x(void 0), L(void 0), g(void 0), k?.(void 0);
516
517
  },
517
518
  children: [
518
- y === "dot" ? /* @__PURE__ */ r.jsx(
519
+ y === "dot" ? /* @__PURE__ */ l.jsx(
519
520
  ai.circle,
520
521
  {
521
522
  cy: 0,
@@ -534,7 +535,7 @@ function Si(P) {
534
535
  exit: { opacity: 0, transition: { duration: w.duration } },
535
536
  r: h
536
537
  }
537
- ) : /* @__PURE__ */ r.jsx(
538
+ ) : /* @__PURE__ */ l.jsx(
538
539
  ai.rect,
539
540
  {
540
541
  x: 0 - h,
@@ -555,7 +556,7 @@ function Si(P) {
555
556
  exit: { opacity: 0, transition: { duration: w.duration } }
556
557
  }
557
558
  ),
558
- a.length !== 0 && a.indexOf(i.label) !== -1 ? /* @__PURE__ */ r.jsx(
559
+ a.length !== 0 && a.indexOf(i.label) !== -1 ? /* @__PURE__ */ l.jsx(
559
560
  ai.text,
560
561
  {
561
562
  y: 0,
@@ -587,7 +588,7 @@ function Si(P) {
587
588
  },
588
589
  i.label
589
590
  )),
590
- li.map((i, t) => /* @__PURE__ */ r.jsx(
591
+ ri.map((i, t) => /* @__PURE__ */ l.jsx(
591
592
  "text",
592
593
  {
593
594
  y: i,
@@ -609,7 +610,7 @@ function Si(P) {
609
610
  ] })
610
611
  }
611
612
  ),
612
- H && F && U && u ? /* @__PURE__ */ r.jsx(
613
+ H && F && U && u ? /* @__PURE__ */ l.jsx(
613
614
  yi,
614
615
  {
615
616
  data: H,
@@ -620,14 +621,14 @@ function Si(P) {
620
621
  className: I?.tooltip
621
622
  }
622
623
  ) : null,
623
- j && f !== void 0 ? /* @__PURE__ */ r.jsx(
624
+ j && f !== void 0 ? /* @__PURE__ */ l.jsx(
624
625
  xi,
625
626
  {
626
627
  open: f !== void 0,
627
628
  onClose: () => {
628
629
  A(void 0);
629
630
  },
630
- children: /* @__PURE__ */ r.jsx(
631
+ children: /* @__PURE__ */ l.jsx(
631
632
  "div",
632
633
  {
633
634
  className: "graph-modal-content m-0",
@@ -688,23 +689,24 @@ function $i(P) {
688
689
  noOfTicks: W = 2,
689
690
  dimmedOpacity: oi = 0.3,
690
691
  precision: ei = 2,
691
- customLayers: ri = []
692
- } = P, [C, z] = E(0), [li, i] = E(0), [t, fi] = E(void 0), Z = si(null), ci = si(null);
692
+ customLayers: li = []
693
+ } = P, [C, z] = E(0), [ri, i] = E(0), [t, fi] = E(void 0), Z = si(null), ci = si(null);
693
694
  return ui(() => {
694
- const l = new ResizeObserver((hi) => {
695
+ const r = new ResizeObserver((hi) => {
695
696
  z(s || hi[0].target.clientWidth || 620), i(h || hi[0].target.clientHeight || 480);
696
697
  });
697
- return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || l.observe(Z.current)), () => l.disconnect();
698
- }, [s, h]), /* @__PURE__ */ r.jsx(
698
+ return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || r.observe(Z.current)), () => r.disconnect();
699
+ }, [s, h]), /* @__PURE__ */ l.jsx(
699
700
  "div",
700
701
  {
701
702
  className: `${f || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
702
703
  dir: M === "he" || M === "ar" ? "rtl" : void 0,
703
- children: /* @__PURE__ */ r.jsx(
704
+ children: /* @__PURE__ */ l.jsx(
704
705
  "div",
705
706
  {
706
707
  className: ni(
707
708
  `${a ? a === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${M || "en"}`,
709
+ s ? "w-fit" : "w-full",
708
710
  g?.graphContainer
709
711
  ),
710
712
  style: {
@@ -714,13 +716,13 @@ function $i(P) {
714
716
  id: ti,
715
717
  ref: ci,
716
718
  "aria-label": A || `${d ? `The graph shows ${d}. ` : ""}This is a strip chart showing distribution of data along the vertical axis. Each dot represents an individual data point, helping to visualize the spread and clustering of values.${n ? ` ${n}` : ""}`,
717
- children: /* @__PURE__ */ r.jsx(
719
+ children: /* @__PURE__ */ l.jsx(
718
720
  "div",
719
721
  {
720
722
  className: "flex grow",
721
723
  style: { padding: a ? k || "1rem" : k || 0 },
722
- children: /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
723
- d || n || I || m ? /* @__PURE__ */ r.jsx(
724
+ children: /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
725
+ d || n || I || m ? /* @__PURE__ */ l.jsx(
724
726
  ji,
725
727
  {
726
728
  styles: {
@@ -735,43 +737,43 @@ function $i(P) {
735
737
  graphDescription: n,
736
738
  width: s,
737
739
  graphDownload: I ? ci.current : void 0,
738
- dataDownload: m ? o.map((l) => l.data).filter((l) => l !== void 0).length > 0 ? o.map((l) => l.data).filter((l) => l !== void 0) : o.filter((l) => l !== void 0) : null
740
+ dataDownload: m ? 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
739
741
  }
740
742
  ) : null,
741
- /* @__PURE__ */ r.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: o.length === 0 ? /* @__PURE__ */ r.jsx(Di, {}) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
742
- y !== !1 && o.filter((l) => l.color).length !== 0 ? /* @__PURE__ */ r.jsx(
743
+ /* @__PURE__ */ l.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: o.length === 0 ? /* @__PURE__ */ l.jsx(Di, {}) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
744
+ y !== !1 && o.filter((r) => r.color).length !== 0 ? /* @__PURE__ */ l.jsx(
743
745
  Mi,
744
746
  {
745
747
  width: s,
746
748
  colorLegendTitle: ii,
747
749
  colors: p || c[f].categoricalColors.colors,
748
750
  colorDomain: Y || gi(
749
- o.filter((l) => l.color),
751
+ o.filter((r) => r.color),
750
752
  "color"
751
- ).map((l) => l.color),
753
+ ).map((r) => r.color),
752
754
  setSelectedColor: fi,
753
755
  showNAColor: H
754
756
  }
755
757
  ) : null,
756
- /* @__PURE__ */ r.jsx(
758
+ /* @__PURE__ */ l.jsx(
757
759
  "div",
758
760
  {
759
761
  className: "flex flex-col grow justify-center w-full leading-0",
760
762
  ref: Z,
761
- children: (s || C) && (h || li) ? /* @__PURE__ */ r.jsx(
763
+ children: (s || C) && (h || ri) ? /* @__PURE__ */ l.jsx(
762
764
  Si,
763
765
  {
764
766
  data: o,
765
767
  width: s || C,
766
768
  height: Math.max(
767
769
  x,
768
- h || (b ? x ? (s || C) * b > x ? (s || C) * b : x : (s || C) * b : li)
770
+ h || (b ? x ? (s || C) * b > x ? (s || C) * b : x : (s || C) * b : ri)
769
771
  ),
770
- colorDomain: o.filter((l) => l.color).length === 0 ? [] : Y || gi(
771
- o.filter((l) => l.color),
772
+ colorDomain: o.filter((r) => r.color).length === 0 ? [] : Y || gi(
773
+ o.filter((r) => r.color),
772
774
  "color"
773
- ).map((l) => l.color),
774
- colors: o.filter((l) => l.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[f].categoricalColors.colors,
775
+ ).map((r) => r.color),
776
+ colors: o.filter((r) => r.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[f].categoricalColors.colors,
775
777
  selectedColor: t,
776
778
  radius: F,
777
779
  leftMargin: R,
@@ -798,13 +800,13 @@ function $i(P) {
798
800
  noOfTicks: W,
799
801
  dimmedOpacity: oi,
800
802
  precision: ei,
801
- customLayers: ri
803
+ customLayers: li
802
804
  }
803
805
  ) : null
804
806
  }
805
807
  )
806
808
  ] }) }),
807
- e || X ? /* @__PURE__ */ r.jsx(
809
+ e || X ? /* @__PURE__ */ l.jsx(
808
810
  Ci,
809
811
  {
810
812
  styles: { footnote: u?.footnote, source: u?.source },
@@ -874,10 +876,10 @@ function Ki(P) {
874
876
  classNames: W,
875
877
  animate: oi,
876
878
  dimmedOpacity: ei = 0.3,
877
- precision: ri,
879
+ precision: li,
878
880
  customLayers: C
879
881
  } = P;
880
- return O === "vertical" ? /* @__PURE__ */ r.jsx(
882
+ return O === "vertical" ? /* @__PURE__ */ l.jsx(
881
883
  $i,
882
884
  {
883
885
  data: o,
@@ -926,10 +928,10 @@ function Ki(P) {
926
928
  classNames: W,
927
929
  animate: oi,
928
930
  dimmedOpacity: ei,
929
- precision: ri,
931
+ precision: li,
930
932
  customLayers: C
931
933
  }
932
- ) : /* @__PURE__ */ r.jsx(
934
+ ) : /* @__PURE__ */ l.jsx(
933
935
  ki,
934
936
  {
935
937
  data: o,
@@ -978,7 +980,7 @@ function Ki(P) {
978
980
  classNames: W,
979
981
  animate: oi,
980
982
  dimmedOpacity: ei,
981
- precision: ri,
983
+ precision: li,
982
984
  customLayers: C
983
985
  }
984
986
  );