@undp/data-viz 1.5.2 → 1.5.4

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 (244) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +3 -2
  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 +1196 -1224
  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 +130 -142
  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 +41 -41
  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 +484 -488
  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 +99 -99
  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 +125 -125
  28. package/dist/ChoroplethMap.js.map +1 -1
  29. package/dist/CirclePackingGraph.cjs +1 -1
  30. package/dist/CirclePackingGraph.js +2 -2
  31. package/dist/DataCards.cjs +2 -2
  32. package/dist/DataCards.cjs.map +1 -1
  33. package/dist/DataCards.js +6 -6
  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 +66 -68
  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 +3 -2
  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 +205 -205
  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 +78 -81
  50. package/dist/DotDensityMap.js.map +1 -1
  51. package/dist/DualAxisLineChart.cjs +1 -1
  52. package/dist/DualAxisLineChart.cjs.map +1 -1
  53. package/dist/DualAxisLineChart.js +3 -2
  54. package/dist/DualAxisLineChart.js.map +1 -1
  55. package/dist/DumbbellChart.cjs +1 -1
  56. package/dist/DumbbellChart.cjs.map +1 -1
  57. package/dist/DumbbellChart.js +66 -67
  58. package/dist/DumbbellChart.js.map +1 -1
  59. package/dist/GeoHubMap.cjs +1 -1
  60. package/dist/GeoHubMap.js +1 -1
  61. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  62. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  63. package/dist/{GraphEl-4RUlclvW.cjs → GraphEl-BcYgMnN2.cjs} +2 -2
  64. package/dist/{GraphEl-4RUlclvW.cjs.map → GraphEl-BcYgMnN2.cjs.map} +1 -1
  65. package/dist/{GraphEl-ClIxlWa3.js → GraphEl-CMWeARJ3.js} +2 -2
  66. package/dist/{GraphEl-ClIxlWa3.js.map → GraphEl-CMWeARJ3.js.map} +1 -1
  67. package/dist/GriddedGraphs.cjs +1 -1
  68. package/dist/GriddedGraphs.js +4 -4
  69. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  70. package/dist/GriddedGraphsFromConfig.js +1 -1
  71. package/dist/HeatMap.cjs +1 -1
  72. package/dist/HeatMap.cjs.map +1 -1
  73. package/dist/HeatMap.js +83 -83
  74. package/dist/HeatMap.js.map +1 -1
  75. package/dist/Histogram.cjs +1 -1
  76. package/dist/Histogram.js +1 -1
  77. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  78. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  79. package/dist/LineChartWithConfidenceInterval.js +7 -6
  80. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  81. package/dist/MultiGraphDashboard.cjs +1 -1
  82. package/dist/MultiGraphDashboard.js +2 -2
  83. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  84. package/dist/MultiGraphDashboardFromConfig.js +1 -1
  85. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  86. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  87. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  88. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
  89. package/dist/MultiLineAltChart.cjs +1 -1
  90. package/dist/MultiLineAltChart.cjs.map +1 -1
  91. package/dist/MultiLineAltChart.js +82 -91
  92. package/dist/MultiLineAltChart.js.map +1 -1
  93. package/dist/MultiLineChart.cjs +1 -1
  94. package/dist/MultiLineChart.cjs.map +1 -1
  95. package/dist/MultiLineChart.js +3 -2
  96. package/dist/MultiLineChart.js.map +1 -1
  97. package/dist/ParetoChart.cjs +1 -1
  98. package/dist/ParetoChart.js +1 -1
  99. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  100. package/dist/PerformanceIntensiveMultiGraphDashboard.js +2 -2
  101. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  102. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
  103. package/dist/RadarChart.cjs +1 -1
  104. package/dist/RadarChart.cjs.map +1 -1
  105. package/dist/RadarChart.js +124 -130
  106. package/dist/RadarChart.js.map +1 -1
  107. package/dist/SankeyChart.cjs +1 -1
  108. package/dist/SankeyChart.cjs.map +1 -1
  109. package/dist/SankeyChart.js +200 -200
  110. package/dist/SankeyChart.js.map +1 -1
  111. package/dist/ScatterPlot.cjs +1 -1
  112. package/dist/ScatterPlot.cjs.map +1 -1
  113. package/dist/ScatterPlot.js +149 -155
  114. package/dist/ScatterPlot.js.map +1 -1
  115. package/dist/SimpleLineChart.cjs +1 -1
  116. package/dist/SimpleLineChart.cjs.map +1 -1
  117. package/dist/SimpleLineChart.js +44 -43
  118. package/dist/SimpleLineChart.js.map +1 -1
  119. package/dist/SingleGraphDashboard.cjs +1 -1
  120. package/dist/SingleGraphDashboard.js +4 -4
  121. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  122. package/dist/SingleGraphDashboardFromConfig.js +1 -1
  123. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  124. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
  125. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  126. package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
  127. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  128. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
  129. package/dist/SlopeChart.cjs +1 -1
  130. package/dist/SlopeChart.cjs.map +1 -1
  131. package/dist/SlopeChart.js +107 -113
  132. package/dist/SlopeChart.js.map +1 -1
  133. package/dist/SparkLine.cjs +1 -1
  134. package/dist/SparkLine.cjs.map +1 -1
  135. package/dist/SparkLine.js +3 -2
  136. package/dist/SparkLine.js.map +1 -1
  137. package/dist/StripChart.cjs +1 -1
  138. package/dist/StripChart.cjs.map +1 -1
  139. package/dist/StripChart.js +159 -159
  140. package/dist/StripChart.js.map +1 -1
  141. package/dist/ThreeDGlobe.cjs +1 -1
  142. package/dist/ThreeDGlobe.cjs.map +1 -1
  143. package/dist/ThreeDGlobe.js +3 -3
  144. package/dist/ThreeDGlobe.js.map +1 -1
  145. package/dist/TreeMapGraph.cjs +1 -1
  146. package/dist/TreeMapGraph.cjs.map +1 -1
  147. package/dist/TreeMapGraph.js +194 -200
  148. package/dist/TreeMapGraph.js.map +1 -1
  149. package/dist/XAxesLabels-Drf7M3YK.cjs +2 -0
  150. package/dist/XAxesLabels-Drf7M3YK.cjs.map +1 -0
  151. package/dist/{XAxesLabels-CaV2q-6H.js → XAxesLabels-loO78vUO.js} +19 -19
  152. package/dist/XAxesLabels-loO78vUO.js.map +1 -0
  153. package/dist/YAxesLabels-CctDydGR.cjs +2 -0
  154. package/dist/YAxesLabels-CctDydGR.cjs.map +1 -0
  155. package/dist/{YAxesLabels-CPGZjmZJ.js → YAxesLabels-DSm6I5zG.js} +16 -17
  156. package/dist/YAxesLabels-DSm6I5zG.js.map +1 -0
  157. package/dist/ensureCompleteData-DkQYPeDa.cjs +2 -0
  158. package/dist/ensureCompleteData-DkQYPeDa.cjs.map +1 -0
  159. package/dist/{ensureCompleteData-BALdOrsS.js → ensureCompleteData-DlmibgaI.js} +28 -8
  160. package/dist/ensureCompleteData-DlmibgaI.js.map +1 -0
  161. package/dist/fetchAndParseData-Ba-_CgxS.cjs +16 -0
  162. package/dist/fetchAndParseData-Ba-_CgxS.cjs.map +1 -0
  163. package/dist/fetchAndParseData-sapWbnYk.js +583 -0
  164. package/dist/fetchAndParseData-sapWbnYk.js.map +1 -0
  165. package/dist/fetchAndParseData.cjs +1 -1
  166. package/dist/fetchAndParseData.js +1 -1
  167. package/dist/getJenks-BbngDoBQ.js +19 -0
  168. package/dist/getJenks-BbngDoBQ.js.map +1 -0
  169. package/dist/getJenks-GYmdwBqm.cjs +2 -0
  170. package/dist/getJenks-GYmdwBqm.cjs.map +1 -0
  171. package/dist/getSliderMarks-9cNoRkDx.js +1023 -0
  172. package/dist/getSliderMarks-9cNoRkDx.js.map +1 -0
  173. package/dist/getSliderMarks-CRIbTGYV.cjs +6 -0
  174. package/dist/getSliderMarks-CRIbTGYV.cjs.map +1 -0
  175. package/dist/getUniqValue-DiCh_MOD.js +13 -0
  176. package/dist/getUniqValue-DiCh_MOD.js.map +1 -0
  177. package/dist/getUniqValue-RViz8tTw.cjs +2 -0
  178. package/dist/getUniqValue-RViz8tTw.cjs.map +1 -0
  179. package/dist/{index-BMgDMxKJ.js → index-37q0ULNQ.js} +44 -50
  180. package/dist/index-37q0ULNQ.js.map +1 -0
  181. package/dist/index-CVlCtJbC.cjs +2 -0
  182. package/dist/index-CVlCtJbC.cjs.map +1 -0
  183. package/dist/index.cjs +1 -1
  184. package/dist/index.d.ts +1 -1
  185. package/dist/index.js +6 -6
  186. package/dist/sort-DfK1b0F5.js +34 -0
  187. package/dist/sort-DfK1b0F5.js.map +1 -0
  188. package/dist/sort-O96oMZLb.cjs +2 -0
  189. package/dist/sort-O96oMZLb.cjs.map +1 -0
  190. package/dist/transformData.cjs +1 -1
  191. package/dist/transformData.js +3 -3
  192. package/dist/transformDataForAggregation-KXGm6flX.cjs +2 -0
  193. package/dist/{transformDataForAggregation-BVxVu4yY.cjs.map → transformDataForAggregation-KXGm6flX.cjs.map} +1 -1
  194. package/dist/{transformDataForAggregation-1BYVFqvF.js → transformDataForAggregation-sBpdlX8n.js} +40 -44
  195. package/dist/{transformDataForAggregation-1BYVFqvF.js.map → transformDataForAggregation-sBpdlX8n.js.map} +1 -1
  196. package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js → transformDataForGraphFromFile-ComYvzuz.js} +3 -3
  197. package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js.map → transformDataForGraphFromFile-ComYvzuz.js.map} +1 -1
  198. package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs → transformDataForGraphFromFile-DVZodTHd.cjs} +2 -2
  199. package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs.map → transformDataForGraphFromFile-DVZodTHd.cjs.map} +1 -1
  200. package/dist/uniqBy-BHy4I8PK.js +8 -0
  201. package/dist/uniqBy-BHy4I8PK.js.map +1 -0
  202. package/dist/uniqBy-O05lp2S5.cjs +2 -0
  203. package/dist/uniqBy-O05lp2S5.cjs.map +1 -0
  204. package/dist/utils.cjs +1 -1
  205. package/dist/utils.d.ts +1 -1
  206. package/dist/utils.js +2 -2
  207. package/package.json +1 -7
  208. package/dist/XAxesLabels-CaV2q-6H.js.map +0 -1
  209. package/dist/XAxesLabels-OjBNl_lS.cjs +0 -2
  210. package/dist/XAxesLabels-OjBNl_lS.cjs.map +0 -1
  211. package/dist/YAxesLabels-CPGZjmZJ.js.map +0 -1
  212. package/dist/YAxesLabels-D8IydyZj.cjs +0 -2
  213. package/dist/YAxesLabels-D8IydyZj.cjs.map +0 -1
  214. package/dist/ensureCompleteData-BALdOrsS.js.map +0 -1
  215. package/dist/ensureCompleteData-BU5Zlccy.cjs +0 -2
  216. package/dist/ensureCompleteData-BU5Zlccy.cjs.map +0 -1
  217. package/dist/fetchAndParseData-DBOl1Icl.js +0 -1196
  218. package/dist/fetchAndParseData-DBOl1Icl.js.map +0 -1
  219. package/dist/fetchAndParseData-Dcy7AS_0.cjs +0 -16
  220. package/dist/fetchAndParseData-Dcy7AS_0.cjs.map +0 -1
  221. package/dist/getJenks-DW96UYNE.js +0 -23
  222. package/dist/getJenks-DW96UYNE.js.map +0 -1
  223. package/dist/getJenks-vofIZmeb.cjs +0 -2
  224. package/dist/getJenks-vofIZmeb.cjs.map +0 -1
  225. package/dist/getSliderMarks-C0jptXeP.js +0 -1054
  226. package/dist/getSliderMarks-C0jptXeP.js.map +0 -1
  227. package/dist/getSliderMarks-CtsEXiLV.cjs +0 -6
  228. package/dist/getSliderMarks-CtsEXiLV.cjs.map +0 -1
  229. package/dist/getUniqValue-CfuE_l9c.cjs +0 -2
  230. package/dist/getUniqValue-CfuE_l9c.cjs.map +0 -1
  231. package/dist/getUniqValue-CttuU_wn.js +0 -20
  232. package/dist/getUniqValue-CttuU_wn.js.map +0 -1
  233. package/dist/index-AqnpA7_O.js +0 -631
  234. package/dist/index-AqnpA7_O.js.map +0 -1
  235. package/dist/index-BJOeaYTk.cjs +0 -2
  236. package/dist/index-BJOeaYTk.cjs.map +0 -1
  237. package/dist/index-BMgDMxKJ.js.map +0 -1
  238. package/dist/index-DYH8g9WA.cjs +0 -2
  239. package/dist/index-DYH8g9WA.cjs.map +0 -1
  240. package/dist/index-Da2GUKrr.cjs +0 -2
  241. package/dist/index-Da2GUKrr.cjs.map +0 -1
  242. package/dist/index-fwdktvAS.js +0 -707
  243. package/dist/index-fwdktvAS.js.map +0 -1
  244. package/dist/transformDataForAggregation-BVxVu4yY.cjs +0 -2
