@undp/data-viz 1.4.12 → 1.4.14

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 (180) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +25 -24
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/BarGraph.cjs +1 -1
  6. package/dist/BarGraph.cjs.map +1 -1
  7. package/dist/BarGraph.js +638 -632
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.cjs.map +1 -1
  11. package/dist/BeeSwarmChart.js +134 -132
  12. package/dist/BeeSwarmChart.js.map +1 -1
  13. package/dist/BiVariateChoroplethMap.cjs +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  15. package/dist/BiVariateChoroplethMap.js +35 -34
  16. package/dist/BiVariateChoroplethMap.js.map +1 -1
  17. package/dist/BulletChart.cjs +1 -1
  18. package/dist/BulletChart.cjs.map +1 -1
  19. package/dist/BulletChart.js +226 -224
  20. package/dist/BulletChart.js.map +1 -1
  21. package/dist/ButterflyChart.cjs +1 -1
  22. package/dist/ButterflyChart.cjs.map +1 -1
  23. package/dist/ButterflyChart.js +48 -47
  24. package/dist/ButterflyChart.js.map +1 -1
  25. package/dist/ChoroplethMap.cjs +1 -1
  26. package/dist/ChoroplethMap.cjs.map +1 -1
  27. package/dist/ChoroplethMap.js +56 -55
  28. package/dist/ChoroplethMap.js.map +1 -1
  29. package/dist/CirclePackingGraph.cjs +1 -1
  30. package/dist/CirclePackingGraph.js +1 -1
  31. package/dist/DataCards.cjs +3 -3
  32. package/dist/DataCards.cjs.map +1 -1
  33. package/dist/DataCards.js +2 -1
  34. package/dist/DataCards.js.map +1 -1
  35. package/dist/DataTable.cjs +1 -1
  36. package/dist/DataTable.cjs.map +1 -1
  37. package/dist/DataTable.js +9 -8
  38. package/dist/DataTable.js.map +1 -1
  39. package/dist/DifferenceLineChart.cjs +1 -1
  40. package/dist/DifferenceLineChart.cjs.map +1 -1
  41. package/dist/DifferenceLineChart.js +1 -0
  42. package/dist/DifferenceLineChart.js.map +1 -1
  43. package/dist/DonutChart.cjs +1 -1
  44. package/dist/DonutChart.cjs.map +1 -1
  45. package/dist/DonutChart.js +77 -76
  46. package/dist/DonutChart.js.map +1 -1
  47. package/dist/DotDensityMap.cjs +1 -1
  48. package/dist/DotDensityMap.cjs.map +1 -1
  49. package/dist/DotDensityMap.js +1 -0
  50. package/dist/DotDensityMap.js.map +1 -1
  51. package/dist/{DropdownSelect-CeHog_ih.js → DropdownSelect-CtOKZHD0.js} +22 -20
  52. package/dist/{DropdownSelect-CeHog_ih.js.map → DropdownSelect-CtOKZHD0.js.map} +1 -1
  53. package/dist/{DropdownSelect-BmE5JaeE.cjs → DropdownSelect-DBDM64B5.cjs} +2 -2
  54. package/dist/{DropdownSelect-BmE5JaeE.cjs.map → DropdownSelect-DBDM64B5.cjs.map} +1 -1
  55. package/dist/DualAxisLineChart.cjs +1 -1
  56. package/dist/DualAxisLineChart.cjs.map +1 -1
  57. package/dist/DualAxisLineChart.d.ts +3 -1
  58. package/dist/DualAxisLineChart.js +265 -261
  59. package/dist/DualAxisLineChart.js.map +1 -1
  60. package/dist/DumbbellChart.cjs +1 -1
  61. package/dist/DumbbellChart.cjs.map +1 -1
  62. package/dist/DumbbellChart.js +216 -214
  63. package/dist/DumbbellChart.js.map +1 -1
  64. package/dist/GeoHubCompareMaps.cjs +1 -1
  65. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  66. package/dist/GeoHubCompareMaps.js +1 -0
  67. package/dist/GeoHubCompareMaps.js.map +1 -1
  68. package/dist/GeoHubMap.cjs +1 -1
  69. package/dist/GeoHubMap.cjs.map +1 -1
  70. package/dist/GeoHubMap.js +29 -28
  71. package/dist/GeoHubMap.js.map +1 -1
  72. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  73. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
  74. package/dist/GeoHubMapWithLayerSelection.js +34 -33
  75. package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
  76. package/dist/{GraphEl-s3ctz7oA.js → GraphEl-N6vuMRw_.js} +6 -2
  77. package/dist/GraphEl-N6vuMRw_.js.map +1 -0
  78. package/dist/GraphEl-Zl0W-LK9.cjs +2 -0
  79. package/dist/GraphEl-Zl0W-LK9.cjs.map +1 -0
  80. package/dist/GriddedGraphs.cjs +1 -1
  81. package/dist/GriddedGraphs.d.ts +1 -0
  82. package/dist/GriddedGraphs.js +2 -2
  83. package/dist/GriddedGraphsFromConfig.d.ts +1 -0
  84. package/dist/HeatMap.cjs +1 -1
  85. package/dist/HeatMap.cjs.map +1 -1
  86. package/dist/HeatMap.js +55 -54
  87. package/dist/HeatMap.js.map +1 -1
  88. package/dist/Histogram.cjs +1 -1
  89. package/dist/Histogram.js +1 -1
  90. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  91. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  92. package/dist/LineChartWithConfidenceInterval.js +22 -21
  93. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  94. package/dist/MultiGraphDashboard.cjs +1 -1
  95. package/dist/MultiGraphDashboard.d.ts +1 -0
  96. package/dist/MultiGraphDashboard.js +1 -1
  97. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
  98. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  99. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  100. package/dist/MultiLineAltChart.cjs +1 -1
  101. package/dist/MultiLineAltChart.cjs.map +1 -1
  102. package/dist/MultiLineAltChart.js +34 -33
  103. package/dist/MultiLineAltChart.js.map +1 -1
  104. package/dist/MultiLineChart.cjs +1 -1
  105. package/dist/MultiLineChart.cjs.map +1 -1
  106. package/dist/MultiLineChart.js +72 -71
  107. package/dist/MultiLineChart.js.map +1 -1
  108. package/dist/ParetoChart.cjs +1 -1
  109. package/dist/ParetoChart.cjs.map +1 -1
  110. package/dist/ParetoChart.d.ts +4 -0
  111. package/dist/ParetoChart.js +317 -312
  112. package/dist/ParetoChart.js.map +1 -1
  113. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  114. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
  115. package/dist/PerformanceIntensiveMultiGraphDashboard.js +1 -1
  116. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
  117. package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
  118. package/dist/RadarChart.cjs +1 -1
  119. package/dist/RadarChart.cjs.map +1 -1
  120. package/dist/RadarChart.js +27 -26
  121. package/dist/RadarChart.js.map +1 -1
  122. package/dist/SankeyChart.cjs +1 -1
  123. package/dist/SankeyChart.cjs.map +1 -1
  124. package/dist/SankeyChart.js +30 -29
  125. package/dist/SankeyChart.js.map +1 -1
  126. package/dist/ScatterPlot.cjs +1 -1
  127. package/dist/ScatterPlot.cjs.map +1 -1
  128. package/dist/ScatterPlot.js +119 -118
  129. package/dist/ScatterPlot.js.map +1 -1
  130. package/dist/ScrollStory.d.ts +1 -0
  131. package/dist/SimpleLineChart.cjs +1 -1
  132. package/dist/SimpleLineChart.cjs.map +1 -1
  133. package/dist/SimpleLineChart.js +16 -15
  134. package/dist/SimpleLineChart.js.map +1 -1
  135. package/dist/SingleGraphDashboard.cjs +1 -1
  136. package/dist/SingleGraphDashboard.d.ts +1 -0
  137. package/dist/SingleGraphDashboard.js +2 -2
  138. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
  139. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
  140. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
  141. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  142. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
  143. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  144. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
  145. package/dist/SlopeChart.cjs +1 -1
  146. package/dist/SlopeChart.cjs.map +1 -1
  147. package/dist/SlopeChart.js +46 -45
  148. package/dist/SlopeChart.js.map +1 -1
  149. package/dist/SparkLine.cjs +1 -1
  150. package/dist/SparkLine.cjs.map +1 -1
  151. package/dist/SparkLine.js +12 -11
  152. package/dist/SparkLine.js.map +1 -1
  153. package/dist/StripChart.cjs +1 -1
  154. package/dist/StripChart.cjs.map +1 -1
  155. package/dist/StripChart.js +81 -79
  156. package/dist/StripChart.js.map +1 -1
  157. package/dist/ThreeDGlobe.cjs +1 -1
  158. package/dist/ThreeDGlobe.cjs.map +1 -1
  159. package/dist/ThreeDGlobe.js +1 -0
  160. package/dist/ThreeDGlobe.js.map +1 -1
  161. package/dist/TreeMapGraph.cjs +1 -1
  162. package/dist/TreeMapGraph.cjs.map +1 -1
  163. package/dist/TreeMapGraph.js +114 -113
  164. package/dist/TreeMapGraph.js.map +1 -1
  165. package/dist/Types.d.ts +1 -0
  166. package/dist/UnitChart.cjs +1 -1
  167. package/dist/UnitChart.cjs.map +1 -1
  168. package/dist/UnitChart.js +10 -9
  169. package/dist/UnitChart.js.map +1 -1
  170. package/dist/{index-CZLvTu6p.cjs → index-BbNoLJ_w.cjs} +2 -2
  171. package/dist/{index-CZLvTu6p.cjs.map → index-BbNoLJ_w.cjs.map} +1 -1
  172. package/dist/{index-DGAaLNu9.js → index-Bc5VF70V.js} +46 -45
  173. package/dist/{index-DGAaLNu9.js.map → index-Bc5VF70V.js.map} +1 -1
  174. package/dist/index.cjs +1 -1
  175. package/dist/index.d.ts +8 -1
  176. package/dist/index.js +1 -1
  177. package/package.json +2 -2
  178. package/dist/GraphEl-OzC-icbr.cjs +0 -2
  179. package/dist/GraphEl-OzC-icbr.cjs.map +0 -1
  180. package/dist/GraphEl-s3ctz7oA.js.map +0 -1
