@undp/data-viz 1.5.7 → 1.5.8

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 (74) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.cjs.map +1 -1
  3. package/dist/BarGraph.js +650 -648
  4. package/dist/BarGraph.js.map +1 -1
  5. package/dist/BulletChart.cjs +1 -1
  6. package/dist/BulletChart.cjs.map +1 -1
  7. package/dist/BulletChart.js +210 -208
  8. package/dist/BulletChart.js.map +1 -1
  9. package/dist/ButterflyChart.cjs +1 -1
  10. package/dist/ButterflyChart.cjs.map +1 -1
  11. package/dist/ButterflyChart.js +42 -40
  12. package/dist/ButterflyChart.js.map +1 -1
  13. package/dist/DifferenceLineChart.cjs +1 -1
  14. package/dist/DifferenceLineChart.cjs.map +1 -1
  15. package/dist/DifferenceLineChart.js +122 -120
  16. package/dist/DifferenceLineChart.js.map +1 -1
  17. package/dist/DualAxisLineChart.cjs +1 -1
  18. package/dist/DualAxisLineChart.cjs.map +1 -1
  19. package/dist/DualAxisLineChart.js +133 -113
  20. package/dist/DualAxisLineChart.js.map +1 -1
  21. package/dist/DumbbellChart.cjs +1 -1
  22. package/dist/DumbbellChart.cjs.map +1 -1
  23. package/dist/DumbbellChart.js +274 -274
  24. package/dist/DumbbellChart.js.map +1 -1
  25. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  26. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  27. package/dist/LineChartWithConfidenceInterval.js +194 -174
  28. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  29. package/dist/MultiLineAltChart.cjs +1 -1
  30. package/dist/MultiLineAltChart.cjs.map +1 -1
  31. package/dist/MultiLineAltChart.js +160 -161
  32. package/dist/MultiLineAltChart.js.map +1 -1
  33. package/dist/MultiLineChart.cjs +1 -1
  34. package/dist/MultiLineChart.cjs.map +1 -1
  35. package/dist/MultiLineChart.js +77 -66
  36. package/dist/MultiLineChart.js.map +1 -1
  37. package/dist/ParetoChart.cjs +1 -1
  38. package/dist/ParetoChart.cjs.map +1 -1
  39. package/dist/ParetoChart.js +166 -161
  40. package/dist/ParetoChart.js.map +1 -1
  41. package/dist/RadarChart.cjs +1 -1
  42. package/dist/RadarChart.cjs.map +1 -1
  43. package/dist/RadarChart.js +253 -241
  44. package/dist/RadarChart.js.map +1 -1
  45. package/dist/{RegressionLine-mH7UKOPi.js → RegressionLine-C2--oMQq.js} +10 -9
  46. package/dist/RegressionLine-C2--oMQq.js.map +1 -0
  47. package/dist/RegressionLine-Dj0GSiAp.cjs +2 -0
  48. package/dist/RegressionLine-Dj0GSiAp.cjs.map +1 -0
  49. package/dist/ScatterPlot.cjs +1 -1
  50. package/dist/ScatterPlot.cjs.map +1 -1
  51. package/dist/ScatterPlot.js +130 -129
  52. package/dist/ScatterPlot.js.map +1 -1
  53. package/dist/SimpleLineChart.cjs +1 -1
  54. package/dist/SimpleLineChart.cjs.map +1 -1
  55. package/dist/SimpleLineChart.js +43 -38
  56. package/dist/SimpleLineChart.js.map +1 -1
  57. package/dist/SlopeChart.cjs +1 -1
  58. package/dist/SlopeChart.cjs.map +1 -1
  59. package/dist/SlopeChart.js +113 -109
  60. package/dist/SlopeChart.js.map +1 -1
  61. package/dist/StripChart.cjs +1 -1
  62. package/dist/StripChart.cjs.map +1 -1
  63. package/dist/StripChart.js +282 -270
  64. package/dist/StripChart.js.map +1 -1
  65. package/dist/UnitChart.cjs +1 -1
  66. package/dist/UnitChart.cjs.map +1 -1
  67. package/dist/UnitChart.js +20 -21
  68. package/dist/UnitChart.js.map +1 -1
  69. package/dist/getCentroidCoordinates-Dfk6IqEG.js.map +1 -1
  70. package/dist/getCentroidCoordinates-DxTBqzp2.cjs.map +1 -1
  71. package/package.json +1 -1
  72. package/dist/RegressionLine-mH7UKOPi.js.map +0 -1
  73. package/dist/RegressionLine-xKdiJ8sw.cjs +0 -2
  74. package/dist/RegressionLine-xKdiJ8sw.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { j as l, m as ni } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
- import { useRef as si, useState as E, useEffect as fi } from "react";
2
+ import { useRef as si, useState as E, useEffect as ui } from "react";
3
3
  import { i as pi } from "./index-Bwrro8-q.js";
4
4
  import { X as mi } from "./Modal-DVVwpKhP.js";
5
5
  import { o as xi } from "./index-DvVprvy6.js";
6
6
  import { T as yi } from "./Tooltip-CVCGWyzw.js";
7
7
  import { c as J } from "./checkIfNullOrUndefined-DmfiKkNw.js";
8
8
  import { n as gi } from "./numberFormattingFunction-14YCbkN2.js";
9
- import { Colors as c } from "./Colors.js";
9
+ import { Colors as h } from "./Colors.js";
10
10
  import { s as vi } from "./string2HTML-oFCROsus.js";
11
11
  import { a as wi } from "./linear-DUdu7l2G.js";
12
12
  import { u as Oi } from "./use-in-view-yS6jzJAp.js";
@@ -16,56 +16,56 @@ import { GraphFooter as Ci } from "./GraphFooter.js";
16
16
  import { GraphHeader as ji } from "./GraphHeader.js";
17
17
  import { ColorLegendWithMouseOver as Mi } from "./ColorLegendWithMouseOver.js";
18
18
  import { E as Di } from "./EmptyState-DdTp-Mdn.js";