@@ -1,11 +1,10 @@
1
- import { j as a, m as E } from "./index-CHPV5EwG-BPSP-7Jg.js";
1
+ import { j as n, m as E } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
2
  import { useRef as ut, useState as j, useEffect as kt } from "react";
3
- import { u as pt } from "./index-AqnpA7_O.js";
4
3
  import { i as jt } from "./index-Bwrro8-q.js";
5
4
  import { X as It } from "./Modal-DVVwpKhP.js";
6
5
  import { T as Ct } from "./Tooltip-CVCGWyzw.js";
7
6
  import { Colors as L } from "./Colors.js";
8
- import { n as ft } from "./numberFormattingFunction-14YCbkN2.js";
7
+ import { n as pt } from "./numberFormattingFunction-14YCbkN2.js";
9
8
  import { s as Nt } from "./string2HTML-oFCROsus.js";
10
9
  import { c as O } from "./checkIfNullOrUndefined-DmfiKkNw.js";
11
10
  import { a as xt } from "./linear-DUdu7l2G.js";
@@ -17,6 +16,7 @@ import { GraphFooter as $t } from "./GraphFooter.js";
17
16
  import { GraphHeader as Dt } from "./GraphHeader.js";
18
17
  import { E as Vt } from "./EmptyState-DdTp-Mdn.js";