@@ -1,227 +1,228 @@
1
- import { j as t, m as R } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
- import { useRef as di, useState as B, useEffect as wi } from "react";
3
- import { i as fi } from "./index-27yTRcko.js";
4
- import { X as ji } from "./Modal-DVVwpKhP.js";
5
- import { n as ni } from "./numberFormattingFunction-14YCbkN2.js";
6
- import { T as Ai } from "./Tooltip-DyM5snqx.js";
7
- import { s as Mi } from "./string2HTML-CWHGfz_d.js";
8
- import { c as hi } from "./checkIfNullOrUndefined-DmfiKkNw.js";
9
- import { A as ui } from "./Axis-Ddg-seDi.js";
10
- import { A as gi } from "./AxisTitle-BmHLMRJZ.js";
11
- import { X as Ni } from "./XAxesLabels-CaV2q-6H.js";
12
- import { b as ki } from "./band-BEjh2CHI.js";
13
- import { a as yi } from "./linear-DUdu7l2G.js";
14
- import { l as $i, c as Ci } from "./line-CPfhohvF.js";
15
- import { c as Ii, s as Li, a as Ti, m as Si } from "./step-BrDul-H4.js";
16
- import { u as Vi } from "./use-in-view-yS6jzJAp.js";
1
+ import { j as t, m as _ } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
+ import { useRef as fi, useState as W, useEffect as ji } from "react";
3
+ import { i as gi } from "./index-27yTRcko.js";
4
+ import { X as Ai } from "./Modal-DVVwpKhP.js";
5
+ import { n as oi } from "./numberFormattingFunction-14YCbkN2.js";
6
+ import { T as Mi } from "./Tooltip-DyM5snqx.js";
7
+ import { s as Ni } from "./string2HTML-CWHGfz_d.js";
8
+ import { c as di } from "./checkIfNullOrUndefined-DmfiKkNw.js";
9
+ import { A as pi } from "./Axis-Ddg-seDi.js";
10
+ import { A as yi } from "./AxisTitle-BmHLMRJZ.js";
11
+ import { X as ki } from "./XAxesLabels-CaV2q-6H.js";
12
+ import { b as Ci } from "./band-BEjh2CHI.js";
13
+ import { a as bi } from "./linear-DUdu7l2G.js";
14
+ import { l as $i, c as Li } from "./line-CPfhohvF.js";
15
+ import { c as Ii, s as Si, a as Ti, m as Vi } from "./step-BrDul-H4.js";
16
+ import { u as Oi } from "./use-in-view-yS6jzJAp.js";
17
17
  import { m as D } from "./proxy-CkpFesk1.js";
