@undp/data-viz 1.2.8 → 1.3.1

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 (642) hide show
  1. package/dist/AreaChart.cjs +2 -0
  2. package/dist/AreaChart.cjs.map +1 -0
  3. package/dist/AreaChart.d.ts +224 -0
  4. package/dist/AreaChart.js +531 -0
  5. package/dist/AreaChart.js.map +1 -0
  6. package/dist/Axis-DE7dSn1_.cjs +2 -0
  7. package/dist/Axis-DE7dSn1_.cjs.map +1 -0
  8. package/dist/Axis-Ddg-seDi.js +43 -0
  9. package/dist/Axis-Ddg-seDi.js.map +1 -0
  10. package/dist/AxisTitle-BmHLMRJZ.js +20 -0
  11. package/dist/AxisTitle-BmHLMRJZ.js.map +1 -0
  12. package/dist/AxisTitle-CK9YeovX.cjs +2 -0
  13. package/dist/AxisTitle-CK9YeovX.cjs.map +1 -0
  14. package/dist/BarGraph.cjs +2 -0
  15. package/dist/BarGraph.cjs.map +1 -0
  16. package/dist/BarGraph.d.ts +460 -0
  17. package/dist/BarGraph.js +4044 -0
  18. package/dist/BarGraph.js.map +1 -0
  19. package/dist/BasicStatCard.cjs +2 -0
  20. package/dist/BasicStatCard.cjs.map +1 -0
  21. package/dist/BasicStatCard.d.ts +106 -0
  22. package/dist/BasicStatCard.js +191 -0
  23. package/dist/BasicStatCard.js.map +1 -0
  24. package/dist/BeeSwarmChart.cjs +2 -0
  25. package/dist/BeeSwarmChart.cjs.map +1 -0
  26. package/dist/BeeSwarmChart.d.ts +181 -0
  27. package/dist/BeeSwarmChart.js +1043 -0
  28. package/dist/BeeSwarmChart.js.map +1 -0
  29. package/dist/BiVariateChoroplethMap.cjs +2 -0
  30. package/dist/BiVariateChoroplethMap.cjs.map +1 -0
  31. package/dist/BiVariateChoroplethMap.d.ts +189 -0
  32. package/dist/BiVariateChoroplethMap.js +721 -0
  33. package/dist/BiVariateChoroplethMap.js.map +1 -0
  34. package/dist/BulletChart.cjs +2 -0
  35. package/dist/BulletChart.cjs.map +1 -0
  36. package/dist/BulletChart.d.ts +219 -0
  37. package/dist/BulletChart.js +1432 -0
  38. package/dist/BulletChart.js.map +1 -0
  39. package/dist/ButterflyChart.cjs +2 -0
  40. package/dist/ButterflyChart.cjs.map +1 -0
  41. package/dist/ButterflyChart.d.ts +201 -0
  42. package/dist/ButterflyChart.js +693 -0
  43. package/dist/ButterflyChart.js.map +1 -0
  44. package/dist/ChoroplethMap.cjs +2 -0
  45. package/dist/ChoroplethMap.cjs.map +1 -0
  46. package/dist/ChoroplethMap.d.ts +190 -0
  47. package/dist/ChoroplethMap.js +746 -0
  48. package/dist/ChoroplethMap.js.map +1 -0
  49. package/dist/CirclePackingGraph.cjs +2 -0
  50. package/dist/CirclePackingGraph.cjs.map +1 -0
  51. package/dist/CirclePackingGraph.d.ts +153 -0
  52. package/dist/CirclePackingGraph.js +15 -0
  53. package/dist/CirclePackingGraph.js.map +1 -0
  54. package/dist/ColorLegend.cjs +2 -0
  55. package/dist/ColorLegend.cjs.map +1 -0
  56. package/dist/ColorLegend.d.ts +17 -0
  57. package/dist/ColorLegend.js +48 -0
  58. package/dist/ColorLegend.js.map +1 -0
  59. package/dist/ColorLegendWithMouseOver.cjs +2 -0
  60. package/dist/ColorLegendWithMouseOver.cjs.map +1 -0
  61. package/dist/ColorLegendWithMouseOver.d.ts +16 -0
  62. package/dist/ColorLegendWithMouseOver.js +71 -0
  63. package/dist/ColorLegendWithMouseOver.js.map +1 -0
  64. package/dist/Colors.cjs +2 -0
  65. package/dist/Colors.cjs.map +1 -0
  66. package/dist/Colors.d.ts +174 -0
  67. package/dist/Colors.js +562 -0
  68. package/dist/Colors.js.map +1 -0
  69. package/dist/CopyTextButton.cjs +17 -0
  70. package/dist/CopyTextButton.cjs.map +1 -0
  71. package/dist/CopyTextButton.d.ts +13 -0
  72. package/dist/CopyTextButton.js +699 -0
  73. package/dist/CopyTextButton.js.map +1 -0
  74. package/dist/CsvDownloadButton.cjs +23 -0
  75. package/dist/CsvDownloadButton.cjs.map +1 -0
  76. package/dist/CsvDownloadButton.d.ts +22 -0
  77. package/dist/CsvDownloadButton.js +868 -0
  78. package/dist/CsvDownloadButton.js.map +1 -0
  79. package/dist/DataCards.cjs +2 -0
  80. package/dist/DataCards.cjs.map +1 -0
  81. package/dist/DataCards.d.ts +131 -0
  82. package/dist/DataCards.js +15 -0
  83. package/dist/DataCards.js.map +1 -0
  84. package/dist/DataTable.cjs +2 -0
  85. package/dist/DataTable.cjs.map +1 -0
  86. package/dist/DataTable.d.ts +122 -0
  87. package/dist/DataTable.js +332 -0
  88. package/dist/DataTable.js.map +1 -0
  89. package/dist/DifferenceLineChart.cjs +2 -0
  90. package/dist/DifferenceLineChart.cjs.map +1 -0
  91. package/dist/DifferenceLineChart.d.ts +237 -0
  92. package/dist/DifferenceLineChart.js +806 -0
  93. package/dist/DifferenceLineChart.js.map +1 -0
  94. package/dist/DonutChart.cjs +2 -0
  95. package/dist/DonutChart.cjs.map +1 -0
  96. package/dist/DonutChart.d.ts +148 -0
  97. package/dist/DonutChart.js +479 -0
  98. package/dist/DonutChart.js.map +1 -0
  99. package/dist/DotDensityMap.cjs +2 -0
  100. package/dist/DotDensityMap.cjs.map +1 -0
  101. package/dist/DotDensityMap.d.ts +191 -0
  102. package/dist/DotDensityMap.js +601 -0
  103. package/dist/DotDensityMap.js.map +1 -0
  104. package/dist/DropdownSelect-0I2QxaVy.cjs +29 -0
  105. package/dist/DropdownSelect-0I2QxaVy.cjs.map +1 -0
  106. package/dist/DropdownSelect-CDC9lEqU.js +4193 -0
  107. package/dist/DropdownSelect-CDC9lEqU.js.map +1 -0
  108. package/dist/DualAxisLineChart.cjs +2 -0
  109. package/dist/DualAxisLineChart.cjs.map +1 -0
  110. package/dist/DualAxisLineChart.d.ts +180 -0
  111. package/dist/DualAxisLineChart.js +700 -0
  112. package/dist/DualAxisLineChart.js.map +1 -0
  113. package/dist/DumbbellChart.cjs +2 -0
  114. package/dist/DumbbellChart.cjs.map +1 -0
  115. package/dist/DumbbellChart.d.ts +224 -0
  116. package/dist/DumbbellChart.js +1511 -0
  117. package/dist/DumbbellChart.js.map +1 -0
  118. package/dist/EmptyState-DdTp-Mdn.js +22 -0
  119. package/dist/EmptyState-DdTp-Mdn.js.map +1 -0
  120. package/dist/EmptyState-d8_8SxeW.cjs +2 -0
  121. package/dist/EmptyState-d8_8SxeW.cjs.map +1 -0
  122. package/dist/ExcelDownloadButton.cjs +2 -0
  123. package/dist/ExcelDownloadButton.cjs.map +1 -0
  124. package/dist/ExcelDownloadButton.d.ts +22 -0
  125. package/dist/ExcelDownloadButton.js +30 -0
  126. package/dist/ExcelDownloadButton.js.map +1 -0
  127. package/dist/FootNote.cjs +2 -0
  128. package/dist/FootNote.cjs.map +1 -0
  129. package/dist/FootNote.d.ts +12 -0
  130. package/dist/FootNote.js +21 -0
  131. package/dist/FootNote.js.map +1 -0
  132. package/dist/GeoHubCompareMaps.cjs +2 -0
  133. package/dist/GeoHubCompareMaps.cjs.map +1 -0
  134. package/dist/GeoHubCompareMaps.d.ts +103 -0
  135. package/dist/GeoHubCompareMaps.js +371 -0
  136. package/dist/GeoHubCompareMaps.js.map +1 -0
  137. package/dist/GeoHubMap.cjs +2 -0
  138. package/dist/GeoHubMap.cjs.map +1 -0
  139. package/dist/GeoHubMap.d.ts +118 -0
  140. package/dist/GeoHubMap.js +430 -0
  141. package/dist/GeoHubMap.js.map +1 -0
  142. package/dist/GeoHubMapWithLayerSelection.cjs +2 -0
  143. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -0
  144. package/dist/GeoHubMapWithLayerSelection.d.ts +117 -0
  145. package/dist/GeoHubMapWithLayerSelection.js +308 -0
  146. package/dist/GeoHubMapWithLayerSelection.js.map +1 -0
  147. package/dist/GraphDescription.cjs +2 -0
  148. package/dist/GraphDescription.cjs.map +1 -0
  149. package/dist/GraphDescription.d.ts +12 -0
  150. package/dist/GraphDescription.js +21 -0
  151. package/dist/GraphDescription.js.map +1 -0
  152. package/dist/GraphFooter.cjs +2 -0
  153. package/dist/GraphFooter.cjs.map +1 -0
  154. package/dist/GraphFooter.d.ts +24 -0
  155. package/dist/GraphFooter.js +22 -0
  156. package/dist/GraphFooter.js.map +1 -0
  157. package/dist/GraphHeader.cjs +2 -0
  158. package/dist/GraphHeader.cjs.map +1 -0
  159. package/dist/GraphHeader.d.ts +22 -0
  160. package/dist/GraphHeader.js +64 -0
  161. package/dist/GraphHeader.js.map +1 -0
  162. package/dist/GraphTitle.cjs +2 -0
  163. package/dist/GraphTitle.cjs.map +1 -0
  164. package/dist/GraphTitle.d.ts +13 -0
  165. package/dist/GraphTitle.js +29 -0
  166. package/dist/GraphTitle.js.map +1 -0
  167. package/dist/GriddedGraphs.cjs +2 -0
  168. package/dist/GriddedGraphs.cjs.map +1 -0
  169. package/dist/GriddedGraphs.d.ts +540 -0
  170. package/dist/GriddedGraphs.js +483 -0
  171. package/dist/GriddedGraphs.js.map +1 -0
  172. package/dist/GriddedGraphsFromConfig.cjs +2 -0
  173. package/dist/GriddedGraphsFromConfig.cjs.map +1 -0
  174. package/dist/GriddedGraphsFromConfig.d.ts +543 -0
  175. package/dist/GriddedGraphsFromConfig.js +43 -0
  176. package/dist/GriddedGraphsFromConfig.js.map +1 -0
  177. package/dist/HeatMap.cjs +2 -0
  178. package/dist/HeatMap.cjs.map +1 -0
  179. package/dist/HeatMap.d.ts +166 -0
  180. package/dist/HeatMap.js +452 -0
  181. package/dist/HeatMap.js.map +1 -0
  182. package/dist/Histogram.cjs +2 -0
  183. package/dist/Histogram.cjs.map +1 -0
  184. package/dist/Histogram.d.ts +165 -0
  185. package/dist/Histogram.js +288 -0
  186. package/dist/Histogram.js.map +1 -0
  187. package/dist/ImageDownloadButton.cjs +2 -0
  188. package/dist/ImageDownloadButton.cjs.map +1 -0
  189. package/dist/ImageDownloadButton.d.ts +15 -0
  190. package/dist/ImageDownloadButton.js +29 -0
  191. package/dist/ImageDownloadButton.js.map +1 -0
  192. package/dist/LineChartWithConfidenceInterval.cjs +2 -0
  193. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -0
  194. package/dist/LineChartWithConfidenceInterval.d.ts +250 -0
  195. package/dist/LineChartWithConfidenceInterval.js +819 -0
  196. package/dist/LineChartWithConfidenceInterval.js.map +1 -0
  197. package/dist/LinearColorLegend.cjs +2 -0
  198. package/dist/LinearColorLegend.cjs.map +1 -0
  199. package/dist/LinearColorLegend.d.ts +13 -0
  200. package/dist/LinearColorLegend.js +34 -0
  201. package/dist/LinearColorLegend.js.map +1 -0
  202. package/dist/Modal-CUU6ZK3U.js +1019 -0
  203. package/dist/Modal-CUU6ZK3U.js.map +1 -0
  204. package/dist/Modal-C_dl0EtQ.cjs +46 -0
  205. package/dist/Modal-C_dl0EtQ.cjs.map +1 -0
  206. package/dist/MultiGraphDashboard.cjs +2 -0
  207. package/dist/MultiGraphDashboard.cjs.map +1 -0
  208. package/dist/MultiGraphDashboard.d.ts +558 -0
  209. package/dist/MultiGraphDashboard.js +304 -0
  210. package/dist/MultiGraphDashboard.js.map +1 -0
  211. package/dist/MultiGraphDashboardFromConfig.cjs +2 -0
  212. package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -0
  213. package/dist/MultiGraphDashboardFromConfig.d.ts +562 -0
  214. package/dist/MultiGraphDashboardFromConfig.js +38 -0
  215. package/dist/MultiGraphDashboardFromConfig.js.map +1 -0
  216. package/dist/MultiGraphDashboardWideToLongFormat.cjs +2 -0
  217. package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -0
  218. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +128 -0
  219. package/dist/MultiGraphDashboardWideToLongFormat.js +244 -0
  220. package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -0
  221. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +2 -0
  222. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -0
  223. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +133 -0
  224. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +31 -0
  225. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -0
  226. package/dist/MultiLineAltChart.cjs +2 -0
  227. package/dist/MultiLineAltChart.cjs.map +1 -0
  228. package/dist/MultiLineAltChart.d.ts +244 -0
  229. package/dist/MultiLineAltChart.js +690 -0
  230. package/dist/MultiLineAltChart.js.map +1 -0
  231. package/dist/MultiLineChart.cjs +2 -0
  232. package/dist/MultiLineChart.cjs.map +1 -0
  233. package/dist/MultiLineChart.d.ts +246 -0
  234. package/dist/MultiLineChart.js +723 -0
  235. package/dist/MultiLineChart.js.map +1 -0
  236. package/dist/ParetoChart.cjs +2 -0
  237. package/dist/ParetoChart.cjs.map +1 -0
  238. package/dist/ParetoChart.d.ts +178 -0
  239. package/dist/ParetoChart.js +637 -0
  240. package/dist/ParetoChart.js.map +1 -0
  241. package/dist/RadarChart.cjs +2 -0
  242. package/dist/RadarChart.cjs.map +1 -0
  243. package/dist/RadarChart.d.ts +176 -0
  244. package/dist/RadarChart.js +678 -0
  245. package/dist/RadarChart.js.map +1 -0
  246. package/dist/ReferenceLine-C1GpoG9d.js +128 -0
  247. package/dist/ReferenceLine-C1GpoG9d.js.map +1 -0
  248. package/dist/ReferenceLine-CuFMk0cI.cjs +2 -0
  249. package/dist/ReferenceLine-CuFMk0cI.cjs.map +1 -0
  250. package/dist/RegressionLine-7_rKTHN_.cjs +2 -0
  251. package/dist/RegressionLine-7_rKTHN_.cjs.map +1 -0
  252. package/dist/RegressionLine-BFwDCTUU.js +48 -0
  253. package/dist/RegressionLine-BFwDCTUU.js.map +1 -0
  254. package/dist/SVGDownloadButton.cjs +2 -0
  255. package/dist/SVGDownloadButton.cjs.map +1 -0
  256. package/dist/SVGDownloadButton.d.ts +15 -0
  257. package/dist/SVGDownloadButton.js +29 -0
  258. package/dist/SVGDownloadButton.js.map +1 -0
  259. package/dist/SankeyChart.cjs +2 -0
  260. package/dist/SankeyChart.cjs.map +1 -0
  261. package/dist/SankeyChart.d.ts +178 -0
  262. package/dist/SankeyChart.js +990 -0
  263. package/dist/SankeyChart.js.map +1 -0
  264. package/dist/ScatterPlot.cjs +2 -0
  265. package/dist/ScatterPlot.cjs.map +1 -0
  266. package/dist/ScatterPlot.d.ts +266 -0
  267. package/dist/ScatterPlot.js +829 -0
  268. package/dist/ScatterPlot.js.map +1 -0
  269. package/dist/ScrollStory.cjs +2 -0
  270. package/dist/ScrollStory.cjs.map +1 -0
  271. package/dist/ScrollStory.d.ts +491 -0
  272. package/dist/ScrollStory.js +106 -0
  273. package/dist/ScrollStory.js.map +1 -0
  274. package/dist/SimpleLineChart.cjs +2 -0
  275. package/dist/SimpleLineChart.cjs.map +1 -0
  276. package/dist/SimpleLineChart.d.ts +230 -0
  277. package/dist/SimpleLineChart.js +620 -0
  278. package/dist/SimpleLineChart.js.map +1 -0
  279. package/dist/SingleGraphDashboard.cjs +2 -0
  280. package/dist/SingleGraphDashboard.cjs.map +1 -0
  281. package/dist/SingleGraphDashboard.d.ts +545 -0
  282. package/dist/SingleGraphDashboard.js +523 -0
  283. package/dist/SingleGraphDashboard.js.map +1 -0
  284. package/dist/SingleGraphDashboardFromConfig.cjs +2 -0
  285. package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -0
  286. package/dist/SingleGraphDashboardFromConfig.d.ts +547 -0
  287. package/dist/SingleGraphDashboardFromConfig.js +35 -0
  288. package/dist/SingleGraphDashboardFromConfig.js.map +1 -0
  289. package/dist/SlopeChart.cjs +2 -0
  290. package/dist/SlopeChart.cjs.map +1 -0
  291. package/dist/SlopeChart.d.ts +167 -0
  292. package/dist/SlopeChart.js +583 -0
  293. package/dist/SlopeChart.js.map +1 -0
  294. package/dist/Source.cjs +2 -0
  295. package/dist/Source.cjs.map +1 -0
  296. package/dist/Source.d.ts +16 -0
  297. package/dist/Source.js +41 -0
  298. package/dist/Source.js.map +1 -0
  299. package/dist/SparkLine.cjs +2 -0
  300. package/dist/SparkLine.cjs.map +1 -0
  301. package/dist/SparkLine.d.ts +139 -0
  302. package/dist/SparkLine.js +321 -0
  303. package/dist/SparkLine.js.map +1 -0
  304. package/dist/Spinner-C85UF28E.js +30 -0
  305. package/dist/Spinner-C85UF28E.js.map +1 -0
  306. package/dist/Spinner-DA6Z5E4n.cjs +2 -0
  307. package/dist/Spinner-DA6Z5E4n.cjs.map +1 -0
  308. package/dist/StatCardFromData.cjs +2 -0
  309. package/dist/StatCardFromData.cjs.map +1 -0
  310. package/dist/StatCardFromData.d.ts +115 -0
  311. package/dist/StatCardFromData.js +250 -0
  312. package/dist/StatCardFromData.js.map +1 -0
  313. package/dist/StripChart.cjs +2 -0
  314. package/dist/StripChart.cjs.map +1 -0
  315. package/dist/StripChart.d.ts +178 -0
  316. package/dist/StripChart.js +989 -0
  317. package/dist/StripChart.js.map +1 -0
  318. package/dist/ThreeDGlobe.cjs +2 -0
  319. package/dist/ThreeDGlobe.cjs.map +1 -0
  320. package/dist/ThreeDGlobe.d.ts +158 -0
  321. package/dist/ThreeDGlobe.js +452 -0
  322. package/dist/ThreeDGlobe.js.map +1 -0
  323. package/dist/ThresholdColorLegendWithMouseOver.cjs +2 -0
  324. package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -0
  325. package/dist/ThresholdColorLegendWithMouseOver.d.ts +16 -0
  326. package/dist/ThresholdColorLegendWithMouseOver.js +131 -0
  327. package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -0
  328. package/dist/Tooltip-DyM5snqx.js +46 -0
  329. package/dist/Tooltip-DyM5snqx.js.map +1 -0
  330. package/dist/Tooltip-n8z5bfav.cjs +2 -0
  331. package/dist/Tooltip-n8z5bfav.cjs.map +1 -0
  332. package/dist/TreeMapGraph.cjs +2 -0
  333. package/dist/TreeMapGraph.cjs.map +1 -0
  334. package/dist/TreeMapGraph.d.ts +158 -0
  335. package/dist/TreeMapGraph.js +761 -0
  336. package/dist/TreeMapGraph.js.map +1 -0
  337. package/dist/Types.cjs +2 -0
  338. package/dist/Types.cjs.map +1 -0
  339. package/dist/Types.d.ts +883 -0
  340. package/dist/Types.js +2 -0
  341. package/dist/Types.js.map +1 -0
  342. package/dist/Typography-Ctgfl1J5.js +140 -0
  343. package/dist/Typography-Ctgfl1J5.js.map +1 -0
  344. package/dist/Typography-k-kOjICQ.cjs +2 -0
  345. package/dist/Typography-k-kOjICQ.cjs.map +1 -0
  346. package/dist/UnitChart.cjs +2 -0
  347. package/dist/UnitChart.cjs.map +1 -0
  348. package/dist/UnitChart.d.ts +132 -0
  349. package/dist/UnitChart.js +217 -0
  350. package/dist/UnitChart.js.map +1 -0
  351. package/dist/XAxesLabels-CJMQbfVy.cjs +2 -0
  352. package/dist/XAxesLabels-CJMQbfVy.cjs.map +1 -0
  353. package/dist/XAxesLabels-DQFo_z2R.js +57 -0
  354. package/dist/XAxesLabels-DQFo_z2R.js.map +1 -0
  355. package/dist/XTicksAndGridLines-Bn9u5gOM.js +56 -0
  356. package/dist/XTicksAndGridLines-Bn9u5gOM.js.map +1 -0
  357. package/dist/XTicksAndGridLines-CCzXIV8d.cjs +2 -0
  358. package/dist/XTicksAndGridLines-CCzXIV8d.cjs.map +1 -0
  359. package/dist/YAxesLabels-BXLTX7AI.cjs +2 -0
  360. package/dist/YAxesLabels-BXLTX7AI.cjs.map +1 -0
  361. package/dist/YAxesLabels-H5-002X5.js +52 -0
  362. package/dist/YAxesLabels-H5-002X5.js.map +1 -0
  363. package/dist/YTicksAndGridLines-B6ah7CRf.js +56 -0
  364. package/dist/YTicksAndGridLines-B6ah7CRf.js.map +1 -0
  365. package/dist/YTicksAndGridLines-DBDuz6vb.cjs +2 -0
  366. package/dist/YTicksAndGridLines-DBDuz6vb.cjs.map +1 -0
  367. package/dist/_commonjsHelpers-DKOUU3wS.cjs +2 -0
  368. package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
  369. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  370. package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  371. package/dist/area-BE2wo7fv.js +53 -0
  372. package/dist/area-BE2wo7fv.js.map +1 -0
  373. package/dist/area-D3Qx7k7K.cjs +2 -0
  374. package/dist/area-D3Qx7k7K.cjs.map +1 -0
  375. package/dist/array-B7TkkRH0.js +89 -0
  376. package/dist/array-B7TkkRH0.js.map +1 -0
  377. package/dist/array-DKbXV8lR.cjs +2 -0
  378. package/dist/array-DKbXV8lR.cjs.map +1 -0
  379. package/dist/band-BEjh2CHI.js +47 -0
  380. package/dist/band-BEjh2CHI.js.map +1 -0
  381. package/dist/band-CAApY4Pd.cjs +2 -0
  382. package/dist/band-CAApY4Pd.cjs.map +1 -0
  383. package/dist/checkIfMultiple-BB7PlCNh.js +2759 -0
  384. package/dist/checkIfMultiple-BB7PlCNh.js.map +1 -0
  385. package/dist/checkIfMultiple-D5ysrI7G.cjs +12 -0
  386. package/dist/checkIfMultiple-D5ysrI7G.cjs.map +1 -0
  387. package/dist/checkIfNullOrUndefined-BCW3Y1ML.cjs +2 -0
  388. package/dist/checkIfNullOrUndefined-BCW3Y1ML.cjs.map +1 -0
  389. package/dist/checkIfNullOrUndefined-DmfiKkNw.js +7 -0
  390. package/dist/checkIfNullOrUndefined-DmfiKkNw.js.map +1 -0
  391. package/dist/customArea-BYNyxAkm.cjs +2 -0
  392. package/dist/customArea-BYNyxAkm.cjs.map +1 -0
  393. package/dist/customArea-CaxScFmW.js +175 -0
  394. package/dist/customArea-CaxScFmW.js.map +1 -0
  395. package/dist/defaultLocale-BEa-49Qz.js +172 -0
  396. package/dist/defaultLocale-BEa-49Qz.js.map +1 -0
  397. package/dist/defaultLocale-DIVzfLaQ.cjs +2 -0
  398. package/dist/defaultLocale-DIVzfLaQ.cjs.map +1 -0
  399. package/dist/delaunay-C1uAf38t.js +684 -0
  400. package/dist/delaunay-C1uAf38t.js.map +1 -0
  401. package/dist/delaunay-rcy0HhZi.cjs +2 -0
  402. package/dist/delaunay-rcy0HhZi.cjs.map +1 -0
  403. package/dist/ensureCompleteData-BBDZbDCE.js +102 -0
  404. package/dist/ensureCompleteData-BBDZbDCE.js.map +1 -0
  405. package/dist/ensureCompleteData-DqWQ2Zbi.cjs +2 -0
  406. package/dist/ensureCompleteData-DqWQ2Zbi.cjs.map +1 -0
  407. package/dist/excelDownload-BOA-lskf.js +19 -0
  408. package/dist/excelDownload-BOA-lskf.js.map +1 -0
  409. package/dist/excelDownload-BQpsCa62.cjs +2 -0
  410. package/dist/excelDownload-BQpsCa62.cjs.map +1 -0
  411. package/dist/fetchAndParseData-Bcmr659B.js +1196 -0
  412. package/dist/fetchAndParseData-Bcmr659B.js.map +1 -0
  413. package/dist/fetchAndParseData-DmgQtB9n.cjs +16 -0
  414. package/dist/fetchAndParseData-DmgQtB9n.cjs.map +1 -0
  415. package/dist/fetchAndParseData.cjs +2 -0
  416. package/dist/fetchAndParseData.cjs.map +1 -0
  417. package/dist/fetchAndParseData.d.ts +84 -0
  418. package/dist/fetchAndParseData.js +10 -0
  419. package/dist/fetchAndParseData.js.map +1 -0
  420. package/dist/filterData-B8ocT57s.js +14 -0
  421. package/dist/filterData-B8ocT57s.js.map +1 -0
  422. package/dist/filterData-DN6py7y_.cjs +2 -0
  423. package/dist/filterData-DN6py7y_.cjs.map +1 -0
  424. package/dist/generateRandomString-B5zBiJzS.cjs +2 -0
  425. package/dist/generateRandomString-B5zBiJzS.cjs.map +1 -0
  426. package/dist/generateRandomString-za3IQGfQ.js +11 -0
  427. package/dist/generateRandomString-za3IQGfQ.js.map +1 -0
  428. package/dist/getGraphList-DuColTJM.js +265 -0
  429. package/dist/getGraphList-DuColTJM.js.map +1 -0
  430. package/dist/getGraphList-gf02xgT2.cjs +2 -0
  431. package/dist/getGraphList-gf02xgT2.cjs.map +1 -0
  432. package/dist/getJenks-TWQvbuOz.cjs +2 -0
  433. package/dist/getJenks-TWQvbuOz.cjs.map +1 -0
  434. package/dist/getJenks-VhM3GIoC.js +23 -0
  435. package/dist/getJenks-VhM3GIoC.js.map +1 -0
  436. package/dist/getSchema.cjs +2 -0
  437. package/dist/getSchema.cjs.map +1 -0
  438. package/dist/getSchema.d.ts +3256 -0
  439. package/dist/getSchema.js +911 -0
  440. package/dist/getSchema.js.map +1 -0
  441. package/dist/getSliderMarks-C0jptXeP.js +1054 -0
  442. package/dist/getSliderMarks-C0jptXeP.js.map +1 -0
  443. package/dist/getSliderMarks-CtsEXiLV.cjs +6 -0
  444. package/dist/getSliderMarks-CtsEXiLV.cjs.map +1 -0
  445. package/dist/getTextColorBasedOnBgColor-B6Nk2WBf.js +28 -0
  446. package/dist/getTextColorBasedOnBgColor-B6Nk2WBf.js.map +1 -0
  447. package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs +2 -0
  448. package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs.map +1 -0
  449. package/dist/getUniqValue-BtUENB2H.js +20 -0
  450. package/dist/getUniqValue-BtUENB2H.js.map +1 -0
  451. package/dist/getUniqValue-CHqgSss5.cjs +2 -0
  452. package/dist/getUniqValue-CHqgSss5.cjs.map +1 -0
  453. package/dist/imageDownload-CgDcm1Sj.cjs +3 -0
  454. package/dist/imageDownload-CgDcm1Sj.cjs.map +1 -0
  455. package/dist/imageDownload-Dcci2LEy.js +495 -0
  456. package/dist/imageDownload-Dcci2LEy.js.map +1 -0
  457. package/dist/index-27yTRcko.js +35 -0
  458. package/dist/index-27yTRcko.js.map +1 -0
  459. package/dist/index-B0rbzOoC.cjs +2 -0
  460. package/dist/index-B0rbzOoC.cjs.map +1 -0
  461. package/dist/index-BLizQDlg.js +658 -0
  462. package/dist/index-BLizQDlg.js.map +1 -0
  463. package/dist/index-BVnYktl4.js +435 -0
  464. package/dist/index-BVnYktl4.js.map +1 -0
  465. package/dist/index-BW_-wD2k.cjs +2 -0
  466. package/dist/index-BW_-wD2k.cjs.map +1 -0
  467. package/dist/index-BXns0-ng.cjs +2 -0
  468. package/dist/index-BXns0-ng.cjs.map +1 -0
  469. package/dist/index-BczVvEBZ.cjs +2 -0
  470. package/dist/index-BczVvEBZ.cjs.map +1 -0
  471. package/dist/index-BmCqpO1B.js +342 -0
  472. package/dist/index-BmCqpO1B.js.map +1 -0
  473. package/dist/index-BxAUvrua.js +120 -0
  474. package/dist/index-BxAUvrua.js.map +1 -0
  475. package/dist/index-BzeLQvXk.cjs +2 -0
  476. package/dist/index-BzeLQvXk.cjs.map +1 -0
  477. package/dist/index-C1rRk_50.js +273 -0
  478. package/dist/index-C1rRk_50.js.map +1 -0
  479. package/dist/index-C21TvELx.cjs +2 -0
  480. package/dist/index-C21TvELx.cjs.map +1 -0
  481. package/dist/index-CHPV5EwG-BPSP-7Jg.js +3341 -0
  482. package/dist/index-CHPV5EwG-BPSP-7Jg.js.map +1 -0
  483. package/dist/index-CHPV5EwG-DDoeWRVt.cjs +44 -0
  484. package/dist/index-CHPV5EwG-DDoeWRVt.cjs.map +1 -0
  485. package/dist/index-CZbIGs8q.cjs +2 -0
  486. package/dist/index-CZbIGs8q.cjs.map +1 -0
  487. package/dist/index-CaAIPGZo.js +631 -0
  488. package/dist/index-CaAIPGZo.js.map +1 -0
  489. package/dist/index-CylX-pWB.cjs +2 -0
  490. package/dist/index-CylX-pWB.cjs.map +1 -0
  491. package/dist/index-D7ltPi18.js +26 -0
  492. package/dist/index-D7ltPi18.js.map +1 -0
  493. package/dist/index-D9h2WYDS.cjs +22 -0
  494. package/dist/index-D9h2WYDS.cjs.map +1 -0
  495. package/dist/index-DG3YrCr5-D3FrrXj8.js +459 -0
  496. package/dist/index-DG3YrCr5-D3FrrXj8.js.map +1 -0
  497. package/dist/index-DG3YrCr5-v7rayV3N.cjs +2 -0
  498. package/dist/index-DG3YrCr5-v7rayV3N.cjs.map +1 -0
  499. package/dist/index-DVOJ7vxH.cjs +10 -0
  500. package/dist/index-DVOJ7vxH.cjs.map +1 -0
  501. package/dist/index-D_n8aamX.cjs +2 -0
  502. package/dist/index-D_n8aamX.cjs.map +1 -0
  503. package/dist/index-Ds0uHjK9.cjs +2 -0
  504. package/dist/index-Ds0uHjK9.cjs.map +1 -0
  505. package/dist/index-DxagiOHo.js +707 -0
  506. package/dist/index-DxagiOHo.js.map +1 -0
  507. package/dist/index-OCoyy1wG.js +635 -0
  508. package/dist/index-OCoyy1wG.js.map +1 -0
  509. package/dist/index-UV9hjG_S.js +53 -0
  510. package/dist/index-UV9hjG_S.js.map +1 -0
  511. package/dist/index-n_RI8T0n.js +77 -0
  512. package/dist/index-n_RI8T0n.js.map +1 -0
  513. package/dist/index-tvAyXPPW-DBlMKnNB.js +47 -0
  514. package/dist/index-tvAyXPPW-DBlMKnNB.js.map +1 -0
  515. package/dist/index-tvAyXPPW-DPOG-C2i.cjs +2 -0
  516. package/dist/index-tvAyXPPW-DPOG-C2i.cjs.map +1 -0
  517. package/dist/index.cjs +1 -67
  518. package/dist/index.cjs.map +1 -1
  519. package/dist/index.d.ts +1 -5
  520. package/dist/index.js +178 -52486
  521. package/dist/index.js.map +1 -1
  522. package/dist/init-BhZylTFx.js +63 -0
  523. package/dist/init-BhZylTFx.js.map +1 -0
  524. package/dist/init-DU0ybBc_.cjs +2 -0
  525. package/dist/init-DU0ybBc_.cjs.map +1 -0
  526. package/dist/line-CPfhohvF.js +68 -0
  527. package/dist/line-CPfhohvF.js.map +1 -0
  528. package/dist/line-DHV4JwCR.cjs +2 -0
  529. package/dist/line-DHV4JwCR.cjs.map +1 -0
  530. package/dist/linear-BVckp9RD.cjs +2 -0
  531. package/dist/linear-BVckp9RD.cjs.map +1 -0
  532. package/dist/linear-DUdu7l2G.js +221 -0
  533. package/dist/linear-DUdu7l2G.js.map +1 -0
  534. package/dist/numberFormattingFunction-02t-wJta.cjs +2 -0
  535. package/dist/numberFormattingFunction-02t-wJta.cjs.map +1 -0
  536. package/dist/numberFormattingFunction-14YCbkN2.js +13 -0
  537. package/dist/numberFormattingFunction-14YCbkN2.js.map +1 -0
  538. package/dist/ordinal-BOeNbyae.cjs +2 -0
  539. package/dist/ordinal-BOeNbyae.cjs.map +1 -0
  540. package/dist/ordinal-w9Lu4Stb.js +62 -0
  541. package/dist/ordinal-w9Lu4Stb.js.map +1 -0
  542. package/dist/parse-DlCRUFh_.js +2768 -0
  543. package/dist/parse-DlCRUFh_.js.map +1 -0
  544. package/dist/parse-hMnG_lRV.cjs +2 -0
  545. package/dist/parse-hMnG_lRV.cjs.map +1 -0
  546. package/dist/pointer-CWRWOsrb.js +23 -0
  547. package/dist/pointer-CWRWOsrb.js.map +1 -0
  548. package/dist/pointer-Dkq5NV1q.cjs +2 -0
  549. package/dist/pointer-Dkq5NV1q.cjs.map +1 -0
  550. package/dist/pow-B5-jkdHU.cjs +2 -0
  551. package/dist/pow-B5-jkdHU.cjs.map +1 -0
  552. package/dist/pow-e8zx3AQJ.js +35 -0
  553. package/dist/pow-e8zx3AQJ.js.map +1 -0
  554. package/dist/proxy-DJxJg1kD.js +4612 -0
  555. package/dist/proxy-DJxJg1kD.js.map +1 -0
  556. package/dist/proxy-PQd2AItT.cjs +2 -0
  557. package/dist/proxy-PQd2AItT.cjs.map +1 -0
  558. package/dist/removeOutliers-DR48e-18.js +57 -0
  559. package/dist/removeOutliers-DR48e-18.js.map +1 -0
  560. package/dist/removeOutliers-WELHHqiI.cjs +2 -0
  561. package/dist/removeOutliers-WELHHqiI.cjs.map +1 -0
  562. package/dist/select-Bnfk0lJx.cjs +2 -0
  563. package/dist/select-Bnfk0lJx.cjs.map +1 -0
  564. package/dist/select-DKy99ogv.js +584 -0
  565. package/dist/select-DKy99ogv.js.map +1 -0
  566. package/dist/simple-statistics-flVzqVtt.js +65 -0
  567. package/dist/simple-statistics-flVzqVtt.js.map +1 -0
  568. package/dist/simple-statistics-xm8c0LQQ.cjs +2 -0
  569. package/dist/simple-statistics-xm8c0LQQ.cjs.map +1 -0
  570. package/dist/step-BZ3C8QFW.cjs +2 -0
  571. package/dist/step-BZ3C8QFW.cjs.map +1 -0
  572. package/dist/step-BrDul-H4.js +119 -0
  573. package/dist/step-BrDul-H4.js.map +1 -0
  574. package/dist/string-B8KlVSPX.js +364 -0
  575. package/dist/string-B8KlVSPX.js.map +1 -0
  576. package/dist/string-CRoCZCYa.cjs +2 -0
  577. package/dist/string-CRoCZCYa.cjs.map +1 -0
  578. package/dist/string2HTML-CWHGfz_d.js +758 -0
  579. package/dist/string2HTML-CWHGfz_d.js.map +1 -0
  580. package/dist/string2HTML-D2Avudmb.cjs +3 -0
  581. package/dist/string2HTML-D2Avudmb.cjs.map +1 -0
  582. package/dist/style.css +1 -1
  583. package/dist/svgDownload-C2-E3yf2.js +9 -0
  584. package/dist/svgDownload-C2-E3yf2.js.map +1 -0
  585. package/dist/svgDownload-D9zEGjTF.cjs +2 -0
  586. package/dist/svgDownload-D9zEGjTF.cjs.map +1 -0
  587. package/dist/threshold-DFfqcDMa.js +23 -0
  588. package/dist/threshold-DFfqcDMa.js.map +1 -0
  589. package/dist/threshold-DNsSUf8Q.cjs +2 -0
  590. package/dist/threshold-DNsSUf8Q.cjs.map +1 -0
  591. package/dist/time-Byw_jYQ7.cjs +2 -0
  592. package/dist/time-Byw_jYQ7.cjs.map +1 -0
  593. package/dist/time-BzJP5SPC.js +715 -0
  594. package/dist/time-BzJP5SPC.js.map +1 -0
  595. package/dist/timer-B39XOBYL.js +124 -0
  596. package/dist/timer-B39XOBYL.js.map +1 -0
  597. package/dist/timer-CKyBCVzT.cjs +2 -0
  598. package/dist/timer-CKyBCVzT.cjs.map +1 -0
  599. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs +4 -0
  600. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs.map +1 -0
  601. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js +145 -0
  602. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js.map +1 -0
  603. package/dist/transformData.cjs +2 -0
  604. package/dist/transformData.cjs.map +1 -0
  605. package/dist/transformData.d.ts +170 -0
  606. package/dist/transformData.js +10 -0
  607. package/dist/transformData.js.map +1 -0
  608. package/dist/transformDataForAggregation-BUGJnson.cjs +2 -0
  609. package/dist/transformDataForAggregation-BUGJnson.cjs.map +1 -0
  610. package/dist/transformDataForAggregation-DAQJWGNL.js +759 -0
  611. package/dist/transformDataForAggregation-DAQJWGNL.js.map +1 -0
  612. package/dist/transformDataForGraphFromFile-CrntpaMU.cjs +2 -0
  613. package/dist/transformDataForGraphFromFile-CrntpaMU.cjs.map +1 -0
  614. package/dist/transformDataForGraphFromFile-DdNiOWeC.js +24 -0
  615. package/dist/transformDataForGraphFromFile-DdNiOWeC.js.map +1 -0
  616. package/dist/use-in-view-BAHrBy6b.js +40 -0
  617. package/dist/use-in-view-BAHrBy6b.js.map +1 -0
  618. package/dist/use-in-view-BCmzDU2O.cjs +2 -0
  619. package/dist/use-in-view-BCmzDU2O.cjs.map +1 -0
  620. package/dist/utils.cjs +2 -0
  621. package/dist/utils.cjs.map +1 -0
  622. package/dist/utils.d.ts +217 -0
  623. package/dist/utils.js +27 -0
  624. package/dist/utils.js.map +1 -0
  625. package/dist/validateSchema.cjs +2 -0
  626. package/dist/validateSchema.cjs.map +1 -0
  627. package/dist/validateSchema.d.ts +68 -0
  628. package/dist/validateSchema.js +105 -0
  629. package/dist/validateSchema.js.map +1 -0
  630. package/dist/x-CnsEH4Ox-CGGXQl4M.cjs +27 -0
  631. package/dist/x-CnsEH4Ox-CGGXQl4M.cjs.map +1 -0
  632. package/dist/x-CnsEH4Ox-DDvAJndW.js +101 -0
  633. package/dist/x-CnsEH4Ox-DDvAJndW.js.map +1 -0
  634. package/dist/y-D0sAaVii.js +421 -0
  635. package/dist/y-D0sAaVii.js.map +1 -0
  636. package/dist/y-QcCbqrzx.cjs +2 -0
  637. package/dist/y-QcCbqrzx.cjs.map +1 -0
  638. package/dist/zoom-Lo7IAUfC.cjs +2 -0
  639. package/dist/zoom-Lo7IAUfC.cjs.map +1 -0
  640. package/dist/zoom-_lqdiGoI.js +1983 -0
  641. package/dist/zoom-_lqdiGoI.js.map +1 -0
  642. package/package.json +340 -4