19
18
  import { ColorLegendWithMouseOver as Et } from "./ColorLegendWithMouseOver.js";
19
+ import { u as ft } from "./uniqBy-BHy4I8PK.js";
20
20
  var Lt = _t(Pt);
21
21
  function gt(t) {
22
22
  this._curve = t;
@@ -108,11 +108,11 @@ yt.prototype = {
108
108
  }
109
109
  };
110
110
  (function t(e) {
111
- function s(c) {
112
- return new yt(c, e);
111
+ function s(l) {
112
+ return new yt(l, e);
113
113
  }
114
- return s.tension = function(c) {
115
- return t(+c);
114
+ return s.tension = function(l) {
115
+ return t(+l);
116
116
  }, s;
117
117
  })(0);
118
118
  function vt(t, e) {
@@ -159,11 +159,11 @@ vt.prototype = {
159
159
  }
160
160
  };
161
161
  const Rt = function t(e) {
162
- function s(c) {
163
- return new vt(c, e);
162
+ function s(l) {
163
+ return new vt(l, e);
164
164
  }
165
- return s.tension = function(c) {
166
- return t(+c);
165
+ return s.tension = function(l) {
166
+ return t(+l);
167
167
  }, s;
168
168
  }(0);
169
169
  function Mt(t) {
@@ -189,7 +189,7 @@ function Ft(t) {
189
189
  const {
190
190
  data: e,
191
191
  radius: s,
192
- lineColors: c,
192
+ lineColors: l,
193
193
  tooltip: I,
194
194
  onSeriesMouseOver: A,
195
195
  onSeriesMouseClick: v,
@@ -199,10 +199,10 @@ function Ft(t) {
199
199
  classNames: m,
200
200
  selectedColor: T,
201
201
  axisLabels: Y,
202
- strokeWidth: at,
203
- showValues: nt,
204
- showDots: ot,
205
- rightMargin: st,
202
+ strokeWidth: nt,
203
+ showValues: at,
204
+ showDots: st,
205
+ rightMargin: ot,
206
206
  topMargin: z,
207
207
  bottomMargin: rt,
208
208
  leftMargin: H,
@@ -211,8 +211,8 @@ function Ft(t) {
211
211
  minValue: $,
212
212
  maxValue: D,
213
213
  resetSelectionOnDoubleClick: lt,
214
- fillShape: h,
215
- highlightedLines: x,
214
+ fillShape: c,
215
+ highlightedLines: f,
216
216
  animate: d,
217
217
  dimmedOpacity: g,
218
218
  precision: C,
@@ -224,27 +224,27 @@ function Ft(t) {
224
224
  top: z,
225
225
  left: H
226
226
  }, y = Math.min(
227
- (2 * s - H - st) / 2,
227
+ (2 * s - H - ot) / 2,
228
228
  (2 * s - z - rt) / 2
229
- ), [k, R] = j(void 0), [N, W] = j(void 0), [K, F] = j(void 0), [Q, G] = j(void 0), l = xt().domain([0, e[0].values.length]).range([0, 2 * Math.PI]), Z = O(D) ? Math.max(
229
+ ), [k, R] = j(void 0), [N, W] = j(void 0), [K, F] = j(void 0), [Q, G] = j(void 0), r = xt().domain([0, e[0].values.length]).range([0, 2 * Math.PI]), Z = O(D) ? Math.max(
230
230
  ...e.map(
231
- (i) => Math.max(...i.values.filter((n) => !O(n)))
231
+ (i) => Math.max(...i.values.filter((a) => !O(a)))
232
232
  )
233
233
  ) < 0 ? 0 : Math.max(
234
234
  ...e.map(
235
- (i) => Math.max(...i.values.filter((n) => !O(n)))
235
+ (i) => Math.max(...i.values.filter((a) => !O(a)))
236
236
  )
237
237
  ) : D, ct = O($) ? Math.min(
238
238
  ...e.map(
239
- (i) => Math.min(...i.values.filter((n) => !O(n)))
239
+ (i) => Math.min(...i.values.filter((a) => !O(a)))
240
240
  )
241
241
  ) >= 0 ? 0 : Math.min(
242
242
  ...e.map(
243
- (i) => Math.min(...i.values.filter((n) => !O(n)))
243
+ (i) => Math.min(...i.values.filter((a) => !O(a)))
244
244
  )
245
- ) : $, p = xt().domain([ct, Z]).range([0, y]).nice(), ht = p.ticks(B), P = Ht().radius((i) => p(i)).angle((i, n) => l(n)).curve(w);
246
- return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
247
- /* @__PURE__ */ a.jsx(
245
+ ) : $, p = xt().domain([ct, Z]).range([0, y]).nice(), ht = p.ticks(B), P = Ht().radius((i) => p(i)).angle((i, a) => r(a)).curve(w);
246
+ return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
247
+ /* @__PURE__ */ n.jsx(
248
248
  X.svg,
249
249
  {
250
250
  width: `${s * 2}px`,
@@ -252,35 +252,35 @@ function Ft(t) {
252
252
  viewBox: `0 0 ${s * 2} ${s * 2}`,
253
253
  direction: "ltr",
254
254
  ref: J,
255
- children: /* @__PURE__ */ a.jsxs("g", { transform: `translate(${b.left},${b.top})`, children: [
255
+ children: /* @__PURE__ */ n.jsxs("g", { transform: `translate(${b.left},${b.top})`, children: [
256
256
  U.filter((i) => i.position === "before").map((i) => i.layer),
257
- /* @__PURE__ */ a.jsxs("g", { transform: `translate(${y},${y})`, children: [
258
- Y.map((i, n) => /* @__PURE__ */ a.jsxs("g", { children: [
259
- /* @__PURE__ */ a.jsx(
257
+ /* @__PURE__ */ n.jsxs("g", { transform: `translate(${y},${y})`, children: [
258
+ Y.map((i, a) => /* @__PURE__ */ n.jsxs("g", { children: [
259
+ /* @__PURE__ */ n.jsx(
260
260
  "line",
261
261
  {
262
262
  x1: 0,
263
263
  y1: 0,
264
- x2: Math.cos(l(n) - Math.PI / 2) * y,
265
- y2: Math.sin(l(n) - Math.PI / 2) * y,
264
+ x2: Math.cos(r(a) - Math.PI / 2) * y,
265
+ y2: Math.sin(r(a) - Math.PI / 2) * y,
266
266
  className: E(
267
267
  "stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",
268
268
  m?.xAxis?.axis
269
269
  ),
270
270
  style: _?.xAxis?.axis
271
271
  },
272
- n
272
+ a
273
273
  ),
274
- /* @__PURE__ */ a.jsx(
274
+ /* @__PURE__ */ n.jsx(
275
275
  "text",
276
276
  {
277
- x: Math.cos(l(n) - Math.PI / 2) * (y + 6),
278
- y: Math.sin(l(n) - Math.PI / 2) * (y + 6),
277
+ x: Math.cos(r(a) - Math.PI / 2) * (y + 6),
278
+ y: Math.sin(r(a) - Math.PI / 2) * (y + 6),
279
279
  style: {
280
- textAnchor: Math.cos(l(n) - Math.PI / 2) < 0 ? "end" : Math.cos(l(n) - Math.PI / 2) < 1e-5 ? "middle" : "start",
280
+ textAnchor: Math.cos(r(a) - Math.PI / 2) < 0 ? "end" : Math.cos(r(a) - Math.PI / 2) < 1e-5 ? "middle" : "start",
281
281
  ..._?.xAxis?.labels || ""
282
282
  },
283
- dy: Math.sin(l(n) - Math.PI / 2) < 0 ? 0 : Math.sin(l(n) - Math.PI / 2) < 1e-5 ? 5 : 10,
283
+ dy: Math.sin(r(a) - Math.PI / 2) < 0 ? 0 : Math.sin(r(a) - Math.PI / 2) < 1e-5 ? 5 : 10,
284
284
  className: E(
285
285
  "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",
286
286
  m?.xAxis?.labels
@@ -288,9 +288,9 @@ function Ft(t) {
288
288
  children: i
289
289
  }
290
290
  )
291
- ] }, n)),
292
- ht.map((i, n) => /* @__PURE__ */ a.jsxs("g", { children: [
293
- /* @__PURE__ */ a.jsx(
291
+ ] }, a)),
292
+ ht.map((i, a) => /* @__PURE__ */ n.jsxs("g", { children: [
293
+ /* @__PURE__ */ n.jsx(
294
294
  "path",
295
295
  {
296
296
  d: P(Array(Y.length).fill(i)) || "",
@@ -304,14 +304,14 @@ function Ft(t) {
304
304
  }
305
305
  }
306
306
  ),
307
- /* @__PURE__ */ a.jsx(
307
+ /* @__PURE__ */ n.jsx(
308
308
  "foreignObject",
309
309
  {
310
310
  x: -25,
311
311
  y: Math.sin(-Math.PI / 2) * p(i) > -1e-4 ? Math.sin(-Math.PI / 2) * p(i) - 7 : Math.sin(-Math.PI / 2) * p(i) - 5,
312
312
  width: 50,
313
313
  height: 12,
314
- children: /* @__PURE__ */ a.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ a.jsx(
314
+ children: /* @__PURE__ */ n.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ n.jsx(
315
315
  "p",
316
316
  {
317
317
  className: E(
@@ -319,32 +319,32 @@ function Ft(t) {
319
319
  m?.xAxis?.labels
320
320
  ),
321
321
  style: _?.xAxis?.labels,
322
- children: ft(i, "NA", C)
322
+ children: pt(i, "NA", C)
323
323
  }
324
324
  ) })
325
325
  }
326
326
  )
327
- ] }, n)),
328
- /* @__PURE__ */ a.jsx(Tt, { children: e.map((i, n) => /* @__PURE__ */ a.jsxs(
327
+ ] }, a)),
328
+ /* @__PURE__ */ n.jsx(Tt, { children: e.map((i, a) => /* @__PURE__ */ n.jsxs(
329
329
  X.g,
330
330
  {
331
331
  variants: {
332
332
  initial: {
333
- opacity: k ? i.label === k.label ? 1 : g : T ? i.color && c[u.indexOf(i.color)] === T ? 1 : g : x.length !== 0 ? i.label && x.indexOf(i.label) !== -1 ? 1 : 0.3 : 1
333
+ opacity: k ? i.label === k.label ? 1 : g : T ? i.color && l[u.indexOf(i.color)] === T ? 1 : g : f.length !== 0 ? i.label && f.indexOf(i.label) !== -1 ? 1 : 0.3 : 1
334
334
  },
335
335
  whileInView: {
336
- opacity: k ? i.label === k.label ? 1 : g : T ? i.color && c[u.indexOf(i.color)] === T ? 1 : g : x.length !== 0 ? i.label && x.indexOf(i.label) !== -1 ? 1 : g : 1,
336
+ opacity: k ? i.label === k.label ? 1 : g : T ? i.color && l[u.indexOf(i.color)] === T ? 1 : g : f.length !== 0 ? i.label && f.indexOf(i.label) !== -1 ? 1 : g : 1,
337
337
  transition: { duration: d.duration }
338
338
  }
339
339
  },
340
340
  initial: "initial",
341
341
  animate: V ? "whileInView" : "initial",
342
342
  exit: { opacity: 0, transition: { duration: d.duration } },
343
- onMouseEnter: (r) => {
344
- R(i), G(r.clientY), F(r.clientX), A?.(i);
343
+ onMouseEnter: (o) => {
344
+ R(i), G(o.clientY), F(o.clientX), A?.(i);
345
345
  },
346
- onMouseMove: (r) => {
347
- R(i), G(r.clientY), F(r.clientX);
346
+ onMouseMove: (o) => {
347
+ R(i), G(o.clientY), F(o.clientX);
348
348
  },
349
349
  onMouseLeave: () => {
350
350
  R(void 0), F(void 0), G(void 0), A?.(void 0);
@@ -353,12 +353,12 @@ function Ft(t) {
353
353
  (v || M) && (jt(N, i) && lt ? (W(void 0), v?.(void 0)) : (W(i), v?.(i)));
354
354
  },
355
355
  children: [
356
- /* @__PURE__ */ a.jsx(
356
+ /* @__PURE__ */ n.jsx(
357
357
  X.path,
358
358
  {
359
359
  d: P(i.values) || "",
360
360
  variants: {
361
- initial: { d: P(i.values.map((r) => 0)) || "" },
361
+ initial: { d: P(i.values.map((o) => 0)) || "" },
362
362
  whileInView: {
363
363
  d: P(i.values) || "",
364
364
  transition: { duration: d.duration }
@@ -368,28 +368,28 @@ function Ft(t) {
368
368
  animate: V ? "whileInView" : "initial",
369
369
  exit: { opacity: 0, transition: { duration: d.duration } },
370
370
  style: {
371
- stroke: e.filter((r) => r.color).length === 0 ? c[0] : i.color ? c[u.indexOf(i.color)] : L.gray,
372
- fill: h ? e.filter((r) => r.color).length === 0 ? c[0] : i.color ? c[u.indexOf(i.color)] : L.gray : "none",
371
+ stroke: e.filter((o) => o.color).length === 0 ? l[0] : i.color ? l[u.indexOf(i.color)] : L.gray,
372
+ fill: c ? e.filter((o) => o.color).length === 0 ? l[0] : i.color ? l[u.indexOf(i.color)] : L.gray : "none",
373
373
  fillOpacity: 0.1,
374
- strokeWidth: at
374
+ strokeWidth: nt
375
375
  }
376
376
  }
377
377
  ),
378
- /* @__PURE__ */ a.jsx("g", { children: i.values.map((r, f) => /* @__PURE__ */ a.jsx("g", { children: O(r) ? null : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
379
- ot ? /* @__PURE__ */ a.jsx(
378
+ /* @__PURE__ */ n.jsx("g", { children: i.values.map((o, x) => /* @__PURE__ */ n.jsx("g", { children: O(o) ? null : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
379
+ st ? /* @__PURE__ */ n.jsx(
380
380
  X.circle,
381
381
  {
382
- cx: Math.cos(l(f) - Math.PI / 2) * p(r),
383
- cy: Math.sin(l(f) - Math.PI / 2) * p(r),
382
+ cx: Math.cos(r(x) - Math.PI / 2) * p(o),
383
+ cy: Math.sin(r(x) - Math.PI / 2) * p(o),
384
384
  r: 4,
385
385
  style: {
386
- fill: e.filter((tt) => tt.color).length === 0 ? c[0] : i.color ? c[u.indexOf(i.color)] : L.gray
386
+ fill: e.filter((tt) => tt.color).length === 0 ? l[0] : i.color ? l[u.indexOf(i.color)] : L.gray
387
387
  },
388
388
  variants: {
389
389
  initial: { cx: 0, cy: 0, opacity: 0 },
390
390
  whileInView: {
391
- cx: Math.cos(l(f) - Math.PI / 2) * p(r),
392
- cy: Math.sin(l(f) - Math.PI / 2) * p(r),
391
+ cx: Math.cos(r(x) - Math.PI / 2) * p(o),
392
+ cy: Math.sin(r(x) - Math.PI / 2) * p(o),
393
393
  opacity: 1,
394
394
  transition: { duration: d.duration }
395
395
  }
@@ -399,17 +399,17 @@ function Ft(t) {
399
399
  exit: { opacity: 0, transition: { duration: d.duration } }
400
400
  }
401
401
  ) : null,
402
- nt ? /* @__PURE__ */ a.jsx(
402
+ at ? /* @__PURE__ */ n.jsx(
403
403
  X.text,
404
404
  {
405
- x: Math.cos(l(f) - Math.PI / 2) * (p(r) + 6),
406
- y: Math.sin(l(f) - Math.PI / 2) * (p(r) + 6),
405
+ x: Math.cos(r(x) - Math.PI / 2) * (p(o) + 6),
406
+ y: Math.sin(r(x) - Math.PI / 2) * (p(o) + 6),
407
407
  style: {
408
- fill: c[n],
409
- textAnchor: Math.cos(l(f) - Math.PI / 2) < 0 ? "end" : Math.cos(l(f) - Math.PI / 2) < 1e-5 ? "middle" : "start",
408
+ fill: l[a],
409
+ textAnchor: Math.cos(r(x) - Math.PI / 2) < 0 ? "end" : Math.cos(r(x) - Math.PI / 2) < 1e-5 ? "middle" : "start",
410
410
  ..._?.graphObjectValues || {}
411
411
  },
412
- dy: Math.sin(l(f) - Math.PI / 2) < 0 ? 10 : (Math.sin(l(f) - Math.PI / 2) < 1e-5, 0),
412
+ dy: Math.sin(r(x) - Math.PI / 2) < 0 ? 10 : (Math.sin(r(x) - Math.PI / 2) < 1e-5, 0),
413
413
  className: E(
414
414
  "graph-value text-xs font-bold",
415
415
  m?.graphObjectValues
@@ -424,20 +424,20 @@ function Ft(t) {
424
424
  initial: "initial",
425
425
  animate: V ? "whileInView" : "initial",
426
426
  exit: { opacity: 0, transition: { duration: d.duration } },
427
- children: ft(r, "NA", C)
427
+ children: pt(o, "NA", C)
428
428
  }
429
429
  ) : null
430
- ] }) }, f)) })
430
+ ] }) }, x)) })
431
431
  ]
432
432
  },
433
- i.label || n
433
+ i.label || a
434
434
  )) })
435
435
  ] }),
436
436
  U.filter((i) => i.position === "after").map((i) => i.layer)
437
437
  ] })
438
438
  }
439
439
  ),
440
- k && I && K && Q ? /* @__PURE__ */ a.jsx(
440
+ k && I && K && Q ? /* @__PURE__ */ n.jsx(
441
441
  Ct,
442
442
  {
443
443
  data: k,
@@ -448,14 +448,14 @@ function Ft(t) {
448
448
  className: m?.tooltip
449
449
  }
450
450
  ) : null,
451
- M && N !== void 0 ? /* @__PURE__ */ a.jsx(
451
+ M && N !== void 0 ? /* @__PURE__ */ n.jsx(
452
452
  It,
453
453
  {
454
454
  open: N !== void 0,
455
455
  onClose: () => {
456
456
  W(void 0);
457
457
  },
458
- children: /* @__PURE__ */ a.jsx(
458
+ children: /* @__PURE__ */ n.jsx(
459
459
  "div",
460
460
  {
461
461
  className: "graph-modal-content m-0",
@@ -471,7 +471,7 @@ function li(t) {
471
471
  const {
472
472
  graphTitle: e,
473
473
  colors: s,
474
- sources: c,
474
+ sources: l,
475
475
  graphDescription: I,
476
476
  footNote: A,
477
477
  radius: v,
@@ -481,10 +481,10 @@ function li(t) {
481
481
  backgroundColor: m = !1,
482
482
  tooltip: T,
483
483
  onSeriesMouseOver: Y,
484
- graphID: at,
485
- onSeriesMouseClick: nt,
486
- topMargin: ot = 75,
487
- bottomMargin: st = 75,
484
+ graphID: nt,
485
+ onSeriesMouseClick: at,
486
+ topMargin: st = 75,
487
+ bottomMargin: ot = 75,
488
488
  leftMargin: z = 75,
489
489
  rightMargin: rt = 75,
490
490
  graphDownload: H = !1,
@@ -493,8 +493,8 @@ function li(t) {
493
493
  language: $ = "en",
494
494
  theme: D = "light",
495
495
  highlightedLines: lt = [],
496
- width: h,
497
- height: x,
496
+ width: c,
497
+ height: f,
498
498
  minHeight: d = 0,
499
499
  strokeWidth: g = 2,
500
500
  relativeHeight: C,
@@ -512,35 +512,35 @@ function li(t) {
512
512
  minValue: F,
513
513
  maxValue: Q,
514
514
  fillShape: G = !1,
515
- resetSelectionOnDoubleClick: l = !0,
515
+ resetSelectionOnDoubleClick: r = !0,
516
516
  animate: Z = !1,
517
517
  dimmedOpacity: ct = 0.3,
518
518
  precision: p = 2,
519
519
  customLayers: ht = []
520
- } = t, [P, i] = j(0), [n, r] = j(0), [f, tt] = j(0), [wt, bt] = j(void 0), S = ut(null), mt = ut(null);
520
+ } = t, [P, i] = j(0), [a, o] = j(0), [x, tt] = j(0), [wt, bt] = j(void 0), S = ut(null), mt = ut(null);
521
521
  return kt(() => {
522
- const o = new ResizeObserver((it) => {
523
- r(h || it[0].target.clientWidth || 420), tt(x || it[0].target.clientHeight || 420), i(
522
+ const h = new ResizeObserver((it) => {
523
+ o(c || it[0].target.clientWidth || 420), tt(f || it[0].target.clientHeight || 420), i(
524
524
  (Math.min(
525
- h || it[0].target.clientWidth || 620,
526
- x || it[0].target.clientHeight || 480
525
+ c || it[0].target.clientWidth || 620,
526
+ f || it[0].target.clientHeight || 480
527
527
  ) || 420) / 2
528
528
  );
529
529
  });
530
- return S.current && (tt(S.current.clientHeight || 420), r(S.current.clientWidth || 420), i(
530
+ return S.current && (tt(S.current.clientHeight || 420), o(S.current.clientWidth || 420), i(
531
531
  (Math.min(S.current.clientWidth, S.current.clientHeight) || 420) / 2
532
- ), (!h || !v) && o.observe(S.current)), () => o.disconnect();
533
- }, [h, x, v]), /* @__PURE__ */ a.jsx(
532
+ ), (!c || !v) && h.observe(S.current)), () => h.disconnect();
533
+ }, [c, f, v]), /* @__PURE__ */ n.jsx(
534
534
  "div",
535
535
  {
536
- className: `${D || "light"} flex ${h ? "w-fit grow-0" : "w-full grow"}`,
536
+ className: `${D || "light"} flex ${c ? "w-fit grow-0" : "w-full grow"}`,
537
537
  dir: $ === "he" || $ === "ar" ? "rtl" : void 0,
538
- children: /* @__PURE__ */ a.jsx(
538
+ children: /* @__PURE__ */ n.jsx(
539
539
  "div",
540
540
  {
541
541
  className: E(
542
542
  `${m ? m === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${$ || "en"}`,
543
- h ? "w-fit" : "w-full",
543
+ c ? "w-fit" : "w-full",
544
544
  b?.graphContainer
545
545
  ),
546
546
  style: {
@@ -548,16 +548,16 @@ function li(t) {
548
548
  minHeight: "inherit",
549
549
  ...m && m !== !0 ? { backgroundColor: m } : {}
550
550
  },
551
- id: at,
551
+ id: nt,
552
552
  ref: mt,
553
553
  "aria-label": U || `${e ? `The graph shows ${e}. ` : ""}This is a donut or pie chart chart. ${I ? ` ${I}` : ""}`,
554
- children: /* @__PURE__ */ a.jsx(
554
+ children: /* @__PURE__ */ n.jsx(
555
555
  "div",
556
556
  {
557
557
  className: "flex grow",
558
558
  style: { padding: m ? _ || "1rem" : _ || 0 },
559
- children: /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col gap-2 w-full grow justify-between", children: [
560
- e || I || H || q ? /* @__PURE__ */ a.jsx(
559
+ children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 w-full grow justify-between", children: [
560
+ e || I || H || q ? /* @__PURE__ */ n.jsx(
561
561
  Dt,
562
562
  {
563
563
  styles: {
@@ -570,59 +570,53 @@ function li(t) {
570
570
  },
571
571
  graphTitle: e,
572
572
  graphDescription: I,
573
- width: h,
573
+ width: c,
574
574
  graphDownload: H ? mt.current : void 0,
575
- dataDownload: q ? u.map((o) => o.data).filter((o) => o !== void 0).length > 0 ? u.map((o) => o.data).filter((o) => o !== void 0) : u.filter((o) => o !== void 0) : null
575
+ dataDownload: q ? u.map((h) => h.data).filter((h) => h !== void 0).length > 0 ? u.map((h) => h.data).filter((h) => h !== void 0) : u.filter((h) => h !== void 0) : null
576
576
  }
577
577
  ) : null,
578
- /* @__PURE__ */ a.jsx(
578
+ /* @__PURE__ */ n.jsx(
579
579
  "div",
580
580
  {
581
581
  className: "flex grow flex-col justify-center items-stretch gap-8 flex-wrap",
582
582
  style: {
583
- width: h ? `${h}px` : "100%"
583
+ width: c ? `${c}px` : "100%"
584
584
  },
585
- children: u.length === 0 ? /* @__PURE__ */ a.jsx(Vt, {}) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
586
- M && u.filter((o) => o.color).length !== 0 ? /* @__PURE__ */ a.jsx(
585
+ children: u.length === 0 ? /* @__PURE__ */ n.jsx(Vt, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
586
+ M && u.filter((h) => h.color).length !== 0 ? /* @__PURE__ */ n.jsx(
587
587
  Et,
588
588
  {
589
- width: h,
589
+ width: c,
590
590
  colorLegendTitle: J,
591
591
  colors: s || L[D].categoricalColors.colors,
592
- colorDomain: B || pt(
593
- u.filter((o) => o.color),
594
- "color"
595
- ).map((o) => o.color),
592
+ colorDomain: B || ft(u, "color", !0),
596
593
  setSelectedColor: bt,
597
594
  showNAColor: y
598
595
  }
599
596
  ) : null,
600
- /* @__PURE__ */ a.jsx(
597
+ /* @__PURE__ */ n.jsx(
601
598
  "div",
602
599
  {
603
- className: `flex ${h ? "grow-0" : "grow"} items-center justify-center leading-0`,
600
+ className: `flex ${c ? "grow-0" : "grow"} items-center justify-center leading-0`,
604
601
  style: {
605
- width: h ? `${h}px` : "100%",
606
- height: x ? `${Math.max(
602
+ width: c ? `${c}px` : "100%",
603
+ height: f ? `${Math.max(
607
604
  d,
608
- x || (C ? d ? (h || n) * C > d ? (h || n) * C : d : (h || n) * C : f)
605
+ f || (C ? d ? (c || a) * C > d ? (c || a) * C : d : (c || a) * C : x)
609
606
  )}px` : "auto"
610
607
  },
611
608
  ref: S,
612
609
  "aria-label": "Graph area",
613
- children: /* @__PURE__ */ a.jsx("div", { className: "w-full flex justify-center leading-0", children: v || P ? /* @__PURE__ */ a.jsx(
610
+ children: /* @__PURE__ */ n.jsx("div", { className: "w-full flex justify-center leading-0", children: v || P ? /* @__PURE__ */ n.jsx(
614
611
  Ft,
615
612
  {
616
613
  data: u,
617
- lineColors: u.filter((o) => o.color).length === 0 ? s ? [s] : [L.primaryColors["blue-600"]] : s || L[D].categoricalColors.colors,
614
+ lineColors: u.filter((h) => h.color).length === 0 ? s ? [s] : [L.primaryColors["blue-600"]] : s || L[D].categoricalColors.colors,
618
615
  radius: v || P,
619
616
  tooltip: T,
620
- colorDomain: B || pt(
621
- u.filter((o) => o.color),
622
- "color"
623
- ).map((o) => o.color),
617
+ colorDomain: B || ft(u, "color", !0),
624
618
  onSeriesMouseOver: Y,
625
- onSeriesMouseClick: nt,
619
+ onSeriesMouseClick: at,
626
620
  styles: w,
627
621
  detailsOnClick: V,
628
622
  selectedColor: wt,
@@ -630,8 +624,8 @@ function li(t) {
630
624
  strokeWidth: g,
631
625
  showValues: N,
632
626
  showDots: R,
633
- topMargin: ot,
634
- bottomMargin: st,
627
+ topMargin: st,
628
+ bottomMargin: ot,
635
629
  leftMargin: z,
636
630
  rightMargin: rt,
637
631
  curveType: W,
@@ -640,7 +634,7 @@ function li(t) {
640
634
  maxValue: Q,
641
635
  fillShape: G,
642
636
  highlightedLines: lt,
643
- resetSelectionOnDoubleClick: l,
637
+ resetSelectionOnDoubleClick: r,
644
638
  animate: Z === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : Z || { duration: 0, once: !0, amount: 0 },
645
639
  dimmedOpacity: ct,
646
640
  precision: p,
@@ -652,7 +646,7 @@ function li(t) {
652
646
  ] })
653
647
  }
654
648
  ),
655
- c || A ? /* @__PURE__ */ a.jsx(
649
+ l || A ? /* @__PURE__ */ n.jsx(
656
650
  $t,
657
651
  {
658
652
  styles: { footnote: w?.footnote, source: w?.source },
@@ -660,11 +654,11 @@ function li(t) {
660
654
  footnote: b?.footnote,
661
655
  source: b?.source
662
656
  },
663
- sources: c,
657
+ sources: l,
664
658
  footNote: A,
665
- width: h
659
+ width: c
666
660
  }
667
- ) : /* @__PURE__ */ a.jsx("div", {})
661
+ ) : /* @__PURE__ */ n.jsx("div", {})
668
662
  ] })
669
663
  }
670
664
  )