19
- import { u as di } from "./uniqBy-BHy4I8PK.js";
20
- function Ni(P, e) {
19
+ import { u as fi } from "./uniqBy-BHy4I8PK.js";
20
+ function Ni(P, o) {
21
21
  if (P < 2) return [];
22
- const d = e / (P - 1);
23
- return Array.from({ length: P }, (p, o) => o * d);
22
+ const f = o / (P - 1);
23
+ return Array.from({ length: P }, (m, e) => e * f);
24
24
  }
25
25
  function Vi(P) {
26
26
  const {
27
- data: e,
28
- width: d,
29
- height: p,
30
- colors: o,
31
- colorDomain: n,
32
- radius: h,
27
+ data: o,
28
+ width: f,
29
+ height: m,
30
+ colors: e,
31
+ colorDomain: a,
32
+ radius: c,
33
33
  leftMargin: s,
34
34
  rightMargin: X,
35
35
  topMargin: Y,
36
36
  bottomMargin: ii,
37
37
  tooltip: F,
38
- onSeriesMouseOver: k,
38
+ onSeriesMouseOver: S,
39
39
  highlightedDataPoints: r,
40
40
  selectedColor: R,
41
41
  minValue: G,
42
42
  maxValue: _,
43
- onSeriesMouseClick: S,
43
+ onSeriesMouseClick: $,
44
44
  prefix: K,
45
45
  suffix: b,
46
46
  stripType: Q,
47
- highlightColor: y,
48
- dotOpacity: v,
47
+ highlightColor: x,
48
+ dotOpacity: y,
49
49
  resetSelectionOnDoubleClick: ti,
50
50
  detailsOnClick: N,
51
51
  styles: j,
52
- classNames: $,
53
- valueColor: I,
54
- animate: m,
52
+ classNames: I,
53
+ valueColor: V,
54
+ animate: d,
55
55
  noOfTicks: w,
56
56
  dimmedOpacity: T,
57
57
  precision: B,
58
58
  customLayers: M
59
59
  } = P, q = si(null), D = Oi(q, {
60
- once: m.once,
61
- amount: m.amount
62
- }), [H, x] = E(void 0), [u, A] = E(void 0), [U, L] = E(void 0), [f, g] = E(void 0), O = {
60
+ once: d.once,
61
+ amount: d.amount
62
+ }), [H, v] = E(void 0), [u, A] = E(void 0), [U, L] = E(void 0), [p, g] = E(void 0), O = {
63
63
  top: Y,
64
64
  bottom: ii,
65
65
  left: s,
66
66
  right: X
67
- }, V = d - O.left - O.right, W = p - O.top - O.bottom, ei = e.map((i, t) => ({ ...i, id: `${t}` })), oi = xi(
68
- ei,
67
+ }, k = f - O.left - O.right, W = m - O.top - O.bottom, oi = o.map((i, t) => ({ ...i, id: `${t}` })), ei = xi(
68
+ oi,
69
69
  [
70
70
  (i) => {
71
71
  const t = (r || []).indexOf(i.label);
@@ -73,20 +73,20 @@ function Vi(P) {
73
73
  }
74
74
  ],
75
75
  ["desc"]
76
- ), li = J(_) ? Math.max(...e.filter((i) => !J(i.position)).map((i) => i.position)) < 0 ? 0 : Math.max(...e.filter((i) => !J(i.position)).map((i) => i.position)) : _, C = J(G) ? Math.min(...e.filter((i) => !J(i.position)).map((i) => i.position)) >= 0 ? 0 : Math.min(...e.filter((i) => !J(i.position)).map((i) => i.position)) : G, z = wi().domain([C, li]).range([0, V]).nice(), ri = Ni(w, V);
76
+ ), 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, k]).nice(), ri = Ni(w, k);
77
77
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
78
78
  /* @__PURE__ */ l.jsx(
79
79
  ai.svg,
80
80
  {
81
- width: `${d}px`,
82
- height: `${p}px`,
83
- viewBox: `0 0 ${d} ${p}`,
81
+ width: `${f}px`,
82
+ height: `${m}px`,
83
+ viewBox: `0 0 ${f} ${m}`,
84
84
  direction: "ltr",
85
85
  ref: q,
86
86
  children: /* @__PURE__ */ l.jsxs("g", { transform: `translate(${O.left},${O.top})`, children: [
87
87
  M.filter((i) => i.position === "before").map((i) => i.layer),
88
88
  /* @__PURE__ */ l.jsxs(bi, { children: [
89
- oi.map((i) => /* @__PURE__ */ l.jsxs(
89
+ ei.map((i) => /* @__PURE__ */ l.jsxs(
90
90
  ai.g,
91
91
  {
92
92
  className: "undp-viz-g-with-hover",
@@ -99,24 +99,24 @@ function Vi(P) {
99
99
  whileInView: {
100
100
  x: z(i.position),
101
101
  y: W / 2,
102
- opacity: R ? i.color && o[n.indexOf(i.color)] === R ? 0.95 : T : r.length !== 0 ? r.indexOf(i.label) !== -1 ? 0.95 : T : v,
103
- transition: { duration: m.duration }
102
+ opacity: R ? i.color && e[a.indexOf(i.color)] === R ? 0.95 : T : r.length !== 0 ? r.indexOf(i.label) !== -1 ? 0.95 : T : y,
103
+ transition: { duration: d.duration }
104
104
  }
105
105
  },
106
106
  initial: "initial",
107
107
  animate: D ? "whileInView" : "initial",
108
- exit: { opacity: 0, transition: { duration: m.duration } },
108
+ exit: { opacity: 0, transition: { duration: d.duration } },
109
109
  onMouseEnter: (t) => {
110
- x(i), g(t.clientY), L(t.clientX), k?.(i);
110
+ v(i), g(t.clientY), L(t.clientX), S?.(i);
111
111
  },
112
112
  onClick: () => {
113
- (S || N) && (pi(u, i) && ti ? (A(void 0), S?.(void 0)) : (A(i), S?.(i)));
113
+ ($ || N) && (pi(u, i) && ti ? (A(void 0), $?.(void 0)) : (A(i), $?.(i)));
114
114
  },
115
115
  onMouseMove: (t) => {
116
- x(i), g(t.clientY), L(t.clientX);
116
+ v(i), g(t.clientY), L(t.clientX);
117
117
  },
118
118
  onMouseLeave: () => {
119
- x(void 0), L(void 0), g(void 0), k?.(void 0);
119
+ v(void 0), L(void 0), g(void 0), S?.(void 0);
120
120
  },
121
121
  children: [
122
122
  Q === "dot" ? /* @__PURE__ */ l.jsx(
@@ -126,62 +126,68 @@ function Vi(P) {
126
126
  cx: 0,
127
127
  variants: {
128
128
  initial: {
129
- fill: y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray
129
+ fill: x && r ? r.indexOf(i.label) !== -1 ? x : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray
130
130
  },
131
131
  whileInView: {
132
- fill: y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray,
133
- transition: { duration: m.duration }
132
+ fill: x && r ? r.indexOf(i.label) !== -1 ? x : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray,
133
+ transition: { duration: d.duration }
134
134
  }
135
135
  },
136
136
  initial: "initial",
137
137
  animate: D ? "whileInView" : "initial",
138
- exit: { opacity: 0, transition: { duration: m.duration } },
139
- r: h
138
+ exit: { opacity: 0, transition: { duration: d.duration } },
139
+ r: c
140
140
  }
141
141
  ) : /* @__PURE__ */ l.jsx(
142
142
  ai.rect,
143
143
  {
144
- y: 0 - h,
145
144
  x: -1,
146
- height: h * 2,
147
145
  width: 2,
148
146
  variants: {
149
147
  initial: {
150
- fill: y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray
148
+ y: 0 - c,
149
+ height: c * 2,
150
+ fill: x && r ? r.indexOf(i.label) !== -1 ? x : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray
151
151
  },
152
152
  whileInView: {
153
- fill: y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray,
154
- transition: { duration: m.duration }
153
+ y: 0 - c,
154
+ height: c * 2,
155
+ fill: x && r ? r.indexOf(i.label) !== -1 ? x : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray,
156
+ transition: { duration: d.duration }
155
157
  }
156
158
  },
157
159
  initial: "initial",
158
160
  animate: D ? "whileInView" : "initial",
159
- exit: { opacity: 0, transition: { duration: m.duration } }
161
+ exit: { opacity: 0, transition: { duration: d.duration } }
160
162
  }
161
163
  ),
162
164
  r.length !== 0 && r.indexOf(i.label) !== -1 ? /* @__PURE__ */ l.jsx(
163
165
  ai.text,
164
166
  {
165
167
  x: 0,
166
- y: 0 - h - 5,
167
168
  variants: {
168
- initial: { opacity: 0 },
169
+ initial: {
170
+ opacity: 0,
171
+ y: 0 - c - 5,
172
+ fill: V || (x && r ? r.indexOf(i.label) !== -1 ? x : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray)
173
+ },
169
174
  whileInView: {
170
175
  opacity: 1,
171
- transition: { duration: m.duration }
176
+ y: 0 - c - 5,
177
+ fill: V || (x && r ? r.indexOf(i.label) !== -1 ? x : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray),
178
+ transition: { duration: d.duration }
172
179
  }
173
180
  },
174
181
  initial: "initial",
175
182
  animate: D ? "whileInView" : "initial",
176
- exit: { opacity: 0, transition: { duration: m.duration } },
183
+ exit: { opacity: 0, transition: { duration: d.duration } },
177
184
  style: {
178
- fill: I || (y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray),
179
185
  textAnchor: "middle",
180
186
  ...j?.graphObjectValues || {}
181
187
  },
182
188
  className: ni(
183
189
  "graph-value text-sm font-bold",
184
- $?.graphObjectValues
190
+ I?.graphObjectValues
185
191
  ),
186
192
  children: gi(i.position, "NA", B, K, b)
187
193
  }
@@ -194,14 +200,14 @@ function Vi(P) {
194
200
  "text",
195
201
  {
196
202
  x: i,
197
- y: W / 2 + h,
203
+ y: W / 2 + c,
198
204
  style: {
199
205
  textAnchor: t === 0 ? "start" : t === ri.length - 1 ? "end" : "middle",
200
206
  ...j?.xAxis?.labels || {}
201
207
  },
202
208
  className: ni(
203
209
  "fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",
204
- $?.xAxis?.labels
210
+ I?.xAxis?.labels
205
211
  ),
206
212
  dy: "1em",
207
213
  children: gi(z.invert(i), "NA", B, K, b)
@@ -213,15 +219,15 @@ function Vi(P) {
213
219
  ] })
214
220
  }
215
221
  ),
216
- H && F && U && f ? /* @__PURE__ */ l.jsx(
222
+ H && F && U && p ? /* @__PURE__ */ l.jsx(
217
223
  yi,
218
224
  {
219
225
  data: H,
220
226
  body: F,
221
227
  xPos: U,
222
- yPos: f,
228
+ yPos: p,
223
229
  backgroundStyle: j?.tooltip,
224
- className: $?.tooltip
230
+ className: I?.tooltip
225
231
  }
226
232
  ) : null,
227
233
  N && u !== void 0 ? /* @__PURE__ */ l.jsx(
@@ -245,34 +251,34 @@ function Vi(P) {
245
251
  }
246
252
  function ki(P) {
247
253
  const {
248
- data: e,
249
- graphTitle: d,
250
- colors: p,
251
- sources: o,
252
- graphDescription: n,
253
- height: h,
254
+ data: o,
255
+ graphTitle: f,
256
+ colors: m,
257
+ sources: e,
258
+ graphDescription: a,
259
+ height: c,
254
260
  width: s,
255
261
  footNote: X,
256
262
  colorDomain: Y,
257
263
  colorLegendTitle: ii,
258
264
  radius: F = 5,
259
- padding: k,
265
+ padding: S,
260
266
  backgroundColor: r = !1,
261
267
  leftMargin: R = 5,
262
268
  rightMargin: G = 5,
263
269
  topMargin: _ = 10,
264
- bottomMargin: S = 10,
270
+ bottomMargin: $ = 10,
265
271
  tooltip: K,
266
272
  relativeHeight: b,
267
273
  onSeriesMouseOver: Q,
268
- showColorScale: y = !0,
269
- highlightedDataPoints: v = [],
274
+ showColorScale: x = !0,
275
+ highlightedDataPoints: y = [],
270
276
  graphID: ti,
271
277
  minValue: N,
272
278
  maxValue: j,
273
- onSeriesMouseClick: $,
274
- graphDownload: I = !1,
275
- dataDownload: m = !1,
279
+ onSeriesMouseClick: I,
280
+ graphDownload: V = !1,
281
+ dataDownload: d = !1,
276
282
  prefix: w = "",
277
283
  suffix: T = "",
278
284
  stripType: B = "dot",
@@ -280,26 +286,26 @@ function ki(P) {
280
286
  highlightColor: q,
281
287
  dotOpacity: D = 0.3,
282
288
  showNAColor: H = !0,
283
- minHeight: x = 0,
289
+ minHeight: v = 0,
284
290
  theme: u = "light",
285
291
  ariaLabel: A,
286
292
  resetSelectionOnDoubleClick: U = !0,
287
293
  detailsOnClick: L,
288
- styles: f,
294
+ styles: p,
289
295
  classNames: g,
290
296
  valueColor: O,
291
- animate: V = !1,
297
+ animate: k = !1,
292
298
  noOfTicks: W = 2,
293
- dimmedOpacity: ei = 0.3,
294
- precision: oi = 2,
299
+ dimmedOpacity: oi = 0.3,
300
+ precision: ei = 2,
295
301
  customLayers: li = []
296
- } = P, [C, z] = E(0), [ri, i] = E(0), [t, ui] = E(void 0), Z = si(null), ci = si(null);
297
- return fi(() => {
298
- const a = new ResizeObserver((hi) => {
299
- z(s || hi[0].target.clientWidth || 620), i(h || hi[0].target.clientHeight || 480);
302
+ } = P, [C, z] = E(0), [ri, i] = E(0), [t, di] = E(void 0), Z = si(null), ci = si(null);
303
+ return ui(() => {
304
+ const n = new ResizeObserver((hi) => {
305
+ z(s || hi[0].target.clientWidth || 620), i(c || hi[0].target.clientHeight || 480);
300
306
  });
301
- return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || a.observe(Z.current)), () => a.disconnect();
302
- }, [s, h]), /* @__PURE__ */ l.jsx(
307
+ return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || n.observe(Z.current)), () => n.disconnect();
308
+ }, [s, c]), /* @__PURE__ */ l.jsx(
303
309
  "div",
304
310
  {
305
311
  className: `${u || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
@@ -313,45 +319,45 @@ function ki(P) {
313
319
  g?.graphContainer
314
320
  ),
315
321
  style: {
316
- ...f?.graphContainer || {},
322
+ ...p?.graphContainer || {},
317
323
  ...r && r !== !0 ? { backgroundColor: r } : {}
318
324
  },
319
325
  id: ti,
320
326
  ref: ci,
321
- "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}` : ""}`,
327
+ "aria-label": A || `${f ? `The graph shows ${f}. ` : ""}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.${a ? ` ${a}` : ""}`,
322
328
  children: /* @__PURE__ */ l.jsx(
323
329
  "div",
324
330
  {
325
331
  className: "flex grow",
326
- style: { padding: r ? k || "1rem" : k || 0 },
332
+ style: { padding: r ? S || "1rem" : S || 0 },
327
333
  children: /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
328
- d || n || I || m ? /* @__PURE__ */ l.jsx(
334
+ f || a || V || d ? /* @__PURE__ */ l.jsx(
329
335
  ji,
330
336
  {
331
337
  styles: {
332
- title: f?.title,
333
- description: f?.description
338
+ title: p?.title,
339
+ description: p?.description
334
340
  },
335
341
  classNames: {
336
342
  title: g?.title,
337
343
  description: g?.description
338
344
  },
339
- graphTitle: d,
340
- graphDescription: n,
345
+ graphTitle: f,
346
+ graphDescription: a,
341
347
  width: s,
342
- graphDownload: I ? ci.current : void 0,
343
- dataDownload: m ? e.map((a) => a.data).filter((a) => a !== void 0).length > 0 ? e.map((a) => a.data).filter((a) => a !== void 0) : e.filter((a) => a !== void 0) : null
348
+ graphDownload: V ? ci.current : void 0,
349
+ dataDownload: d ? o.map((n) => n.data).filter((n) => n !== void 0).length > 0 ? o.map((n) => n.data).filter((n) => n !== void 0) : o.filter((n) => n !== void 0) : null
344
350
  }
345
351
  ) : null,
346
- /* @__PURE__ */ l.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: e.length === 0 ? /* @__PURE__ */ l.jsx(Di, {}) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
347
- y !== !1 && e.filter((a) => a.color).length !== 0 ? /* @__PURE__ */ l.jsx(
352
+ /* @__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: [
353
+ x !== !1 && o.filter((n) => n.color).length !== 0 ? /* @__PURE__ */ l.jsx(
348
354
  Mi,
349
355
  {
350
356
  width: s,
351
357
  colorLegendTitle: ii,
352
- colors: p || c[u].categoricalColors.colors,
353
- colorDomain: Y || di(e, "color", !0),
354
- setSelectedColor: ui,
358
+ colors: m || h[u].categoricalColors.colors,
359
+ colorDomain: Y || fi(o, "color", !0),
360
+ setSelectedColor: di,
355
361
  showNAColor: H ?? !0
356
362
  }
357
363
  ) : null,
@@ -361,29 +367,29 @@ function ki(P) {
361
367
  className: "flex flex-col grow justify-center w-full leading-0",
362
368
  ref: Z,
363
369
  "aria-label": "Graph area",
364
- children: (s || C) && (h || ri) ? /* @__PURE__ */ l.jsx(
370
+ children: (s || C) && (c || ri) ? /* @__PURE__ */ l.jsx(
365
371
  Vi,
366
372
  {
367
- data: e,
373
+ data: o,
368
374
  width: s || C,
369
375
  height: Math.max(
370
- x,
371
- h || (b ? x ? (s || C) * b > x ? (s || C) * b : x : (s || C) * b : ri)
376
+ v,
377
+ c || (b ? v ? (s || C) * b > v ? (s || C) * b : v : (s || C) * b : ri)
372
378
  ),
373
- colorDomain: e.filter((a) => a.color).length === 0 ? [] : Y || di(e, "color", !0),
374
- colors: e.filter((a) => a.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[u].categoricalColors.colors,
379
+ colorDomain: o.filter((n) => n.color).length === 0 ? [] : Y || fi(o, "color", !0),
380
+ colors: o.filter((n) => n.color).length === 0 ? m ? [m] : [h.primaryColors["blue-600"]] : m || h[u].categoricalColors.colors,
375
381
  selectedColor: t,
376
382
  radius: F,
377
383
  leftMargin: R,
378
384
  rightMargin: G,
379
385
  topMargin: _,
380
- bottomMargin: S,
386
+ bottomMargin: $,
381
387
  tooltip: K,
382
388
  onSeriesMouseOver: Q,
383
- highlightedDataPoints: v,
389
+ highlightedDataPoints: y,
384
390
  minValue: N,
385
391
  maxValue: j,
386
- onSeriesMouseClick: $,
392
+ onSeriesMouseClick: I,
387
393
  prefix: w,
388
394
  suffix: T,
389
395
  stripType: B,
@@ -391,28 +397,28 @@ function ki(P) {
391
397
  dotOpacity: D,
392
398
  resetSelectionOnDoubleClick: U,
393
399
  detailsOnClick: L,
394
- styles: f,
400
+ styles: p,
395
401
  classNames: g,
396
402
  valueColor: O,
397
- animate: V === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : V || { duration: 0, once: !0, amount: 0 },
403
+ animate: k === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : k || { duration: 0, once: !0, amount: 0 },
398
404
  noOfTicks: W,
399
- dimmedOpacity: ei,
400
- precision: oi,
405
+ dimmedOpacity: oi,
406
+ precision: ei,
401
407
  customLayers: li
402
408
  }
403
409
  ) : null
404
410
  }
405
411
  )
406
412
  ] }) }),
407
- o || X ? /* @__PURE__ */ l.jsx(
413
+ e || X ? /* @__PURE__ */ l.jsx(
408
414
  Ci,
409
415
  {
410
- styles: { footnote: f?.footnote, source: f?.source },
416
+ styles: { footnote: p?.footnote, source: p?.source },
411
417
  classNames: {
412
418
  footnote: g?.footnote,
413
419
  source: g?.source
414
420
  },
415
- sources: o,
421
+ sources: e,
416
422
  footNote: X,
417
423
  width: s
418
424
  }
@@ -427,34 +433,34 @@ function ki(P) {
427
433
  }
428
434
  function Si(P) {
429
435
  const {
430
- data: e,
431
- width: d,
432
- height: p,
433
- colors: o,
434
- colorDomain: n,
435
- radius: h,
436
+ data: o,
437
+ width: f,
438
+ height: m,
439
+ colors: e,
440
+ colorDomain: a,
441
+ radius: c,
436
442
  leftMargin: s,
437
443
  rightMargin: X,
438
444
  topMargin: Y,
439
445
  bottomMargin: ii,
440
446
  tooltip: F,
441
- onSeriesMouseOver: k,
447
+ onSeriesMouseOver: S,
442
448
  highlightedDataPoints: r,
443
449
  selectedColor: R,
444
450
  minValue: G,
445
451
  maxValue: _,
446
- onSeriesMouseClick: S,
452
+ onSeriesMouseClick: $,
447
453
  noOfTicks: K,
448
454
  prefix: b,
449
455
  suffix: Q,
450
- stripType: y,
451
- highlightColor: v,
456
+ stripType: x,
457
+ highlightColor: y,
452
458
  dotOpacity: ti,
453
459
  resetSelectionOnDoubleClick: N,
454
460
  detailsOnClick: j,
455
- styles: $,
456
- classNames: I,
457
- valueColor: m,
461
+ styles: I,
462
+ classNames: V,
463
+ valueColor: d,
458
464
  animate: w,
459
465
  dimmedOpacity: T,
460
466
  precision: B,
@@ -462,13 +468,13 @@ function Si(P) {
462
468
  } = P, q = si(null), D = Oi(q, {
463
469
  once: w.once,
464
470
  amount: w.amount
465
- }), [H, x] = E(void 0), [u, A] = E(void 0), [U, L] = E(void 0), [f, g] = E(void 0), O = {
471
+ }), [H, v] = E(void 0), [u, A] = E(void 0), [U, L] = E(void 0), [p, g] = E(void 0), O = {
466
472
  top: Y,
467
473
  bottom: ii,
468
474
  left: s,
469
475
  right: X
470
- }, V = d - O.left - O.right, W = p - O.top - O.bottom, ei = e.map((i, t) => ({ ...i, id: `${t}` })), oi = xi(
471
- ei,
476
+ }, k = f - O.left - O.right, W = m - O.top - O.bottom, oi = o.map((i, t) => ({ ...i, id: `${t}` })), ei = xi(
477
+ oi,
472
478
  [
473
479
  (i) => {
474
480
  const t = (r || []).indexOf(i.label);
@@ -476,33 +482,33 @@ function Si(P) {
476
482
  }
477
483
  ],
478
484
  ["desc"]
479
- ), li = J(_) ? Math.max(...e.filter((i) => !J(i.position)).map((i) => i.position)) < 0 ? 0 : Math.max(...e.filter((i) => !J(i.position)).map((i) => i.position)) : _, C = J(G) ? Math.min(...e.filter((i) => !J(i.position)).map((i) => i.position)) >= 0 ? 0 : Math.min(...e.filter((i) => !J(i.position)).map((i) => i.position)) : G, z = wi().domain([C, li]).range([W, 0]).nice(), ri = Ni(K, W);
485
+ ), 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);
480
486
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
481
487
  /* @__PURE__ */ l.jsx(
482
488
  ai.svg,
483
489
  {
484
- width: `${d}px`,
485
- height: `${p}px`,
486
- viewBox: `0 0 ${d} ${p}`,
490
+ width: `${f}px`,
491
+ height: `${m}px`,
492
+ viewBox: `0 0 ${f} ${m}`,
487
493
  direction: "ltr",
488
494
  ref: q,
489
495
  children: /* @__PURE__ */ l.jsxs("g", { transform: `translate(${O.left},${O.top})`, children: [
490
496
  M.filter((i) => i.position === "before").map((i) => i.layer),
491
497
  /* @__PURE__ */ l.jsxs(bi, { children: [
492
- oi.map((i) => /* @__PURE__ */ l.jsxs(
498
+ ei.map((i) => /* @__PURE__ */ l.jsxs(
493
499
  ai.g,
494
500
  {
495
501
  className: "undp-viz-g-with-hover",
496
502
  variants: {
497
503
  initial: {
498
504
  opacity: 0,
499
- x: V / 2,
505
+ x: k / 2,
500
506
  y: z(0)
501
507
  },
502
508
  whileInView: {
503
- x: V / 2,
509
+ x: k / 2,
504
510
  y: z(i.position),
505
- opacity: R ? i.color && o[n.indexOf(i.color)] === R ? 0.95 : T : r.length !== 0 ? r.indexOf(i.label) !== -1 ? 0.95 : T : ti,
511
+ opacity: R ? i.color && e[a.indexOf(i.color)] === R ? 0.95 : T : r.length !== 0 ? r.indexOf(i.label) !== -1 ? 0.95 : T : ti,
506
512
  transition: { duration: w.duration }
507
513
  }
508
514
  },
@@ -510,50 +516,52 @@ function Si(P) {
510
516
  animate: D ? "whileInView" : "initial",
511
517
  exit: { opacity: 0, transition: { duration: w.duration } },
512
518
  onMouseEnter: (t) => {
513
- x(i), g(t.clientY), L(t.clientX), k?.(i);
519
+ v(i), g(t.clientY), L(t.clientX), S?.(i);
514
520
  },
515
521
  onClick: () => {
516
- (S || j) && (pi(u, i) && N ? (A(void 0), S?.(void 0)) : (A(i), S?.(i)));
522
+ ($ || j) && (pi(u, i) && N ? (A(void 0), $?.(void 0)) : (A(i), $?.(i)));
517
523
  },
518
524
  onMouseMove: (t) => {
519
- x(i), g(t.clientY), L(t.clientX);
525
+ v(i), g(t.clientY), L(t.clientX);
520
526
  },
521
527
  onMouseLeave: () => {
522
- x(void 0), L(void 0), g(void 0), k?.(void 0);
528
+ v(void 0), L(void 0), g(void 0), S?.(void 0);
523
529
  },
524
530
  children: [
525
- y === "dot" ? /* @__PURE__ */ l.jsx(
531
+ x === "dot" ? /* @__PURE__ */ l.jsx(
526
532
  ai.circle,
527
533
  {
528
534
  cy: 0,
529
535
  cx: 0,
530
536
  variants: {
531
537
  initial: {
532
- fill: v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray
538
+ fill: y && r ? r.indexOf(i.label) !== -1 ? y : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray
533
539
  },
534
540
  whileInView: {
535
- fill: v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray,
541
+ fill: y && r ? r.indexOf(i.label) !== -1 ? y : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray,
536
542
  transition: { duration: w.duration }
537
543
  }
538
544
  },
539
545
  initial: "initial",
540
546
  animate: D ? "whileInView" : "initial",
541
547
  exit: { opacity: 0, transition: { duration: w.duration } },
542
- r: h
548
+ r: c
543
549
  }
544
550
  ) : /* @__PURE__ */ l.jsx(
545
551
  ai.rect,
546
552
  {
547
- x: 0 - h,
548
553
  y: -1,
549
- width: h * 2,
550
554
  height: 2,
551
555
  variants: {
552
556
  initial: {
553
- fill: v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray
557
+ x: 0 - c,
558
+ width: c * 2,
559
+ fill: y && r ? r.indexOf(i.label) !== -1 ? y : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray
554
560
  },
555
561
  whileInView: {
556
- fill: v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray,
562
+ x: 0 - c,
563
+ width: c * 2,
564
+ fill: y && r ? r.indexOf(i.label) !== -1 ? y : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray,
557
565
  transition: { duration: w.duration }
558
566
  }
559
567
  },
@@ -567,11 +575,16 @@ function Si(P) {
567
575
  {
568
576
  y: 0,
569
577
  dy: "0.33em",
570
- x: 0 + h + 3,
571
578
  variants: {
572
- initial: { opacity: 0 },
579
+ initial: {
580
+ opacity: 0,
581
+ x: 0 + c + 3,
582
+ fill: d || (y && r ? r.indexOf(i.label) !== -1 ? y : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray)
583
+ },
573
584
  whileInView: {
574
585
  opacity: 1,
586
+ x: 0 + c + 3,
587
+ fill: d || (y && r ? r.indexOf(i.label) !== -1 ? y : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray : o.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(i.color)] : h.gray),
575
588
  transition: { duration: w.duration }
576
589
  }
577
590
  },
@@ -579,13 +592,12 @@ function Si(P) {
579
592
  animate: D ? "whileInView" : "initial",
580
593
  exit: { opacity: 0, transition: { duration: w.duration } },
581
594
  style: {
582
- fill: m || (v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray),
583
595
  textAnchor: "start",
584
- ...$?.graphObjectValues || {}
596
+ ...I?.graphObjectValues || {}
585
597
  },
586
598
  className: ni(
587
599
  "graph-value text-sm font-bold",
588
- I?.graphObjectValues
600
+ V?.graphObjectValues
589
601
  ),
590
602
  children: gi(i.position, "NA", B, b, Q)
591
603
  }
@@ -598,14 +610,14 @@ function Si(P) {
598
610
  "text",
599
611
  {
600
612
  y: i,
601
- x: V / 2 + h + 5,
613
+ x: k / 2 + c + 5,
602
614
  style: {
603
615
  textAnchor: "start",
604
- ...$?.yAxis?.labels || {}
616
+ ...I?.yAxis?.labels || {}
605
617
  },
606
618
  className: ni(
607
619
  "fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",
608
- I?.yAxis?.labels
620
+ V?.yAxis?.labels
609
621
  ),
610
622
  children: gi(z.invert(i), "NA", B, b, Q)
611
623
  },
@@ -616,15 +628,15 @@ function Si(P) {
616
628
  ] })
617
629
  }
618
630
  ),
619
- H && F && U && f ? /* @__PURE__ */ l.jsx(
631
+ H && F && U && p ? /* @__PURE__ */ l.jsx(
620
632
  yi,
621
633
  {
622
634
  data: H,
623
635
  body: F,
624
636
  xPos: U,
625
- yPos: f,
626
- backgroundStyle: $?.tooltip,
627
- className: I?.tooltip
637
+ yPos: p,
638
+ backgroundStyle: I?.tooltip,
639
+ className: V?.tooltip
628
640
  }
629
641
  ) : null,
630
642
  j && u !== void 0 ? /* @__PURE__ */ l.jsx(
@@ -648,34 +660,34 @@ function Si(P) {
648
660
  }
649
661
  function $i(P) {
650
662
  const {
651
- data: e,
652
- graphTitle: d,
653
- colors: p,
654
- sources: o,
655
- graphDescription: n,
656
- height: h,
663
+ data: o,
664
+ graphTitle: f,
665
+ colors: m,
666
+ sources: e,
667
+ graphDescription: a,
668
+ height: c,
657
669
  width: s,
658
670
  footNote: X,
659
671
  colorDomain: Y,
660
672
  colorLegendTitle: ii,
661
673
  radius: F = 5,
662
- padding: k,
674
+ padding: S,
663
675
  backgroundColor: r = !1,
664
676
  leftMargin: R = 20,
665
677
  rightMargin: G = 20,
666
678
  topMargin: _ = 10,
667
- bottomMargin: S = 10,
679
+ bottomMargin: $ = 10,
668
680
  tooltip: K,
669
681
  relativeHeight: b,
670
682
  onSeriesMouseOver: Q,
671
- showColorScale: y = !0,
672
- highlightedDataPoints: v = [],
683
+ showColorScale: x = !0,
684
+ highlightedDataPoints: y = [],
673
685
  graphID: ti,
674
686
  minValue: N,
675
687
  maxValue: j,
676
- onSeriesMouseClick: $,
677
- graphDownload: I = !1,
678
- dataDownload: m = !1,
688
+ onSeriesMouseClick: I,
689
+ graphDownload: V = !1,
690
+ dataDownload: d = !1,
679
691
  prefix: w = "",
680
692
  suffix: T = "",
681
693
  stripType: B = "dot",
@@ -683,26 +695,26 @@ function $i(P) {
683
695
  highlightColor: q,
684
696
  dotOpacity: D = 0.3,
685
697
  showNAColor: H = !0,
686
- minHeight: x = 0,
698
+ minHeight: v = 0,
687
699
  theme: u = "light",
688
700
  ariaLabel: A,
689
701
  resetSelectionOnDoubleClick: U = !0,
690
702
  detailsOnClick: L,
691
- styles: f,
703
+ styles: p,
692
704
  classNames: g,
693
705
  valueColor: O,
694
- animate: V = !1,
706
+ animate: k = !1,
695
707
  noOfTicks: W = 2,
696
- dimmedOpacity: ei = 0.3,
697
- precision: oi = 2,
708
+ dimmedOpacity: oi = 0.3,
709
+ precision: ei = 2,
698
710
  customLayers: li = []
699
- } = P, [C, z] = E(0), [ri, i] = E(0), [t, ui] = E(void 0), Z = si(null), ci = si(null);
700
- return fi(() => {
701
- const a = new ResizeObserver((hi) => {
702
- z(s || hi[0].target.clientWidth || 620), i(h || hi[0].target.clientHeight || 480);
711
+ } = P, [C, z] = E(0), [ri, i] = E(0), [t, di] = E(void 0), Z = si(null), ci = si(null);
712
+ return ui(() => {
713
+ const n = new ResizeObserver((hi) => {
714
+ z(s || hi[0].target.clientWidth || 620), i(c || hi[0].target.clientHeight || 480);
703
715
  });
704
- return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || a.observe(Z.current)), () => a.disconnect();
705
- }, [s, h]), /* @__PURE__ */ l.jsx(
716
+ return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || n.observe(Z.current)), () => n.disconnect();
717
+ }, [s, c]), /* @__PURE__ */ l.jsx(
706
718
  "div",
707
719
  {
708
720
  className: `${u || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
@@ -716,45 +728,45 @@ function $i(P) {
716
728
  g?.graphContainer
717
729
  ),
718
730
  style: {
719
- ...f?.graphContainer || {},
731
+ ...p?.graphContainer || {},
720
732
  ...r && r !== !0 ? { backgroundColor: r } : {}
721
733
  },
722
734
  id: ti,
723
735
  ref: ci,
724
- "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}` : ""}`,
736
+ "aria-label": A || `${f ? `The graph shows ${f}. ` : ""}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.${a ? ` ${a}` : ""}`,
725
737
  children: /* @__PURE__ */ l.jsx(
726
738
  "div",
727
739
  {
728
740
  className: "flex grow",
729
- style: { padding: r ? k || "1rem" : k || 0 },
741
+ style: { padding: r ? S || "1rem" : S || 0 },
730
742
  children: /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
731
- d || n || I || m ? /* @__PURE__ */ l.jsx(
743
+ f || a || V || d ? /* @__PURE__ */ l.jsx(
732
744
  ji,
733
745
  {
734
746
  styles: {
735
- title: f?.title,
736
- description: f?.description
747
+ title: p?.title,
748
+ description: p?.description
737
749
  },
738
750
  classNames: {
739
751
  title: g?.title,
740
752
  description: g?.description
741
753
  },
742
- graphTitle: d,
743
- graphDescription: n,
754
+ graphTitle: f,
755
+ graphDescription: a,
744
756
  width: s,
745
- graphDownload: I ? ci.current : void 0,
746
- dataDownload: m ? e.map((a) => a.data).filter((a) => a !== void 0).length > 0 ? e.map((a) => a.data).filter((a) => a !== void 0) : e.filter((a) => a !== void 0) : null
757
+ graphDownload: V ? ci.current : void 0,
758
+ dataDownload: d ? o.map((n) => n.data).filter((n) => n !== void 0).length > 0 ? o.map((n) => n.data).filter((n) => n !== void 0) : o.filter((n) => n !== void 0) : null
747
759
  }
748
760
  ) : null,
749
- /* @__PURE__ */ l.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: e.length === 0 ? /* @__PURE__ */ l.jsx(Di, {}) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
750
- y !== !1 && e.filter((a) => a.color).length !== 0 ? /* @__PURE__ */ l.jsx(
761
+ /* @__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: [
762
+ x !== !1 && o.filter((n) => n.color).length !== 0 ? /* @__PURE__ */ l.jsx(
751
763
  Mi,
752
764
  {
753
765
  width: s,
754
766
  colorLegendTitle: ii,
755
- colors: p || c[u].categoricalColors.colors,
756
- colorDomain: Y || di(e, "color", !0),
757
- setSelectedColor: ui,
767
+ colors: m || h[u].categoricalColors.colors,
768
+ colorDomain: Y || fi(o, "color", !0),
769
+ setSelectedColor: di,
758
770
  showNAColor: H
759
771
  }
760
772
  ) : null,
@@ -763,29 +775,29 @@ function $i(P) {
763
775
  {
764
776
  className: "flex flex-col grow justify-center w-full leading-0",
765
777
  ref: Z,
766
- children: (s || C) && (h || ri) ? /* @__PURE__ */ l.jsx(
778
+ children: (s || C) && (c || ri) ? /* @__PURE__ */ l.jsx(
767
779
  Si,
768
780
  {
769
- data: e,
781
+ data: o,
770
782
  width: s || C,
771
783
  height: Math.max(
772
- x,
773
- h || (b ? x ? (s || C) * b > x ? (s || C) * b : x : (s || C) * b : ri)
784
+ v,
785
+ c || (b ? v ? (s || C) * b > v ? (s || C) * b : v : (s || C) * b : ri)
774
786
  ),
775
- colorDomain: e.filter((a) => a.color).length === 0 ? [] : Y || di(e, "color", !0),
776
- colors: e.filter((a) => a.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[u].categoricalColors.colors,
787
+ colorDomain: o.filter((n) => n.color).length === 0 ? [] : Y || fi(o, "color", !0),
788
+ colors: o.filter((n) => n.color).length === 0 ? m ? [m] : [h.primaryColors["blue-600"]] : m || h[u].categoricalColors.colors,
777
789
  selectedColor: t,
778
790
  radius: F,
779
791
  leftMargin: R,
780
792
  rightMargin: G,
781
793
  topMargin: _,
782
- bottomMargin: S,
794
+ bottomMargin: $,
783
795
  tooltip: K,
784
796
  onSeriesMouseOver: Q,
785
- highlightedDataPoints: v,
797
+ highlightedDataPoints: y,
786
798
  minValue: N,
787
799
  maxValue: j,
788
- onSeriesMouseClick: $,
800
+ onSeriesMouseClick: I,
789
801
  prefix: w,
790
802
  suffix: T,
791
803
  stripType: B,
@@ -793,28 +805,28 @@ function $i(P) {
793
805
  dotOpacity: D,
794
806
  resetSelectionOnDoubleClick: U,
795
807
  detailsOnClick: L,
796
- styles: f,
808
+ styles: p,
797
809
  classNames: g,
798
810
  valueColor: O,
799
- animate: V === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : V || { duration: 0, once: !0, amount: 0 },
811
+ animate: k === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : k || { duration: 0, once: !0, amount: 0 },
800
812
  noOfTicks: W,
801
- dimmedOpacity: ei,
802
- precision: oi,
813
+ dimmedOpacity: oi,
814
+ precision: ei,
803
815
  customLayers: li
804
816
  }
805
817
  ) : null
806
818
  }
807
819
  )
808
820
  ] }) }),
809
- o || X ? /* @__PURE__ */ l.jsx(
821
+ e || X ? /* @__PURE__ */ l.jsx(
810
822
  Ci,
811
823
  {
812
- styles: { footnote: f?.footnote, source: f?.source },
824
+ styles: { footnote: p?.footnote, source: p?.source },
813
825
  classNames: {
814
826
  footnote: g?.footnote,
815
827
  source: g?.source
816
828
  },
817
- sources: o,
829
+ sources: e,
818
830
  footNote: X,
819
831
  width: s
820
832
  }
@@ -829,34 +841,34 @@ function $i(P) {
829
841
  }
830
842
  function Ki(P) {
831
843
  const {
832
- data: e,
833
- graphTitle: d,
834
- colors: p,
835
- sources: o,
836
- graphDescription: n,
837
- height: h,
844
+ data: o,
845
+ graphTitle: f,
846
+ colors: m,
847
+ sources: e,
848
+ graphDescription: a,
849
+ height: c,
838
850
  width: s,
839
851
  footNote: X,
840
852
  colorDomain: Y,
841
853
  colorLegendTitle: ii,
842
854
  radius: F,
843
- padding: k,
855
+ padding: S,
844
856
  backgroundColor: r,
845
857
  leftMargin: R,
846
858
  rightMargin: G,
847
859
  topMargin: _,
848
- bottomMargin: S,
860
+ bottomMargin: $,
849
861
  tooltip: K,
850
862
  relativeHeight: b,
851
863
  onSeriesMouseOver: Q,
852
- showColorScale: y,
853
- highlightedDataPoints: v,
864
+ showColorScale: x,
865
+ highlightedDataPoints: y,
854
866
  graphID: ti,
855
867
  minValue: N,
856
868
  maxValue: j,
857
- onSeriesMouseClick: $,
858
- noOfTicks: I,
859
- graphDownload: m,
869
+ onSeriesMouseClick: I,
870
+ noOfTicks: V,
871
+ graphDownload: d,
860
872
  dataDownload: w,
861
873
  prefix: T,
862
874
  suffix: B,
@@ -864,52 +876,52 @@ function Ki(P) {
864
876
  language: q,
865
877
  highlightColor: D,
866
878
  dotOpacity: H,
867
- showNAColor: x,
879
+ showNAColor: v,
868
880
  minHeight: u,
869
881
  theme: A,
870
882
  ariaLabel: U,
871
883
  valueColor: L,
872
- resetSelectionOnDoubleClick: f,
884
+ resetSelectionOnDoubleClick: p,
873
885
  detailsOnClick: g,
874
886
  orientation: O = "vertical",
875
- styles: V,
887
+ styles: k,
876
888
  classNames: W,
877
- animate: ei,
878
- dimmedOpacity: oi = 0.3,
889
+ animate: oi,
890
+ dimmedOpacity: ei = 0.3,
879
891
  precision: li,
880
892
  customLayers: C
881
893
  } = P;
882
894
  return O === "vertical" ? /* @__PURE__ */ l.jsx(
883
895
  $i,
884
896
  {
885
- data: e,
886
- graphTitle: d,
887
- colors: p,
888
- sources: o,
889
- graphDescription: n,
890
- height: h,
897
+ data: o,
898
+ graphTitle: f,
899
+ colors: m,
900
+ sources: e,
901
+ graphDescription: a,
902
+ height: c,
891
903
  width: s,
892
904
  footNote: X,
893
905
  colorDomain: Y,
894
906
  colorLegendTitle: ii,
895
907
  radius: F,
896
- padding: k,
908
+ padding: S,
897
909
  backgroundColor: r,
898
910
  leftMargin: R,
899
911
  rightMargin: G,
900
912
  topMargin: _,
901
- bottomMargin: S,
913
+ bottomMargin: $,
902
914
  tooltip: K,
903
915
  relativeHeight: b,
904
916
  onSeriesMouseOver: Q,
905
- showColorScale: y,
906
- highlightedDataPoints: v,
917
+ showColorScale: x,
918
+ highlightedDataPoints: y,
907
919
  graphID: ti,
908
920
  minValue: N,
909
921
  maxValue: j,
910
- onSeriesMouseClick: $,
911
- noOfTicks: I,
912
- graphDownload: m,
922
+ onSeriesMouseClick: I,
923
+ noOfTicks: V,
924
+ graphDownload: d,
913
925
  dataDownload: w,
914
926
  prefix: T,
915
927
  suffix: B,
@@ -917,51 +929,51 @@ function Ki(P) {
917
929
  language: q,
918
930
  highlightColor: D,
919
931
  dotOpacity: H,
920
- showNAColor: x,
932
+ showNAColor: v,
921
933
  minHeight: u,
922
934
  theme: A,
923
935
  ariaLabel: U,
924
- resetSelectionOnDoubleClick: f,
925
- styles: V,
936
+ resetSelectionOnDoubleClick: p,
937
+ styles: k,
926
938
  valueColor: L,
927
939
  detailsOnClick: g,
928
940
  classNames: W,
929
- animate: ei,
930
- dimmedOpacity: oi,
941
+ animate: oi,
942
+ dimmedOpacity: ei,
931
943
  precision: li,
932
944
  customLayers: C
933
945
  }
934
946
  ) : /* @__PURE__ */ l.jsx(
935
947
  ki,
936
948
  {
937
- data: e,
938
- graphTitle: d,
939
- colors: p,
940
- sources: o,
941
- graphDescription: n,
942
- height: h,
949
+ data: o,
950
+ graphTitle: f,
951
+ colors: m,
952
+ sources: e,
953
+ graphDescription: a,
954
+ height: c,
943
955
  width: s,
944
956
  footNote: X,
945
957
  colorDomain: Y,
946
958
  colorLegendTitle: ii,
947
959
  radius: F,
948
- padding: k,
960
+ padding: S,
949
961
  backgroundColor: r,
950
962
  leftMargin: R,
951
963
  rightMargin: G,
952
964
  topMargin: _,
953
- bottomMargin: S,
965
+ bottomMargin: $,
954
966
  tooltip: K,
955
967
  relativeHeight: b,
956
968
  onSeriesMouseOver: Q,
957
- showColorScale: y,
958
- highlightedDataPoints: v,
969
+ showColorScale: x,
970
+ highlightedDataPoints: y,
959
971
  graphID: ti,
960
972
  minValue: N,
961
973
  maxValue: j,
962
- onSeriesMouseClick: $,
963
- noOfTicks: I,
964
- graphDownload: m,
974
+ onSeriesMouseClick: I,
975
+ noOfTicks: V,
976
+ graphDownload: d,
965
977
  dataDownload: w,
966
978
  prefix: T,
967
979
  suffix: B,
@@ -969,17 +981,17 @@ function Ki(P) {
969
981
  language: q,
970
982
  highlightColor: D,
971
983
  dotOpacity: H,
972
- showNAColor: x,
984
+ showNAColor: v,
973
985
  minHeight: u,
974
986
  theme: A,
975
987
  ariaLabel: U,
976
- resetSelectionOnDoubleClick: f,
977
- styles: V,
988
+ resetSelectionOnDoubleClick: p,
989
+ styles: k,
978
990
  valueColor: L,
979
991
  detailsOnClick: g,
980
992
  classNames: W,
981
- animate: ei,
982
- dimmedOpacity: oi,
993
+ animate: oi,
994
+ dimmedOpacity: ei,
983
995
  precision: li,
984
996
  customLayers: C
985
997
  }