@@ -0,0 +1,165 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ declare interface AxesClassNameObject {
4
+ gridLines?: string;
5
+ labels?: string;
6
+ title?: string;
7
+ axis?: string;
8
+ }
9
+
10
+ declare interface AxesStyleObject {
11
+ gridLines?: React.CSSProperties;
12
+ labels?: React.CSSProperties;
13
+ title?: React.CSSProperties;
14
+ axis?: React.CSSProperties;
15
+ }
16
+
17
+ declare interface ClassNameObject {
18
+ title?: string;
19
+ footnote?: string;
20
+ source?: string;
21
+ description?: string;
22
+ tooltip?: string;
23
+ xAxis?: AxesClassNameObject;
24
+ yAxis?: AxesClassNameObject;
25
+ legend?: string;
26
+ graphContainer?: string;
27
+ graphObjectValues?: string;
28
+ dataConnectors?: string;
29
+ mouseOverLine?: string;
30
+ regLine?: string;
31
+ dataCards?: string;
32
+ }
33
+
34
+ export declare function Histogram(props: Props): JSX.Element;
35
+
36
+ declare interface HistogramDataType {
37
+ value: number;
38
+ data?: object;
39
+ }
40
+
41
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
42
+
43
+ declare interface Props {
44
+ /** Array of data objects */
45
+ data: HistogramDataType[];
46
+ /** Type of the graph for histogram */
47
+ graphType?: 'circlePacking' | 'treeMap' | 'barGraph' | 'donutChart';
48
+ /** Title of the graph */
49
+ graphTitle?: string | React.ReactNode;
50
+ /** Description of the graph */
51
+ graphDescription?: string | React.ReactNode;
52
+ /** Footnote for the graph */
53
+ footNote?: string | React.ReactNode;
54
+ /** Source data for the graph */
55
+ sources?: SourcesDataType[];
56
+ /** Accessibility label */
57
+ ariaLabel?: string;
58
+ /** Colors for visualization */
59
+ colors?: string[] | string;
60
+ /** Background color of the graph */
61
+ backgroundColor?: string | boolean;
62
+ /** Custom styles for the graph. Each object should be a valid React CSS style object. */
63
+ styles?: StyleObject;
64
+ /** Custom class names */
65
+ classNames?: ClassNameObject;
66
+ /** Width of the graph */
67
+ width?: number;
68
+ /** Height of the graph */
69
+ height?: number;
70
+ /** Minimum height of the graph */
71
+ minHeight?: number;
72
+ /** Relative height scaling factor. This overwrites the height props */
73
+ relativeHeight?: number;
74
+ /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
75
+ padding?: string;
76
+ /** Left margin of the graph */
77
+ leftMargin?: number;
78
+ /** Right margin of the graph */
79
+ rightMargin?: number;
80
+ /** Top margin of the graph */
81
+ topMargin?: number;
82
+ /** Bottom margin of the graph */
83
+ bottomMargin?: number;
84
+ /** Padding between bars */
85
+ barPadding?: number;
86
+ /** Maximum thickness of bars */
87
+ maxBarThickness?: number;
88
+ /** Maximum value for the chart */
89
+ maxValue?: number;
90
+ /** Truncate labels by specified length */
91
+ truncateBy?: number;
92
+ /** Reference values for comparison */
93
+ refValues?: ReferenceDataType[];
94
+ /** Number of bins for the histogram */
95
+ numberOfBins?: number;
96
+ /** Orientation of the bar graph. Only applicable if graphType is barGraph. */
97
+ barGraphLayout?: 'vertical' | 'horizontal';
98
+ /** Stroke width of the arcs and circle of the donut. Only applicable if graphType is donutChart. */
99
+ donutStrokeWidth?: number;
100
+ /** Sorting order for data. This is overwritten by labelOrder prop */
101
+ sortData?: 'asc' | 'desc';
102
+ /** Toggle visibility of labels */
103
+ showLabels?: boolean;
104
+ /** Toggle visibility of values */
105
+ showValues?: boolean;
106
+ /** Toggle visibility of axis ticks */
107
+ showTicks?: boolean;
108
+ /** Specifies the number of decimal places to display in the value. */
109
+ precision?: number;
110
+ /** Enable graph download option as png */
111
+ graphDownload?: boolean;
112
+ /** Enable data download option as a csv */
113
+ dataDownload?: boolean;
114
+ /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
115
+ tooltip?: string | ((_d: any) => React.ReactNode);
116
+ /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */
117
+ detailsOnClick?: string | ((_d: any) => React.ReactNode);
118
+ /** Callback for mouse over event */
119
+ onSeriesMouseOver?: (_d: any) => void;
120
+ /** Callback for mouse click event */
121
+ onSeriesMouseClick?: (_d: any) => void;
122
+ /** Language setting */
123
+ language?: Languages;
124
+ /** Color theme */
125
+ theme?: 'light' | 'dark';
126
+ /** Unique ID for the graph */
127
+ graphID?: string;
128
+ }
129
+
130
+ declare interface ReferenceDataType {
131
+ value: number | null;
132
+ text: string;
133
+ color?: string;
134
+ styles?: {
135
+ line?: React.CSSProperties;
136
+ text?: React.CSSProperties;
137
+ };
138
+ classNames?: {
139
+ line?: string;
140
+ text?: string;
141
+ };
142
+ }
143
+
144
+ declare interface SourcesDataType {
145
+ source: string;
146
+ link?: string;
147
+ }
148
+
149
+ declare interface StyleObject {
150
+ title?: React.CSSProperties;
151
+ footnote?: React.CSSProperties;
152
+ source?: React.CSSProperties;
153
+ description?: React.CSSProperties;
154
+ graphContainer?: React.CSSProperties;
155
+ tooltip?: React.CSSProperties;
156
+ xAxis?: AxesStyleObject;
157
+ yAxis?: AxesStyleObject;
158
+ graphObjectValues?: React.CSSProperties;
159
+ dataConnectors?: React.CSSProperties;
160
+ mouseOverLine?: React.CSSProperties;
161
+ regLine?: React.CSSProperties;
162
+ dataCards?: React.CSSProperties;
163
+ }
164
+
165
+ export { }
@@ -0,0 +1,288 @@
1
+ import { j as C } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
+ import { useState as Z, useEffect as _ } from "react";
3
+ import { y as rr } from "./Spinner-C85UF28E.js";
4
+ import { e as P, C as er } from "./index-BVnYktl4.js";
5
+ import { TreeMapGraph as tr } from "./TreeMapGraph.js";
6
+ import { DonutChart as or } from "./DonutChart.js";
7
+ import { SimpleBarGraph as ir } from "./BarGraph.js";
8
+ import { Colors as z } from "./Colors.js";
9
+ import { b as ar } from "./init-BhZylTFx.js";
10
+ import { b as E, d as nr } from "./linear-DUdu7l2G.js";
11
+ function lr(a, l) {
12
+ let h = 0;
13
+ for (let n of a)
14
+ n != null && (n = +n) >= n && ++h;
15
+ return h;
16
+ }
17
+ function sr(a) {
18
+ return a;
19
+ }
20
+ var fr = Array.prototype, hr = fr.slice;
21
+ function V(a) {
22
+ return () => a;
23
+ }
24
+ function ur(a, l, h) {
25
+ let n;
26
+ for (; ; ) {
27
+ const r = E(a, l, h);
28
+ if (r === n || r === 0 || !isFinite(r))
29
+ return [a, l];
30
+ r > 0 ? (a = Math.floor(a / r) * r, l = Math.ceil(l / r) * r) : r < 0 && (a = Math.ceil(a * r) / r, l = Math.floor(l * r) / r), n = r;
31
+ }
32
+ }
33
+ function cr(a) {
34
+ return Math.max(1, Math.ceil(Math.log(lr(a)) / Math.LN2) + 1);
35
+ }
36
+ function mr() {
37
+ var a = sr, l = P, h = cr;
38
+ function n(r) {
39
+ Array.isArray(r) || (r = Array.from(r));
40
+ var e, x = r.length, s, m, p = new Array(x);
41
+ for (e = 0; e < x; ++e)
42
+ p[e] = a(r[e], e, r);
43
+ var c = l(p), t = c[0], o = c[1], i = h(p, t, o);
44
+ if (!Array.isArray(i)) {
45
+ const v = o, y = +i;
46
+ if (l === P && ([t, o] = ur(t, o, y)), i = nr(t, o, y), i[0] <= t && (m = E(t, o, y)), i[i.length - 1] >= o)
47
+ if (v >= o && l === P) {
48
+ const u = E(t, o, y);
49
+ isFinite(u) && (u > 0 ? o = (Math.floor(o / u) + 1) * u : u < 0 && (o = (Math.ceil(o * -u) + 1) / -u));
50
+ } else
51
+ i.pop();
52
+ }
53
+ for (var f = i.length, g = 0, d = f; i[g] <= t; ) ++g;
54
+ for (; i[d - 1] > o; ) --d;
55
+ (g || d < f) && (i = i.slice(g, d), f = d - g);
56
+ var M = new Array(f + 1), w;
57
+ for (e = 0; e <= f; ++e)
58
+ w = M[e] = [], w.x0 = e > 0 ? i[e - 1] : t, w.x1 = e < f ? i[e] : o;
59
+ if (isFinite(m)) {
60
+ if (m > 0)
61
+ for (e = 0; e < x; ++e)
62
+ (s = p[e]) != null && t <= s && s <= o && M[Math.min(f, Math.floor((s - t) / m))].push(r[e]);
63
+ else if (m < 0) {
64
+ for (e = 0; e < x; ++e)
65
+ if ((s = p[e]) != null && t <= s && s <= o) {
66
+ const v = Math.floor((t - s) * m);
67
+ M[Math.min(f, v + (i[v] <= s))].push(r[e]);
68
+ }
69
+ }
70
+ } else
71
+ for (e = 0; e < x; ++e)
72
+ (s = p[e]) != null && t <= s && s <= o && M[ar(i, s, 0, f)].push(r[e]);
73
+ return M;
74
+ }
75
+ return n.value = function(r) {
76
+ return arguments.length ? (a = typeof r == "function" ? r : V(r), n) : a;
77
+ }, n.domain = function(r) {
78
+ return arguments.length ? (l = typeof r == "function" ? r : V([r[0], r[1]]), n) : l;
79
+ }, n.thresholds = function(r) {
80
+ return arguments.length ? (h = typeof r == "function" ? r : V(Array.isArray(r) ? hr.call(r) : r), n) : h;
81
+ }, n;
82
+ }
83
+ function kr(a) {
84
+ const {
85
+ data: l,
86
+ graphTitle: h,
87
+ sources: n,
88
+ graphDescription: r,
89
+ barPadding: e,
90
+ showValues: x,
91
+ showTicks: s,
92
+ leftMargin: m,
93
+ rightMargin: p,
94
+ height: c,
95
+ width: t,
96
+ footNote: o,
97
+ colors: i,
98
+ padding: f,
99
+ backgroundColor: g,
100
+ topMargin: d,
101
+ bottomMargin: M,
102
+ showLabels: w,
103
+ relativeHeight: v,
104
+ tooltip: y,
105
+ onSeriesMouseOver: u,
106
+ refValues: W,
107
+ graphID: A,
108
+ maxValue: q,
109
+ onSeriesMouseClick: S,
110
+ graphDownload: D,
111
+ dataDownload: $,
112
+ numberOfBins: I,
113
+ truncateBy: U,
114
+ graphType: H,
115
+ barGraphLayout: J,
116
+ donutStrokeWidth: K,
117
+ sortData: R,
118
+ language: F,
119
+ minHeight: O,
120
+ theme: j = "light",
121
+ maxBarThickness: Q,
122
+ ariaLabel: T,
123
+ detailsOnClick: B,
124
+ styles: G,
125
+ classNames: L,
126
+ precision: N
127
+ } = a, [k, X] = Z([]);
128
+ return _(() => {
129
+ const Y = mr().thresholds(I || 10).value((b) => b.value)(l).map((b) => ({
130
+ label: `${b.x0}-${b.x1}`,
131
+ size: b.length,
132
+ data: {
133
+ options: `${b.x0}-${b.x1}`,
134
+ frequency: b.length
135
+ }
136
+ }));
137
+ X(Y);
138
+ }, [l, I]), k.length === 0 ? /* @__PURE__ */ C.jsx("div", { style: { width: `${t}px`, height: `${c}px`, margin: "auto" }, children: /* @__PURE__ */ C.jsx("div", { className: "flex m-auto items-center justify-center p-0 leading-none text-base h-40", children: /* @__PURE__ */ C.jsx(rr, {}) }) }) : H === "circlePacking" ? /* @__PURE__ */ C.jsx(
139
+ er,
140
+ {
141
+ colors: i || z.graphMainColor,
142
+ graphTitle: h,
143
+ graphDescription: r,
144
+ footNote: o,
145
+ width: t,
146
+ height: c,
147
+ sources: n,
148
+ leftMargin: m,
149
+ rightMargin: p,
150
+ backgroundColor: g,
151
+ padding: f,
152
+ topMargin: d,
153
+ bottomMargin: M,
154
+ relativeHeight: v,
155
+ showLabels: w,
156
+ tooltip: y,
157
+ onSeriesMouseOver: u,
158
+ showColorScale: !1,
159
+ showValues: x,
160
+ graphID: A,
161
+ onSeriesMouseClick: S,
162
+ graphDownload: D,
163
+ dataDownload: $,
164
+ data: k,
165
+ language: F,
166
+ minHeight: O,
167
+ theme: j,
168
+ ariaLabel: T,
169
+ detailsOnClick: B,
170
+ styles: G,
171
+ classNames: L,
172
+ precision: N
173
+ }
174
+ ) : H === "treeMap" ? /* @__PURE__ */ C.jsx(
175
+ tr,
176
+ {
177
+ colors: i || z.graphMainColor,
178
+ graphTitle: h,
179
+ graphDescription: r,
180
+ footNote: o,
181
+ width: t,
182
+ height: c,
183
+ sources: n,
184
+ leftMargin: m,
185
+ rightMargin: p,
186
+ backgroundColor: g,
187
+ padding: f,
188
+ topMargin: d,
189
+ bottomMargin: M,
190
+ relativeHeight: v,
191
+ showLabels: w,
192
+ tooltip: y,
193
+ onSeriesMouseOver: u,
194
+ showColorScale: !1,
195
+ showValues: x,
196
+ graphID: A,
197
+ onSeriesMouseClick: S,
198
+ graphDownload: D,
199
+ dataDownload: $,
200
+ data: k,
201
+ language: F,
202
+ minHeight: O,
203
+ theme: j,
204
+ ariaLabel: T,
205
+ detailsOnClick: B,
206
+ styles: G,
207
+ classNames: L,
208
+ precision: N
209
+ }
210
+ ) : H === "donutChart" ? /* @__PURE__ */ C.jsx(
211
+ or,
212
+ {
213
+ colors: i || z[j].categoricalColors.colors,
214
+ graphTitle: h,
215
+ graphDescription: r,
216
+ footNote: o,
217
+ radius: t && c ? t < c ? t : c : t || c || void 0,
218
+ sources: n,
219
+ backgroundColor: g,
220
+ padding: f,
221
+ tooltip: y,
222
+ onSeriesMouseOver: u,
223
+ graphID: A,
224
+ onSeriesMouseClick: S,
225
+ graphDownload: D,
226
+ dataDownload: $,
227
+ data: k,
228
+ strokeWidth: K,
229
+ showColorScale: !0,
230
+ sortData: R,
231
+ language: F,
232
+ theme: j,
233
+ ariaLabel: T,
234
+ detailsOnClick: B,
235
+ styles: G,
236
+ classNames: L,
237
+ precision: N
238
+ }
239
+ ) : /* @__PURE__ */ C.jsx(
240
+ ir,
241
+ {
242
+ colors: i || z.graphMainColor,
243
+ graphTitle: h,
244
+ graphDescription: r,
245
+ footNote: o,
246
+ width: t,
247
+ height: c,
248
+ sources: n,
249
+ leftMargin: m,
250
+ rightMargin: p,
251
+ backgroundColor: g,
252
+ padding: f,
253
+ topMargin: d,
254
+ bottomMargin: M,
255
+ relativeHeight: v,
256
+ showLabels: w,
257
+ tooltip: y,
258
+ onSeriesMouseOver: u,
259
+ showColorScale: !1,
260
+ showValues: x,
261
+ graphID: A,
262
+ onSeriesMouseClick: S,
263
+ graphDownload: D,
264
+ dataDownload: $,
265
+ data: k,
266
+ barPadding: e,
267
+ refValues: W,
268
+ truncateBy: U,
269
+ maxValue: q,
270
+ showTicks: s,
271
+ sortData: R,
272
+ language: F,
273
+ minHeight: O,
274
+ theme: j,
275
+ maxBarThickness: Q,
276
+ ariaLabel: T,
277
+ orientation: J,
278
+ detailsOnClick: B,
279
+ styles: G,
280
+ classNames: L,
281
+ precision: N
282
+ }
283
+ );
284
+ }
285
+ export {
286
+ kr as Histogram
287
+ };
288
+ //# sourceMappingURL=Histogram.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Histogram.js","sources":["../node_modules/d3-array/src/count.js","../node_modules/d3-array/src/identity.js","../node_modules/d3-array/src/array.js","../node_modules/d3-array/src/constant.js","../node_modules/d3-array/src/nice.js","../node_modules/d3-array/src/threshold/sturges.js","../node_modules/d3-array/src/bin.js","../src/Components/Graphs/Histogram/index.tsx"],"sourcesContent":["export default function count(values, valueof) {\n let count = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count;\n }\n }\n }\n return count;\n}\n","export default function identity(x) {\n return x;\n}\n","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","export default function constant(x) {\n return () => x;\n}\n","import {tickIncrement} from \"./ticks.js\";\n\nexport default function nice(start, stop, count) {\n let prestep;\n while (true) {\n const step = tickIncrement(start, stop, count);\n if (step === prestep || step === 0 || !isFinite(step)) {\n return [start, stop];\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n }\n prestep = step;\n }\n}\n","import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n","import {slice} from \"./array.js\";\nimport bisect from \"./bisect.js\";\nimport constant from \"./constant.js\";\nimport extent from \"./extent.js\";\nimport identity from \"./identity.js\";\nimport nice from \"./nice.js\";\nimport ticks, {tickIncrement} from \"./ticks.js\";\nimport sturges from \"./threshold/sturges.js\";\n\nexport default function bin() {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n if (!Array.isArray(data)) data = Array.from(data);\n\n var i,\n n = data.length,\n x,\n step,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1);\n\n // Convert number of thresholds into uniform thresholds, and nice the\n // default domain accordingly.\n if (!Array.isArray(tz)) {\n const max = x1, tn = +tz;\n if (domain === extent) [x0, x1] = nice(x0, x1, tn);\n tz = ticks(x0, x1, tn);\n\n // If the domain is aligned with the first tick (which it will by\n // default), then we can use quantization rather than bisection to bin\n // values, which is substantially faster.\n if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);\n\n // If the last threshold is coincident with the domain’s upper bound, the\n // last bin will be zero-width. If the default domain is used, and this\n // last threshold is coincident with the maximum input value, we can\n // extend the niced upper bound by one tick to ensure uniform bin widths;\n // otherwise, we simply remove the last threshold. Note that we don’t\n // coerce values or the domain to numbers, and thus must be careful to\n // compare order (>=) rather than strict equality (===)!\n if (tz[tz.length - 1] >= x1) {\n if (max >= x1 && domain === extent) {\n const step = tickIncrement(x0, x1, tn);\n if (isFinite(step)) {\n if (step > 0) {\n x1 = (Math.floor(x1 / step) + 1) * step;\n } else if (step < 0) {\n x1 = (Math.ceil(x1 * -step) + 1) / -step;\n }\n }\n } else {\n tz.pop();\n }\n }\n }\n\n // Remove any thresholds outside the domain.\n // Be careful not to mutate an array owned by the user!\n var m = tz.length, a = 0, b = m;\n while (tz[a] <= x0) ++a;\n while (tz[b - 1] > x1) --b;\n if (a || b < m) tz = tz.slice(a, b), m = b - a;\n\n var bins = new Array(m + 1),\n bin;\n\n // Initialize bins.\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n }\n\n // Assign data to bins by value, ignoring any outside the domain.\n if (isFinite(step)) {\n if (step > 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);\n }\n }\n } else if (step < 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n const j = Math.floor((x0 - x) * step);\n bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding\n }\n }\n }\n } else {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n }\n\n return bins;\n }\n\n histogram.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function(_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : constant(Array.isArray(_) ? slice.call(_) : _), histogram) : threshold;\n };\n\n return histogram;\n}\n","import { useState, useEffect } from 'react';\r\nimport { bin } from 'd3-array';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { CirclePackingGraph } from '../CirclePackingGraph';\r\nimport { TreeMapGraph } from '../TreeMapGraph';\r\nimport { DonutChart } from '../DonutChart';\r\nimport { SimpleBarGraph } from '../BarGraph';\r\n\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport {\r\n TreeMapDataType,\r\n ReferenceDataType,\r\n HistogramDataType,\r\n DonutChartDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: HistogramDataType[];\r\n\r\n /** Type of the graph for histogram */\r\n graphType?: 'circlePacking' | 'treeMap' | 'barGraph' | 'donutChart';\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for visualization */\r\n colors?: string[] | string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Padding between bars */\r\n barPadding?: number;\r\n /** Maximum thickness of bars */\r\n maxBarThickness?: number;\r\n\r\n // Values and Ticks\r\n /** Maximum value for the chart */\r\n maxValue?: number;\r\n /** Truncate labels by specified length */\r\n truncateBy?: number;\r\n /** Reference values for comparison */\r\n refValues?: ReferenceDataType[];\r\n\r\n // Graph Parameters\r\n /** Number of bins for the histogram */\r\n numberOfBins?: number;\r\n /** Orientation of the bar graph. Only applicable if graphType is barGraph. */\r\n barGraphLayout?: 'vertical' | 'horizontal';\r\n /** Stroke width of the arcs and circle of the donut. Only applicable if graphType is donutChart. */\r\n donutStrokeWidth?: number;\r\n /** Sorting order for data. This is overwritten by labelOrder prop */\r\n sortData?: 'asc' | 'desc';\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of axis ticks */\r\n showTicks?: boolean;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function Histogram(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n sources,\r\n graphDescription,\r\n barPadding,\r\n showValues,\r\n showTicks,\r\n leftMargin,\r\n rightMargin,\r\n height,\r\n width,\r\n footNote,\r\n colors,\r\n padding,\r\n backgroundColor,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n graphID,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload,\r\n dataDownload,\r\n numberOfBins,\r\n truncateBy,\r\n graphType,\r\n barGraphLayout,\r\n donutStrokeWidth,\r\n sortData,\r\n language,\r\n minHeight,\r\n theme = 'light',\r\n maxBarThickness,\r\n ariaLabel,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n precision,\r\n } = props;\r\n\r\n const [dataFormatted, setDataFormatted] = useState<TreeMapDataType[]>([]);\r\n useEffect(() => {\r\n const bins = bin()\r\n .thresholds(numberOfBins || 10)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .value((d: any) => d.value)(data as any);\r\n const dataUpdates = bins.map(d => ({\r\n label: `${d.x0}-${d.x1}`,\r\n size: d.length,\r\n data: {\r\n options: `${d.x0}-${d.x1}`,\r\n frequency: d.length,\r\n },\r\n }));\r\n setDataFormatted(dataUpdates);\r\n }, [data, numberOfBins]);\r\n if (dataFormatted.length === 0)\r\n return (\r\n <div style={{ width: `${width}px`, height: `${height}px`, margin: 'auto' }}>\r\n <div className='flex m-auto items-center justify-center p-0 leading-none text-base h-40'>\r\n <Spinner />\r\n </div>\r\n </div>\r\n );\r\n if (graphType === 'circlePacking')\r\n return (\r\n <CirclePackingGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n />\r\n );\r\n if (graphType === 'treeMap')\r\n return (\r\n <TreeMapGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n />\r\n );\r\n if (graphType === 'donutChart')\r\n return (\r\n <DonutChart\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n radius={width && height ? (width < height ? width : height) : width || height || undefined}\r\n sources={sources}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted as DonutChartDataType[]}\r\n strokeWidth={donutStrokeWidth}\r\n showColorScale\r\n sortData={sortData}\r\n language={language}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n />\r\n );\r\n return (\r\n <SimpleBarGraph\r\n colors={colors || Colors.graphMainColor}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n footNote={footNote}\r\n width={width}\r\n height={height}\r\n sources={sources}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n backgroundColor={backgroundColor}\r\n padding={padding}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n relativeHeight={relativeHeight}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={false}\r\n showValues={showValues}\r\n graphID={graphID}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n data={dataFormatted}\r\n barPadding={barPadding}\r\n refValues={refValues}\r\n truncateBy={truncateBy}\r\n maxValue={maxValue}\r\n showTicks={showTicks}\r\n sortData={sortData}\r\n language={language}\r\n minHeight={minHeight}\r\n theme={theme}\r\n maxBarThickness={maxBarThickness}\r\n ariaLabel={ariaLabel}\r\n orientation={barGraphLayout}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n />\r\n );\r\n}\r\n"],"names":["count","values","valueof","value","identity","x","array","slice","constant","nice","start","stop","prestep","step","tickIncrement","thresholdSturges","bin","domain","extent","threshold","sturges","histogram","data","i","n","xz","x0","x1","tz","max","tn","ticks","m","a","b","bins","j","bisect","_","Histogram","props","graphTitle","sources","graphDescription","barPadding","showValues","showTicks","leftMargin","rightMargin","height","width","footNote","colors","padding","backgroundColor","topMargin","bottomMargin","showLabels","relativeHeight","tooltip","onSeriesMouseOver","refValues","graphID","maxValue","onSeriesMouseClick","graphDownload","dataDownload","numberOfBins","truncateBy","graphType","barGraphLayout","donutStrokeWidth","sortData","language","minHeight","theme","maxBarThickness","ariaLabel","detailsOnClick","styles","classNames","precision","dataFormatted","setDataFormatted","useState","useEffect","dataUpdates","d","jsx","Spinner","CirclePackingGraph","Colors","TreeMapGraph","DonutChart","SimpleBarGraph"],"mappings":";;;;;;;;;;AAAe,SAASA,GAAMC,GAAQC,GAAS;AA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,MACA,WAAAE;AAAA,MACA,gBAAAC;AAAA,MACA,QAAAC;AAAA,MACA,YAAAC;AAAA,MACA,WAAAC;AAAA,IAAA;AAAA,EAAA,IAIJO,gBAAAA,EAAAA;AAAAA,IAACM;AAAA,IAAA;AAAA,MACC,QAAQ1C,KAAUuC,EAAO;AAAA,MACzB,YAAAlD;AAAA,MACA,kBAAAE;AAAA,MACA,UAAAQ;AAAA,MACA,OAAAD;AAAA,MACA,QAAAD;AAAA,MACA,SAAAP;AAAA,MACA,YAAAK;AAAA,MACA,aAAAC;AAAA,MACA,iBAAAM;AAAA,MACA,SAAAD;AAAA,MACA,WAAAE;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAE;AAAA,MACA,YAAAD;AAAA,MACA,SAAAE;AAAA,MACA,mBAAAC;AAAA,MACA,gBAAgB;AAAA,MAChB,YAAAf;AAAA,MACA,SAAAiB;AAAA,MACA,oBAAAE;AAAA,MACA,eAAAC;AAAA,MACA,cAAAC;AAAA,MACA,MAAMgB;AAAA,MACN,YAAAtC;AAAA,MACA,WAAAiB;AAAA,MACA,YAAAO;AAAA,MACA,UAAAL;AAAA,MACA,WAAAjB;AAAA,MACA,UAAA0B;AAAA,MACA,UAAAC;AAAA,MACA,WAAAC;AAAA,MACA,OAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,aAAaP;AAAA,MACb,gBAAAQ;AAAA,MACA,QAAAC;AAAA,MACA,YAAAC;AAAA,MACA,WAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;","x_google_ignoreList":[0,1,2,3,4,5,6]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-DDoeWRVt.cjs"),n=require("./index-BW_-wD2k.cjs"),a=require("./imageDownload-CgDcm1Sj.cjs");function s(r){const{nodeID:e,filename:t="image",buttonContent:i,buttonType:l="tertiary",buttonSmall:d,className:m=""}=r;return o.jsxRuntimeExports.jsx(n.d,{variant:l,className:`undp-viz-download-button ${d?"p-2":"py-4 px-6"} ${m} border border-primary-gray-400 dark:border-primary-gray-550`,onClick:()=>{typeof e=="string"?document.getElementById(e)?a.imageDownload(document.getElementById(e),t):console.error("Cannot find the html element"):a.imageDownload(e,t)},"aria-label":"Click to download the graph as image",children:i||o.jsxRuntimeExports.jsx(n.ImageDown,{})})}exports.ImageDownloadButton=s;
2
+ //# sourceMappingURL=ImageDownloadButton.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageDownloadButton.cjs","sources":["../src/Components/Actions/ImageDownloadButton.tsx"],"sourcesContent":["import { JSX } from 'react';\r\nimport { Button } from '@undp/design-system-react/Button';\r\n\r\nimport { imageDownload } from '@/Utils/imageDownload';\r\nimport { ImageDown } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n buttonContent?: string | JSX.Element;\r\n buttonType?:\r\n | 'primary'\r\n | 'primary-without-icon'\r\n | 'secondary'\r\n | 'secondary-without-icon'\r\n | 'tertiary';\r\n nodeID: string | HTMLElement;\r\n filename?: string;\r\n buttonSmall?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function ImageDownloadButton(props: Props) {\r\n const {\r\n nodeID,\r\n filename = 'image',\r\n buttonContent,\r\n buttonType = 'tertiary',\r\n buttonSmall,\r\n className = '',\r\n } = props;\r\n return (\r\n <Button\r\n variant={buttonType}\r\n className={`undp-viz-download-button ${\r\n buttonSmall ? 'p-2' : 'py-4 px-6'\r\n } ${className} border border-primary-gray-400 dark:border-primary-gray-550`}\r\n onClick={() => {\r\n if (typeof nodeID === 'string') {\r\n if (document.getElementById(nodeID)) {\r\n imageDownload(document.getElementById(nodeID) as HTMLElement, filename);\r\n } else {\r\n console.error('Cannot find the html element');\r\n }\r\n } else {\r\n imageDownload(nodeID as HTMLElement, filename);\r\n }\r\n }}\r\n aria-label='Click to download the graph as image'\r\n >\r\n {buttonContent || <ImageDown />}\r\n </Button>\r\n );\r\n}\r\n"],"names":["ImageDownloadButton","props","nodeID","filename","buttonContent","buttonType","buttonSmall","className","jsx","Button","imageDownload","ImageDown"],"mappings":"6MAoBO,SAASA,EAAoBC,EAAc,CAChD,KAAM,CACJ,OAAAC,EACA,SAAAC,EAAW,QACX,cAAAC,EACA,WAAAC,EAAa,WACb,YAAAC,EACA,UAAAC,EAAY,EAAA,EACVN,EACJ,OACEO,EAAAA,kBAAAA,IAACC,EAAAA,EAAA,CACC,QAASJ,EACT,UAAW,4BACTC,EAAc,MAAQ,WACxB,IAAIC,CAAS,+DACb,QAAS,IAAM,CACT,OAAOL,GAAW,SAChB,SAAS,eAAeA,CAAM,EAChCQ,EAAAA,cAAc,SAAS,eAAeR,CAAM,EAAkBC,CAAQ,EAEtE,QAAQ,MAAM,8BAA8B,EAG9CO,EAAAA,cAAcR,EAAuBC,CAAQ,CAEjD,EACA,aAAW,uCAEV,SAAAC,2BAAkBO,EAAAA,UAAA,CAAA,CAAU,CAAA,CAAA,CAGnC"}
@@ -0,0 +1,15 @@
1
+ import { JSX } from 'react';
2
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
3
+
4
+ export declare function ImageDownloadButton(props: Props): JSX_2.Element;
5
+
6
+ declare interface Props {
7
+ buttonContent?: string | JSX.Element;
8
+ buttonType?: 'primary' | 'primary-without-icon' | 'secondary' | 'secondary-without-icon' | 'tertiary';
9
+ nodeID: string | HTMLElement;
10
+ filename?: string;
11
+ buttonSmall?: boolean;
12
+ className?: string;
13
+ }
14
+
15
+ export { }
@@ -0,0 +1,29 @@
1
+ import { j as t } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
+ import { d, I as s } from "./index-BmCqpO1B.js";
3
+ import { i as n } from "./imageDownload-Dcci2LEy.js";
4
+ function c(r) {
5
+ const {
6
+ nodeID: e,
7
+ filename: o = "image",
8
+ buttonContent: a,
9
+ buttonType: m = "tertiary",
10
+ buttonSmall: i,
11
+ className: l = ""
12
+ } = r;
13
+ return /* @__PURE__ */ t.jsx(
14
+ d,
15
+ {
16
+ variant: m,
17
+ className: `undp-viz-download-button ${i ? "p-2" : "py-4 px-6"} ${l} border border-primary-gray-400 dark:border-primary-gray-550`,
18
+ onClick: () => {
19
+ typeof e == "string" ? document.getElementById(e) ? n(document.getElementById(e), o) : console.error("Cannot find the html element") : n(e, o);
20
+ },
21
+ "aria-label": "Click to download the graph as image",
22
+ children: a || /* @__PURE__ */ t.jsx(s, {})
23
+ }
24
+ );
25
+ }
26
+ export {
27
+ c as ImageDownloadButton
28
+ };
29
+ //# sourceMappingURL=ImageDownloadButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageDownloadButton.js","sources":["../src/Components/Actions/ImageDownloadButton.tsx"],"sourcesContent":["import { JSX } from 'react';\r\nimport { Button } from '@undp/design-system-react/Button';\r\n\r\nimport { imageDownload } from '@/Utils/imageDownload';\r\nimport { ImageDown } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n buttonContent?: string | JSX.Element;\r\n buttonType?:\r\n | 'primary'\r\n | 'primary-without-icon'\r\n | 'secondary'\r\n | 'secondary-without-icon'\r\n | 'tertiary';\r\n nodeID: string | HTMLElement;\r\n filename?: string;\r\n buttonSmall?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function ImageDownloadButton(props: Props) {\r\n const {\r\n nodeID,\r\n filename = 'image',\r\n buttonContent,\r\n buttonType = 'tertiary',\r\n buttonSmall,\r\n className = '',\r\n } = props;\r\n return (\r\n <Button\r\n variant={buttonType}\r\n className={`undp-viz-download-button ${\r\n buttonSmall ? 'p-2' : 'py-4 px-6'\r\n } ${className} border border-primary-gray-400 dark:border-primary-gray-550`}\r\n onClick={() => {\r\n if (typeof nodeID === 'string') {\r\n if (document.getElementById(nodeID)) {\r\n imageDownload(document.getElementById(nodeID) as HTMLElement, filename);\r\n } else {\r\n console.error('Cannot find the html element');\r\n }\r\n } else {\r\n imageDownload(nodeID as HTMLElement, filename);\r\n }\r\n }}\r\n aria-label='Click to download the graph as image'\r\n >\r\n {buttonContent || <ImageDown />}\r\n </Button>\r\n );\r\n}\r\n"],"names":["ImageDownloadButton","props","nodeID","filename","buttonContent","buttonType","buttonSmall","className","jsx","Button","imageDownload","ImageDown"],"mappings":";;;AAoBO,SAASA,EAAoBC,GAAc;AAChD,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,eAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,aAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,EAAA,IACVN;AACJ,SACEO,gBAAAA,EAAAA;AAAAA,IAACC;AAAAA,IAAA;AAAA,MACC,SAASJ;AAAA,MACT,WAAW,4BACTC,IAAc,QAAQ,WACxB,IAAIC,CAAS;AAAA,MACb,SAAS,MAAM;AACb,QAAI,OAAOL,KAAW,WAChB,SAAS,eAAeA,CAAM,IAChCQ,EAAc,SAAS,eAAeR,CAAM,GAAkBC,CAAQ,IAEtE,QAAQ,MAAM,8BAA8B,IAG9CO,EAAcR,GAAuBC,CAAQ;AAAA,MAEjD;AAAA,MACA,cAAW;AAAA,MAEV,UAAAC,2BAAkBO,GAAA,CAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AAGnC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),p=require("react"),y=require("./parse-hMnG_lRV.cjs"),qt=require("./index-BzeLQvXk.cjs"),kt=require("./simple-statistics-xm8c0LQQ.cjs"),ot=require("./numberFormattingFunction-02t-wJta.cjs"),$t=require("./Tooltip-n8z5bfav.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),bt=require("./customArea-BYNyxAkm.cjs"),Ft=require("./AxisTitle-CK9YeovX.cjs"),Tt=require("./Axis-DE7dSn1_.cjs"),Wt=require("./ReferenceLine-CuFMk0cI.cjs"),Ht=require("./RegressionLine-7_rKTHN_.cjs"),Pt=require("./YTicksAndGridLines-DBDuz6vb.cjs"),Ut=require("./index-CylX-pWB.cjs"),Yt=require("./use-in-view-BCmzDU2O.cjs"),Gt=require("./time-Byw_jYQ7.cjs"),Xt=require("./linear-BVckp9RD.cjs"),lt=require("./line-DHV4JwCR.cjs"),ct=require("./step-BZ3C8QFW.cjs"),Bt=require("./area-D3Qx7k7K.cjs"),zt=require("./select-Bnfk0lJx.cjs"),g=require("./proxy-PQd2AItT.cjs"),Jt=require("./init-DU0ybBc_.cjs"),Kt=require("./pointer-Dkq5NV1q.cjs"),Qt=require("./GraphFooter.cjs"),Zt=require("./GraphHeader.cjs"),xt=require("./Colors.cjs"),_t=require("./ColorLegend.cjs"),te=require("./EmptyState-d8_8SxeW.cjs");function ee(ut){const{data:A,width:M,height:$,lineColor:k,suffix:I,prefix:j,dateFormat:o,highlightAreaSettings:h,showValues:G,noOfXTicks:mt,rightMargin:ht,leftMargin:R,topMargin:C,bottomMargin:X,tooltip:B,onSeriesMouseOver:F,refValues:z,minValue:J,maxValue:K,animate:a,rtl:Q,strokeWidth:yt,showDots:D,annotations:pt,customHighlightAreaSettings:dt,regressionLine:T,showIntervalDots:gt,showIntervalValues:ft,intervalLineStrokeWidth:W,intervalLineColors:b,intervalAreaColor:jt,intervalAreaOpacity:wt,yAxisTitle:Z,noOfYTicks:vt,minDate:H,maxDate:P,curveType:L,styles:c,classNames:x,precision:N,customLayers:_}=ut,tt=p.useRef(null),l=Yt.useInView(tt,{once:a.once,amount:a.amount}),[u,Rt]=p.useState(!1);p.useEffect(()=>{if(l&&!u){const t=setTimeout(()=>{Rt(!0)},(a.duration+.5)*1e3);return()=>clearTimeout(t)}},[l,u,a.duration]);const S=L==="linear"?lt.curveLinear:L==="step"?ct.curveStep:L==="stepAfter"?ct.stepAfter:L==="stepBefore"?ct.stepBefore:ct.monotoneX,[V,et]=p.useState(void 0),[it,nt]=p.useState(void 0),[U,Y]=p.useState(void 0),f={top:C,bottom:X,left:Z?R+30:R,right:ht},E=p.useRef(null),n=qt.sortBy(A.filter(t=>!v.checkIfNullOrUndefined(t.y)).map(t=>({date:y.parse(`${t.date}`,o,new Date),y:t.y,yMin:v.checkIfNullOrUndefined(t.yMin)?t.y:t.yMin,yMax:v.checkIfNullOrUndefined(t.yMax)?t.y:t.yMax,data:t.data})),"date"),Et=h.map(t=>({...t,coordinates:[t.coordinates[0]===null?null:y.parse(`${t.coordinates[0]}`,o,new Date),t.coordinates[1]===null?null:y.parse(`${t.coordinates[1]}`,o,new Date)]})),Mt=dt.map(t=>({...t,coordinates:t.coordinates.map((d,O)=>O%2===0?y.parse(`${d}`,o,new Date):d)})),r=M-f.left-f.right,w=$-f.top-f.bottom,at=H?y.parse(`${H}`,o,new Date):n[0].date,st=P?y.parse(`${P}`,o,new Date):n[n.length-1].date,m=v.checkIfNullOrUndefined(J)?Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin)))?Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin)))>0?0:Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin))):0:J,q=Math.max(...n.map(t=>Math.max(t.y,t.yMax,t.yMin)))?Math.max(...n.map(t=>Math.max(t.y,t.yMax,t.yMin))):0,i=Gt.time().domain([at,st]).range([0,r]),s=Xt.linear().domain([m,v.checkIfNullOrUndefined(K)?q>0?q:0:K]).range([w,0]).nice(),Ot=lt.line().x(t=>i(t.date)).y(t=>s(t.y)).curve(S),At=lt.line().x(t=>i(t.date)).y(t=>s(t.yMin)).curve(S),It=lt.line().x(t=>i(t.date)).y(t=>s(t.yMax)).curve(S),Lt=Bt.area().x(t=>i(t.date)).y0(t=>s(t.yMin)).y1(t=>s(t.yMax)).curve(S),Nt=s.ticks(vt),Dt=i.ticks(mt);p.useEffect(()=>{const t=O=>{const rt=n[Jt.bisectCenter(n.map(Ct=>Ct.date),i.invert(Kt.pointer(O)[0]),1)];et(rt||n[n.length-1]),F?.(rt||n[n.length-1]),Y(O.clientY),nt(O.clientX)},d=()=>{et(void 0),nt(void 0),Y(void 0),F?.(void 0)};zt.select(E.current).on("mousemove",t).on("mouseout",d)},[i,n,F]);const St=kt.linearRegression(n.filter(t=>!v.checkIfNullOrUndefined(t.date)&&!v.checkIfNullOrUndefined(t.y)).map(t=>[i(t.date),s(t.y)])),Vt=kt.linearRegressionLine(St);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(g.motion.svg,{width:`${M}px`,height:`${$}px`,viewBox:`0 0 ${M} ${$}`,direction:"ltr",ref:tt,children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${f.left},${f.top})`,children:[e.jsxRuntimeExports.jsx(Ut.HighlightArea,{areaSettings:Et,width:r,height:w,scale:i,animate:a,isInView:l}),e.jsxRuntimeExports.jsx(bt.CustomArea,{areaSettings:Mt,scaleX:i,scaleY:s,animate:a,isInView:l}),e.jsxRuntimeExports.jsxs("g",{children:[e.jsxRuntimeExports.jsx(Pt.YTicksAndGridLines,{values:Nt.filter(t=>t!==0),y:Nt.filter(t=>t!==0).map(t=>s(t)),x1:0-R,x2:r+f.right,styles:{gridLines:c?.yAxis?.gridLines,labels:c?.yAxis?.labels},classNames:{gridLines:x?.yAxis?.gridLines,labels:x?.yAxis?.labels},suffix:I,prefix:j,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:N}),e.jsxRuntimeExports.jsx(Tt.Axis,{y1:s(m<0?0:m),y2:s(m<0?0:m),x1:0-R,x2:r+f.right,label:ot.numberFormattingFunction(m<0?0:m,"NA",N,j,I),labelPos:{x:0-R,y:s(m<0?0:m),dx:0,dy:q<0?"1em":-5},classNames:{axis:x?.xAxis?.axis,label:x?.yAxis?.labels},styles:{axis:c?.xAxis?.axis,label:c?.yAxis?.labels}}),e.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:0-R+15,y:w/2,style:c?.yAxis?.title,className:x?.yAxis?.title,text:Z,rotate90:!0})]}),e.jsxRuntimeExports.jsx("g",{children:Dt.map((t,d)=>e.jsxRuntimeExports.jsx("g",{children:e.jsxRuntimeExports.jsx("text",{y:w,x:i(t),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:y.format(t,o)})},d))}),_.filter(t=>t.position==="before").map(t=>t.layer),e.jsxRuntimeExports.jsx(g.motion.path,{style:{fill:jt},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,d:Lt(n)||""},whileInView:{opacity:wt,d:Lt(n)||"",transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),W?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(g.motion.path,{style:{stroke:b[0],fill:"none",strokeWidth:W},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:At(n)||"",opacity:1},whileInView:{pathLength:1,d:At(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),e.jsxRuntimeExports.jsx(g.motion.path,{style:{stroke:b[1],fill:"none",strokeWidth:W},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:It(n)||"",opacity:1},whileInView:{pathLength:1,d:It(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"})]}):null,e.jsxRuntimeExports.jsx(g.motion.path,{style:{stroke:k,fill:"none",strokeWidth:yt},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:Ot(n)||"",opacity:1},whileInView:{pathLength:1,d:Ot(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),V?e.jsxRuntimeExports.jsx("line",{y1:0,y2:w,x1:i(V.date),x2:i(V.date),className:e.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",x?.mouseOverLine),style:c?.mouseOverLine}):null,e.jsxRuntimeExports.jsx("g",{children:n.map((t,d)=>e.jsxRuntimeExports.jsx(g.motion.g,{children:v.checkIfNullOrUndefined(t.y)?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[D?e.jsxRuntimeExports.jsx(g.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,style:{fill:k},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,cx:i(t.date),cy:s(t.y)},whileInView:{opacity:1,transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.y)}},initial:"initial",animate:l?"whileInView":"initial"}):null,gt?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(g.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,style:{fill:b[0]},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,cx:i(t.date),cy:s(t.yMin)},whileInView:{opacity:1,transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.yMin)}},initial:"initial",animate:l?"whileInView":"initial"}),e.jsxRuntimeExports.jsx(g.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,style:{fill:b[1]},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,cx:i(t.date),cy:s(t.yMax)},whileInView:{opacity:1,transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.yMax)}},initial:"initial",animate:l?"whileInView":"initial"})]}):null,G?e.jsxRuntimeExports.jsx(g.motion.text,{dy:-8,style:{fill:k,textAnchor:"middle",...c?.graphObjectValues||{}},className:e.mo("graph-value text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,x:i(t.date),y:s(t.y)},whileInView:{opacity:1,x:i(t.date),y:s(t.y),transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:ot.numberFormattingFunction(t.y,"NA",N,j,I)}):null,ft?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(g.motion.text,{dy:"1em",style:{fill:b[0],textAnchor:"middle",...c?.graphObjectValues||{}},className:e.mo("text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,x:i(t.date),y:s(t.yMin)},whileInView:{opacity:1,x:i(t.date),y:s(t.yMin),transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:ot.numberFormattingFunction(t.yMin,"NA",N,j,I)}),e.jsxRuntimeExports.jsx(g.motion.text,{dy:-8,style:{fill:b[1],textAnchor:"middle",...c?.graphObjectValues||{}},className:e.mo("text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,x:i(t.date),y:s(t.yMax)},whileInView:{opacity:1,x:i(t.date),y:s(t.yMax),transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:ot.numberFormattingFunction(t.yMax,"NA",N,j,I)})]}):null]})},d))}),z?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:z.map((t,d)=>e.jsxRuntimeExports.jsx(Wt.RefLineY,{text:t.text,color:t.color,y:s(t.value),x1:0-R,x2:r+f.right,classNames:t.classNames,styles:t.styles,animate:a,isInView:l},d))}):null,e.jsxRuntimeExports.jsx("g",{children:pt.map((t,d)=>{const O=bt.getLineEndPoint({x:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date)):0,y:t.yCoordinate?s(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),rt=t.showConnector?{y1:O.y,x1:O.x,y2:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?s(t.yCoordinate):0,cx:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date)):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,Ct={y:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:Q?0:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),width:Q?t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0):r-(t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return e.jsxRuntimeExports.jsx(bt.Annotation,{color:t.color,connectorsSettings:rt,labelSettings:Ct,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:l},d)})}),e.jsxRuntimeExports.jsx("g",{children:T?e.jsxRuntimeExports.jsx(Ht.RegressionLine,{x1:0,x2:r,y1:Vt(0),y2:Vt(r),graphHeight:w,graphWidth:r,className:x?.regLine,style:c?.regLine,color:typeof T=="string"?T:void 0,animate:a,isInView:l}):null}),_.filter(t=>t.position==="after").map(t=>t.layer),e.jsxRuntimeExports.jsx("rect",{ref:E,style:{fill:"none",pointerEvents:"all"},width:r,height:w})]})}),V&&B&&it&&U?e.jsxRuntimeExports.jsx($t.Tooltip,{data:V,body:B,xPos:it,yPos:U,backgroundStyle:c?.tooltip,className:x?.tooltip}):null]})}function ie(ut){const{data:A,graphTitle:M,suffix:$="",sources:k,prefix:I="",graphDescription:j,height:o,width:h,footNote:G,noOfXTicks:mt=10,dateFormat:ht="yyyy",showValues:R=!1,backgroundColor:C=!1,padding:X,lineColor:B,leftMargin:F=30,rightMargin:z=30,topMargin:J=20,bottomMargin:K=25,tooltip:a,refValues:Q=[],highlightAreaSettings:yt=[],relativeHeight:D,onSeriesMouseOver:pt,graphID:dt,minValue:T,maxValue:gt,regressionLine:ft=!1,showIntervalDots:W=!1,showIntervalValues:b=!1,intervalLineStrokeWidth:jt=0,intervalLineColors:wt=[xt.Colors.light.grays["gray-500"],xt.Colors.light.grays["gray-500"]],intervalAreaColor:Z=xt.Colors.primaryColors["blue-100"],intervalAreaOpacity:vt=.4,graphDownload:H=!1,dataDownload:P=!1,animate:L=!1,language:c="en",minHeight:x=0,strokeWidth:N=2,showDots:_=!0,annotations:tt=[],customHighlightAreaSettings:l=[],theme:u="light",ariaLabel:Rt,yAxisTitle:S,noOfYTicks:V=5,minDate:et,maxDate:it,colorLegendTitle:nt,colorLegendColors:U,colorLegendDomain:Y,curveType:f="curve",styles:E,classNames:n,precision:Et=2,customLayers:Mt=[]}=ut,[r,w]=p.useState(0),[at,st]=p.useState(0),m=p.useRef(null),q=p.useRef(null);return p.useEffect(()=>{const i=new ResizeObserver(s=>{w(h||s[0].target.clientWidth||620),st(o||s[0].target.clientHeight||480)});return m.current&&(st(m.current.clientHeight||480),w(m.current.clientWidth||620),h||i.observe(m.current)),()=>i.disconnect()},[h,o]),e.jsxRuntimeExports.jsx("div",{className:`${u||"light"} flex ${h?"w-fit grow-0":"w-full grow"}`,dir:c==="he"||c==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${C?C===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${c||"en"}`,n?.graphContainer),style:{...E?.graphContainer||{},...C&&C!==!0?{backgroundColor:C}:{}},id:dt,ref:q,"aria-label":Rt||`${M?`The graph shows ${M}. `:""}This is a line chart that highlights the difference between two datasets over time.${j?` ${j}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:C?X||"1rem":X||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[M||j||H||P?e.jsxRuntimeExports.jsx(Zt.GraphHeader,{styles:{title:E?.title,description:E?.description},classNames:{title:n?.title,description:n?.description},graphTitle:M,graphDescription:j,width:h,graphDownload:H?q.current:void 0,dataDownload:P?A.map(i=>i.data).filter(i=>i!==void 0).length>0?A.map(i=>i.data).filter(i=>i!==void 0):A.filter(i=>i!==void 0):null}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:A.length===0?e.jsxRuntimeExports.jsx(te.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[U&&Y?e.jsxRuntimeExports.jsx(_t.ColorLegend,{width:h,colorLegendTitle:nt,colors:U,colorDomain:Y,showNAColor:!1}):null,e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:m,"aria-label":"Graph area",children:(h||r)&&(o||at)?e.jsxRuntimeExports.jsx(ee,{data:A,lineColor:B||xt.Colors.primaryColors["blue-600"],width:h||r,height:Math.max(x,o||(D?x?(h||r)*D>x?(h||r)*D:x:(h||r)*D:at)),suffix:$,prefix:I,dateFormat:ht,showValues:R,noOfXTicks:mt,leftMargin:F,rightMargin:z,topMargin:J,bottomMargin:K,tooltip:a,highlightAreaSettings:yt,onSeriesMouseOver:pt,refValues:Q,minValue:T,maxValue:gt,animate:L===!0?{duration:.5,once:!0,amount:.5}:L||{duration:0,once:!0,amount:0},rtl:c==="he"||c==="ar",strokeWidth:N,showDots:_,annotations:tt,customHighlightAreaSettings:l,regressionLine:ft,showIntervalDots:W,showIntervalValues:b,intervalLineStrokeWidth:jt,intervalLineColors:wt,intervalAreaColor:Z,intervalAreaOpacity:vt,yAxisTitle:S,noOfYTicks:V,minDate:et,maxDate:it,curveType:f,styles:E,classNames:n,precision:Et,customLayers:Mt}):null})]})}),k||G?e.jsxRuntimeExports.jsx(Qt.GraphFooter,{styles:{footnote:E?.footnote,source:E?.source},classNames:{footnote:n?.footnote,source:n?.source},sources:k,footNote:G,width:h}):null]})})})})}exports.LineChartWithConfidenceInterval=ie;
2
+ //# sourceMappingURL=LineChartWithConfidenceInterval.cjs.map