@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 @@
1
+ {"version":3,"file":"StripChart.js","sources":["../src/Utils/getTickPosition.ts","../src/Components/Graphs/StripChart/Horizontal/Graph.tsx","../src/Components/Graphs/StripChart/Horizontal/index.tsx","../src/Components/Graphs/StripChart/Vertical/Graph.tsx","../src/Components/Graphs/StripChart/Vertical/index.tsx","../src/Components/Graphs/StripChart/index.tsx"],"sourcesContent":["export function getTickPositions(count: number, width: number) {\r\n if (count < 2) return [];\r\n const step = width / (count - 1);\r\n return Array.from({ length: count }, (_, i) => i * step);\r\n}\r\n","import isEqual from 'fast-deep-equal';\r\nimport { useRef, useState } from 'react';\r\nimport { scaleLinear } from 'd3-scale';\r\nimport sortBy from 'lodash.sortby';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n StripChartDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { getTickPositions } from '@/Utils/getTickPosition';\r\n\r\ninterface Props {\r\n data: StripChartDataType[];\r\n width: number;\r\n height: number;\r\n selectedColor?: string;\r\n colors: string[];\r\n colorDomain: string[];\r\n radius: number;\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n prefix: string;\r\n suffix: string;\r\n stripType: 'strip' | 'dot';\r\n highlightColor?: string;\r\n dotOpacity: number;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n valueColor?: string;\r\n animate: AnimateDataType;\r\n noOfTicks: number;\r\n dimmedOpacity: number;\r\n precision: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n colors,\r\n colorDomain,\r\n radius,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n highlightedDataPoints,\r\n selectedColor,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n prefix,\r\n suffix,\r\n stripType,\r\n highlightColor,\r\n dotOpacity,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n valueColor,\r\n animate,\r\n noOfTicks,\r\n dimmedOpacity,\r\n precision,\r\n customLayers,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const dataWithId = data.map((d, i) => ({ ...d, id: `${i}` }));\r\n\r\n const sortedData = sortBy(dataWithId, item => {\r\n const index = (highlightedDataPoints || []).indexOf(item.label);\r\n return index === -1 ? Infinity : index;\r\n }).reverse();\r\n const xMaxValue = !checkIfNullOrUndefined(maxValue)\r\n ? (maxValue as number)\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) < 0\r\n ? 0\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const xMinValue = !checkIfNullOrUndefined(minValue)\r\n ? (minValue as number)\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) >= 0\r\n ? 0\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const x = scaleLinear().domain([xMinValue, xMaxValue]).range([0, graphWidth]).nice();\r\n const ticks = getTickPositions(noOfTicks, graphWidth);\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <AnimatePresence>\r\n {sortedData.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: x(0),\r\n y: graphHeight / 2,\r\n },\r\n whileInView: {\r\n x: x(d.position),\r\n y: graphHeight / 2,\r\n opacity: selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(d.color)] === selectedColor\r\n ? 0.95\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 0.95\r\n : dimmedOpacity\r\n : dotOpacity,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n {stripType === 'dot' ? (\r\n <motion.circle\r\n cy={0}\r\n cx={0}\r\n variants={{\r\n initial: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n },\r\n whileInView: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n r={radius}\r\n />\r\n ) : (\r\n <motion.rect\r\n y={0 - radius}\r\n x={-1}\r\n height={radius * 2}\r\n width={2}\r\n variants={{\r\n initial: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n },\r\n whileInView: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n />\r\n )}\r\n {highlightedDataPoints.length !== 0 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n x={0}\r\n y={0 - radius - 5}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fill:\r\n valueColor ||\r\n (highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]),\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-value text-sm font-bold',\r\n classNames?.graphObjectValues,\r\n )}\r\n >\r\n {numberFormattingFunction(d.position, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n {ticks.map((tick, i) => (\r\n <text\r\n key={i}\r\n x={tick}\r\n y={graphHeight / 2 + radius}\r\n style={{\r\n textAnchor: i === 0 ? 'start' : i === ticks.length - 1 ? 'end' : 'middle',\r\n ...(styles?.xAxis?.labels || {}),\r\n }}\r\n className={cn(\r\n 'fill-primary-gray-550 dark:fill-primary-gray-500 text-xs',\r\n classNames?.xAxis?.labels,\r\n )}\r\n dy='1em'\r\n >\r\n {numberFormattingFunction(x.invert(tick), 'NA', precision, prefix, suffix)}\r\n </text>\r\n ))}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import uniqBy from 'lodash.uniqby';\r\nimport { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n Languages,\r\n SourcesDataType,\r\n StripChartDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n data: StripChartDataType[];\r\n graphTitle?: string | React.ReactNode;\r\n graphDescription?: string | React.ReactNode;\r\n footNote?: string | React.ReactNode;\r\n width?: number;\r\n height?: number;\r\n sources?: SourcesDataType[];\r\n stripType?: 'strip' | 'dot';\r\n colors?: string | string[];\r\n colorDomain?: string[];\r\n colorLegendTitle?: string;\r\n radius?: number;\r\n backgroundColor?: string | boolean;\r\n padding?: string;\r\n leftMargin?: number;\r\n rightMargin?: number;\r\n topMargin?: number;\r\n bottomMargin?: number;\r\n relativeHeight?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n highlightedDataPoints?: (string | number)[];\r\n showColorScale?: boolean;\r\n graphID?: string;\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n graphDownload?: boolean;\r\n dataDownload?: boolean;\r\n prefix?: string;\r\n suffix?: string;\r\n language?: Languages;\r\n highlightColor?: string;\r\n dotOpacity?: number;\r\n showNAColor?: boolean;\r\n minHeight?: number;\r\n theme?: 'light' | 'dark';\r\n ariaLabel?: string;\r\n resetSelectionOnDoubleClick?: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n valueColor?: string;\r\n animate?: boolean | AnimateDataType;\r\n noOfTicks?: number;\r\n dimmedOpacity?: number;\r\n precision?: number;\r\n customLayers?: CustomLayerDataType[];\r\n}\r\n\r\nexport function HorizontalStripChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n radius = 5,\r\n padding,\r\n backgroundColor = false,\r\n leftMargin = 5,\r\n rightMargin = 5,\r\n topMargin = 10,\r\n bottomMargin = 10,\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n highlightedDataPoints = [],\r\n graphID,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n prefix = '',\r\n suffix = '',\r\n stripType = 'dot',\r\n language = 'en',\r\n highlightColor,\r\n dotOpacity = 0.3,\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n valueColor,\r\n animate = false,\r\n noOfTicks = 2,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n customLayers = [],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a strip chart showing distribution of data along the horizontal axis. Each dot represents an individual data point, helping to visualize the spread and clustering of values.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale !== false && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={\r\n showNAColor === undefined || showNAColor === null ? true : showNAColor\r\n }\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center w-full leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) ||\r\n Colors[theme].categoricalColors.colors\r\n }\r\n selectedColor={selectedColor}\r\n radius={radius}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n highlightedDataPoints={highlightedDataPoints}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n prefix={prefix}\r\n suffix={suffix}\r\n stripType={stripType}\r\n highlightColor={highlightColor}\r\n dotOpacity={dotOpacity}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n valueColor={valueColor}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n noOfTicks={noOfTicks}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import isEqual from 'fast-deep-equal';\r\nimport { useRef, useState } from 'react';\r\nimport { scaleLinear } from 'd3-scale';\r\nimport sortBy from 'lodash.sortby';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n StripChartDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { getTickPositions } from '@/Utils/getTickPosition';\r\n\r\ninterface Props {\r\n data: StripChartDataType[];\r\n width: number;\r\n height: number;\r\n selectedColor?: string;\r\n colors: string[];\r\n colorDomain: string[];\r\n radius: number;\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n prefix: string;\r\n suffix: string;\r\n stripType: 'strip' | 'dot';\r\n highlightColor?: string;\r\n dotOpacity: number;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n valueColor?: string;\r\n animate: AnimateDataType;\r\n noOfTicks: number;\r\n dimmedOpacity: number;\r\n precision: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n colors,\r\n colorDomain,\r\n radius,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n highlightedDataPoints,\r\n selectedColor,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n noOfTicks,\r\n prefix,\r\n suffix,\r\n stripType,\r\n highlightColor,\r\n dotOpacity,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n valueColor,\r\n animate,\r\n dimmedOpacity,\r\n precision,\r\n customLayers,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const dataWithId = data.map((d, i) => ({ ...d, id: `${i}` }));\r\n\r\n const sortedData = sortBy(dataWithId, item => {\r\n const index = (highlightedDataPoints || []).indexOf(item.label);\r\n return index === -1 ? Infinity : index;\r\n }).reverse();\r\n const yMaxValue = !checkIfNullOrUndefined(maxValue)\r\n ? (maxValue as number)\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) < 0\r\n ? 0\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const yMinValue = !checkIfNullOrUndefined(minValue)\r\n ? (minValue as number)\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) >= 0\r\n ? 0\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const y = scaleLinear().domain([yMinValue, yMaxValue]).range([graphHeight, 0]).nice();\r\n const ticks = getTickPositions(noOfTicks, graphHeight);\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <AnimatePresence>\r\n {sortedData.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: graphWidth / 2,\r\n y: y(0),\r\n },\r\n whileInView: {\r\n x: graphWidth / 2,\r\n y: y(d.position),\r\n opacity: selectedColor\r\n ? d.color\r\n ? colors[colorDomain.indexOf(d.color)] === selectedColor\r\n ? 0.95\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 0.95\r\n : dimmedOpacity\r\n : dotOpacity,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n {stripType === 'dot' ? (\r\n <motion.circle\r\n cy={0}\r\n cx={0}\r\n variants={{\r\n initial: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n },\r\n whileInView: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n r={radius}\r\n />\r\n ) : (\r\n <motion.rect\r\n x={0 - radius}\r\n y={-1}\r\n width={radius * 2}\r\n height={2}\r\n variants={{\r\n initial: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n },\r\n whileInView: {\r\n fill:\r\n highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n />\r\n )}\r\n {highlightedDataPoints.length !== 0 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n y={0}\r\n dy='0.33em'\r\n x={0 + radius + 3}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fill:\r\n valueColor ||\r\n (highlightColor && highlightedDataPoints\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? highlightColor\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]\r\n : data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(d.color)]),\r\n textAnchor: 'start',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-value text-sm font-bold',\r\n classNames?.graphObjectValues,\r\n )}\r\n >\r\n {numberFormattingFunction(d.position, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n {ticks.map((tick, i) => (\r\n <text\r\n key={i}\r\n y={tick}\r\n x={graphWidth / 2 + radius + 5}\r\n style={{\r\n textAnchor: 'start',\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn(\r\n 'fill-primary-gray-550 dark:fill-primary-gray-500 text-xs',\r\n classNames?.yAxis?.labels,\r\n )}\r\n >\r\n {numberFormattingFunction(y.invert(tick), 'NA', precision, prefix, suffix)}\r\n </text>\r\n ))}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import uniqBy from 'lodash.uniqby';\r\nimport { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n Languages,\r\n SourcesDataType,\r\n StripChartDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n data: StripChartDataType[];\r\n graphTitle?: string | React.ReactNode;\r\n graphDescription?: string | React.ReactNode;\r\n footNote?: string | React.ReactNode;\r\n width?: number;\r\n height?: number;\r\n sources?: SourcesDataType[];\r\n colors?: string | string[];\r\n colorDomain?: string[];\r\n colorLegendTitle?: string;\r\n radius?: number;\r\n backgroundColor?: string | boolean;\r\n padding?: string;\r\n leftMargin?: number;\r\n rightMargin?: number;\r\n topMargin?: number;\r\n bottomMargin?: number;\r\n relativeHeight?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n highlightedDataPoints?: (string | number)[];\r\n showColorScale?: boolean;\r\n graphID?: string;\r\n maxValue?: number;\r\n minValue?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n graphDownload?: boolean;\r\n dataDownload?: boolean;\r\n prefix?: string;\r\n suffix?: string;\r\n stripType?: 'strip' | 'dot';\r\n language?: Languages;\r\n highlightColor?: string;\r\n dotOpacity?: number;\r\n showNAColor?: boolean;\r\n minHeight?: number;\r\n theme?: 'light' | 'dark';\r\n ariaLabel?: string;\r\n resetSelectionOnDoubleClick?: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n valueColor?: string;\r\n animate?: boolean | AnimateDataType;\r\n noOfTicks?: number;\r\n dimmedOpacity?: number;\r\n precision?: number;\r\n customLayers?: CustomLayerDataType[];\r\n}\r\n\r\nexport function VerticalStripChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n radius = 5,\r\n padding,\r\n backgroundColor = false,\r\n leftMargin = 20,\r\n rightMargin = 20,\r\n topMargin = 10,\r\n bottomMargin = 10,\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n highlightedDataPoints = [],\r\n graphID,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n prefix = '',\r\n suffix = '',\r\n stripType = 'dot',\r\n language = 'en',\r\n highlightColor,\r\n dotOpacity = 0.3,\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n valueColor,\r\n animate = false,\r\n noOfTicks = 2,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n customLayers = [],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a strip chart showing distribution of data along the vertical axis. Each dot represents an individual data point, helping to visualize the spread and clustering of values.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale !== false && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center w-full leading-0'\r\n ref={graphDiv}\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) ||\r\n Colors[theme].categoricalColors.colors\r\n }\r\n selectedColor={selectedColor}\r\n radius={radius}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n highlightedDataPoints={highlightedDataPoints}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n prefix={prefix}\r\n suffix={suffix}\r\n stripType={stripType}\r\n highlightColor={highlightColor}\r\n dotOpacity={dotOpacity}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n valueColor={valueColor}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n noOfTicks={noOfTicks}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import { HorizontalStripChart } from './Horizontal';\r\nimport { VerticalStripChart } from './Vertical';\r\n\r\nimport {\r\n SourcesDataType,\r\n Languages,\r\n StripChartDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: StripChartDataType[];\r\n\r\n /** Orientation of the graph */\r\n orientation?: 'vertical' | 'horizontal';\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 /** Color or array of colors for circles */\r\n colors?: string | string[];\r\n /** Color of the highlighted data points */\r\n highlightColor?: string;\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color of value labels */\r\n valueColor?: 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\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Maximum value for the chart */\r\n maxValue?: number;\r\n /** Minimum value for the chart */\r\n minValue?: number;\r\n\r\n // Graph Parameters\r\n /** Number of ticks on the axis */\r\n noOfTicks?: number;\r\n /** Radius of the dots or width of the strips */\r\n radius?: number;\r\n /** Opacity of each dot or strip */\r\n dotOpacity?: number;\r\n /** Type of strip */\r\n stripType?: 'strip' | 'dot';\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\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 /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: 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 StripChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n radius,\r\n padding,\r\n backgroundColor,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n highlightedDataPoints,\r\n graphID,\r\n minValue,\r\n maxValue,\r\n onSeriesMouseClick,\r\n noOfTicks,\r\n graphDownload,\r\n dataDownload,\r\n prefix,\r\n suffix,\r\n stripType,\r\n language,\r\n highlightColor,\r\n dotOpacity,\r\n showNAColor,\r\n minHeight,\r\n theme,\r\n ariaLabel,\r\n valueColor,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n orientation = 'vertical',\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity = 0.3,\r\n precision,\r\n customLayers,\r\n } = props;\r\n\r\n if (orientation === 'vertical')\r\n return (\r\n <VerticalStripChart\r\n data={data}\r\n graphTitle={graphTitle}\r\n colors={colors}\r\n sources={sources}\r\n graphDescription={graphDescription}\r\n height={height}\r\n width={width}\r\n footNote={footNote}\r\n colorDomain={colorDomain}\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n padding={padding}\r\n backgroundColor={backgroundColor}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n relativeHeight={relativeHeight}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={showColorScale}\r\n highlightedDataPoints={highlightedDataPoints}\r\n graphID={graphID}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n noOfTicks={noOfTicks}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n prefix={prefix}\r\n suffix={suffix}\r\n stripType={stripType}\r\n language={language}\r\n highlightColor={highlightColor}\r\n dotOpacity={dotOpacity}\r\n showNAColor={showNAColor}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n valueColor={valueColor}\r\n detailsOnClick={detailsOnClick}\r\n classNames={classNames}\r\n animate={animate}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n );\r\n return (\r\n <HorizontalStripChart\r\n data={data}\r\n graphTitle={graphTitle}\r\n colors={colors}\r\n sources={sources}\r\n graphDescription={graphDescription}\r\n height={height}\r\n width={width}\r\n footNote={footNote}\r\n colorDomain={colorDomain}\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\r\n padding={padding}\r\n backgroundColor={backgroundColor}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n relativeHeight={relativeHeight}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showColorScale={showColorScale}\r\n highlightedDataPoints={highlightedDataPoints}\r\n graphID={graphID}\r\n minValue={minValue}\r\n maxValue={maxValue}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n noOfTicks={noOfTicks}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n prefix={prefix}\r\n suffix={suffix}\r\n stripType={stripType}\r\n language={language}\r\n highlightColor={highlightColor}\r\n dotOpacity={dotOpacity}\r\n showNAColor={showNAColor}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n valueColor={valueColor}\r\n detailsOnClick={detailsOnClick}\r\n classNames={classNames}\r\n animate={animate}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n );\r\n}\r\n"],"names":["getTickPositions","count","width","step","_","i","Graph","props","data","height","colors","colorDomain","radius","leftMargin","rightMargin","topMargin","bottomMargin","tooltip","onSeriesMouseOver","highlightedDataPoints","selectedColor","minValue","maxValue","onSeriesMouseClick","prefix","suffix","stripType","highlightColor","dotOpacity","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","valueColor","animate","noOfTicks","dimmedOpacity","precision","customLayers","svgRef","useRef","isInView","useInView","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","margin","graphWidth","graphHeight","dataWithId","d","sortedData","sortBy","item","index","xMaxValue","checkIfNullOrUndefined","xMinValue","x","scaleLinear","ticks","jsxs","Fragment","jsx","motion","AnimatePresence","event","isEqual","el","Colors","cn","tick","numberFormattingFunction","Tooltip","Modal","string2HTML","HorizontalStripChart","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","language","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","useEffect","resizeObserver","entries","GraphHeader","EmptyState","ColorLegendWithMouseOver","uniqBy","GraphFooter","yMaxValue","yMinValue","y","VerticalStripChart","StripChart","orientation"],"mappings":";;;;;;;;;;;;;;;;;;;AAAO,SAASA,GAAiBC,GAAeC,GAAe;AAC7D,MAAID,IAAQ,EAAG,QAAO,CAAA;AACtB,QAAME,IAAOD,KAASD,IAAQ;AAC9B,SAAO,MAAM,KAAK,EAAE,QAAQA,KAAS,CAACG,GAAGC,MAAMA,IAAIF,CAAI;AACzD;ACyDO,SAASG,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAN;AAAA,IACA,QAAAO;AAAA,IACA,QAAA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,iBAAAC;AAAA,MACA,YAAA5E;AAAA,MACA,aAAAC;AAAA,MACA,WAAAC;AAAA,MACA,cAAAC;AAAA,MACA,SAAAC;AAAA,MACA,gBAAAyE;AAAA,MACA,mBAAAxE;AAAA,MACA,gBAAAyE;AAAA,MACA,uBAAAxE;AAAA,MACA,SAAAyE;AAAA,MACA,UAAAvE;AAAA,MACA,UAAAC;AAAA,MACA,oBAAAC;AAAA,MACA,WAAAY;AAAA,MACA,eAAA0D;AAAA,MACA,cAAAC;AAAA,MACA,QAAAtE;AAAA,MACA,QAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAqE;AAAA,MACA,gBAAApE;AAAA,MACA,YAAAC;AAAA,MACA,aAAAoE;AAAA,MACA,WAAAC;AAAA,MACA,OAAAC;AAAA,MACA,WAAAC;AAAA,MACA,6BAAAtE;AAAA,MACA,QAAAE;AAAA,MACA,YAAAE;AAAA,MACA,gBAAAH;AAAA,MACA,YAAAE;AAAA,MACA,SAAAE;AAAA,MACA,eAAAE;AAAA,MACA,WAAAC;AAAA,MACA,cAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),c=require("react"),le=require("./Spinner-DA6Z5E4n.cjs"),ce=require("react-globe.gl"),ue=require("./index-BXns0-ng.cjs"),de=require("three"),pe=require("./Modal-C_dl0EtQ.cjs"),ie=require("./Typography-k-kOjICQ.cjs"),ge=require("./Tooltip-n8z5bfav.cjs"),me=require("./numberFormattingFunction-02t-wJta.cjs"),he=require("./index-BW_-wD2k.cjs"),xe=require("./string2HTML-D2Avudmb.cjs"),fe=require("./ordinal-BOeNbyae.cjs"),ye=require("./threshold-DNsSUf8Q.cjs"),je=require("./GraphHeader.cjs"),ve=require("./GraphFooter.cjs"),be=require("./fetchAndParseData-DmgQtB9n.cjs"),N=require("./Colors.cjs"),Ee=require("./getUniqValue-CHqgSss5.cjs"),Re=require("./getJenks-TWQvbuOz.cjs");function Ce(f){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const i in f)if(i!=="default"){const p=Object.getOwnPropertyDescriptor(f,i);Object.defineProperty(u,i,p.get?p:{enumerable:!0,get:()=>f[i]})}}return u.default=f,Object.freeze(u)}const we=Ce(de);function De(f){const{width:u,autoRotate:i,data:p,enableZoom:M,categorical:w,colorDomain:g,colors:o,globeMaterial:n,height:H,polygonData:_,mapProperty:m,mapBorderColor:q,atmosphereColor:$,tooltip:G,styles:v,classNames:J,mapNoDataColor:h,centerPoint:A,colorLegendTitle:O,showColorScale:X,hoverStrokeColor:F,detailsOnClick:x,onSeriesMouseClick:d,onSeriesMouseOver:D,resetSelectionOnDoubleClick:Z,highlightedIds:y,scale:j,globeOffset:P,polygonAltitude:Y,centerLng:z,centerLat:S}=f,a=c.useRef(void 0),[E,k]=c.useState(void 0),[K,B]=c.useState(!(u<680)),[I,Q]=c.useState({x:0,y:0}),[b,ee]=c.useState(void 0),U=w?fe.ordinal().domain(g).range(o):ye.threshold().domain(g).range(o);c.useEffect(()=>{a?.current&&(a.current.controls().autoRotate=i!==0,a.current.controls().enableZoom=M,a.current.controls().autoRotateSpeed=i)},[i,M]),c.useEffect(()=>{a.current&&(b?a.current.controls().autoRotate=!1:a.current.controls().autoRotate=i!==0)},[b,i]),c.useEffect(()=>{const r=a.current?.renderer().domElement;if(!r)return;const t=s=>{Q({x:s.clientX,y:s.clientY})};return r.addEventListener("mousemove",t),()=>r.removeEventListener("mousemove",t)},[]),c.useEffect(()=>{a.current&&a.current.pointOfView({lat:S,lng:z,altitude:j},1e3)},[j,z,S]);const W=new we.MeshLambertMaterial({color:"#fff",opacity:1,transparent:!1,...n||{}});return e.jsxRuntimeExports.jsxs("div",{className:"relative",children:[e.jsxRuntimeExports.jsx(ce,{ref:a,width:u,height:H,globeOffset:P,lineHoverPrecision:0,polygonsData:_,polygonAltitude:r=>y.includes(r?.properties?.[m])?.1:r?.properties?.[m]===b?.id?.01:Y,polygonCapColor:r=>{const t=r?.properties?.[m],s=p.find(R=>R.id===t)?.x;return s!=null?U(s):h},polygonSideColor:r=>{const t=r?.properties?.[m],s=p.find(V=>V.id===t)?.x,R=s!=null?U(s):h;return y.includes(r?.properties?.[m])?R:"rgba(100,100,100,0)"},polygonStrokeColor:r=>r?.properties?.[m]===b?.id?F:q,onPolygonClick:r=>{const t=r?.properties?.[m]?p.find(s=>s.id===r?.properties?.[m]):void 0;(d||x)&&(ue.isEqual(E,t)&&Z&&t?(k(void 0),d?.(void 0)):(k(t),d?.(t))),k(t),d?.(t)},onPolygonHover:r=>{const t=r?.properties?.[m]?p.find(s=>s.id===r?.properties?.[m]):void 0;ee(t),D?.(t)},atmosphereColor:$,globeMaterial:W,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{a.current&&a.current.pointOfView({lat:A[0],lng:A[1]})}}),X===!1?null:e.jsxRuntimeExports.jsx("div",{className:"absolute left-4 bottom-4",children:K?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{B(!1)},children:e.jsxRuntimeExports.jsx(he.X,{})}),e.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)",width:w?void 0:"340px"},children:[O&&O!==""?e.jsxRuntimeExports.jsx(ie.u,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:O}):null,w?e.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:g.map((r,t)=>e.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:o[t%o.length]}}),e.jsxRuntimeExports.jsx(ie.u,{size:"sm",marginBottom:"none",leading:"none",children:r})]},t))}):e.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:e.jsxRuntimeExports.jsxs("g",{children:[g.map((r,t)=>e.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[e.jsxRuntimeExports.jsx("rect",{x:t*320/o.length+1,y:1,width:320/o.length-2,height:8,style:{fill:o[t],stroke:o[t]}}),e.jsxRuntimeExports.jsx("text",{x:(t+1)*320/o.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:me.numberFormattingFunction(r,"NA")})]},t)),e.jsxRuntimeExports.jsx("g",{children:e.jsxRuntimeExports.jsx("rect",{x:g.length*320/o.length+1,y:1,width:320/o.length-2,height:8,style:{fill:o[g.length],stroke:o[g.length]}})})]})})]})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{B(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),b&&G?e.jsxRuntimeExports.jsx(ge.Tooltip,{data:b,body:G,xPos:I.x,yPos:I.y,backgroundStyle:v?.tooltip,className:J?.tooltip}):null,x&&E!==void 0?e.jsxRuntimeExports.jsx(pe.X,{open:E!==void 0,onClose:()=>{k(void 0)},children:e.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof x=="string"?{__html:xe.string2HTML(x,E)}:void 0,children:typeof x=="function"?x(E):null})}):null]})}function Se(f){const{data:u,mapData:i="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json",graphTitle:p,colors:M,sources:w,graphDescription:g,height:o,width:n,footNote:H="The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.",colorDomain:_,colorLegendTitle:m,scaleType:q="threshold",padding:$,mapNoDataColor:G=N.Colors.light.graphNoData,backgroundColor:v=!1,mapBorderColor:J=N.Colors.light.grays["gray-500"],relativeHeight:h,tooltip:A,graphID:O,mapProperty:X="ISO3",dataDownload:F=!1,language:x="en",minHeight:d=0,theme:D="light",ariaLabel:Z,styles:y,classNames:j,autoRotate:P=!0,enableZoom:Y=!0,globeMaterial:z,centerPoint:S=[0,0],atmosphereColor:a="#999",showColorScale:E=!0,resetSelectionOnDoubleClick:k=!0,detailsOnClick:K,onSeriesMouseOver:B,onSeriesMouseClick:I,highlightedIds:Q=[],scale:b=1,globeOffset:ee=[0,0],polygonAltitude:U=.01}=f,[W,r]=c.useState(void 0),[t,s]=c.useState(0),[R,V]=c.useState(0),T=c.useRef(null);c.useEffect(()=>{const l=new ResizeObserver(L=>{s(n||L[0].target.clientWidth||760),V(o||L[0].target.clientHeight||480)});return T.current&&(V(T.current.clientHeight||480),s(T.current.clientWidth||760),n||l.observe(T.current)),()=>l.disconnect()},[n,o]),c.useEffect(()=>{typeof i=="string"?be.fetchAndParseJSON(i).then(L=>{if(i==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const ne=L.features.map(C=>{if(C.geometry.type==="Polygon"){const re=[...C.geometry.coordinates[0]].reverse(),oe={...C.geometry,coordinates:[re]};return{...C,geometry:oe}}const se=[];C.geometry.coordinates.forEach(re=>{const oe=[...re[0]].reverse();se.push([oe])});const ae={...C.geometry,coordinates:se};return{...C,geometry:ae}});r(ne)}else r(L.features)}):r(i.features)},[i]);const te=_||(q==="categorical"?Ee.getUniqValue(u,"x"):Re.getJenks(u.map(l=>l.x),M?.length||4));return e.jsxRuntimeExports.jsx("div",{className:`${D||"light"} flex ${n?"w-fit grow-0":"w-full grow"}`,dir:x==="he"||x==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${v?v===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${x||"en"}`,j?.graphContainer),style:{...y?.graphContainer||{},...v&&v!==!0?{backgroundColor:v}:{}},id:O,"aria-label":Z||`${p?`The graph shows ${p}. `:""}This is a map.${g?` ${g}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:v?$||"1rem":$||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[p||g||F?e.jsxRuntimeExports.jsx(je.GraphHeader,{styles:{title:y?.title,description:y?.description},classNames:{title:j?.title,description:j?.description},graphTitle:p,graphDescription:g,width:n,graphDownload:void 0,dataDownload:F?u.map(l=>l.data).filter(l=>l!==void 0).length>0?u.map(l=>l.data).filter(l=>l!==void 0):u.filter(l=>l!==void 0):null}):null,e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:T,"aria-label":"Map area",children:(n||t)&&(o||R)&&W?e.jsxRuntimeExports.jsx(De,{data:u,globeOffset:ee,polygonData:W,colorDomain:te,width:n||t,height:Math.max(d,o||(h?d?(n||t)*h>d?(n||t)*h:d:(n||t)*h:R)),colors:M||(q==="categorical"?N.Colors[D].sequentialColors[`neutralColorsx0${te.length}`]:N.Colors[D].sequentialColors[`neutralColorsx0${te.length+1}`]),mapNoDataColor:G,categorical:q==="categorical",mapBorderColor:J,tooltip:A,mapProperty:X,styles:y,classNames:j,autoRotate:P===!0?1.5:P===!1?0:P,enableZoom:Y,globeMaterial:z,atmosphereColor:a,centerPoint:S,colorLegendTitle:m,showColorScale:E,hoverStrokeColor:D==="light"?N.Colors.light.grays["gray-700"]:N.Colors.light.grays["gray-300"],highlightedIds:Q,resetSelectionOnDoubleClick:k,detailsOnClick:K,onSeriesMouseOver:B,onSeriesMouseClick:I,scale:b,polygonAltitude:U,centerLat:S[0],centerLng:S[1]}):e.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(d,o||(h?d?(n||t)*h>d?(n||t)*h:d:(n||t)*h:R))}px`},className:"flex items-center justify-center",children:e.jsxRuntimeExports.jsx(le.y,{"aria-label":"Loading graph"})})}),w||H?e.jsxRuntimeExports.jsx(ve.GraphFooter,{styles:{footnote:y?.footnote,source:y?.source},classNames:{footnote:j?.footnote,source:j?.source},sources:w,footNote:H,width:n}):null]})})})})}exports.ThreeDGlobe=Se;
2
+ //# sourceMappingURL=ThreeDGlobe.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThreeDGlobe.cjs","sources":["../src/Components/Graphs/Maps/ThreeDGlobe/Graph.tsx","../src/Components/Graphs/Maps/ThreeDGlobe/index.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport Globe, { GlobeMethods } from 'react-globe.gl';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport { scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport * as THREE from 'three';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { ChoroplethMapDataType, ClassNameObject, StyleObject } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n width: number;\r\n data: ChoroplethMapDataType[];\r\n autoRotate: number;\r\n enableZoom: boolean;\r\n categorical: boolean;\r\n colorDomain: number[] | string[];\r\n colors: string[];\r\n height: number;\r\n globeMaterial?: THREE.MeshPhongMaterialProperties;\r\n polygonData: any;\r\n mapProperty: string;\r\n mapBorderColor: string;\r\n atmosphereColor: string;\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapNoDataColor: string;\r\n centerPoint: [number, number];\r\n colorLegendTitle?: string;\r\n showColorScale: boolean;\r\n hoverStrokeColor: string;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n resetSelectionOnDoubleClick: boolean;\r\n highlightedIds: string[];\r\n scale: number;\r\n globeOffset: [number, number];\r\n polygonAltitude: number;\r\n centerLng: number;\r\n centerLat: number;\r\n}\r\n\r\nfunction Graph(props: Props) {\r\n const {\r\n width,\r\n autoRotate,\r\n data,\r\n enableZoom,\r\n categorical,\r\n colorDomain,\r\n colors,\r\n globeMaterial,\r\n height,\r\n polygonData,\r\n mapProperty,\r\n mapBorderColor,\r\n atmosphereColor,\r\n tooltip,\r\n styles,\r\n classNames,\r\n mapNoDataColor,\r\n centerPoint,\r\n colorLegendTitle,\r\n showColorScale,\r\n hoverStrokeColor,\r\n detailsOnClick,\r\n onSeriesMouseClick,\r\n onSeriesMouseOver,\r\n resetSelectionOnDoubleClick,\r\n highlightedIds,\r\n scale,\r\n globeOffset,\r\n polygonAltitude,\r\n centerLng,\r\n centerLat,\r\n } = props;\r\n const globeEl = useRef<GlobeMethods | undefined>(undefined);\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [showLegend, setShowLegend] = useState(!(width < 680));\r\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\r\n const [mouseOverData, setMouseOverData] = useState<ChoroplethMapDataType | undefined>(undefined);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n if (globeEl?.current) {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n globeEl.current.controls().enableZoom = enableZoom;\r\n globeEl.current.controls().autoRotateSpeed = autoRotate;\r\n }\r\n }, [autoRotate, enableZoom]);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n if (mouseOverData) {\r\n globeEl.current.controls().autoRotate = false;\r\n } else {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n }\r\n }\r\n }, [mouseOverData, autoRotate]);\r\n\r\n useEffect(() => {\r\n const canvas = globeEl.current?.renderer().domElement;\r\n if (!canvas) return;\r\n\r\n const handleMouseMove = (e: MouseEvent) => {\r\n setMousePos({ x: e.clientX, y: e.clientY });\r\n };\r\n\r\n canvas.addEventListener('mousemove', handleMouseMove);\r\n return () => canvas.removeEventListener('mousemove', handleMouseMove);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({ lat: centerLat, lng: centerLng, altitude: scale }, 1000);\r\n }\r\n }, [scale, centerLng, centerLat]);\r\n const materials = new THREE.MeshLambertMaterial({\r\n color: '#fff',\r\n opacity: 1,\r\n transparent: false,\r\n ...(globeMaterial || {}),\r\n });\r\n return (\r\n <div className='relative'>\r\n <Globe\r\n ref={globeEl}\r\n width={width}\r\n height={height}\r\n globeOffset={globeOffset}\r\n lineHoverPrecision={0}\r\n polygonsData={polygonData}\r\n polygonAltitude={(polygon: any) =>\r\n highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 0.1\r\n : polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? 0.01\r\n : polygonAltitude\r\n }\r\n polygonCapColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n if (val !== undefined && val !== null) {\r\n return colorScale(val as any);\r\n }\r\n return mapNoDataColor;\r\n }}\r\n polygonSideColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? color\r\n : 'rgba(100,100,100,0)';\r\n }}\r\n polygonStrokeColor={(polygon: any) =>\r\n polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? hoverStrokeColor\r\n : mapBorderColor\r\n }\r\n onPolygonClick={(polygon: any) => {\r\n const clickedData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n isEqual(mouseClickData, clickedData) &&\r\n resetSelectionOnDoubleClick &&\r\n clickedData\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }\r\n }\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }}\r\n onPolygonHover={(polygon: any) => {\r\n const hoverData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n setMouseOverData(hoverData);\r\n onSeriesMouseOver?.(hoverData);\r\n }}\r\n atmosphereColor={atmosphereColor}\r\n globeMaterial={materials}\r\n backgroundColor='rgba(0, 0, 0, 0)'\r\n polygonsTransitionDuration={100}\r\n onGlobeReady={() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({\r\n lat: centerPoint[0],\r\n lng: centerPoint[1],\r\n });\r\n }\r\n }}\r\n />\r\n {showColorScale === false ? null : (\r\n <div className='absolute left-4 bottom-4'>\r\n {showLegend ? (\r\n <>\r\n <div\r\n style={{\r\n backgroundColor: 'rgba(240,240,240, 0.7)',\r\n border: '1px solid var(--gray-400)',\r\n borderRadius: '999px',\r\n width: '24px',\r\n height: '24px',\r\n padding: '3px',\r\n cursor: 'pointer',\r\n zIndex: 10,\r\n position: 'absolute',\r\n right: '-0.75rem',\r\n top: '-0.75rem',\r\n }}\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='p-2'\r\n style={{\r\n backgroundColor: 'rgba(240,240,240, 0.7)',\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g key={i} className='cursor-pointer'>\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[i],\r\n stroke: colors[i],\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n stroke: colors[colorDomain.length],\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div key={i} className='flex gap-2 items-center'>\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {mouseOverData && tooltip ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={mousePos.x}\r\n yPos={mousePos.y}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n\r\nexport default Graph;\r\n","import React, { useEffect, useRef, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport * as THREE from 'three';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport Graph from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n Languages,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ChoroplethMapDataType[];\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 the choropleth map */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: 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\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines if the globe rotates automatically */\r\n autoRotate?: number | boolean;\r\n /** Defines the material property applied to the sphere of the globe */\r\n globeMaterial?: THREE.MeshPhongMaterialProperties;\r\n /** Defines the colo of the glow around the globe */\r\n atmosphereColor?: string;\r\n /** Defines if the globe can be zoomed when scrolled */\r\n enableZoom?: boolean;\r\n /** Position offset of the globe relative to the canvas center */\r\n globeOffset?: [number, number];\r\n /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */\r\n scale?: number;\r\n /** Defines the spacing between the country shape polygon with the sphere */\r\n polygonAltitude?: number;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggles if the color scaling is categorical or not */\r\n categorical?: boolean;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: 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\n/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */\r\nexport function ThreeDGlobe(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n padding,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n graphID,\r\n mapProperty = 'ISO3',\r\n dataDownload = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n autoRotate = true,\r\n enableZoom = true,\r\n globeMaterial,\r\n centerPoint = [0, 0],\r\n atmosphereColor = '#999',\r\n showColorScale = true,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n highlightedIds = [],\r\n scale = 1,\r\n globeOffset = [0, 0],\r\n polygonAltitude = 0.01,\r\n } = props;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 760);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 760);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n if (\r\n mapData ===\r\n 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json'\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const features = d.features.map((el: any) => {\r\n if (el.geometry.type === 'Polygon') {\r\n const reversed = [...el.geometry.coordinates[0]].reverse();\r\n const geometry = { ...el.geometry, coordinates: [reversed] };\r\n return { ...el, geometry };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const coord: any = [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n el.geometry.coordinates.forEach((c: any) => {\r\n const reversed = [...c[0]].reverse();\r\n coord.push([reversed]);\r\n });\r\n const geometry = { ...el.geometry, coordinates: coord };\r\n return { ...el, geometry };\r\n });\r\n setMapShape(features);\r\n } else setMapShape(d.features);\r\n });\r\n } else {\r\n setMapShape(mapData.features);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a map.${graphDescription ? ` ${graphDescription}` : ''}`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) && mapShape ? (\r\n <Graph\r\n data={data}\r\n globeOffset={globeOffset}\r\n polygonData={mapShape}\r\n colorDomain={domain}\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n mapProperty={mapProperty}\r\n styles={styles}\r\n classNames={classNames}\r\n autoRotate={autoRotate === true ? 1.5 : autoRotate === false ? 0 : autoRotate}\r\n enableZoom={enableZoom}\r\n globeMaterial={globeMaterial}\r\n atmosphereColor={atmosphereColor}\r\n centerPoint={centerPoint}\r\n colorLegendTitle={colorLegendTitle}\r\n showColorScale={showColorScale}\r\n hoverStrokeColor={\r\n theme === 'light'\r\n ? Colors.light.grays['gray-700']\r\n : Colors.light.grays['gray-300']\r\n }\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n scale={scale}\r\n polygonAltitude={polygonAltitude}\r\n centerLat={centerPoint[0]}\r\n centerLng={centerPoint[1]}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["Graph","props","width","autoRotate","data","enableZoom","categorical","colorDomain","colors","globeMaterial","height","polygonData","mapProperty","mapBorderColor","atmosphereColor","tooltip","styles","classNames","mapNoDataColor","centerPoint","colorLegendTitle","showColorScale","hoverStrokeColor","detailsOnClick","onSeriesMouseClick","onSeriesMouseOver","resetSelectionOnDoubleClick","highlightedIds","scale","globeOffset","polygonAltitude","centerLng","centerLat","globeEl","useRef","mouseClickData","setMouseClickData","useState","showLegend","setShowLegend","mousePos","setMousePos","mouseOverData","setMouseOverData","colorScale","scaleOrdinal","scaleThreshold","useEffect","canvas","handleMouseMove","e","materials","THREE","jsxs","jsx","Globe","polygon","id","val","el","color","clickedData","isEqual","hoverData","Fragment","X","P","d","i","numberFormattingFunction","Tooltip","Modal","string2HTML","ThreeDGlobe","mapData","graphTitle","sources","graphDescription","footNote","scaleType","padding","Colors","backgroundColor","relativeHeight","graphID","dataDownload","language","minHeight","theme","ariaLabel","mapShape","setMapShape","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","resizeObserver","entries","fetchAndParseJSON","features","reversed","geometry","coord","c","domain","getUniqValue","getJenks","cn","GraphHeader","Spinner","GraphFooter"],"mappings":"kkCAiDA,SAASA,GAAMC,EAAc,CAC3B,KAAM,CACJ,MAAAC,EACA,WAAAC,EACA,KAAAC,EACA,WAAAC,EACA,YAAAC,EACA,YAAAC,EACA,OAAAC,EACA,cAAAC,EACA,OAAAC,EACA,YAAAC,EACA,YAAAC,EACA,eAAAC,EACA,gBAAAC,EACA,QAAAC,EACA,OAAAC,EACA,WAAAC,EACA,eAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,mBAAAC,EACA,kBAAAC,EACA,4BAAAC,EACA,eAAAC,EACA,MAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,UAAAC,EACA,UAAAC,CAAA,EACE/B,EACEgC,EAAUC,EAAAA,OAAiC,MAAS,EACpD,CAACC,EAAgBC,CAAiB,EAAIC,EAAAA,SAAc,MAAS,EAC7D,CAACC,EAAYC,CAAa,EAAIF,EAAAA,SAAS,EAAEnC,EA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F,EACA,YAAa6D,IAAc,cAC3B,eAAAlE,EACA,QAAAE,EACA,YAAAH,EACA,OAAAI,EACA,WAAAC,EACA,WAAYd,IAAe,GAAO,IAAMA,IAAe,GAAQ,EAAIA,EACnE,WAAAE,EACA,cAAAI,EACA,gBAAAK,EACA,YAAAK,EACA,iBAAAC,EACA,eAAAC,EACA,iBACEmE,IAAU,QACNP,EAAAA,OAAO,MAAM,MAAM,UAAU,EAC7BA,EAAAA,OAAO,MAAM,MAAM,UAAU,EAEnC,eAAAtD,EACA,4BAAAD,EACA,eAAAH,EACA,kBAAAE,EACA,mBAAAD,EACA,MAAAI,EACA,gBAAAE,EACA,UAAWX,EAAY,CAAC,EACxB,UAAWA,EAAY,CAAC,CAAA,CAAA,EAG1BmC,EAAAA,kBAAAA,IAAC,MAAA,CACC,MAAO,CACL,OAAQ,GAAG,KAAK,IACdiC,EACA7E,IACGyE,EACGI,GACGrF,GAAS0F,GAAYT,EAAiBI,GACpCrF,GAAS0F,GAAYT,EACtBI,GACDrF,GAAS0F,GAAYT,EACxBW,EAAA,CACP,IAAA,EAEH,UAAU,mCAEV,SAAAxC,EAAAA,kBAAAA,IAACwD,GAAAA,EAAA,CAAQ,aAAW,eAAA,CAAgB,CAAA,CAAA,CACtC,CAAA,EAGHlC,GAAWE,EACVxB,EAAAA,kBAAAA,IAACyD,GAAAA,YAAA,CACC,OAAQ,CAAE,SAAU/F,GAAQ,SAAU,OAAQA,GAAQ,MAAA,EACtD,WAAY,CACV,SAAUC,GAAY,SACtB,OAAQA,GAAY,MAAA,EAEtB,QAAA2D,EACA,SAAAE,EACA,MAAA5E,CAAA,CAAA,EAEA,IAAA,CAAA,CACN,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAGN"}
@@ -0,0 +1,158 @@
1
+ import { default as default_2 } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import * as THREE from 'three';
4
+
5
+ declare interface AxesClassNameObject {
6
+ gridLines?: string;
7
+ labels?: string;
8
+ title?: string;
9
+ axis?: string;
10
+ }
11
+
12
+ declare interface AxesStyleObject {
13
+ gridLines?: React.CSSProperties;
14
+ labels?: React.CSSProperties;
15
+ title?: React.CSSProperties;
16
+ axis?: React.CSSProperties;
17
+ }
18
+
19
+ declare interface ChoroplethMapDataType {
20
+ x?: number | string | null;
21
+ id: string;
22
+ date?: string | number;
23
+ data?: object;
24
+ }
25
+
26
+ declare interface ClassNameObject {
27
+ title?: string;
28
+ footnote?: string;
29
+ source?: string;
30
+ description?: string;
31
+ tooltip?: string;
32
+ xAxis?: AxesClassNameObject;
33
+ yAxis?: AxesClassNameObject;
34
+ legend?: string;
35
+ graphContainer?: string;
36
+ graphObjectValues?: string;
37
+ dataConnectors?: string;
38
+ mouseOverLine?: string;
39
+ regLine?: string;
40
+ dataCards?: string;
41
+ }
42
+
43
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
44
+
45
+ declare interface Props {
46
+ /** Array of data objects */
47
+ data: ChoroplethMapDataType[];
48
+ /** Title of the graph */
49
+ graphTitle?: string | default_2.ReactNode;
50
+ /** Description of the graph */
51
+ graphDescription?: string | default_2.ReactNode;
52
+ /** Footnote for the graph */
53
+ footNote?: string | default_2.ReactNode;
54
+ /** Source data for the graph */
55
+ sources?: SourcesDataType[];
56
+ /** Accessibility label */
57
+ ariaLabel?: string;
58
+ /** Colors for the choropleth map */
59
+ colors?: string[];
60
+ /** Domain of colors for the graph */
61
+ colorDomain?: number[] | string[];
62
+ /** Title for the color legend */
63
+ colorLegendTitle?: string;
64
+ /** Color for the areas where data is no available */
65
+ mapNoDataColor?: string;
66
+ /** Background color of the graph */
67
+ backgroundColor?: string | boolean;
68
+ /** Custom styles for the graph. Each object should be a valid React CSS style object. */
69
+ styles?: StyleObject;
70
+ /** Custom class names */
71
+ classNames?: ClassNameObject;
72
+ /** Width of the graph */
73
+ width?: number;
74
+ /** Height of the graph */
75
+ height?: number;
76
+ /** Minimum height of the graph */
77
+ minHeight?: number;
78
+ /** Relative height scaling factor. This overwrites the height props */
79
+ relativeHeight?: number;
80
+ /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
81
+ padding?: string;
82
+ /** Map data as an object in geoJson format or a url for geoJson */
83
+ mapData?: any;
84
+ /** Stroke color of the regions in the map */
85
+ mapBorderColor?: string;
86
+ /** Center point of the map */
87
+ centerPoint?: [number, number];
88
+ /** Defines if the globe rotates automatically */
89
+ autoRotate?: number | boolean;
90
+ /** Defines the material property applied to the sphere of the globe */
91
+ globeMaterial?: THREE.MeshPhongMaterialProperties;
92
+ /** Defines the colo of the glow around the globe */
93
+ atmosphereColor?: string;
94
+ /** Defines if the globe can be zoomed when scrolled */
95
+ enableZoom?: boolean;
96
+ /** Position offset of the globe relative to the canvas center */
97
+ globeOffset?: [number, number];
98
+ /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */
99
+ scale?: number;
100
+ /** Defines the spacing between the country shape polygon with the sphere */
101
+ polygonAltitude?: number;
102
+ /** Scale for the colors */
103
+ scaleType?: Exclude<ScaleDataType, 'linear'>;
104
+ /** Toggles if the color scaling is categorical or not */
105
+ categorical?: boolean;
106
+ /** Toggle visibility of color scale. */
107
+ showColorScale?: boolean;
108
+ /** Property in the property object in mapData geoJson object is used to match to the id in the data object */
109
+ mapProperty?: string;
110
+ /** Countries or regions to be highlighted */
111
+ highlightedIds?: string[];
112
+ /** Enable data download option as a csv */
113
+ dataDownload?: boolean;
114
+ /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */
115
+ resetSelectionOnDoubleClick?: boolean;
116
+ /** 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 */
117
+ tooltip?: string | ((_d: any) => default_2.ReactNode);
118
+ /** 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 */
119
+ detailsOnClick?: string | ((_d: any) => default_2.ReactNode);
120
+ /** Callback for mouse over event */
121
+ onSeriesMouseOver?: (_d: any) => void;
122
+ /** Callback for mouse click event */
123
+ onSeriesMouseClick?: (_d: any) => void;
124
+ /** Language setting */
125
+ language?: Languages;
126
+ /** Color theme */
127
+ theme?: 'light' | 'dark';
128
+ /** Unique ID for the graph */
129
+ graphID?: string;
130
+ }
131
+
132
+ declare type ScaleDataType = 'categorical' | 'linear' | 'threshold';
133
+
134
+ declare interface SourcesDataType {
135
+ source: string;
136
+ link?: string;
137
+ }
138
+
139
+ declare interface StyleObject {
140
+ title?: React.CSSProperties;
141
+ footnote?: React.CSSProperties;
142
+ source?: React.CSSProperties;
143
+ description?: React.CSSProperties;
144
+ graphContainer?: React.CSSProperties;
145
+ tooltip?: React.CSSProperties;
146
+ xAxis?: AxesStyleObject;
147
+ yAxis?: AxesStyleObject;
148
+ graphObjectValues?: React.CSSProperties;
149
+ dataConnectors?: React.CSSProperties;
150
+ mouseOverLine?: React.CSSProperties;
151
+ regLine?: React.CSSProperties;
152
+ dataCards?: React.CSSProperties;
153
+ }
154
+
155
+ /** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */
156
+ export declare function ThreeDGlobe(props: Props): JSX.Element;
157
+
158
+ export { }