18
- import { A as Oi } from "./index-CNvov0eg.js";
19
- import { GraphFooter as Pi } from "./GraphFooter.js";
20
- import { GraphHeader as Di } from "./GraphHeader.js";
21
- import { ColorLegend as Yi } from "./ColorLegend.js";
22
- import { Colors as oi } from "./Colors.js";
23
- import { E as Hi } from "./EmptyState-DdTp-Mdn.js";
24
- function Xi(li) {
18
+ import { A as Pi } from "./index-CNvov0eg.js";
19
+ import { GraphFooter as Di } from "./GraphFooter.js";
20
+ import { GraphHeader as Yi } from "./GraphHeader.js";
21
+ import { ColorLegend as Hi } from "./ColorLegend.js";
22
+ import { Colors as ci } from "./Colors.js";
23
+ import { E as Xi } from "./EmptyState-DdTp-Mdn.js";
24
+ function Ei(mi) {
25
25
  const {
26
- data: L,
27
- width: A,
26
+ data: S,
27
+ width: N,
28
28
  height: Y,
29
29
  barColor: p,
30
- lineColor: u,
31
- axisTitles: s,
32
- sameAxes: y,
33
- rightMargin: z,
34
- leftMargin: _,
35
- topMargin: q,
36
- bottomMargin: ci,
30
+ lineColor: x,
31
+ axisTitles: a,
32
+ sameAxes: b,
33
+ rightMargin: q,
34
+ leftMargin: U,
35
+ topMargin: J,
36
+ bottomMargin: xi,
37
37
  tooltip: v,
38
- showValues: U,
38
+ showValues: K,
39
39
  onSeriesMouseOver: H,
40
- barPadding: mi,
41
- truncateBy: J,
42
- showLabels: K,
43
- onSeriesMouseClick: b,
44
- resetSelectionOnDoubleClick: Q,
45
- detailsOnClick: d,
46
- noOfTicks: Z,
47
- lineSuffix: ii,
48
- barSuffix: F,
49
- linePrefix: G,
50
- barPrefix: ti,
40
+ barPadding: hi,
41
+ truncateBy: Q,
42
+ showLabels: Z,
43
+ onSeriesMouseClick: w,
44
+ resetSelectionOnDoubleClick: ii,
45
+ detailsOnClick: h,
46
+ noOfTicks: ti,
47
+ lineSuffix: ei,
48
+ barSuffix: B,
49
+ linePrefix: F,
50
+ barPrefix: ai,
51
51
  curveType: X,
52
- styles: o,
53
- classNames: l,
54
- animate: r,
52
+ styles: n,
53
+ classNames: o,
54
+ animate: l,
55
55
  precision: E,
56
56
  customLayers: T,
57
- naLabel: M
58
- } = li, ei = di(null), N = Vi(ei, {
59
- once: r.once,
60
- amount: r.amount
61
- }), xi = X === "linear" ? Ci : X === "step" ? Ii : X === "stepAfter" ? Li : X === "stepBefore" ? Ti : Si, [ai, k] = B(void 0), [$, S] = B(void 0), [si, C] = B(void 0), [ri, x] = B(void 0), n = {
62
- top: q,
63
- bottom: ci,
64
- left: _ + 50,
65
- right: z + 65
66
- }, h = A - n.left - n.right, f = Y - n.top - n.bottom, a = L.map((i, j) => ({ ...i, id: `${j}` })), c = ki().domain(a.map((i) => `${i.id}`)).range([0, h]).paddingInner(mi), w = Math.min(...a.map((i) => i.bar).filter((i) => i != null)) !== 1 / 0 ? Math.min(...a.map((i) => i.bar).filter((i) => i != null)) > 0 ? 0 : Math.min(...a.map((i) => i.bar).filter((i) => i != null)) : 0, W = Math.min(...a.map((i) => i.line).filter((i) => i != null)) !== 1 / 0 ? Math.min(...a.map((i) => i.line).filter((i) => i != null)) > 0 ? 0 : Math.min(...a.map((i) => i.line).filter((i) => i != null)) : 0, V = Math.max(...a.map((i) => i.bar).filter((i) => i != null)) !== 1 / 0 ? Math.max(...a.map((i) => i.bar).filter((i) => i != null)) : 0, O = Math.max(...a.map((i) => i.line).filter((i) => i != null)) !== 1 / 0 ? Math.max(...a.map((i) => i.line).filter((i) => i != null)) : 0, I = w < W ? w : W, P = V > O ? V : O, e = yi().domain([
67
- y ? I : w,
68
- y ? P > 0 ? P : 0 : V > 0 ? V : 0
69
- ]).range([f, 0]).nice(), m = yi().domain([
70
- y ? I : W,
71
- y ? P > 0 ? P : 0 : O > 0 ? O : 0
72
- ]).range([f, 0]).nice(), pi = $i().defined((i) => !hi(i.line)).x((i) => c(`${i.id}`) + c.bandwidth() / 2).y((i) => m(i.line)).curve(xi), vi = e.ticks(Z), bi = m.ticks(Z);
57
+ naLabel: k,
58
+ showAxisLabels: si
59
+ } = mi, ri = fi(null), C = Oi(ri, {
60
+ once: l.once,
61
+ amount: l.amount
62
+ }), ui = X === "linear" ? Li : X === "step" ? Ii : X === "stepAfter" ? Si : X === "stepBefore" ? Ti : Vi, [li, $] = W(void 0), [L, V] = W(void 0), [ni, I] = W(void 0), [j, m] = W(void 0), u = {
63
+ top: J,
64
+ bottom: xi,
65
+ left: U + 50,
66
+ right: q + 65
67
+ }, d = N - u.left - u.right, f = Y - u.top - u.bottom, s = S.map((i, M) => ({ ...i, id: `${M}` })), c = Ci().domain(s.map((i) => `${i.id}`)).range([0, d]).paddingInner(hi), G = Math.min(...s.map((i) => i.bar).filter((i) => i != null)) !== 1 / 0 ? Math.min(...s.map((i) => i.bar).filter((i) => i != null)) > 0 ? 0 : Math.min(...s.map((i) => i.bar).filter((i) => i != null)) : 0, A = Math.min(...s.map((i) => i.line).filter((i) => i != null)) !== 1 / 0 ? Math.min(...s.map((i) => i.line).filter((i) => i != null)) > 0 ? 0 : Math.min(...s.map((i) => i.line).filter((i) => i != null)) : 0, O = Math.max(...s.map((i) => i.bar).filter((i) => i != null)) !== 1 / 0 ? Math.max(...s.map((i) => i.bar).filter((i) => i != null)) : 0, P = Math.max(...s.map((i) => i.line).filter((i) => i != null)) !== 1 / 0 ? Math.max(...s.map((i) => i.line).filter((i) => i != null)) : 0, R = G < A ? G : A, y = O > P ? O : P, r = bi().domain([
68
+ b ? R : G,
69
+ b ? y > 0 ? y : 0 : O > 0 ? O : 0
70
+ ]).range([f, 0]).nice(), e = bi().domain([
71
+ b ? R : A,
72
+ b ? y > 0 ? y : 0 : P > 0 ? P : 0
73
+ ]).range([f, 0]).nice(), z = $i().defined((i) => !di(i.line)).x((i) => c(`${i.id}`) + c.bandwidth() / 2).y((i) => e(i.line)).curve(ui), vi = r.ticks(ti), wi = e.ticks(ti);
73
74
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
74
75
  /* @__PURE__ */ t.jsx(
75
76
  D.svg,
76
77
  {
77
- width: `${A}px`,
78
+ width: `${N}px`,
78
79
  height: `${Y}px`,
79
- viewBox: `0 0 ${A} ${Y}`,
80
+ viewBox: `0 0 ${N} ${Y}`,
80
81
  direction: "ltr",
81
- ref: ei,
82
- children: /* @__PURE__ */ t.jsxs("g", { transform: `translate(${n.left},${n.top})`, children: [
82
+ ref: ri,
83
+ children: /* @__PURE__ */ t.jsxs("g", { transform: `translate(${u.left},${u.top})`, children: [
83
84
  /* @__PURE__ */ t.jsxs("g", { children: [
84
- vi.map((i, j) => /* @__PURE__ */ t.jsxs("g", { children: [
85
+ vi.map((i, M) => /* @__PURE__ */ t.jsxs("g", { children: [
85
86
  /* @__PURE__ */ t.jsx(
86
87
  "line",
87
88
  {
88
- y1: e(i),
89
- y2: e(i),
89
+ y1: r(i),
90
+ y2: r(i),
90
91
  x1: -15,
91
92
  x2: -20,
92
93
  style: {
93
94
  stroke: p,
94
95
  strokeWidth: 1,
95
- ...o?.yAxis?.gridLines || {}
96
+ ...n?.yAxis?.gridLines || {}
96
97
  },
97
- className: l?.yAxis?.gridLines
98
+ className: o?.yAxis?.gridLines
98
99
  }
99
100
  ),
100
101
  /* @__PURE__ */ t.jsx(
101
102
  "text",
102
103
  {
103
104
  x: -25,
104
- y: e(i),
105
+ y: r(i),
105
106
  dy: "0.33em",
106
- className: R("text-xs", l?.yAxis?.labels),
107
+ className: _("text-xs", o?.yAxis?.labels),
107
108
  style: {
108
109
  textAnchor: "end",
109
110
  fill: p,
110
- ...o?.yAxis?.labels || {}
111
+ ...n?.yAxis?.labels || {}
111
112
  },
112
- children: ni(i, M, E, ti, F)
113
+ children: oi(i, k, E, ai, B)
113
114
  }
114
115
  )
115
- ] }, j)),
116
+ ] }, M)),
116
117
  /* @__PURE__ */ t.jsx(
117
- ui,
118
+ pi,
118
119
  {
119
120
  y1: 0,
120
121
  y2: f,
121
122
  x1: -15,
122
123
  x2: -15,
123
- classNames: { axis: l?.xAxis?.axis },
124
- styles: { axis: { stroke: p, ...o?.xAxis?.axis || {} } }
124
+ classNames: { axis: o?.xAxis?.axis },
125
+ styles: { axis: { stroke: p, ...n?.xAxis?.axis || {} } }
125
126
  }
126
127
  ),
127
- /* @__PURE__ */ t.jsx(
128
- gi,
128
+ si ? /* @__PURE__ */ t.jsx(
129
+ yi,
129
130
  {
130
- x: 10 - n.left,
131
+ x: 10 - u.left,
131
132
  y: f / 2,
132
- style: { fill: p, ...o?.yAxis?.title || {} },
133
- className: l?.yAxis?.title,
134
- text: s[0].length > 100 ? `${s[0].substring(0, 100)}...` : s[0],
133
+ style: { fill: p, ...n?.yAxis?.title || {} },
134
+ className: o?.yAxis?.title,
135
+ text: a[0].length > 100 ? `${a[0].substring(0, 100)}...` : a[0],
135
136
  rotate90: !0
136
137
  }
137
- )
138
+ ) : null
138
139
  ] }),
139
140
  /* @__PURE__ */ t.jsxs("g", { children: [
140
- bi.map((i, j) => /* @__PURE__ */ t.jsxs("g", { children: [
141
+ wi.map((i, M) => /* @__PURE__ */ t.jsxs("g", { children: [
141
142
  /* @__PURE__ */ t.jsx(
142
143
  "line",
143
144
  {
144
- y1: m(i),
145
- y2: m(i),
146
- x1: h + 15,
147
- x2: h + 20,
145
+ y1: e(i),
146
+ y2: e(i),
147
+ x1: d + 15,
148
+ x2: d + 20,
148
149
  style: {
149
- stroke: u,
150
+ stroke: x,
150
151
  strokeWidth: 1,
151
- ...o?.yAxis?.gridLines || {}
152
+ ...n?.yAxis?.gridLines || {}
152
153
  },
153
- className: l?.yAxis?.gridLines
154
+ className: o?.yAxis?.gridLines
154
155
  }
155
156
  ),
156
157
  /* @__PURE__ */ t.jsx(
157
158
  "text",
158
159
  {
159
- x: h + 25,
160
- y: m(i),
160
+ x: d + 25,
161
+ y: e(i),
161
162
  dy: "0.33em",
162
163
  dx: -2,
163
164
  style: {
164
165
  textAnchor: "start",
165
- fill: u,
166
- ...o?.yAxis?.labels || {}
166
+ fill: x,
167
+ ...n?.yAxis?.labels || {}
167
168
  },
168
- className: R("text-xs", l?.yAxis?.labels),
169
- children: ni(i, M, E, G, ii)
169
+ className: _("text-xs", o?.yAxis?.labels),
170
+ children: oi(i, k, E, F, ei)
170
171
  }
171
172
  )
172
- ] }, j)),
173
+ ] }, M)),
173
174
  /* @__PURE__ */ t.jsx(
174
- ui,
175
+ pi,
175
176
  {
176
177
  y1: 0,
177
178
  y2: f,
178
- x1: h + 15,
179
- x2: h + 15,
180
- classNames: { axis: l?.xAxis?.axis },
181
- styles: { axis: { stroke: u, ...o?.xAxis?.axis || {} } }
179
+ x1: d + 15,
180
+ x2: d + 15,
181
+ classNames: { axis: o?.xAxis?.axis },
182
+ styles: { axis: { stroke: x, ...n?.xAxis?.axis || {} } }
182
183
  }
183
184
  ),
184
- /* @__PURE__ */ t.jsx(
185
- gi,
185
+ si ? /* @__PURE__ */ t.jsx(
186
+ yi,
186
187
  {
187
- x: h + n.right - 15,
188
+ x: d + u.right - 15,
188
189
  y: f / 2,
189
- style: { fill: u, ...o?.yAxis?.title || {} },
190
- className: l?.yAxis?.title,
191
- text: s[1].length > 100 ? `${s[1].substring(0, 100)}...` : s[1],
190
+ style: { fill: x, ...n?.yAxis?.title || {} },
191
+ className: o?.yAxis?.title,
192
+ text: a[1].length > 100 ? `${a[1].substring(0, 100)}...` : a[1],
192
193
  rotate90: !0
193
194
  }
194
- )
195
+ ) : null
195
196
  ] }),
196
197
  /* @__PURE__ */ t.jsx(
197
- ui,
198
+ pi,
198
199
  {
199
- y1: y ? e(0) : f,
200
- y2: y ? e(0) : f,
200
+ y1: b ? r(0) : f,
201
+ y2: b ? r(0) : f,
201
202
  x1: -15,
202
- x2: h + 15,
203
- classNames: { axis: l?.xAxis?.axis },
204
- styles: { axis: o?.xAxis?.axis }
203
+ x2: d + 15,
204
+ classNames: { axis: o?.xAxis?.axis },
205
+ styles: { axis: n?.xAxis?.axis }
205
206
  }
206
207
  ),
207
208
  T.filter((i) => i.position === "before").map((i) => i.layer),
208
- /* @__PURE__ */ t.jsxs(Oi, { children: [
209
- a.map((i, j) => /* @__PURE__ */ t.jsxs(
209
+ /* @__PURE__ */ t.jsxs(Pi, { children: [
210
+ s.map((i, M) => /* @__PURE__ */ t.jsxs(
210
211
  D.g,
211
212
  {
212
213
  className: "undp-viz-g-with-hover",
213
214
  opacity: 0.85,
214
215
  onMouseEnter: (g) => {
215
- k(i), x(g.clientY), C(g.clientX), H?.(i);
216
+ $(i), m(g.clientY), I(g.clientX), H?.(i);
216
217
  },
217
218
  onClick: () => {
218
- (b || d) && (fi($, i) && Q ? (S(void 0), b?.(void 0)) : (S(i), b?.(i)));
219
+ (w || h) && (gi(L, i) && ii ? (V(void 0), w?.(void 0)) : (V(i), w?.(i)));
219
220
  },
220
221
  onMouseMove: (g) => {
221
- k(i), x(g.clientY), C(g.clientX);
222
+ $(i), m(g.clientY), I(g.clientX);
222
223
  },
223
224
  onMouseLeave: () => {
224
- k(void 0), C(void 0), x(void 0), H?.(void 0);
225
+ $(void 0), I(void 0), m(void 0), H?.(void 0);
225
226
  },
226
227
  children: [
227
228
  /* @__PURE__ */ t.jsx(
@@ -229,75 +230,75 @@ function Xi(li) {
229
230
  {
230
231
  variants: {
231
232
  initial: {
232
- attrY: e(0),
233
+ attrY: r(0),
233
234
  height: 0,
234
235
  opacity: 1
235
236
  },
236
237
  whileInView: {
237
- attrY: i.bar ? i.bar > 0 ? e(i.bar) : e(0) : 0,
238
- height: i.bar ? Math.abs(e(i.bar) - e(0)) : 0,
238
+ attrY: i.bar ? i.bar > 0 ? r(i.bar) : r(0) : 0,
239
+ height: i.bar ? Math.abs(r(i.bar) - r(0)) : 0,
239
240
  opacity: 1,
240
- transition: { duration: r.duration }
241
+ transition: { duration: l.duration }
241
242
  }
242
243
  },
243
244
  initial: "initial",
244
- animate: N ? "whileInView" : "initial",
245
+ animate: C ? "whileInView" : "initial",
245
246
  exit: {
246
- attrY: e(0),
247
+ attrY: r(0),
247
248
  height: 0,
248
249
  opacity: 0,
249
- transition: { duration: r.duration }
250
+ transition: { duration: l.duration }
250
251
  },
251
- x: c(`${j}`),
252
+ x: c(`${M}`),
252
253
  width: c.bandwidth(),
253
254
  style: { fill: p }
254
255
  }
255
256
  ),
256
- U && !hi(i.bar) ? /* @__PURE__ */ t.jsx(
257
+ K && !di(i.bar) ? /* @__PURE__ */ t.jsx(
257
258
  D.text,
258
259
  {
259
260
  x: c(`${i.id}`) + c.bandwidth() / 2,
260
261
  exit: {
261
- attrY: e(0),
262
+ attrY: r(0),
262
263
  opacity: 0,
263
- transition: { duration: r.duration }
264
+ transition: { duration: l.duration }
264
265
  },
265
266
  variants: {
266
267
  initial: {
267
- attrY: e(0),
268
+ attrY: r(0),
268
269
  opacity: 0
269
270
  },
270
271
  whileInView: {
271
- attrY: e(i.bar || 0),
272
+ attrY: r(i.bar || 0),
272
273
  opacity: 1,
273
- transition: { duration: r.duration }
274
+ transition: { duration: l.duration }
274
275
  }
275
276
  },
276
277
  initial: "initial",
277
- animate: N ? "whileInView" : "initial",
278
+ animate: C ? "whileInView" : "initial",
278
279
  style: {
279
280
  fill: p,
280
281
  textAnchor: "middle",
281
- ...o?.graphObjectValues || {}
282
+ ...n?.graphObjectValues || {}
282
283
  },
283
- className: R("graph-value text-sm", l?.graphObjectValues),
284
+ className: _("graph-value text-sm", o?.graphObjectValues),
284
285
  dy: i.bar ? i.bar >= 0 ? "-5px" : "1em" : "-5px",
285
- children: ni(i.bar, M, E, ti, F)
286
+ children: oi(i.bar, k, E, ai, B)
286
287
  }
287
288
  ) : null,
288
- K ? /* @__PURE__ */ t.jsx(
289
- Ni,
289
+ Z ? /* @__PURE__ */ t.jsx(
290
+ ki,
290
291
  {
291
- value: `${i.label}`.length < J ? `${i.label}` : `${`${i.label}`.substring(0, J)}...`,
292
+ value: `${i.label}`.length < Q ? `${i.label}` : `${`${i.label}`.substring(0, Q)}...`,
292
293
  y: f + 5,
293
294
  x: c(`${i.id}`),
294
295
  width: c.bandwidth(),
295
- height: n.bottom,
296
- style: o?.xAxis?.labels,
297
- className: l?.xAxis?.labels,
296
+ height: u.bottom,
297
+ style: n?.xAxis?.labels,
298
+ className: o?.xAxis?.labels,
298
299
  alignment: "top",
299
- animate: r,
300
- isInView: N
300
+ animate: l,
301
+ isInView: C
301
302
  }
302
303
  ) : null
303
304
  ]
@@ -309,253 +310,256 @@ function Xi(li) {
309
310
  {
310
311
  exit: {
311
312
  opacity: 0,
312
- transition: { duration: r.duration }
313
+ transition: { duration: l.duration }
313
314
  },
314
315
  variants: {
315
316
  initial: {
316
- d: pi(a.map((i) => ({ ...i, line: 0 }))),
317
+ d: z(s.map((i) => ({ ...i, line: 0 }))),
317
318
  opacity: 0
318
319
  },
319
320
  whileInView: {
320
- d: pi(a),
321
+ d: z(s),
321
322
  opacity: 1,
322
- transition: { duration: r.duration }
323
+ transition: { duration: l.duration }
323
324
  }
324
325
  },
325
326
  initial: "initial",
326
- animate: N ? "whileInView" : "initial",
327
+ animate: C ? "whileInView" : "initial",
327
328
  style: {
328
- stroke: u,
329
+ stroke: x,
329
330
  fill: "none",
330
331
  strokeWidth: 2
331
332
  }
332
333
  }
333
334
  ),
334
- a.map((i, j) => /* @__PURE__ */ t.jsx("g", { children: hi(i.line) ? null : /* @__PURE__ */ t.jsxs(
335
+ s.map((i, M) => /* @__PURE__ */ t.jsx("g", { children: di(i.line) ? null : /* @__PURE__ */ t.jsxs(
335
336
  "g",
336
337
  {
337
338
  onMouseEnter: (g) => {
338
- k(i), x(g.clientY), C(g.clientX), H?.(i);
339
+ $(i), m(g.clientY), I(g.clientX), H?.(i);
339
340
  },
340
341
  onClick: () => {
341
- (b || d) && (fi($, i) && Q ? (S(void 0), b?.(void 0)) : (S(i), b?.(i)));
342
+ (w || h) && (gi(L, i) && ii ? (V(void 0), w?.(void 0)) : (V(i), w?.(i)));
342
343
  },
343
344
  onMouseMove: (g) => {
344
- k(i), x(g.clientY), C(g.clientX);
345
+ $(i), m(g.clientY), I(g.clientX);
345
346
  },
346
347
  onMouseLeave: () => {
347
- k(void 0), C(void 0), x(void 0), H?.(void 0);
348
+ $(void 0), I(void 0), m(void 0), H?.(void 0);
348
349
  },
349
350
  children: [
350
351
  /* @__PURE__ */ t.jsx(
351
352
  D.circle,
352
353
  {
353
354
  exit: {
354
- cy: m(0),
355
+ cy: e(0),
355
356
  opacity: 0,
356
- transition: { duration: r.duration }
357
+ transition: { duration: l.duration }
357
358
  },
358
359
  variants: {
359
360
  initial: {
360
- cy: m(0),
361
+ cy: e(0),
361
362
  opacity: 0
362
363
  },
363
364
  whileInView: {
364
- cy: m(i.line),
365
+ cy: e(i.line),
365
366
  opacity: 1,
366
- transition: { duration: r.duration }
367
+ transition: { duration: l.duration }
367
368
  }
368
369
  },
369
370
  initial: "initial",
370
- animate: N ? "whileInView" : "initial",
371
+ animate: C ? "whileInView" : "initial",
371
372
  cx: c(i.id) + c.bandwidth() / 2,
372
- r: h / a.length < 5 ? 0 : h / a.length < 20 ? 2 : 4,
373
- style: { fill: u }
373
+ r: d / s.length < 5 ? 0 : d / s.length < 20 ? 2 : 4,
374
+ style: { fill: x }
374
375
  }
375
376
  ),
376
- U ? /* @__PURE__ */ t.jsx(
377
+ K ? /* @__PURE__ */ t.jsx(
377
378
  D.text,
378
379
  {
379
380
  x: c(`${i.id}`) + c.bandwidth() / 2,
380
381
  exit: {
381
- y: m(0),
382
+ y: e(0),
382
383
  opacity: 0,
383
- transition: { duration: r.duration }
384
+ transition: { duration: l.duration }
384
385
  },
385
386
  style: {
386
- fill: u,
387
+ fill: x,
387
388
  textAnchor: "middle",
388
- ...o?.graphObjectValues || {}
389
+ ...n?.graphObjectValues || {}
389
390
  },
390
391
  variants: {
391
392
  initial: {
392
- y: m(0),
393
+ y: e(0),
393
394
  opacity: 0
394
395
  },
395
396
  whileInView: {
396
- y: m(i.line),
397
+ y: e(i.line),
397
398
  opacity: 1,
398
- transition: { duration: r.duration }
399
+ transition: { duration: l.duration }
399
400
  }
400
401
  },
401
402
  initial: "initial",
402
- animate: N ? "whileInView" : "initial",
403
- className: R("graph-value text-sm", l?.graphObjectValues),
403
+ animate: C ? "whileInView" : "initial",
404
+ className: _("graph-value text-sm", o?.graphObjectValues),
404
405
  dy: "-5px",
405
- children: ni(
406
+ children: oi(
406
407
  i.line,
407
- M,
408
+ k,
408
409
  E,
409
- G,
410
- ii
410
+ F,
411
+ ei
411
412
  )
412
413
  }
413
414
  ) : null
414
415
  ]
415
416
  }
416
- ) }, j))
417
+ ) }, M))
417
418
  ] }),
418
419
  T.filter((i) => i.position === "after").map((i) => i.layer)
419
420
  ] })
420
421
  }
421
422
  ),
422
- ai && v && si && ri ? /* @__PURE__ */ t.jsx(
423
- Ai,
423
+ li && v && ni && j ? /* @__PURE__ */ t.jsx(
424
+ Mi,
424
425
  {
425
- data: ai,
426
+ data: li,
426
427
  body: v,
427
- xPos: si,
428
- yPos: ri,
429
- backgroundStyle: o?.tooltip,
430
- className: l?.tooltip
428
+ xPos: ni,
429
+ yPos: j,
430
+ backgroundStyle: n?.tooltip,
431
+ className: o?.tooltip
431
432
  }
432
433
  ) : null,
433
- d && $ !== void 0 ? /* @__PURE__ */ t.jsx(
434
- ji,
434
+ h && L !== void 0 ? /* @__PURE__ */ t.jsx(
435
+ Ai,
435
436
  {
436
- open: $ !== void 0,
437
+ open: L !== void 0,
437
438
  onClose: () => {
438
- S(void 0);
439
+ V(void 0);
439
440
  },
440
441
  children: /* @__PURE__ */ t.jsx(
441
442
  "div",
442
443
  {
443
444
  className: "graph-modal-content m-0",
444
- dangerouslySetInnerHTML: typeof d == "string" ? { __html: Mi(d, $) } : void 0,
445
- children: typeof d == "function" ? d($) : null
445
+ dangerouslySetInnerHTML: typeof h == "string" ? { __html: Ni(h, L) } : void 0,
446
+ children: typeof h == "function" ? h(L) : null
446
447
  }
447
448
  )
448
449
  }
449
450
  ) : null
450
451
  ] });
451
452
  }
452
- function ct(li) {
453
+ function mt(mi) {
453
454
  const {
454
- data: L,
455
- graphTitle: A,
455
+ data: S,
456
+ graphTitle: N,
456
457
  sources: Y,
457
458
  graphDescription: p,
458
- height: u,
459
- width: s,
460
- footNote: y,
461
- padding: z,
462
- lineColor: _ = oi.light.categoricalColors.colors[1],
463
- barColor: q = oi.light.categoricalColors.colors[0],
464
- sameAxes: ci = !1,
459
+ height: x,
460
+ width: a,
461
+ footNote: b,
462
+ padding: q,
463
+ lineColor: U = ci.light.categoricalColors.colors[1],
464
+ barColor: J = ci.light.categoricalColors.colors[0],
465
+ sameAxes: xi = !1,
465
466
  backgroundColor: v = !1,
466
- leftMargin: U = 80,
467
+ leftMargin: K = 80,
467
468
  rightMargin: H = 80,
468
- topMargin: mi = 20,
469
- bottomMargin: J = 25,
470
- lineAxisTitle: K = "Line chart",
471
- barAxisTitle: b = "Bar graph",
472
- tooltip: Q,
473
- relativeHeight: d,
474
- onSeriesMouseOver: Z,
475
- graphID: ii,
476
- graphDownload: F = !1,
477
- dataDownload: G = !1,
478
- barPadding: ti = 0.25,
469
+ topMargin: hi = 20,
470
+ bottomMargin: Q = 25,
471
+ lineAxisTitle: Z = "Line chart",
472
+ barAxisTitle: w = "Bar graph",
473
+ tooltip: ii,
474
+ relativeHeight: h,
475
+ onSeriesMouseOver: ti,
476
+ graphID: ei,
477
+ graphDownload: B = !1,
478
+ dataDownload: F = !1,
479
+ barPadding: ai = 0.25,
479
480
  truncateBy: X = 999,
480
- showLabels: o = !0,
481
- onSeriesMouseClick: l,
482
- language: r = "en",
481
+ showLabels: n = !0,
482
+ onSeriesMouseClick: o,
483
+ language: l = "en",
483
484
  colorLegendTitle: E,
484
485
  minHeight: T = 0,
485
- theme: M = "light",
486
- ariaLabel: ei,
487
- resetSelectionOnDoubleClick: N = !0,
488
- detailsOnClick: xi,
489
- showValues: ai = !0,
490
- noOfTicks: k = 5,
486
+ theme: k = "light",
487
+ ariaLabel: si,
488
+ resetSelectionOnDoubleClick: ri = !0,
489
+ detailsOnClick: C,
490
+ showValues: ui = !0,
491
+ noOfTicks: li = 5,
491
492
  lineSuffix: $ = "",
492
- barSuffix: S = "",
493
- linePrefix: si = "",
494
- barPrefix: C = "",
495
- curveType: ri = "curve",
496
- styles: x,
497
- classNames: n,
498
- animate: h = !1,
499
- precision: f = 2,
500
- customLayers: a = [],
501
- naLabel: c = "NA"
502
- } = li, [w, W] = B(0), [V, O] = B(0), I = di(null), P = di(null);
503
- return wi(() => {
504
- const e = new ResizeObserver((m) => {
505
- W(s || m[0].target.clientWidth || 620), O(u || m[0].target.clientHeight || 480);
493
+ barSuffix: L = "",
494
+ linePrefix: V = "",
495
+ barPrefix: ni = "",
496
+ curveType: I = "curve",
497
+ styles: j,
498
+ classNames: m,
499
+ animate: u = !1,
500
+ precision: d = 2,
501
+ customLayers: f = [],
502
+ naLabel: s = "NA",
503
+ showColorScale: c = !0,
504
+ showAxisLabels: G = !0
505
+ } = mi, [A, O] = W(0), [P, R] = W(0), y = fi(null), r = fi(null);
506
+ return ji(() => {
507
+ const e = new ResizeObserver((z) => {
508
+ O(a || z[0].target.clientWidth || 620), R(x || z[0].target.clientHeight || 480);
506
509
  });
507
- return I.current && (O(I.current.clientHeight || 480), W(I.current.clientWidth || 620), s || e.observe(I.current)), () => e.disconnect();
508
- }, [s, u]), /* @__PURE__ */ t.jsx(
510
+ return y.current && (R(y.current.clientHeight || 480), O(y.current.clientWidth || 620), a || e.observe(y.current)), () => e.disconnect();
511
+ }, [a, x]), /* @__PURE__ */ t.jsx(
509
512
  "div",
510
513
  {
511
- className: `${M || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
512
- dir: r === "he" || r === "ar" ? "rtl" : void 0,
514
+ className: `${k || "light"} flex ${a ? "w-fit grow-0" : "w-full grow"}`,
515
+ dir: l === "he" || l === "ar" ? "rtl" : void 0,
513
516
  children: /* @__PURE__ */ t.jsx(
514
517
  "div",
515
518
  {
516
- className: R(
517
- `${v ? v === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${r || "en"}`,
518
- n?.graphContainer
519
+ className: _(
520
+ `${v ? v === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${l || "en"}`,
521
+ a ? "w-fit" : "w-full",
522
+ m?.graphContainer
519
523
  ),
520
524
  style: {
521
- ...x?.graphContainer || {},
525
+ ...j?.graphContainer || {},
522
526
  ...v && v !== !0 ? { backgroundColor: v } : {}
523
527
  },
524
- id: ii,
525
- ref: P,
526
- "aria-label": ei || `${A ? `The graph shows ${A}. ` : ""}This is a pareto chart that shows a variable as bars and another as line chart.${p ? ` ${p}` : ""}`,
528
+ id: ei,
529
+ ref: r,
530
+ "aria-label": si || `${N ? `The graph shows ${N}. ` : ""}This is a pareto chart that shows a variable as bars and another as line chart.${p ? ` ${p}` : ""}`,
527
531
  children: /* @__PURE__ */ t.jsx(
528
532
  "div",
529
533
  {
530
534
  className: "flex grow",
531
- style: { padding: v ? z || "1rem" : z || 0 },
535
+ style: { padding: v ? q || "1rem" : q || 0 },
532
536
  children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
533
- A || p || F || G ? /* @__PURE__ */ t.jsx(
534
- Di,
537
+ N || p || B || F ? /* @__PURE__ */ t.jsx(
538
+ Yi,
535
539
  {
536
540
  styles: {
537
- title: x?.title,
538
- description: x?.description
541
+ title: j?.title,
542
+ description: j?.description
539
543
  },
540
544
  classNames: {
541
- title: n?.title,
542
- description: n?.description
545
+ title: m?.title,
546
+ description: m?.description
543
547
  },
544
- graphTitle: A,
548
+ graphTitle: N,
545
549
  graphDescription: p,
546
- width: s,
547
- graphDownload: F ? P.current : void 0,
548
- dataDownload: G ? L.map((e) => e.data).filter((e) => e !== void 0).length > 0 ? L.map((e) => e.data).filter((e) => e !== void 0) : L.filter((e) => e !== void 0) : null
550
+ width: a,
551
+ graphDownload: B ? r.current : void 0,
552
+ dataDownload: F ? S.map((e) => e.data).filter((e) => e !== void 0).length > 0 ? S.map((e) => e.data).filter((e) => e !== void 0) : S.filter((e) => e !== void 0) : null
549
553
  }
550
554
  ) : null,
551
- /* @__PURE__ */ t.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: L.length === 0 ? /* @__PURE__ */ t.jsx(Hi, {}) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
552
- /* @__PURE__ */ t.jsx(
553
- Yi,
555
+ /* @__PURE__ */ t.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: S.length === 0 ? /* @__PURE__ */ t.jsx(Xi, {}) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
556
+ c ? null : /* @__PURE__ */ t.jsx(
557
+ Hi,
554
558
  {
555
- colorDomain: [b, K],
559
+ colorDomain: [w, Z],
556
560
  colors: [
557
- q || oi[M].categoricalColors.colors[0],
558
- _ || oi[M].categoricalColors.colors[1]
561
+ J || ci[k].categoricalColors.colors[0],
562
+ U || ci[k].categoricalColors.colors[1]
559
563
  ],
560
564
  colorLegendTitle: E,
561
565
  showNAColor: !1
@@ -565,62 +569,63 @@ function ct(li) {
565
569
  "div",
566
570
  {
567
571
  className: "flex flex-col grow justify-center leading-0",
568
- ref: I,
572
+ ref: y,
569
573
  "aria-label": "Graph area",
570
- children: (s || w) && (u || V) ? /* @__PURE__ */ t.jsx(
571
- Xi,
574
+ children: (a || A) && (x || P) ? /* @__PURE__ */ t.jsx(
575
+ Ei,
572
576
  {
573
- data: L,
574
- sameAxes: ci,
575
- lineColor: _,
576
- barColor: q,
577
- width: s || w,
577
+ data: S,
578
+ sameAxes: xi,
579
+ lineColor: U,
580
+ barColor: J,
581
+ width: a || A,
578
582
  height: Math.max(
579
583
  T,
580
- u || (d ? T ? (s || w) * d > T ? (s || w) * d : T : (s || w) * d : V)
584
+ x || (h ? T ? (a || A) * h > T ? (a || A) * h : T : (a || A) * h : P)
581
585
  ),
582
586
  truncateBy: X,
583
- leftMargin: U,
587
+ leftMargin: K,
584
588
  rightMargin: H,
585
- topMargin: mi,
586
- bottomMargin: J,
587
- axisTitles: [b, K],
588
- tooltip: Q,
589
- onSeriesMouseOver: Z,
590
- barPadding: ti,
591
- showLabels: o,
592
- onSeriesMouseClick: l,
593
- resetSelectionOnDoubleClick: N,
594
- detailsOnClick: xi,
595
- noOfTicks: k,
589
+ topMargin: hi,
590
+ bottomMargin: Q,
591
+ axisTitles: [w, Z],
592
+ tooltip: ii,
593
+ onSeriesMouseOver: ti,
594
+ barPadding: ai,
595
+ showLabels: n,
596
+ onSeriesMouseClick: o,
597
+ resetSelectionOnDoubleClick: ri,
598
+ detailsOnClick: C,
599
+ noOfTicks: li,
596
600
  lineSuffix: $,
597
- barSuffix: S,
598
- linePrefix: si,
599
- barPrefix: C,
600
- curveType: ri,
601
- showValues: ai,
602
- styles: x,
603
- classNames: n,
604
- animate: h === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : h || { duration: 0, once: !0, amount: 0 },
605
- precision: f,
606
- customLayers: a,
607
- naLabel: c
601
+ barSuffix: L,
602
+ linePrefix: V,
603
+ barPrefix: ni,
604
+ curveType: I,
605
+ showValues: ui,
606
+ styles: j,
607
+ classNames: m,
608
+ animate: u === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : u || { duration: 0, once: !0, amount: 0 },
609
+ precision: d,
610
+ customLayers: f,
611
+ naLabel: s,
612
+ showAxisLabels: G
608
613
  }
609
614
  ) : null
610
615
  }
611
616
  )
612
617
  ] }) }),
613
- Y || y ? /* @__PURE__ */ t.jsx(
614
- Pi,
618
+ Y || b ? /* @__PURE__ */ t.jsx(
619
+ Di,
615
620
  {
616
- styles: { footnote: x?.footnote, source: x?.source },
621
+ styles: { footnote: j?.footnote, source: j?.source },
617
622
  classNames: {
618
- footnote: n?.footnote,
619
- source: n?.source
623
+ footnote: m?.footnote,
624
+ source: m?.source
620
625
  },
621
626
  sources: Y,
622
- footNote: y,
623
- width: s
627
+ footNote: b,
628
+ width: a
624
629
  }
625
630
  ) : null
626
631
  ] })
@@ -632,6 +637,6 @@ function ct(li) {
632
637
  );
633
638
  }
634
639
  export {
635
- ct as ParetoChart
640
+ mt as ParetoChart
636
641
  };
637
642
  //# sourceMappingURL=ParetoChart.js.map