@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
@@ -4,7 +4,7 @@ import { i as xi } from "./index-Bwrro8-q.js";
4
4
  import { X as mi } from "./Modal-DVVwpKhP.js";
5
5
  import { T as hi } from "./Tooltip-CVCGWyzw.js";
6
6
  import { c as J } from "./checkIfNullOrUndefined-DmfiKkNw.js";
7
- import { Colors as n } from "./Colors.js";
7
+ import { Colors as s } from "./Colors.js";
8
8
  import { s as fi } from "./string2HTML-oFCROsus.js";
9
9
  import { A as ri } from "./Axis-Ddg-seDi.js";
10
10
  import { A as ai } from "./AxisTitle-BmHLMRJZ.js";
@@ -24,8 +24,8 @@ function Oi(K) {
24
24
  height: k,
25
25
  showLabels: H,
26
26
  colors: e,
27
- colorDomain: r,
28
- radius: c,
27
+ colorDomain: a,
28
+ radius: r,
29
29
  leftMargin: m,
30
30
  rightMargin: X,
31
31
  topMargin: G,
@@ -40,20 +40,20 @@ function Oi(K) {
40
40
  onSeriesMouseClick: E,
41
41
  resetSelectionOnDoubleClick: Z,
42
42
  detailsOnClick: g,
43
- styles: u,
43
+ styles: d,
44
44
  classNames: h,
45
- animate: s,
46
- dimmedOpacity: d,
45
+ animate: c,
46
+ dimmedOpacity: p,
47
47
  customLayers: B
48
- } = K, _ = ii(null), p = ui(_, {
49
- once: s.once,
50
- amount: s.amount
51
- }), [w, S] = I(void 0), [M, N] = I(void 0), [U, C] = I(void 0), [T, W] = I(void 0), A = {
48
+ } = K, _ = ii(null), w = ui(_, {
49
+ once: c.once,
50
+ amount: c.amount
51
+ }), [v, S] = I(void 0), [M, N] = I(void 0), [U, C] = I(void 0), [T, W] = I(void 0), A = {
52
52
  top: G,
53
53
  bottom: Q,
54
54
  left: m,
55
55
  right: X
56
- }, v = $ - A.left - A.right, f = k - A.top - A.bottom, b = Math.min(Math.min(...l.map((i) => i.y1)), Math.min(...l.map((i) => i.y2))), P = Math.max(Math.max(...l.map((i) => i.y1)), Math.max(...l.map((i) => i.y2))), y = gi().domain([
56
+ }, u = $ - A.left - A.right, f = k - A.top - A.bottom, b = Math.min(Math.min(...l.map((i) => i.y1)), Math.min(...l.map((i) => i.y2))), P = Math.max(Math.max(...l.map((i) => i.y1)), Math.max(...l.map((i) => i.y2))), y = gi().domain([
57
57
  J(q) ? b > 0 ? 0 : b : q,
58
58
  J(z) ? P > 0 ? P : 0 : z
59
59
  ]).range([f, 0]).nice();
@@ -74,8 +74,8 @@ function Oi(K) {
74
74
  {
75
75
  y1: 0,
76
76
  y2: f,
77
- x1: c,
78
- x2: c,
77
+ x1: r,
78
+ x2: r,
79
79
  classNames: {
80
80
  axis: j(
81
81
  "stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",
@@ -87,9 +87,9 @@ function Oi(K) {
87
87
  /* @__PURE__ */ o.jsx(
88
88
  ai,
89
89
  {
90
- x: c,
90
+ x: r,
91
91
  y: f + 15,
92
- style: u?.yAxis?.title,
92
+ style: d?.yAxis?.title,
93
93
  className: j(
94
94
  "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",
95
95
  h?.yAxis?.title
@@ -104,8 +104,8 @@ function Oi(K) {
104
104
  {
105
105
  y1: 0,
106
106
  y2: f,
107
- x1: v - c,
108
- x2: v - c,
107
+ x1: u - r,
108
+ x2: u - r,
109
109
  classNames: {
110
110
  axis: j(
111
111
  "stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",
@@ -117,9 +117,9 @@ function Oi(K) {
117
117
  /* @__PURE__ */ o.jsx(
118
118
  ai,
119
119
  {
120
- x: v - c,
120
+ x: u - r,
121
121
  y: f + 15,
122
- style: u?.yAxis?.title,
122
+ style: d?.yAxis?.title,
123
123
  className: j(
124
124
  "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",
125
125
  h?.yAxis?.title
@@ -134,16 +134,16 @@ function Oi(K) {
134
134
  {
135
135
  variants: {
136
136
  initial: {
137
- opacity: D ? i.color && e[r.indexOf(`${i.color}`)] === D ? 1 : d : w ? w.label === i.label ? 1 : d : x.length !== 0 ? x.indexOf(i.label) !== -1 ? 1 : d : 1
137
+ opacity: D ? i.color && e[a.indexOf(`${i.color}`)] === D ? 1 : p : v ? v.label === i.label ? 1 : p : x.length !== 0 ? x.indexOf(i.label) !== -1 ? 1 : p : 1
138
138
  },
139
139
  whileInView: {
140
- opacity: D ? i.color && e[r.indexOf(`${i.color}`)] === D ? 1 : d : w ? w.label === i.label ? 1 : d : x.length !== 0 ? x.indexOf(i.label) !== -1 ? 1 : d : 1,
141
- transition: { duration: s.duration }
140
+ opacity: D ? i.color && e[a.indexOf(`${i.color}`)] === D ? 1 : p : v ? v.label === i.label ? 1 : p : x.length !== 0 ? x.indexOf(i.label) !== -1 ? 1 : p : 1,
141
+ transition: { duration: c.duration }
142
142
  }
143
143
  },
144
144
  initial: "initial",
145
- animate: p ? "whileInView" : "initial",
146
- exit: { opacity: 0, transition: { duration: s.duration } },
145
+ animate: w ? "whileInView" : "initial",
146
+ exit: { opacity: 0, transition: { duration: c.duration } },
147
147
  onMouseEnter: (t) => {
148
148
  S(i), W(t.clientY), C(t.clientX), F?.(i);
149
149
  },
@@ -160,26 +160,27 @@ function Oi(K) {
160
160
  /* @__PURE__ */ o.jsx(
161
161
  O.circle,
162
162
  {
163
- cx: c,
164
163
  variants: {
165
164
  initial: {
165
+ cx: r,
166
166
  cy: y(i.y1),
167
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
168
- stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
167
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
168
+ stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
169
169
  opacity: 0
170
170
  },
171
171
  whileInView: {
172
+ cx: r,
172
173
  cy: y(i.y1),
173
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
174
- stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
174
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
175
+ stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
175
176
  opacity: 1,
176
- transition: { duration: s.duration }
177
+ transition: { duration: c.duration }
177
178
  }
178
179
  },
179
180
  initial: "initial",
180
- animate: p ? "whileInView" : "initial",
181
- exit: { opacity: 0, transition: { duration: s.duration } },
182
- r: c,
181
+ animate: w ? "whileInView" : "initial",
182
+ exit: { opacity: 0, transition: { duration: c.duration } },
183
+ r,
183
184
  style: {
184
185
  fillOpacity: 0.6
185
186
  }
@@ -191,28 +192,28 @@ function Oi(K) {
191
192
  variants: {
192
193
  initial: {
193
194
  y: y(i.y1),
194
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
195
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
195
196
  opacity: 0
196
197
  },
197
198
  whileInView: {
198
199
  y: y(i.y1),
199
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
200
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
200
201
  opacity: 1,
201
- transition: { duration: s.duration }
202
+ transition: { duration: c.duration }
202
203
  }
203
204
  },
204
205
  initial: "initial",
205
- animate: p ? "whileInView" : "initial",
206
- exit: { opacity: 0, transition: { duration: s.duration } },
206
+ animate: w ? "whileInView" : "initial",
207
+ exit: { opacity: 0, transition: { duration: c.duration } },
207
208
  style: {
208
209
  textAnchor: "end",
209
- ...u?.yAxis?.labels || {}
210
+ ...d?.yAxis?.labels || {}
210
211
  },
211
212
  className: j("text-xs", h?.yAxis?.labels),
212
213
  x: 5,
213
214
  dy: "0.33em",
214
215
  textAnchor: "end",
215
- dx: 0 - c - 3,
216
+ dx: 0 - r - 3,
216
217
  children: i.label
217
218
  }
218
219
  ) : x.length !== 0 && x.indexOf(i.label) !== -1 ? /* @__PURE__ */ o.jsx(
@@ -221,22 +222,22 @@ function Oi(K) {
221
222
  variants: {
222
223
  initial: {
223
224
  y: y(i.y1),
224
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
225
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
225
226
  opacity: 0
226
227
  },
227
228
  whileInView: {
228
229
  y: y(i.y1),
229
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
230
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
230
231
  opacity: 1,
231
- transition: { duration: s.duration }
232
+ transition: { duration: c.duration }
232
233
  }
233
234
  },
234
235
  initial: "initial",
235
- animate: p ? "whileInView" : "initial",
236
- exit: { opacity: 0, transition: { duration: s.duration } },
236
+ animate: w ? "whileInView" : "initial",
237
+ exit: { opacity: 0, transition: { duration: c.duration } },
237
238
  style: {
238
239
  textAnchor: "end",
239
- ...u?.yAxis?.labels || {}
240
+ ...d?.yAxis?.labels || {}
240
241
  },
241
242
  className: j("text-xs", h?.yAxis?.labels),
242
243
  x: 5,
@@ -248,26 +249,27 @@ function Oi(K) {
248
249
  /* @__PURE__ */ o.jsx(
249
250
  O.circle,
250
251
  {
251
- cx: v - c,
252
252
  variants: {
253
253
  initial: {
254
+ cx: u - r,
254
255
  cy: y(i.y2),
255
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
256
- stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
256
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
257
+ stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
257
258
  opacity: 0
258
259
  },
259
260
  whileInView: {
261
+ cx: u - r,
260
262
  cy: y(i.y2),
261
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
262
- stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
263
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
264
+ stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
263
265
  opacity: 1,
264
- transition: { duration: s.duration }
266
+ transition: { duration: c.duration }
265
267
  }
266
268
  },
267
269
  initial: "initial",
268
- animate: p ? "whileInView" : "initial",
269
- exit: { opacity: 0, transition: { duration: s.duration } },
270
- r: c,
270
+ animate: w ? "whileInView" : "initial",
271
+ exit: { opacity: 0, transition: { duration: c.duration } },
272
+ r,
271
273
  style: {
272
274
  fillOpacity: 0.6
273
275
  }
@@ -279,27 +281,27 @@ function Oi(K) {
279
281
  variants: {
280
282
  initial: {
281
283
  y: y(i.y2),
282
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
284
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
283
285
  opacity: 0
284
286
  },
285
287
  whileInView: {
286
288
  y: y(i.y2),
287
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
289
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
288
290
  opacity: 1,
289
- transition: { duration: s.duration }
291
+ transition: { duration: c.duration }
290
292
  }
291
293
  },
292
294
  initial: "initial",
293
- animate: p ? "whileInView" : "initial",
294
- exit: { opacity: 0, transition: { duration: s.duration } },
295
+ animate: w ? "whileInView" : "initial",
296
+ exit: { opacity: 0, transition: { duration: c.duration } },
295
297
  style: {
296
298
  textAnchor: "start",
297
- ...u?.yAxis?.labels || {}
299
+ ...d?.yAxis?.labels || {}
298
300
  },
299
301
  className: j("text-xs", h?.yAxis?.labels),
300
- x: v - 5,
302
+ x: u - 5,
301
303
  dy: "0.33em",
302
- dx: c + 3,
304
+ dx: r + 3,
303
305
  children: i.label
304
306
  }
305
307
  ) : x.length !== 0 && x.indexOf(i.label) !== -1 ? /* @__PURE__ */ o.jsx(
@@ -308,25 +310,25 @@ function Oi(K) {
308
310
  variants: {
309
311
  initial: {
310
312
  y: y(i.y2),
311
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
313
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
312
314
  opacity: 0
313
315
  },
314
316
  whileInView: {
315
317
  y: y(i.y2),
316
- fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
318
+ fill: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
317
319
  opacity: 1,
318
- transition: { duration: s.duration }
320
+ transition: { duration: c.duration }
319
321
  }
320
322
  },
321
323
  initial: "initial",
322
- animate: p ? "whileInView" : "initial",
323
- exit: { opacity: 0, transition: { duration: s.duration } },
324
+ animate: w ? "whileInView" : "initial",
325
+ exit: { opacity: 0, transition: { duration: c.duration } },
324
326
  style: {
325
327
  textAnchor: "start",
326
- ...u?.yAxis?.labels || {}
328
+ ...d?.yAxis?.labels || {}
327
329
  },
328
330
  className: j("text-xs", h?.yAxis?.labels),
329
- x: v - 5,
331
+ x: u - 5,
330
332
  dy: "0.33em",
331
333
  dx: 3,
332
334
  children: i.label
@@ -335,29 +337,31 @@ function Oi(K) {
335
337
  /* @__PURE__ */ o.jsx(
336
338
  O.line,
337
339
  {
338
- x1: c,
339
- x2: v - c,
340
340
  variants: {
341
341
  initial: {
342
+ x1: r,
343
+ x2: u - r,
342
344
  y1: y(i.y1),
343
345
  y2: y(i.y1),
344
- stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray
346
+ stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray
345
347
  },
346
348
  whileInView: {
349
+ x1: r,
350
+ x2: u - r,
347
351
  y1: y(i.y1),
348
352
  y2: y(i.y2),
349
- stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[r.indexOf(`${i.color}`)] : n.gray,
350
- transition: { duration: s.duration }
353
+ stroke: l.filter((t) => t.color).length === 0 ? e[0] : i.color ? e[a.indexOf(`${i.color}`)] : s.gray,
354
+ transition: { duration: c.duration }
351
355
  }
352
356
  },
353
357
  initial: "initial",
354
- animate: p ? "whileInView" : "initial",
355
- exit: { opacity: 0, transition: { duration: s.duration } },
358
+ animate: w ? "whileInView" : "initial",
359
+ exit: { opacity: 0, transition: { duration: c.duration } },
356
360
  className: h?.dataConnectors,
357
361
  style: {
358
362
  fill: "none",
359
363
  strokeWidth: 1,
360
- ...u?.dataConnectors
364
+ ...d?.dataConnectors
361
365
  }
362
366
  }
363
367
  )
@@ -369,14 +373,14 @@ function Oi(K) {
369
373
  ] })
370
374
  }
371
375
  ),
372
- w && R && U && T ? /* @__PURE__ */ o.jsx(
376
+ v && R && U && T ? /* @__PURE__ */ o.jsx(
373
377
  hi,
374
378
  {
375
- data: w,
379
+ data: v,
376
380
  body: R,
377
381
  xPos: U,
378
382
  yPos: T,
379
- backgroundStyle: u?.tooltip,
383
+ backgroundStyle: d?.tooltip,
380
384
  className: h?.tooltip
381
385
  }
382
386
  ) : null,
@@ -406,8 +410,8 @@ function Gi(K) {
406
410
  colors: k,
407
411
  sources: H,
408
412
  graphDescription: e,
409
- showLabels: r = !1,
410
- height: c,
413
+ showLabels: a = !1,
414
+ height: r,
411
415
  width: m,
412
416
  footNote: X,
413
417
  colorDomain: G,
@@ -422,14 +426,14 @@ function Gi(K) {
422
426
  bottomMargin: E = 20,
423
427
  tooltip: Z,
424
428
  relativeHeight: g,
425
- onSeriesMouseOver: u,
429
+ onSeriesMouseOver: d,
426
430
  showColorScale: h = !0,
427
- highlightedDataPoints: s = [],
428
- graphID: d,
431
+ highlightedDataPoints: c = [],
432
+ graphID: p,
429
433
  minValue: B,
430
434
  maxValue: _,
431
- onSeriesMouseClick: p,
432
- graphDownload: w = !1,
435
+ onSeriesMouseClick: w,
436
+ graphDownload: v = !1,
433
437
  dataDownload: S = !1,
434
438
  fillContainer: M = !0,
435
439
  language: N = "en",
@@ -438,7 +442,7 @@ function Gi(K) {
438
442
  theme: T = "light",
439
443
  ariaLabel: W,
440
444
  resetSelectionOnDoubleClick: A = !0,
441
- detailsOnClick: v,
445
+ detailsOnClick: u,
442
446
  styles: f,
443
447
  classNames: b,
444
448
  animate: P = !1,
@@ -446,11 +450,11 @@ function Gi(K) {
446
450
  customLayers: i = []
447
451
  } = K, [V, t] = I(0), [ti, ei] = I(0), [si, ci] = I(void 0), Y = ii(null), oi = ii(null);
448
452
  return yi(() => {
449
- const a = new ResizeObserver((li) => {
450
- t(m || li[0].target.clientWidth || 620), ei(c || li[0].target.clientHeight || 480);
453
+ const n = new ResizeObserver((li) => {
454
+ t(m || li[0].target.clientWidth || 620), ei(r || li[0].target.clientHeight || 480);
451
455
  });
452
- return Y.current && (ei(Y.current.clientHeight || 480), t(Y.current.clientWidth || 620), m || a.observe(Y.current)), () => a.disconnect();
453
- }, [m, c]), /* @__PURE__ */ o.jsx(
456
+ return Y.current && (ei(Y.current.clientHeight || 480), t(Y.current.clientWidth || 620), m || n.observe(Y.current)), () => n.disconnect();
457
+ }, [m, r]), /* @__PURE__ */ o.jsx(
454
458
  "div",
455
459
  {
456
460
  className: `${T || "light"} flex ${m ? "grow-0" : "grow"} ${M ? "w-full" : "w-fit"} `,
@@ -467,7 +471,7 @@ function Gi(K) {
467
471
  ...f?.graphContainer || {},
468
472
  ...x && x !== !0 ? { backgroundColor: x } : {}
469
473
  },
470
- id: d,
474
+ id: p,
471
475
  ref: oi,
472
476
  "aria-label": W || `${$ ? `The graph shows ${$}. ` : ""}This is a slope chart showing changes in data between two category or starting and ending time. Each line represents a different row in data, with lines sloping up or down to show increase or decrease over two categories or time.${e ? ` ${e}` : ""}`,
473
477
  children: /* @__PURE__ */ o.jsx(
@@ -476,7 +480,7 @@ function Gi(K) {
476
480
  className: "flex grow",
477
481
  style: { padding: x ? L || "1rem" : L || 0 },
478
482
  children: /* @__PURE__ */ o.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
479
- $ || e || w || S ? /* @__PURE__ */ o.jsx(
483
+ $ || e || v || S ? /* @__PURE__ */ o.jsx(
480
484
  wi,
481
485
  {
482
486
  styles: {
@@ -490,17 +494,17 @@ function Gi(K) {
490
494
  graphTitle: $,
491
495
  graphDescription: e,
492
496
  width: m,
493
- graphDownload: w ? oi.current : void 0,
494
- dataDownload: S ? l.map((a) => a.data).filter((a) => a !== void 0).length > 0 ? l.map((a) => a.data).filter((a) => a !== void 0) : l.filter((a) => a !== void 0) : null
497
+ graphDownload: v ? oi.current : void 0,
498
+ dataDownload: S ? l.map((n) => n.data).filter((n) => n !== void 0).length > 0 ? l.map((n) => n.data).filter((n) => n !== void 0) : l.filter((n) => n !== void 0) : null
495
499
  }
496
500
  ) : null,
497
501
  /* @__PURE__ */ o.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: l.length === 0 ? /* @__PURE__ */ o.jsx(bi, {}) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
498
- h && l.filter((a) => a.color).length !== 0 ? /* @__PURE__ */ o.jsx(
502
+ h && l.filter((n) => n.color).length !== 0 ? /* @__PURE__ */ o.jsx(
499
503
  vi,
500
504
  {
501
505
  width: m,
502
506
  colorLegendTitle: Q,
503
- colors: k || n[T].categoricalColors.colors,
507
+ colors: k || s[T].categoricalColors.colors,
504
508
  colorDomain: G || ni(l, "color", !0),
505
509
  setSelectedColor: ci,
506
510
  showNAColor: U
@@ -512,35 +516,35 @@ function Gi(K) {
512
516
  className: "flex flex-col grow justify-center w-full leading-0",
513
517
  ref: Y,
514
518
  "aria-label": "Graph area",
515
- children: (m || V) && (c || ti) ? /* @__PURE__ */ o.jsx(
519
+ children: (m || V) && (r || ti) ? /* @__PURE__ */ o.jsx(
516
520
  Oi,
517
521
  {
518
522
  data: l.filter(
519
- (a) => !J(a.y1) && !J(a.y2)
523
+ (n) => !J(n.y1) && !J(n.y2)
520
524
  ),
521
525
  width: m || V,
522
526
  height: Math.max(
523
527
  C,
524
- c || (g ? C ? (m || V) * g > C ? (m || V) * g : C : (m || V) * g : ti)
528
+ r || (g ? C ? (m || V) * g > C ? (m || V) * g : C : (m || V) * g : ti)
525
529
  ),
526
- colorDomain: l.filter((a) => a.color).length === 0 ? [] : G || ni(l, "color", !0),
527
- colors: l.filter((a) => a.color).length === 0 ? k ? [k] : [n.primaryColors["blue-600"]] : k || n[T].categoricalColors.colors,
530
+ colorDomain: l.filter((n) => n.color).length === 0 ? [] : G || ni(l, "color", !0),
531
+ colors: l.filter((n) => n.color).length === 0 ? k ? [k] : [s.primaryColors["blue-600"]] : k || s[T].categoricalColors.colors,
528
532
  selectedColor: si,
529
533
  axisTitles: F,
530
- showLabels: r,
534
+ showLabels: a,
531
535
  radius: R,
532
536
  leftMargin: D,
533
537
  rightMargin: q,
534
538
  topMargin: z,
535
539
  bottomMargin: E,
536
540
  tooltip: Z,
537
- onSeriesMouseOver: u,
538
- highlightedDataPoints: s,
541
+ onSeriesMouseOver: d,
542
+ highlightedDataPoints: c,
539
543
  minValue: B,
540
544
  maxValue: _,
541
- onSeriesMouseClick: p,
545
+ onSeriesMouseClick: w,
542
546
  resetSelectionOnDoubleClick: A,
543
- detailsOnClick: v,
547
+ detailsOnClick: u,
544
548
  styles: f,
545
549
  classNames: b,
546
550
  animate: P === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : P || { duration: 0, once: !0, amount: 0 },