@undp/data-viz 1.4.6 → 1.4.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 (49) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +58 -58
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/BiVariateChoroplethMap.cjs +1 -1
  6. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  7. package/dist/BiVariateChoroplethMap.js +50 -50
  8. package/dist/BiVariateChoroplethMap.js.map +1 -1
  9. package/dist/ChoroplethMap.cjs +1 -1
  10. package/dist/ChoroplethMap.cjs.map +1 -1
  11. package/dist/ChoroplethMap.js +26 -26
  12. package/dist/ChoroplethMap.js.map +1 -1
  13. package/dist/DifferenceLineChart.cjs +1 -1
  14. package/dist/DifferenceLineChart.cjs.map +1 -1
  15. package/dist/DifferenceLineChart.js +44 -44
  16. package/dist/DifferenceLineChart.js.map +1 -1
  17. package/dist/DotDensityMap.cjs +1 -1
  18. package/dist/DotDensityMap.cjs.map +1 -1
  19. package/dist/DotDensityMap.js +2 -2
  20. package/dist/DotDensityMap.js.map +1 -1
  21. package/dist/DualAxisLineChart.cjs +1 -1
  22. package/dist/DualAxisLineChart.cjs.map +1 -1
  23. package/dist/DualAxisLineChart.js +1 -1
  24. package/dist/DualAxisLineChart.js.map +1 -1
  25. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  26. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  27. package/dist/LineChartWithConfidenceInterval.js +33 -33
  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 +78 -78
  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 +28 -28
  36. package/dist/MultiLineChart.js.map +1 -1
  37. package/dist/ScatterPlot.cjs +1 -1
  38. package/dist/ScatterPlot.cjs.map +1 -1
  39. package/dist/ScatterPlot.js +43 -43
  40. package/dist/ScatterPlot.js.map +1 -1
  41. package/dist/SimpleLineChart.cjs +1 -1
  42. package/dist/SimpleLineChart.cjs.map +1 -1
  43. package/dist/SimpleLineChart.js +17 -17
  44. package/dist/SimpleLineChart.js.map +1 -1
  45. package/dist/SparkLine.cjs +1 -1
  46. package/dist/SparkLine.cjs.map +1 -1
  47. package/dist/SparkLine.js +1 -1
  48. package/dist/SparkLine.js.map +1 -1
  49. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { j as t, m as he } from "./index-CHPV5EwG-BPSP-7Jg.js";
1
+ import { j as t, m as xe } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
2
  import { useRef as ge, useState as G, useEffect as Me } from "react";
3
3
  import { u as ue } from "./index-CaAIPGZo.js";
4
4
  import { p as u, f as Ve } from "./parse-DlCRUFh_.js";
5
5
  import { s as $e } from "./index-DxagiOHo.js";
6
6
  import { n as Se } from "./numberFormattingFunction-14YCbkN2.js";
7
7
  import { T as He } from "./Tooltip-DyM5snqx.js";
8
- import { c as x } from "./checkIfNullOrUndefined-DmfiKkNw.js";
8
+ import { c as h } from "./checkIfNullOrUndefined-DmfiKkNw.js";
9
9
  import { C as We, g as Ie, A as Re } from "./customArea-B-dWU0zZ.js";
10
10
  import { A as Ye } from "./AxisTitle-BmHLMRJZ.js";
11
11
  import { A as Fe } from "./Axis-Ddg-seDi.js";
@@ -40,7 +40,7 @@ function lt(pe) {
40
40
  topMargin: de,
41
41
  bottomMargin: B,
42
42
  suffix: D,
43
- prefix: h,
43
+ prefix: x,
44
44
  leftMargin: O,
45
45
  tooltip: ee,
46
46
  onSeriesMouseOver: W,
@@ -60,8 +60,8 @@ function lt(pe) {
60
60
  minDate: ae,
61
61
  maxDate: re,
62
62
  curveType: U,
63
- styles: v,
64
- colorDomain: b,
63
+ styles: b,
64
+ colorDomain: C,
65
65
  selectedColor: I,
66
66
  classNames: p,
67
67
  showLabels: R,
@@ -90,7 +90,7 @@ function lt(pe) {
90
90
  date: u(`${e.date}`, f, /* @__PURE__ */ new Date())
91
91
  })),
92
92
  "date"
93
- ).filter((e) => !x(e.y)), Ae = ue(l, (e) => e.label).map((e) => e.label), Z = ue(
93
+ ).filter((e) => !h(e.y)), Ae = ue(l, (e) => e.label).map((e) => e.label), Z = ue(
94
94
  $e(
95
95
  n.map((e) => ({
96
96
  ...e,
@@ -99,7 +99,7 @@ function lt(pe) {
99
99
  "date"
100
100
  ),
101
101
  (e) => e.date
102
- ).map((e) => e.date), [g, d] = G(void 0), [N, Y] = G(void 0), [le, F] = G(void 0), C = {
102
+ ).map((e) => e.date), [g, d] = G(void 0), [N, Y] = G(void 0), [le, F] = G(void 0), w = {
103
103
  top: de,
104
104
  bottom: B,
105
105
  left: oe ? O + 30 : O,
@@ -120,28 +120,28 @@ function lt(pe) {
120
120
  coordinates: e.coordinates.map(
121
121
  (o, m) => m % 2 === 0 ? u(`${o}`, f, /* @__PURE__ */ new Date()) : o
122
122
  )
123
- })), w = S - C.left - C.right, V = K - C.top - C.bottom, P = ae ? u(`${ae}`, f, /* @__PURE__ */ new Date()) : Z[0], xe = re ? u(`${re}`, f, /* @__PURE__ */ new Date()) : Z[Z.length - 1], i = x(z) ? Math.min(...l.map((e) => e.y).filter((e) => !x(e))) ? Math.min(
124
- ...l.map((e) => e.y).filter((e) => !x(e))
123
+ })), v = S - w.left - w.right, V = K - w.top - w.bottom, P = ae ? u(`${ae}`, f, /* @__PURE__ */ new Date()) : Z[0], he = re ? u(`${re}`, f, /* @__PURE__ */ new Date()) : Z[Z.length - 1], i = h(z) ? Math.min(...l.map((e) => e.y).filter((e) => !h(e))) ? Math.min(
124
+ ...l.map((e) => e.y).filter((e) => !h(e))
125
125
  ) > 0 ? 0 : Math.min(
126
- ...l.map((e) => e.y).filter((e) => !x(e))
126
+ ...l.map((e) => e.y).filter((e) => !h(e))
127
127
  ) : 0 : z, J = Math.max(
128
- ...l.map((e) => e.y).filter((e) => !x(e))
128
+ ...l.map((e) => e.y).filter((e) => !h(e))
129
129
  ) ? Math.max(
130
- ...l.map((e) => e.y).filter((e) => !x(e))
131
- ) : 0, r = Be().domain([P, xe]).range([0, w]), c = ze().domain([
132
- x(z) ? i : z,
133
- x(te) ? J > 0 ? J : 0 : te
130
+ ...l.map((e) => e.y).filter((e) => !h(e))
131
+ ) : 0, r = Be().domain([P, he]).range([0, v]), c = ze().domain([
132
+ h(z) ? i : z,
133
+ h(te) ? J > 0 ? J : 0 : te
134
134
  ]).range([V, 0]).nice(), ke = qe.from(
135
- l.filter((e) => !x(e.date) && !x(e.y)),
135
+ l.filter((e) => !h(e.date) && !h(e.y)),
136
136
  (e) => r(e.date),
137
137
  (e) => c(e.y)
138
- ).voronoi([0, 0, w < 0 ? 0 : w, V < 0 ? 0 : V]), De = Ue().x((e) => r(e.date)).y((e) => c(e.y)).curve(je), Ne = c.ticks(be), Te = r.ticks(ye);
138
+ ).voronoi([0, 0, v < 0 ? 0 : v, V < 0 ? 0 : V]), De = Ue().x((e) => r(e.date)).y((e) => c(e.y)).curve(je), Ne = c.ticks(be), Te = r.ticks(ye);
139
139
  return Me(() => {
140
140
  const e = (m) => {
141
141
  const H = l[tt(
142
142
  l.map((Le) => Le.date),
143
143
  r.invert(it(m)[0]),
144
- 1
144
+ 0
145
145
  )];
146
146
  d(H || l[l.length - 1]), F(m.clientY), Y(m.clientX), W?.(H || l[l.length - 1]);
147
147
  }, o = () => {
@@ -157,12 +157,12 @@ function lt(pe) {
157
157
  viewBox: `0 0 ${S} ${K}`,
158
158
  direction: "ltr",
159
159
  ref: se,
160
- children: /* @__PURE__ */ t.jsxs("g", { transform: `translate(${C.left},${C.top})`, children: [
160
+ children: /* @__PURE__ */ t.jsxs("g", { transform: `translate(${w.left},${w.top})`, children: [
161
161
  /* @__PURE__ */ t.jsx(
162
162
  Ge,
163
163
  {
164
164
  areaSettings: me,
165
- width: w,
165
+ width: v,
166
166
  height: V,
167
167
  scale: r,
168
168
  animate: a,
@@ -186,17 +186,17 @@ function lt(pe) {
186
186
  values: Ne.filter((e) => e !== 0),
187
187
  y: Ne.filter((e) => e !== 0).map((e) => c(e)),
188
188
  x1: 0 - O,
189
- x2: w + C.right,
189
+ x2: v + w.right,
190
190
  styles: {
191
- gridLines: v?.yAxis?.gridLines,
192
- labels: v?.yAxis?.labels
191
+ gridLines: b?.yAxis?.gridLines,
192
+ labels: b?.yAxis?.labels
193
193
  },
194
194
  classNames: {
195
195
  gridLines: p?.yAxis?.gridLines,
196
196
  labels: p?.yAxis?.labels
197
197
  },
198
198
  suffix: D,
199
- prefix: h,
199
+ prefix: x,
200
200
  labelType: "secondary",
201
201
  showGridLines: !0,
202
202
  labelPos: "vertical",
@@ -209,12 +209,12 @@ function lt(pe) {
209
209
  y1: c(i < 0 ? 0 : i),
210
210
  y2: c(i < 0 ? 0 : i),
211
211
  x1: 0 - O,
212
- x2: w + C.right,
212
+ x2: v + w.right,
213
213
  label: Se(
214
214
  i < 0 ? 0 : i,
215
215
  "NA",
216
216
  M,
217
- h,
217
+ x,
218
218
  D
219
219
  ),
220
220
  labelPos: {
@@ -228,8 +228,8 @@ function lt(pe) {
228
228
  label: p?.yAxis?.labels
229
229
  },
230
230
  styles: {
231
- axis: v?.xAxis?.axis,
232
- label: v?.yAxis?.labels
231
+ axis: b?.xAxis?.axis,
232
+ label: b?.yAxis?.labels
233
233
  }
234
234
  }
235
235
  ),
@@ -238,7 +238,7 @@ function lt(pe) {
238
238
  {
239
239
  x: 0 - O - 15,
240
240
  y: V / 2,
241
- style: v?.yAxis?.title,
241
+ style: b?.yAxis?.title,
242
242
  className: p?.yAxis?.title,
243
243
  text: oe,
244
244
  rotate90: !0
@@ -253,18 +253,18 @@ function lt(pe) {
253
253
  y1: 0,
254
254
  y2: V,
255
255
  styles: {
256
- gridLines: v?.xAxis?.gridLines,
257
- labels: v?.xAxis?.labels
256
+ gridLines: b?.xAxis?.gridLines,
257
+ labels: b?.xAxis?.labels
258
258
  },
259
259
  classNames: {
260
- gridLines: he("opacity-0", p?.xAxis?.gridLines),
261
- labels: he(
260
+ gridLines: xe("opacity-0", p?.xAxis?.gridLines),
261
+ labels: xe(
262
262
  "fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",
263
263
  p?.xAxis?.labels
264
264
  )
265
265
  },
266
266
  suffix: D,
267
- prefix: h,
267
+ prefix: x,
268
268
  labelType: "primary",
269
269
  showGridLines: !0,
270
270
  precision: M
@@ -278,10 +278,10 @@ function lt(pe) {
278
278
  exit: { opacity: 0, transition: { duration: a.duration } },
279
279
  variants: {
280
280
  initial: {
281
- opacity: g ? e[0].label === g.label ? 1 : j : I ? e[0].color && s[b.indexOf(e[0].color)] === I ? 1 : j : L.length !== 0 ? L.indexOf(e[0].label) !== -1 ? 1 : j : 1
281
+ opacity: g ? e[0].label === g.label ? 1 : j : I ? e[0].color && s[C.indexOf(e[0].color)] === I ? 1 : j : L.length !== 0 ? L.indexOf(e[0].label) !== -1 ? 1 : j : 1
282
282
  },
283
283
  whileInView: {
284
- opacity: g ? e[0].label === g.label ? 1 : j : I ? e[0].color && s[b.indexOf(e[0].color)] === I ? 1 : j : L.length !== 0 ? L.indexOf(e[0].label) !== -1 ? 1 : j : 1,
284
+ opacity: g ? e[0].label === g.label ? 1 : j : I ? e[0].color && s[C.indexOf(e[0].color)] === I ? 1 : j : L.length !== 0 ? L.indexOf(e[0].label) !== -1 ? 1 : j : 1,
285
285
  transition: { duration: a.duration }
286
286
  }
287
287
  },
@@ -292,7 +292,7 @@ function lt(pe) {
292
292
  E.path,
293
293
  {
294
294
  d: De(
295
- e.filter((o) => !x(o.y))
295
+ e.filter((o) => !h(o.y))
296
296
  ) || "",
297
297
  style: {
298
298
  fill: "none",
@@ -303,18 +303,18 @@ function lt(pe) {
303
303
  initial: {
304
304
  pathLength: 0,
305
305
  d: De(
306
- e.filter((o) => !x(o.y))
306
+ e.filter((o) => !h(o.y))
307
307
  ) || "",
308
308
  opacity: 1,
309
- stroke: n.filter((o) => o.color).length === 0 ? s[0] : e[0].color ? s[b.indexOf(e[0].color)] : T.gray
309
+ stroke: n.filter((o) => o.color).length === 0 ? s[0] : e[0].color ? s[C.indexOf(e[0].color)] : T.gray
310
310
  },
311
311
  whileInView: {
312
312
  pathLength: 1,
313
313
  d: De(
314
- e.filter((o) => !x(o.y))
314
+ e.filter((o) => !h(o.y))
315
315
  ) || "",
316
316
  opacity: 1,
317
- stroke: n.filter((o) => o.color).length === 0 ? s[0] : e[0].color ? s[b.indexOf(e[0].color)] : T.gray,
317
+ stroke: n.filter((o) => o.color).length === 0 ? s[0] : e[0].color ? s[C.indexOf(e[0].color)] : T.gray,
318
318
  transition: { duration: a.duration }
319
319
  }
320
320
  },
@@ -322,21 +322,21 @@ function lt(pe) {
322
322
  animate: y ? "whileInView" : "initial"
323
323
  }
324
324
  ),
325
- e.map((o, m) => /* @__PURE__ */ t.jsx(E.g, { children: x(o.y) ? null : /* @__PURE__ */ t.jsx(t.Fragment, { children: q ? /* @__PURE__ */ t.jsx(
325
+ e.map((o, m) => /* @__PURE__ */ t.jsx(E.g, { children: h(o.y) ? null : /* @__PURE__ */ t.jsx(t.Fragment, { children: q ? /* @__PURE__ */ t.jsx(
326
326
  E.circle,
327
327
  {
328
- r: w / e.length < 5 ? 0 : w / e.length < 20 ? 2 : 4,
328
+ r: v / e.length < 5 ? 0 : v / e.length < 20 ? 2 : 4,
329
329
  exit: { opacity: 0, transition: { duration: a.duration } },
330
330
  variants: {
331
331
  initial: {
332
332
  opacity: 0,
333
- fill: n.filter((H) => H.color).length === 0 ? s[0] : e[0].color ? s[b.indexOf(e[0].color)] : T.gray,
333
+ fill: n.filter((H) => H.color).length === 0 ? s[0] : e[0].color ? s[C.indexOf(e[0].color)] : T.gray,
334
334
  cx: r(o.date),
335
335
  cy: c(o.y)
336
336
  },
337
337
  whileInView: {
338
338
  opacity: 1,
339
- fill: n.filter((H) => H.color).length === 0 ? s[0] : e[0].color ? s[b.indexOf(e[0].color)] : T.gray,
339
+ fill: n.filter((H) => H.color).length === 0 ? s[0] : e[0].color ? s[C.indexOf(e[0].color)] : T.gray,
340
340
  transition: {
341
341
  duration: A ? a.duration : 0.5,
342
342
  delay: A ? 0 : a.duration
@@ -353,7 +353,7 @@ function lt(pe) {
353
353
  E.text,
354
354
  {
355
355
  style: {
356
- fill: n.filter((o) => o.color).length === 0 ? s[0] : e[0].color ? s[b.indexOf(e[0].color)] : T.gray
356
+ fill: n.filter((o) => o.color).length === 0 ? s[0] : e[0].color ? s[C.indexOf(e[0].color)] : T.gray
357
357
  },
358
358
  className: "text-sm font-bold",
359
359
  dx: 5,
@@ -389,17 +389,17 @@ function lt(pe) {
389
389
  {
390
390
  y: c(g.y) - 8,
391
391
  x: r(g.date),
392
- className: he("graph-value text-sm font-bold", p?.graphObjectValues),
392
+ className: xe("graph-value text-sm font-bold", p?.graphObjectValues),
393
393
  style: {
394
- fill: n.filter((e) => e.color).length === 0 ? s[0] : g.color ? s[b.indexOf(g.color)] : T.gray,
394
+ fill: n.filter((e) => e.color).length === 0 ? s[0] : g.color ? s[C.indexOf(g.color)] : T.gray,
395
395
  textAnchor: "middle",
396
- ...v?.graphObjectValues || {}
396
+ ...b?.graphObjectValues || {}
397
397
  },
398
- children: Se(g.y, Ce, M, h, D)
398
+ children: Se(g.y, Ce, M, x, D)
399
399
  }
400
400
  ) : null
401
401
  ] }),
402
- l.filter((e) => !x(e.y)).map((e, o) => /* @__PURE__ */ t.jsx("g", { children: /* @__PURE__ */ t.jsx(
402
+ l.filter((e) => !h(e.y)).map((e, o) => /* @__PURE__ */ t.jsx("g", { children: /* @__PURE__ */ t.jsx(
403
403
  "path",
404
404
  {
405
405
  d: ke.renderCell(
@@ -424,7 +424,7 @@ function lt(pe) {
424
424
  color: e.color,
425
425
  y: c(e.value),
426
426
  x1: 0 - O,
427
- x2: w + C.right,
427
+ x2: v + w.right,
428
428
  classNames: e.classNames,
429
429
  styles: e.styles,
430
430
  animate: a,
@@ -442,7 +442,7 @@ function lt(pe) {
442
442
  x: e.xCoordinate ? r(u(`${e.xCoordinate}`, f, /* @__PURE__ */ new Date())) : 0,
443
443
  y: e.yCoordinate ? c(e.yCoordinate) : 0
444
444
  },
445
- x(e.connectorRadius) ? 3.5 : e.connectorRadius
445
+ h(e.connectorRadius) ? 3.5 : e.connectorRadius
446
446
  ), H = e.showConnector ? {
447
447
  y1: m.y,
448
448
  x1: m.x,
@@ -450,12 +450,12 @@ function lt(pe) {
450
450
  x2: e.xCoordinate ? r(u(`${e.xCoordinate}`, f, /* @__PURE__ */ new Date())) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
451
451
  cy: e.yCoordinate ? c(e.yCoordinate) : 0,
452
452
  cx: e.xCoordinate ? r(u(`${e.xCoordinate}`, f, /* @__PURE__ */ new Date())) : 0,
453
- circleRadius: x(e.connectorRadius) ? 3.5 : e.connectorRadius,
453
+ circleRadius: h(e.connectorRadius) ? 3.5 : e.connectorRadius,
454
454
  strokeWidth: e.showConnector === !0 ? 2 : Math.min(e.showConnector || 0, 1)
455
455
  } : void 0, Le = {
456
456
  y: e.yCoordinate ? c(e.yCoordinate) + (e.yOffset || 0) - 8 : 0 + (e.yOffset || 0) - 8,
457
457
  x: ie ? 0 : e.xCoordinate ? r(u(`${e.xCoordinate}`, f, /* @__PURE__ */ new Date())) + (e.xOffset || 0) : 0 + (e.xOffset || 0),
458
- width: ie ? e.xCoordinate ? r(u(`${e.xCoordinate}`, f, /* @__PURE__ */ new Date())) + (e.xOffset || 0) : 0 + (e.xOffset || 0) : w - (e.xCoordinate ? r(u(`${e.xCoordinate}`, f, /* @__PURE__ */ new Date())) + (e.xOffset || 0) : 0 + (e.xOffset || 0)),
458
+ width: ie ? e.xCoordinate ? r(u(`${e.xCoordinate}`, f, /* @__PURE__ */ new Date())) + (e.xOffset || 0) : 0 + (e.xOffset || 0) : v + w.right - (e.xCoordinate ? r(u(`${e.xCoordinate}`, f, /* @__PURE__ */ new Date())) + (e.xOffset || 0) : 0 + (e.xOffset || 0)),
459
459
  maxWidth: e.maxWidth,
460
460
  fontWeight: e.fontWeight,
461
461
  align: e.align
@@ -486,7 +486,7 @@ function lt(pe) {
486
486
  body: ee,
487
487
  xPos: N,
488
488
  yPos: le,
489
- backgroundStyle: v?.tooltip,
489
+ backgroundStyle: b?.tooltip,
490
490
  className: p?.tooltip
491
491
  }
492
492
  ) : null
@@ -504,7 +504,7 @@ function Yt(pe) {
504
504
  prefix: de = "",
505
505
  graphDescription: B,
506
506
  height: D,
507
- width: h,
507
+ width: x,
508
508
  footNote: O,
509
509
  noOfXTicks: ee = 10,
510
510
  dateFormat: W = "yyyy",
@@ -524,8 +524,8 @@ function Yt(pe) {
524
524
  graphID: ae,
525
525
  minValue: re,
526
526
  maxValue: U,
527
- highlightedLines: v = [],
528
- graphDownload: b = !1,
527
+ highlightedLines: b = [],
528
+ graphDownload: C = !1,
529
529
  dataDownload: I = !1,
530
530
  animate: p = !1,
531
531
  language: R = "en",
@@ -547,22 +547,22 @@ function Yt(pe) {
547
547
  dimmedOpacity: Y = 0.3,
548
548
  precision: le = 2,
549
549
  customLayers: F = [],
550
- naLabel: C = "NA"
551
- } = pe, [X, ce] = G(0), [me, fe] = G(0), [w, V] = G(void 0), P = ge(null), xe = ge(null);
550
+ naLabel: w = "NA"
551
+ } = pe, [X, ce] = G(0), [me, fe] = G(0), [v, V] = G(void 0), P = ge(null), he = ge(null);
552
552
  return Me(() => {
553
553
  const i = new ResizeObserver((J) => {
554
- ce(h || J[0].target.clientWidth || 620), fe(D || J[0].target.clientHeight || 480);
554
+ ce(x || J[0].target.clientWidth || 620), fe(D || J[0].target.clientHeight || 480);
555
555
  });
556
- return P.current && (fe(P.current.clientHeight || 480), ce(P.current.clientWidth || 620), h || i.observe(P.current)), () => i.disconnect();
557
- }, [h, D]), /* @__PURE__ */ t.jsx(
556
+ return P.current && (fe(P.current.clientHeight || 480), ce(P.current.clientWidth || 620), x || i.observe(P.current)), () => i.disconnect();
557
+ }, [x, D]), /* @__PURE__ */ t.jsx(
558
558
  "div",
559
559
  {
560
- className: `${A || "light"} flex ${h ? "w-fit grow-0" : "w-full grow"}`,
560
+ className: `${A || "light"} flex ${x ? "w-fit grow-0" : "w-full grow"}`,
561
561
  dir: R === "he" || R === "ar" ? "rtl" : void 0,
562
562
  children: /* @__PURE__ */ t.jsx(
563
563
  "div",
564
564
  {
565
- className: he(
565
+ className: xe(
566
566
  `${k ? k === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${R || "en"}`,
567
567
  N?.graphContainer
568
568
  ),
@@ -571,7 +571,7 @@ function Yt(pe) {
571
571
  ...k && k !== !0 ? { backgroundColor: k } : {}
572
572
  },
573
573
  id: ae,
574
- ref: xe,
574
+ ref: he,
575
575
  "aria-label": Oe || `${S ? `The graph shows ${S}. ` : ""}This is a multi-line chart that shows trends over time.${B ? ` ${B}` : ""}`,
576
576
  children: /* @__PURE__ */ t.jsx(
577
577
  "div",
@@ -579,7 +579,7 @@ function Yt(pe) {
579
579
  className: "flex grow",
580
580
  style: { padding: k ? Q || "1rem" : Q || 0 },
581
581
  children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
582
- S || B || b || I ? /* @__PURE__ */ t.jsx(
582
+ S || B || C || I ? /* @__PURE__ */ t.jsx(
583
583
  rt,
584
584
  {
585
585
  styles: {
@@ -592,8 +592,8 @@ function Yt(pe) {
592
592
  },
593
593
  graphTitle: S,
594
594
  graphDescription: B,
595
- width: h,
596
- graphDownload: b ? xe.current : void 0,
595
+ width: x,
596
+ graphDownload: C ? he.current : void 0,
597
597
  dataDownload: I ? n.map((i) => i.data).filter((i) => i !== void 0).length > 0 ? n.map((i) => i.data).filter((i) => i !== void 0) : n.filter((i) => i !== void 0) : null
598
598
  }
599
599
  ) : null,
@@ -601,7 +601,7 @@ function Yt(pe) {
601
601
  ie && n.filter((i) => i.color).length !== 0 ? /* @__PURE__ */ t.jsx(
602
602
  st,
603
603
  {
604
- width: h,
604
+ width: x,
605
605
  colorLegendTitle: j,
606
606
  colors: s || T[A].categoricalColors.colors,
607
607
  colorDomain: f || ue(
@@ -612,15 +612,15 @@ function Yt(pe) {
612
612
  showNAColor: K
613
613
  }
614
614
  ) : null,
615
- /* @__PURE__ */ t.jsx("div", { className: "w-full grow leading-0", ref: P, "aria-label": "Graph area", children: (h || X) && (D || me) ? /* @__PURE__ */ t.jsx(
615
+ /* @__PURE__ */ t.jsx("div", { className: "w-full grow leading-0", ref: P, "aria-label": "Graph area", children: (x || X) && (D || me) ? /* @__PURE__ */ t.jsx(
616
616
  lt,
617
617
  {
618
618
  data: n,
619
619
  lineColors: n.filter((i) => i.color).length === 0 ? s ? [s] : [T.primaryColors["blue-600"]] : s || T[A].categoricalColors.colors,
620
- width: h || X,
620
+ width: x || X,
621
621
  height: Math.max(
622
622
  M,
623
- D || (q ? M ? (h || X) * q > M ? (h || X) * q : M : (h || X) * q : me)
623
+ D || (q ? M ? (x || X) * q > M ? (x || X) * q : M : (x || X) * q : me)
624
624
  ),
625
625
  dateFormat: W,
626
626
  noOfXTicks: ee,
@@ -636,7 +636,7 @@ function Yt(pe) {
636
636
  refValues: oe,
637
637
  minValue: re,
638
638
  maxValue: U,
639
- highlightedLines: v,
639
+ highlightedLines: b,
640
640
  animate: p === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : p || { duration: 0, once: !0, amount: 0 },
641
641
  rtl: R === "he" || R === "ar",
642
642
  strokeWidth: Ce,
@@ -650,7 +650,7 @@ function Yt(pe) {
650
650
  curveType: g,
651
651
  styles: d,
652
652
  classNames: N,
653
- selectedColor: w,
653
+ selectedColor: v,
654
654
  showLabels: ve,
655
655
  colorDomain: n.filter((i) => i.color).length === 0 ? [] : f || ue(
656
656
  n.filter((i) => i.color),
@@ -659,7 +659,7 @@ function Yt(pe) {
659
659
  dimmedOpacity: Y,
660
660
  precision: le,
661
661
  customLayers: F,
662
- naLabel: C
662
+ naLabel: w
663
663
  }
664
664
  ) : null })
665
665
  ] }) }),
@@ -673,7 +673,7 @@ function Yt(pe) {
673
673
  },
674
674
  sources: _,
675
675
  footNote: O,
676
- width: h
676
+ width: x
677
677
  }
678
678
  ) : null
679
679
  ] })