@undp/data-viz 2.4.1 → 2.5.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 (271) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.d.ts +11 -9
  4. package/dist/AreaChart.js +320 -322
  5. package/dist/AreaChart.js.map +1 -1
  6. package/dist/BarGraph.cjs +1 -1
  7. package/dist/BarGraph.cjs.map +1 -1
  8. package/dist/BarGraph.d.ts +15 -25
  9. package/dist/BarGraph.js +1694 -1694
  10. package/dist/BarGraph.js.map +1 -1
  11. package/dist/BasicStatCard.cjs +1 -1
  12. package/dist/BasicStatCard.cjs.map +1 -1
  13. package/dist/BasicStatCard.d.ts +13 -9
  14. package/dist/BasicStatCard.js +79 -81
  15. package/dist/BasicStatCard.js.map +1 -1
  16. package/dist/BeeSwarmChart.cjs +1 -1
  17. package/dist/BeeSwarmChart.cjs.map +1 -1
  18. package/dist/BeeSwarmChart.d.ts +11 -9
  19. package/dist/BeeSwarmChart.js +335 -336
  20. package/dist/BeeSwarmChart.js.map +1 -1
  21. package/dist/BiVariateChoroplethMap.cjs +1 -1
  22. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  23. package/dist/BiVariateChoroplethMap.d.ts +13 -3
  24. package/dist/BiVariateChoroplethMap.js +309 -304
  25. package/dist/BiVariateChoroplethMap.js.map +1 -1
  26. package/dist/BulletChart.cjs +1 -1
  27. package/dist/BulletChart.cjs.map +1 -1
  28. package/dist/BulletChart.d.ts +11 -5
  29. package/dist/BulletChart.js +560 -559
  30. package/dist/BulletChart.js.map +1 -1
  31. package/dist/ButterflyChart.cjs +1 -1
  32. package/dist/ButterflyChart.cjs.map +1 -1
  33. package/dist/ButterflyChart.d.ts +11 -9
  34. package/dist/ButterflyChart.js +348 -350
  35. package/dist/ButterflyChart.js.map +1 -1
  36. package/dist/ChoroplethMap.cjs +1 -1
  37. package/dist/ChoroplethMap.cjs.map +1 -1
  38. package/dist/ChoroplethMap.d.ts +11 -3
  39. package/dist/ChoroplethMap.js +314 -311
  40. package/dist/ChoroplethMap.js.map +1 -1
  41. package/dist/CirclePackingGraph.cjs +1 -1
  42. package/dist/CirclePackingGraph.d.ts +11 -9
  43. package/dist/CirclePackingGraph.js +1 -1
  44. package/dist/DataCards.cjs +1 -1
  45. package/dist/DataCards.d.ts +1 -1
  46. package/dist/DataCards.js +1 -1
  47. package/dist/DataTable.cjs +1 -1
  48. package/dist/DataTable.cjs.map +1 -1
  49. package/dist/DataTable.d.ts +4 -5
  50. package/dist/DataTable.js +114 -116
  51. package/dist/DataTable.js.map +1 -1
  52. package/dist/{DetailsModal-jmmKRMRM.cjs → DetailsModal-Du8Fr1QD.cjs} +2 -2
  53. package/dist/{DetailsModal-jmmKRMRM.cjs.map → DetailsModal-Du8Fr1QD.cjs.map} +1 -1
  54. package/dist/{DetailsModal-B2XBWR7w.js → DetailsModal-GqEbGHY2.js} +2 -2
  55. package/dist/{DetailsModal-B2XBWR7w.js.map → DetailsModal-GqEbGHY2.js.map} +1 -1
  56. package/dist/DifferenceLineChart.cjs +1 -1
  57. package/dist/DifferenceLineChart.cjs.map +1 -1
  58. package/dist/DifferenceLineChart.d.ts +11 -9
  59. package/dist/DifferenceLineChart.js +502 -504
  60. package/dist/DifferenceLineChart.js.map +1 -1
  61. package/dist/DonutChart.cjs +1 -1
  62. package/dist/DonutChart.cjs.map +1 -1
  63. package/dist/DonutChart.d.ts +14 -9
  64. package/dist/DonutChart.js +174 -179
  65. package/dist/DonutChart.js.map +1 -1
  66. package/dist/DotDensityMap.cjs +1 -1
  67. package/dist/DotDensityMap.cjs.map +1 -1
  68. package/dist/DotDensityMap.d.ts +1 -1
  69. package/dist/DotDensityMap.js +270 -267
  70. package/dist/DotDensityMap.js.map +1 -1
  71. package/dist/DualAxisLineChart.cjs +1 -1
  72. package/dist/DualAxisLineChart.cjs.map +1 -1
  73. package/dist/DualAxisLineChart.d.ts +13 -9
  74. package/dist/DualAxisLineChart.js +341 -351
  75. package/dist/DualAxisLineChart.js.map +1 -1
  76. package/dist/DumbbellChart.cjs +1 -1
  77. package/dist/DumbbellChart.cjs.map +1 -1
  78. package/dist/DumbbellChart.d.ts +11 -9
  79. package/dist/DumbbellChart.js +592 -593
  80. package/dist/DumbbellChart.js.map +1 -1
  81. package/dist/GeoHubCompareMaps.cjs +1 -1
  82. package/dist/GeoHubCompareMaps.d.ts +1 -1
  83. package/dist/GeoHubCompareMaps.js +1 -1
  84. package/dist/GeoHubMap.cjs +1 -1
  85. package/dist/GeoHubMap.d.ts +1 -1
  86. package/dist/GeoHubMap.js +1 -1
  87. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  88. package/dist/GeoHubMapWithLayerSelection.d.ts +1 -1
  89. package/dist/GeoHubMapWithLayerSelection.js +1 -1
  90. package/dist/GraphEl-BgkDbq50.cjs +2 -0
  91. package/dist/GraphEl-BgkDbq50.cjs.map +1 -0
  92. package/dist/GraphEl-Ch0uAeZw.js +1830 -0
  93. package/dist/GraphEl-Ch0uAeZw.js.map +1 -0
  94. package/dist/GriddedGraphs.cjs +1 -1
  95. package/dist/GriddedGraphs.d.ts +29 -16
  96. package/dist/GriddedGraphs.js +1 -1
  97. package/dist/GriddedGraphsFromConfig.d.ts +29 -16
  98. package/dist/HeatMap.cjs +1 -1
  99. package/dist/HeatMap.cjs.map +1 -1
  100. package/dist/HeatMap.d.ts +11 -9
  101. package/dist/HeatMap.js +203 -205
  102. package/dist/HeatMap.js.map +1 -1
  103. package/dist/Histogram.cjs +1 -1
  104. package/dist/Histogram.cjs.map +1 -1
  105. package/dist/Histogram.d.ts +11 -5
  106. package/dist/Histogram.js +88 -89
  107. package/dist/Histogram.js.map +1 -1
  108. package/dist/HybridMap.cjs +1 -1
  109. package/dist/HybridMap.cjs.map +1 -1
  110. package/dist/HybridMap.d.ts +11 -3
  111. package/dist/HybridMap.js +339 -336
  112. package/dist/HybridMap.js.map +1 -1
  113. package/dist/ImageDownloadButton.cjs +1 -1
  114. package/dist/ImageDownloadButton.js +1 -1
  115. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  116. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  117. package/dist/LineChartWithConfidenceInterval.d.ts +11 -9
  118. package/dist/LineChartWithConfidenceInterval.js +393 -395
  119. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  120. package/dist/LinearColorLegend.cjs +1 -1
  121. package/dist/LinearColorLegend.js +1 -1
  122. package/dist/MultiGraphDashboard.d.ts +29 -16
  123. package/dist/MultiGraphDashboardFromConfig.d.ts +29 -16
  124. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -1
  125. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -1
  126. package/dist/MultiLineAltChart.cjs +1 -1
  127. package/dist/MultiLineAltChart.cjs.map +1 -1
  128. package/dist/MultiLineAltChart.d.ts +11 -9
  129. package/dist/MultiLineAltChart.js +411 -413
  130. package/dist/MultiLineAltChart.js.map +1 -1
  131. package/dist/MultiLineChart.cjs +1 -1
  132. package/dist/MultiLineChart.cjs.map +1 -1
  133. package/dist/MultiLineChart.d.ts +11 -9
  134. package/dist/MultiLineChart.js +438 -440
  135. package/dist/MultiLineChart.js.map +1 -1
  136. package/dist/ParetoChart.cjs +1 -1
  137. package/dist/ParetoChart.cjs.map +1 -1
  138. package/dist/ParetoChart.d.ts +13 -13
  139. package/dist/ParetoChart.js +347 -355
  140. package/dist/ParetoChart.js.map +1 -1
  141. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +29 -16
  142. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +29 -16
  143. package/dist/PerformanceIntensiveScrollStory.d.ts +29 -16
  144. package/dist/RadarChart.cjs +1 -1
  145. package/dist/RadarChart.cjs.map +1 -1
  146. package/dist/RadarChart.d.ts +11 -5
  147. package/dist/RadarChart.js +213 -213
  148. package/dist/RadarChart.js.map +1 -1
  149. package/dist/SankeyChart.cjs +1 -1
  150. package/dist/SankeyChart.cjs.map +1 -1
  151. package/dist/SankeyChart.d.ts +11 -9
  152. package/dist/SankeyChart.js +448 -450
  153. package/dist/SankeyChart.js.map +1 -1
  154. package/dist/ScatterPlot.cjs +1 -1
  155. package/dist/ScatterPlot.cjs.map +1 -1
  156. package/dist/ScatterPlot.d.ts +15 -13
  157. package/dist/ScatterPlot.js +477 -483
  158. package/dist/ScatterPlot.js.map +1 -1
  159. package/dist/ScrollStory.d.ts +29 -16
  160. package/dist/SimpleLineChart.cjs +1 -1
  161. package/dist/SimpleLineChart.cjs.map +1 -1
  162. package/dist/SimpleLineChart.d.ts +11 -9
  163. package/dist/SimpleLineChart.js +362 -364
  164. package/dist/SimpleLineChart.js.map +1 -1
  165. package/dist/SingleGraphDashboard.cjs +1 -1
  166. package/dist/SingleGraphDashboard.d.ts +29 -16
  167. package/dist/SingleGraphDashboard.js +1 -1
  168. package/dist/SingleGraphDashboardFromConfig.d.ts +29 -16
  169. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +29 -16
  170. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +29 -16
  171. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  172. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  173. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +29 -16
  174. package/dist/SingleGraphDashboardThreeDGraphs.js +40 -39
  175. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  176. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +29 -16
  177. package/dist/SlopeChart.cjs +1 -1
  178. package/dist/SlopeChart.d.ts +1 -1
  179. package/dist/SlopeChart.js +2 -2
  180. package/dist/SparkLine.cjs +1 -1
  181. package/dist/SparkLine.d.ts +1 -1
  182. package/dist/SparkLine.js +1 -1
  183. package/dist/StatCardFromData.cjs +1 -1
  184. package/dist/StatCardFromData.cjs.map +1 -1
  185. package/dist/StatCardFromData.d.ts +11 -9
  186. package/dist/StatCardFromData.js +113 -116
  187. package/dist/StatCardFromData.js.map +1 -1
  188. package/dist/StripChart.cjs +1 -1
  189. package/dist/StripChart.cjs.map +1 -1
  190. package/dist/StripChart.d.ts +11 -9
  191. package/dist/StripChart.js +434 -435
  192. package/dist/StripChart.js.map +1 -1
  193. package/dist/ThreeDGlobe.cjs +1 -1
  194. package/dist/ThreeDGlobe.cjs.map +1 -1
  195. package/dist/ThreeDGlobe.d.ts +11 -3
  196. package/dist/ThreeDGlobe.js +143 -143
  197. package/dist/ThreeDGlobe.js.map +1 -1
  198. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  199. package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
  200. package/dist/{Tooltip-Bj-s__cI.js → Tooltip-3EYDVa3w.js} +2 -2
  201. package/dist/{Tooltip-Bj-s__cI.js.map → Tooltip-3EYDVa3w.js.map} +1 -1
  202. package/dist/{Tooltip-Hr46paWP.cjs → Tooltip-C9F3uYG0.cjs} +2 -2
  203. package/dist/{Tooltip-Hr46paWP.cjs.map → Tooltip-C9F3uYG0.cjs.map} +1 -1
  204. package/dist/TreeMapGraph.cjs +1 -1
  205. package/dist/TreeMapGraph.cjs.map +1 -1
  206. package/dist/TreeMapGraph.d.ts +11 -9
  207. package/dist/TreeMapGraph.js +369 -371
  208. package/dist/TreeMapGraph.js.map +1 -1
  209. package/dist/Types.d.ts +29 -16
  210. package/dist/UnitChart.cjs +1 -1
  211. package/dist/UnitChart.cjs.map +1 -1
  212. package/dist/UnitChart.d.ts +11 -5
  213. package/dist/UnitChart.js +118 -119
  214. package/dist/UnitChart.js.map +1 -1
  215. package/dist/WaterfallChart.cjs +1 -1
  216. package/dist/WaterfallChart.cjs.map +1 -1
  217. package/dist/WaterfallChart.d.ts +11 -9
  218. package/dist/WaterfallChart.js +306 -308
  219. package/dist/WaterfallChart.js.map +1 -1
  220. package/dist/XTicksAndGridLines-B4UhDVyU.cjs +2 -0
  221. package/dist/XTicksAndGridLines-B4UhDVyU.cjs.map +1 -0
  222. package/dist/XTicksAndGridLines-CkYwVshF.js +40 -0
  223. package/dist/XTicksAndGridLines-CkYwVshF.js.map +1 -0
  224. package/dist/YTicksAndGridLines-BbujwxOB.js +40 -0
  225. package/dist/YTicksAndGridLines-BbujwxOB.js.map +1 -0
  226. package/dist/YTicksAndGridLines-sT3zdCs6.cjs +2 -0
  227. package/dist/YTicksAndGridLines-sT3zdCs6.cjs.map +1 -0
  228. package/dist/{imageDownload-Diofs_vY.js → imageDownload-BYsNEtMS.js} +11 -11
  229. package/dist/{imageDownload-Diofs_vY.js.map → imageDownload-BYsNEtMS.js.map} +1 -1
  230. package/dist/{imageDownload-61q6jyJW.cjs → imageDownload-CkMwA7Cw.cjs} +4 -4
  231. package/dist/{imageDownload-61q6jyJW.cjs.map → imageDownload-CkMwA7Cw.cjs.map} +1 -1
  232. package/dist/index-BPyj_6hG.js +375 -0
  233. package/dist/index-BPyj_6hG.js.map +1 -0
  234. package/dist/index-DuLvdHo2.cjs +2 -0
  235. package/dist/index-DuLvdHo2.cjs.map +1 -0
  236. package/dist/index.cjs +1 -1
  237. package/dist/index.d.ts +108 -245
  238. package/dist/index.js +3 -3
  239. package/dist/numberFormattingFunction-BUUV_luR.js +28 -0
  240. package/dist/numberFormattingFunction-BUUV_luR.js.map +1 -0
  241. package/dist/numberFormattingFunction-u2iNHL_c.cjs +2 -0
  242. package/dist/numberFormattingFunction-u2iNHL_c.cjs.map +1 -0
  243. package/dist/{string2HTML-ZoGd08P_.cjs → string2HTML-30nfIm8R.cjs} +2 -2
  244. package/dist/{string2HTML-ZoGd08P_.cjs.map → string2HTML-30nfIm8R.cjs.map} +1 -1
  245. package/dist/{string2HTML-BrFperRM.js → string2HTML-DL-pInUB.js} +2 -2
  246. package/dist/{string2HTML-BrFperRM.js.map → string2HTML-DL-pInUB.js.map} +1 -1
  247. package/dist/style.css +1 -1
  248. package/dist/utils.cjs +1 -1
  249. package/dist/utils.d.ts +1 -1
  250. package/dist/utils.js +2 -2
  251. package/package.json +2 -2
  252. package/dist/GraphEl-B73N4RIA.js +0 -1906
  253. package/dist/GraphEl-B73N4RIA.js.map +0 -1
  254. package/dist/GraphEl-Lt1og0C-.cjs +0 -2
  255. package/dist/GraphEl-Lt1og0C-.cjs.map +0 -1
  256. package/dist/XTicksAndGridLines-C5DuC5oY.cjs +0 -2
  257. package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +0 -1
  258. package/dist/XTicksAndGridLines-gdbGX2rm.js +0 -39
  259. package/dist/XTicksAndGridLines-gdbGX2rm.js.map +0 -1
  260. package/dist/YTicksAndGridLines-CsNSq9W9.js +0 -39
  261. package/dist/YTicksAndGridLines-CsNSq9W9.js.map +0 -1
  262. package/dist/YTicksAndGridLines-DFjm8RCc.cjs +0 -2
  263. package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +0 -1
  264. package/dist/index-B0Awa_de.js +0 -377
  265. package/dist/index-B0Awa_de.js.map +0 -1
  266. package/dist/index-CP8cmNzt.cjs +0 -2
  267. package/dist/index-CP8cmNzt.cjs.map +0 -1
  268. package/dist/numberFormattingFunction-Cn9R7CM9.cjs +0 -2
  269. package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +0 -1
  270. package/dist/numberFormattingFunction-DqMf_v1m.js +0 -28
  271. package/dist/numberFormattingFunction-DqMf_v1m.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"StripChart.js","sources":["../src/Utils/getTickPosition.ts","../src/Components/Graphs/StripChart/Graph.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 { cn } from '@undp/design-system-react/cn';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport orderBy from 'lodash.orderby';\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 { getTickPositions } from '@/Utils/getTickPosition';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\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 showDataMinMax: boolean;\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 locale: string;\r\n}\r\n\r\nexport function VerticalGraph(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 = 20,\r\n rightMargin = 20,\r\n topMargin = 10,\r\n bottomMargin = 10,\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 showDataMinMax,\r\n locale,\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 = orderBy(\r\n dataWithId,\r\n [\r\n item => {\r\n const index = (highlightedDataPoints || []).indexOf(item.label);\r\n return index === -1 ? Infinity : index;\r\n },\r\n ],\r\n ['desc'],\r\n );\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\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={-1}\r\n height={2}\r\n variants={{\r\n initial: {\r\n x: 0 - radius,\r\n width: radius * 2,\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 x: 0 - radius,\r\n width: radius * 2,\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 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n y={0}\r\n dy='0.33em'\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: 0 + radius + 3,\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 },\r\n whileInView: {\r\n opacity: 1,\r\n x: 0 + radius + 3,\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 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 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(\r\n d.position,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n {showDataMinMax\r\n ? [\r\n Math.min(\r\n ...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position),\r\n ),\r\n Math.max(\r\n ...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position),\r\n ),\r\n ].map((d, i) => (\r\n <motion.g\r\n key={i}\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),\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 >\r\n <motion.text\r\n key={i}\r\n y={0}\r\n dy='0.33em'\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: 0 + radius + 3,\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: 0 + radius + 3,\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 textAnchor: 'start',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-value text-sm text-primary-gray-550 dark:text-primary-gray-200',\r\n classNames?.graphObjectValues,\r\n )}\r\n >\r\n {numberFormattingFunction(d, undefined, precision, prefix, suffix, locale)}\r\n </motion.text>\r\n </motion.g>\r\n ))\r\n : null}\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(\r\n y.invert(tick),\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )}\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 <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n\r\nexport function HorizontalGraph(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 = 5,\r\n rightMargin = 5,\r\n topMargin = 10,\r\n bottomMargin = 10,\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 showDataMinMax,\r\n locale,\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 = orderBy(\r\n dataWithId,\r\n [\r\n item => {\r\n const index = (highlightedDataPoints || []).indexOf(item.label);\r\n return index === -1 ? Infinity : index;\r\n },\r\n ],\r\n ['desc'],\r\n );\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\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={-1}\r\n width={2}\r\n variants={{\r\n initial: {\r\n y: 0 - radius,\r\n height: radius * 2,\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 y: 0 - radius,\r\n height: radius * 2,\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 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n x={0}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n y: 0 - radius - 5,\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 },\r\n whileInView: {\r\n opacity: 1,\r\n y: 0 - radius - 5,\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 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 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(\r\n d.position,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n {showDataMinMax\r\n ? [\r\n Math.min(\r\n ...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position),\r\n ),\r\n Math.max(\r\n ...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position),\r\n ),\r\n ].map((d, i) => (\r\n <motion.g\r\n key={i}\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),\r\n y: graphHeight / 2,\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 >\r\n <motion.text\r\n x={0}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n y: 0 - radius - 5,\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n y: 0 - radius - 5,\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 textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-value text-sm text-primary-gray-550 dark:text-primary-gray-200',\r\n classNames?.graphObjectValues,\r\n )}\r\n >\r\n {numberFormattingFunction(d, undefined, precision, prefix, suffix, locale)}\r\n </motion.text>\r\n </motion.g>\r\n ))\r\n : null}\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(\r\n x.invert(tick),\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )}\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 <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useEffect, useRef, useState } from 'react';\r\n\r\nimport { HorizontalGraph, VerticalGraph } from './Graph';\r\n\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { Colors } from '@/Components/ColorPalette';\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\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\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 /** Toggles if the graph show the min and max value of the data. */\r\n showDataMinMax?: boolean;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\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 = 5,\r\n padding,\r\n backgroundColor = false,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\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 noOfTicks = 2,\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 valueColor,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n orientation = 'vertical',\r\n styles,\r\n classNames,\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n customLayers = [],\r\n showDataMinMax = false,\r\n locale = 'en',\r\n } = props;\r\n\r\n const Comp = orientation === 'horizontal' ? HorizontalGraph : VerticalGraph;\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(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\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 : 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 {showColorScale !== false && data.filter(el => el.color).length !== 0 && data.length > 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Comp\r\n data={data}\r\n width={svgWidth}\r\n showDataMinMax={showDataMinMax}\r\n height={svgHeight}\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) 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) || 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 locale={locale}\r\n />\r\n ) : null}\r\n </GraphArea>\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 </GraphContainer>\r\n );\r\n}\r\n"],"names":["getTickPositions","count","width","step","Array","from","length","_","i","VerticalGraph","props","$","_c","data","height","colors","colorDomain","radius","leftMargin","t0","rightMargin","t1","topMargin","t2","bottomMargin","t3","tooltip","onSeriesMouseOver","highlightedDataPoints","selectedColor","minValue","maxValue","onSeriesMouseClick","noOfTicks","prefix","suffix","stripType","highlightColor","dotOpacity","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","valueColor","animate","dimmedOpacity","precision","customLayers","showDataMinMax","locale","undefined","svgRef","useRef","t4","amount","once","isInView","useInView","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t5","top","bottom","left","right","margin","graphWidth","graphHeight","T0","T1","t10","t11","t12","t13","t14","t15","t6","t7","t8","t9","duration","graphObjectValues","yAxis","labels","dataWithId","map","_temp","t16","item","index","indexOf","label","Infinity","sortedData","orderBy","t17","checkIfNullOrUndefined","Math","max","filter","_temp2","_temp3","_temp4","_temp5","yMaxValue","t18","min","_temp6","_temp7","_temp8","_temp9","yMinValue","y","scaleLinear","domain","range","nice","ticks","motion","svg","_temp0","_temp1","AnimatePresence","d_10","jsxs","initial","opacity","x","whileInView","d","position","color","transition","event","clientY","clientX","isEqual","event_0","fill","_temp10","Colors","gray","_temp11","_temp12","_temp13","jsx","_temp14","_temp15","_temp16","_temp17","_temp18","_temp19","_temp20","_temp21","textAnchor","cn","numberFormattingFunction","_temp22","_temp23","_temp24","_temp25","d_15","i_0","tick","i_1","invert","_temp26","_temp27","t19","t20","Tooltip","t21","modal","DetailsModal","t22","Fragment","d_17","layer","d_16","d_14","d_13","d_12","d_11","el_10","el","el_9","el_8","el_7","el_6","el_5","el_4","el_3","el_2","el_1","el_0","d_9","d_8","d_5","d_4","d_7","d_6","d_1","d_0","d_3","d_2","id","HorizontalGraph","xAxis","_temp28","_temp29","_temp30","_temp31","_temp32","xMaxValue","_temp33","_temp34","_temp35","_temp36","xMinValue","_temp37","_temp38","_temp39","_temp40","_temp41","_temp42","_temp43","_temp44","_temp45","_temp46","_temp47","_temp48","_temp49","_temp50","_temp51","_temp52","_temp53","_temp54","_temp55","_temp56","StripChart","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","language","showNAColor","minHeight","theme","ariaLabel","orientation","Comp","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t23","t24","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","t25","graphContainer","t26","t27","description","title","GraphHeader","t28","colorLegend","ColorLegendWithMouseOver","categoricalColors","uniqBy","t29","EmptyState","t30","primaryColors","t31","GraphArea","t32","footnote","source","GraphFooter","t33","GraphContainer"],"mappings":";;;;;;;;;;;;;;;;;;;AAAO,SAASA,GAAiBC,GAAeC,GAAe;AAC7D,MAAID,IAAQ,EAAG,QAAO,CAAA;AACtB,QAAME,IAAOD,KAASD,IAAQ;AAC9B,SAAOG,MAAMC,KAAK;A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A,EACY,WAAAvB,IACJ,OAAAE,IACHjC,QACCgB,QACOT,cAAAA,IACKV,iBAAAA,GACVS,OAAAA,GACGH,UAAAA,GACCE,WAAAA,GACJnQ,OAAAA,GACCY,QAAAA,GACQgP,gBAAAA,GACPF,SAAAA,IAERsC,UAAAA;AAAAA,IAAAA;AAAAA,IAuBAI;AAAAA,IAWDS;AAAAA,IAuDCE;AAAAA,EAAAA,GAYH,GAAiBtS,QAAA4P,IAAA5P,QAAAkP,GAAAlP,QAAAqP,IAAArP,QAAAG,GAAAH,QAAAwP,GAAAxP,QAAA0P,GAAA1P,QAAAiP,IAAAjP,QAAAmP,GAAAnP,QAAAoR,IAAApR,QAAAsR,IAAAtR,QAAAuR,IAAAvR,QAAA2R,IAAA3R,QAAAoS,IAAApS,QAAAsS,IAAAtS,QAAA2P,GAAA3P,QAAAT,GAAAS,QAAA0S,MAAAA,KAAA1S,EAAA,EAAA,GApHjB0S;AAoHiB;AA9Ld,SAAAjM,GAAAoF,GAAA;AAAA,SAyIyBT,EAAErD;AAAM;AAzIjC,SAAAvB,GAAAsF,GAAA;AAAA,SAoIyBV,EAAErD;AAAM;AApIjC,SAAAxB,GAAA6E,GAAA;AAAA,SAgH8CA,EAAErD;AAAM;AAhHtD,SAAA5B,GAAAkG,GAAA;AAAA,SA2G4BxE,MAAMtF;AAAS;AA3G3C,SAAA2D,GAAAoG,GAAA;AAAA,SA0G6CzE,MAAMtF;AAAS;AA1G5D,SAAA0D,GAAA4B,GAAA;AAAA,SA0GyBA,EAAC3H;AAAK;AA1G/B,SAAA8F,GAAAuG,GAAA;AAAA,SAyG2C1E,MAAMtF;AAAS;AAzG1D,SAAA2C,GAAAsH,GAAA;AAAA,SAyGuB3E,EAAC3H;AAAK;"}
1
+ {"version":3,"file":"StripChart.js","sources":["../src/Utils/getTickPosition.ts","../src/Components/Graphs/StripChart/Graph.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 { cn } from '@undp/design-system-react/cn';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport orderBy from 'lodash.orderby';\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 { getTickPositions } from '@/Utils/getTickPosition';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\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 showDataMinMax: boolean;\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 locale: string;\r\n padZeros: boolean;\r\n}\r\n\r\nexport function VerticalGraph(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 = 20,\r\n rightMargin = 20,\r\n topMargin = 10,\r\n bottomMargin = 10,\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 showDataMinMax,\r\n locale,\r\n padZeros,\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 = orderBy(\r\n dataWithId,\r\n [\r\n item => {\r\n const index = (highlightedDataPoints || []).indexOf(item.label);\r\n return index === -1 ? Infinity : index;\r\n },\r\n ],\r\n ['desc'],\r\n );\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\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={-1}\r\n height={2}\r\n variants={{\r\n initial: {\r\n x: 0 - radius,\r\n width: radius * 2,\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 x: 0 - radius,\r\n width: radius * 2,\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 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n y={0}\r\n dy='0.33em'\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: 0 + radius + 3,\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 },\r\n whileInView: {\r\n opacity: 1,\r\n x: 0 + radius + 3,\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 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 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(\r\n d.position,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n padZeros,\r\n )}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n {showDataMinMax\r\n ? [\r\n Math.min(\r\n ...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position),\r\n ),\r\n Math.max(\r\n ...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position),\r\n ),\r\n ].map((d, i) => (\r\n <motion.g\r\n key={i === 0 ? 'min-value' : 'max-value'}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: graphWidth / 2,\r\n y: y(d),\r\n },\r\n whileInView: {\r\n x: graphWidth / 2,\r\n y: y(d),\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 >\r\n <motion.text\r\n y={0}\r\n dy='0.33em'\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: 0 + radius + 3,\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: 0 + radius + 3,\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 textAnchor: 'start',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-min-max-value text-sm text-primary-gray-550 dark:text-primary-gray-200',\r\n classNames?.graphObjectValues,\r\n )}\r\n >\r\n {numberFormattingFunction(\r\n d,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n padZeros,\r\n )}\r\n </motion.text>\r\n </motion.g>\r\n ))\r\n : null}\r\n {ticks.map((tick, i) => (\r\n <text\r\n key={`tick-${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(\r\n y.invert(tick),\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n padZeros,\r\n )}\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 <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n\r\nexport function HorizontalGraph(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 = 5,\r\n rightMargin = 5,\r\n topMargin = 10,\r\n bottomMargin = 10,\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 showDataMinMax,\r\n locale,\r\n padZeros,\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 = orderBy(\r\n dataWithId,\r\n [\r\n item => {\r\n const index = (highlightedDataPoints || []).indexOf(item.label);\r\n return index === -1 ? Infinity : index;\r\n },\r\n ],\r\n ['desc'],\r\n );\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\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={-1}\r\n width={2}\r\n variants={{\r\n initial: {\r\n y: 0 - radius,\r\n height: radius * 2,\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 y: 0 - radius,\r\n height: radius * 2,\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 ? (\r\n highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n <motion.text\r\n x={0}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n y: 0 - radius - 5,\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 },\r\n whileInView: {\r\n opacity: 1,\r\n y: 0 - radius - 5,\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 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 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(\r\n d.position,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n padZeros,\r\n )}\r\n </motion.text>\r\n ) : null\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n {showDataMinMax\r\n ? [\r\n Math.min(\r\n ...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position),\r\n ),\r\n Math.max(\r\n ...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position),\r\n ),\r\n ].map((d, i) => (\r\n <motion.g\r\n key={i === 0 ? 'min-value' : 'max-value'}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: x(d),\r\n y: graphHeight / 2,\r\n },\r\n whileInView: {\r\n x: x(d),\r\n y: graphHeight / 2,\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 >\r\n <motion.text\r\n x={0}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n y: 0 - radius - 5,\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n y: 0 - radius - 5,\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 textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-min-max-value text-sm text-primary-gray-550 dark:text-primary-gray-200',\r\n classNames?.graphObjectValues,\r\n )}\r\n >\r\n {numberFormattingFunction(\r\n d,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n padZeros,\r\n )}\r\n </motion.text>\r\n </motion.g>\r\n ))\r\n : null}\r\n {ticks.map((tick, i) => (\r\n <text\r\n key={`tick-${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(\r\n x.invert(tick),\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n padZeros,\r\n )}\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 <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useEffect, useRef, useState } from 'react';\r\n\r\nimport { HorizontalGraph, VerticalGraph } from './Graph';\r\n\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { Colors } from '@/Components/ColorPalette';\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 NumberFormatOptions,\r\n} from '@/Types';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\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 /** 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 /** Toggles if the graph show the min and max value of the data. */\r\n showDataMinMax?: boolean;\r\n /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n numberDisplayOptions?: NumberFormatOptions;\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 = 5,\r\n padding,\r\n backgroundColor = false,\r\n leftMargin,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\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 noOfTicks = 2,\r\n graphDownload = false,\r\n dataDownload = false,\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 valueColor,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n orientation = 'vertical',\r\n styles,\r\n classNames,\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n showDataMinMax = false,\r\n numberDisplayOptions,\r\n } = props;\r\n\r\n const Comp = orientation === 'horizontal' ? HorizontalGraph : VerticalGraph;\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(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\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 : 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 {showColorScale !== false && data.filter(el => el.color).length !== 0 && data.length > 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Comp\r\n data={data}\r\n width={svgWidth}\r\n showDataMinMax={showDataMinMax}\r\n height={svgHeight}\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) 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) || 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 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 customLayers={customLayers}\r\n locale={numberDisplayOptions?.locale || 'en'}\r\n padZeros={numberDisplayOptions?.padZeros || false}\r\n suffix={numberDisplayOptions?.suffix || ''}\r\n prefix={numberDisplayOptions?.prefix || ''}\r\n precision={numberDisplayOptions?.precision ?? 2}\r\n />\r\n ) : null}\r\n </GraphArea>\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 </GraphContainer>\r\n );\r\n}\r\n"],"names":["getTickPositions","count","width","step","Array","from","length","_","i","VerticalGraph","props","$","_c","data","height","colors","colorDomain","radius","leftMargin","t0","rightMargin","t1","topMargin","t2","bottomMargin","t3","tooltip","onSeriesMouseOver","highlightedDataPoints","selectedColor","minValue","maxValue","onSeriesMouseClick","noOfTicks","prefix","suffix","stripType","highlightColor","dotOpacity","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","valueColor","animate","dimmedOpacity","precision","customLayers","showDataMinMax","locale","padZeros","undefined","svgRef","useRef","t4","amount","once","isInView","useInView","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t5","top","bottom","left","right","margin","graphWidth","graphHeight","T0","T1","t10","t11","t12","t13","t14","t15","t6","t7","t8","t9","duration","graphObjectValues","yAxis","labels","dataWithId","map","_temp","t16","item","index","indexOf","label","Infinity","sortedData","orderBy","t17","checkIfNullOrUndefined","Math","max","filter","_temp2","_temp3","_temp4","_temp5","yMaxValue","t18","min","_temp6","_temp7","_temp8","_temp9","yMinValue","y","scaleLinear","domain","range","nice","ticks","motion","svg","_temp0","_temp1","AnimatePresence","d_10","jsxs","initial","opacity","x","whileInView","d","position","color","transition","event","clientY","clientX","isEqual","event_0","fill","_temp10","Colors","gray","_temp11","_temp12","_temp13","jsx","_temp14","_temp15","_temp16","_temp17","_temp18","_temp19","_temp20","_temp21","textAnchor","cn","numberFormattingFunction","_temp22","_temp23","_temp24","_temp25","d_15","i_0","tick","i_1","invert","_temp26","_temp27","t19","t20","Tooltip","t21","modal","DetailsModal","t22","Fragment","d_17","layer","d_16","d_14","d_13","d_12","d_11","el_10","el","el_9","el_8","el_7","el_6","el_5","el_4","el_3","el_2","el_1","el_0","d_9","d_8","d_5","d_4","d_7","d_6","d_1","d_0","d_3","d_2","id","HorizontalGraph","xAxis","_temp28","_temp29","_temp30","_temp31","_temp32","xMaxValue","_temp33","_temp34","_temp35","_temp36","xMinValue","_temp37","_temp38","_temp39","_temp40","_temp41","_temp42","_temp43","_temp44","_temp45","_temp46","_temp47","_temp48","_temp49","_temp50","_temp51","_temp52","_temp53","_temp54","_temp55","_temp56","StripChart","graphTitle","sources","graphDescription","footNote","colorLegendTitle","padding","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","language","showNAColor","minHeight","theme","ariaLabel","orientation","numberDisplayOptions","Comp","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","graphContainer","t23","description","title","GraphHeader","t24","colorLegend","ColorLegendWithMouseOver","categoricalColors","uniqBy","t25","EmptyState","t26","primaryColors","t27","GraphArea","t28","footnote","source","GraphFooter","t29","GraphContainer"],"mappings":";;;;;;;;;;;;;;;;;;;AAAO,SAASA,GAAiBC,GAAeC,GAAe;AAC7D,MAAID,IAAQ,EAAG,QAAO,CAAA;AACtB,QAAME,IAAOD,KAASD,IAAQ;AAC9B,SAAOG,MAAMC,KAAK;AAAA,IAAEC,QAAQL;AAAAA,EAAAA,GAAS,CAACM,GAAGC,MAAMA,IAAIL,CAAI;AACzD;AC2DO,SAAAM,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,GAAA,GACL;AAAA,IAAAC,MAAAA;AAAAA,IAAAX,OAAAA;AAAAA,IAAAY,QAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,aAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAC;AAAAA,IAAAC,aAAAC;AAAAA,IAAAC,WAAAC;AAAAA,IAAAC,cAAAC;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,mBAAAA;AAAAA,IAAAC,uBAAAA;AAAAA,IAAAC,eAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,oBAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,gBAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,6BAAAA;AAAAA,IAAAC,gBAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,YAAAA;AAAAA,IAAAC,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S,IAAApS,QAAA4P,GAAA5P,QAAAT,GAAAS,QAAAwS,MAAAA,KAAAxS,EAAA,EAAA,GArHjBwS;AAqHiB;AA5Ld,SAAA9L,GAAAoF,GAAA;AAAA,SAsIyBT,EAAErD;AAAM;AAtIjC,SAAAvB,GAAAsF,GAAA;AAAA,SAiIyBV,EAAErD;AAAM;AAjIjC,SAAAxB,GAAA6E,GAAA;AAAA,SA6G8CA,EAAErD;AAAM;AA7GtD,SAAA5B,GAAAkG,GAAA;AAAA,SAwG4BxE,MAAMtF;AAAS;AAxG3C,SAAA2D,GAAAoG,GAAA;AAAA,SAuG6CzE,MAAMtF;AAAS;AAvG5D,SAAA0D,GAAA4B,GAAA;AAAA,SAuGyBA,EAAC5H;AAAK;AAvG/B,SAAA+F,GAAAuG,GAAA;AAAA,SAsG2C1E,MAAMtF;AAAS;AAtG1D,SAAA2C,GAAAsH,GAAA;AAAA,SAsGuB3E,EAAC5H;AAAK;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),h=require("react"),lt=require("./Spinner-WHzzloYQ.cjs"),ct=require("react-globe.gl"),dt=require("./index-DQA8q5sC.cjs"),ut=require("three"),Ke=require("./Typography-BqmyF1gP.cjs"),pt=require("./_commonjsHelpers-BH3jXuIh.cjs"),ht=require("./Tooltip-Hr46paWP.cjs"),mt=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Qe=require("./index-BhI7mBJx.cjs"),gt=require("./getCentroidCoordinates-CtBGrNC8.cjs"),xt=require("./DetailsModal-jmmKRMRM.cjs"),ft=require("./ordinal-CrsysVE-.cjs"),vt=require("./threshold-DNsSUf8Q.cjs"),yt=require("./GraphHeader.cjs"),bt=require("./GraphFooter.cjs"),wt=require("./fetchAndParseData-QTF6tjij.cjs"),te=require("./Colors.cjs"),jt=require("./getUniqValue-NX8DgwND.cjs"),Ct=require("./getJenks-BzJvhy_H.cjs"),et=require("./GraphContainer-Cul9b74X.cjs");function Et(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,x.get?x:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const I=Et(ut);var Ye,tt;function Rt(){if(tt)return Ye;tt=1;var t=function(o){return o.charAt(0)==="#"?o.slice(1):o},e=function(o){var l=o.length===3||o.length===4,v=l?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),a=l?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),j=l?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),k=(l?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff";return{r:v,g:a,b:j,a:k}},n=function(o){return parseInt(o,16)},x=function(o){var l=o.r,v=o.g,a=o.b,j=o.a;return{r:n(l),g:n(v),b:n(a),a:+(n(j)/255).toFixed(2)}},w=function(o){return!isNaN(parseFloat(o))&&isFinite(o)},E=function(o,l){var v=o.r,a=o.g,j=o.b,k=o.a,P=w(l)?l:k;return"rgba(".concat(v,", ").concat(a,", ").concat(j,", ").concat(P,")")},f=function(o,l){var v=t(o),a=e(v),j=x(a);return E(j,l)};return Ye=f,Ye}var St=Rt();const ot=pt.getDefaultExportFromCjs(St);function Dt(t){let e;switch(t.type){case"ambient":e=new I.AmbientLight(t.color,t.intensity);break;case"directional":e=new I.DirectionalLight(t.color,t.intensity),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z===void 0?-1:t.target.z),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;case"point":e=new I.PointLight(t.color,t.intensity,t.distance||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z));break;case"spot":e=new I.SpotLight(t.color,t.intensity,t.distance||0,t.angle||Math.PI/3,t.penumbra||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z||0),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;default:throw new Error("Unknown light type")}return e}function Nt(t){const{width:e,autoRotate:n,data:x,enableZoom:w,categorical:E,colorDomain:f,colors:c,globeMaterial:o,height:l,polygonData:v,mapProperty:a,mapBorderColor:j,atmosphereColor:k,tooltip:P,styles:ve,classNames:_,mapNoDataColor:oe,colorLegendTitle:C,showColorScale:re,hoverStrokeColor:se,detailsOnClick:U,onSeriesMouseClick:$,onSeriesMouseOver:ye,resetSelectionOnDoubleClick:be,highlightedIds:T,scale:M,globeOffset:m,polygonAltitude:g,centerLng:V,centerLat:W,atmosphereAltitude:ie,globeCurvatureResolution:Z,fogSettings:z,lights:L,highlightedAltitude:ae,selectedId:y,collapseColorScaleByDefault:J,dimmedOpacity:A,locale:ne}=t,[le,we]=h.useState(!1),u=h.useRef(void 0),[N,B]=h.useState(void 0),[je,ce]=h.useState(J===void 0?!(e<680):!J),[X,Y]=h.useState({x:0,y:0}),[D,de]=h.useState(void 0),ue=E?ft.ordinal().domain(f).range(c):vt.threshold().domain(f).range(c);h.useEffect(()=>{u.current&&(u.current.controls().enableZoom=w)},[w]),h.useEffect(()=>{u.current&&(D||y?u.current.controls().autoRotate=!1:(u.current.controls().autoRotate=n!==0,u.current.controls().autoRotateSpeed=n))},[D,y,n]),h.useEffect(()=>{if(u.current&&y){const r=v.find(b=>b.properties[a]===y),[s,d]=gt.getCentroidCoordinates(r);u.current.pointOfView({lat:d,lng:s,altitude:M},1e3)}},[y,M,v,a]),h.useEffect(()=>{const r=u.current?.renderer().domElement;if(!r)return;const s=d=>{Y({x:d.clientX,y:d.clientY})};return r.addEventListener("mousemove",s),()=>r.removeEventListener("mousemove",s)},[]),h.useEffect(()=>{u.current&&u.current.pointOfView({lat:W,lng:V,altitude:M},1e3)},[M,V,W]);const R=o||new I.MeshBasicMaterial({color:"#FFF"}),G=h.useCallback(()=>{if(!u.current)return;const r=u.current.scene(),s=u.current.camera();let d=[];r.traverse(p=>{p instanceof I.Light&&d.push(p)}),d=[...d,...s.children],d.forEach(p=>p.parent?.remove(p)),L.map(p=>Dt(p)).forEach((p,S)=>{L[S].type!=="ambient"&&L[S].position==="camera"?(s.add(p),L[S].type!=="point"&&s.add(p.target)):r.add(p)}),z&&(r.fog=new I.Fog(z.color,z.near,z.far))},[L,z]),O=()=>{we(!0),G()};return h.useEffect(()=>{le&&G()},[le,G]),i.jsxRuntimeExports.jsxs("div",{className:"relative",children:[i.jsxRuntimeExports.jsx(ct,{ref:u,height:l,width:e,globeOffset:m,lineHoverPrecision:0,polygonsData:v,polygonAltitude:r=>T?.includes(r?.properties?.[a])||r?.properties?.[a]===y||r?.properties?.[a]===D?.id||r?.properties?.[a]===N?.id?ae:g,polygonCapColor:r=>{const s=y?r?.properties?.[a]===y?1:A:T?T.includes(r?.properties?.[a])?1:A:1,d=r?.properties?.[a],b=x.find(S=>S.id===d)?.x,p=b!=null?ue(b):oe;return ot(p,`${s}`)},polygonSideColor:r=>{const s=r?.properties?.[a],d=x.find(S=>S.id===s)?.x,b=y?r?.properties?.[a]===y?1:A:T?T.includes(r?.properties?.[a])?1:A:1,p=d!=null?ue(d):oe;return ot(p,`${b}`)},polygonStrokeColor:r=>r?.properties?.[a]===D?.id?se:j,onGlobeClick:()=>{B(void 0)},onPolygonClick:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;($||U)&&(dt.isEqual(N,s)&&be&&s?(B(void 0),$?.(void 0)):(B(s),$?.(s)))},onPolygonHover:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;de(s),ye?.(s)},atmosphereColor:k,atmosphereAltitude:ie,globeCurvatureResolution:Z,globeMaterial:R,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{if(u.current){u.current.pointOfView({lat:W,lng:V});const r=u.current.scene();setTimeout(()=>{(r.children[3]?.children[0]?.children[4]?.children||[]).forEach(b=>{const p=b.children[1];p.renderOrder=2})},300);const s=u.current.camera();r.add(s),O()}}}),re===!1?null:i.jsxRuntimeExports.jsx("div",{className:i.mo("absolute left-4 bottom-4 map-color-legend",_?.colorLegend),children:je?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{ce(!1)},children:i.jsxRuntimeExports.jsx(Qe.X,{})}),i.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:E?void 0:"340px"},children:[C&&C!==""?i.jsxRuntimeExports.jsx(Ke._,{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:C}):null,E?i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((r,s)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[s%c.length]}}),i.jsxRuntimeExports.jsx(Ke._,{size:"sm",marginBottom:"none",leading:"none",children:r})]},s))}):i.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:i.jsxRuntimeExports.jsxs("g",{children:[f.map((r,s)=>i.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[i.jsxRuntimeExports.jsx("rect",{x:s*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[s],stroke:c[s]}}),i.jsxRuntimeExports.jsx("text",{x:(s+1)*320/c.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:mt.numberFormattingFunction(r,void 0,void 0,void 0,void 0,ne)})]},s)),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("rect",{x:f.length*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[f.length],stroke:c[f.length]}})})]})})]})]}):i.jsxRuntimeExports.jsx("button",{type:"button",className:"p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button",onClick:()=>{ce(!0)},children:i.jsxRuntimeExports.jsx(Qe.ExpandIcon,{})})}),D&&P?i.jsxRuntimeExports.jsx(ht.Tooltip,{data:D,body:P,xPos:X.x,yPos:X.y,backgroundStyle:ve?.tooltip,className:_?.tooltip}):null,U&&N!==void 0?i.jsxRuntimeExports.jsx(xt.DetailsModal,{body:U,data:N,setData:B,className:_?.modal}):null]})}function Ot(t){const e=i.compilerRuntimeExports.c(96),{data:n,mapData:x,graphTitle:w,colors:E,sources:f,graphDescription:c,height:o,width:l,footNote:v,colorDomain:a,colorLegendTitle:j,scaleType:k,padding:P,mapNoDataColor:ve,backgroundColor:_,mapBorderColor:oe,relativeHeight:C,tooltip:re,graphID:se,mapProperty:U,dataDownload:$,language:ye,minHeight:be,theme:T,ariaLabel:M,styles:m,classNames:g,autoRotate:V,enableZoom:W,globeMaterial:ie,centerPoint:Z,atmosphereColor:z,showColorScale:L,resetSelectionOnDoubleClick:ae,detailsOnClick:y,onSeriesMouseOver:J,onSeriesMouseClick:A,highlightedIds:ne,highlightedAltitude:le,dimmedOpacity:we,scale:u,globeOffset:N,polygonAltitude:B,globeCurvatureResolution:je,atmosphereAltitude:ce,fogSettings:X,lights:Y,selectedId:D,collapseColorScaleByDefault:de,locale:ue}=t,R=x===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json":x,G=v===void 0?"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.":v,O=k===void 0?"threshold":k,r=ve===void 0?te.Colors.light.graphNoData:ve,s=_===void 0?!1:_,d=oe===void 0?te.Colors.light.grays["gray-500"]:oe,b=U===void 0?"ISO3":U,p=$===void 0?!1:$,S=ye===void 0?"en":ye,q=be===void 0?0:be,F=T===void 0?"light":T,pe=V===void 0?!0:V,ze=W===void 0?!0:W;let Ce;e[0]!==Z?(Ce=Z===void 0?[0,0]:Z,e[0]=Z,e[1]=Ce):Ce=e[1];const Ee=Ce,Le=z===void 0?"#999":z,Ae=L===void 0?!0:L,Ge=ae===void 0?!0:ae,Fe=le===void 0?.1:le,Be=we===void 0?.3:we,He=u===void 0?1:u;let Re;e[2]!==N?(Re=N===void 0?[0,0]:N,e[2]=N,e[3]=Re):Re=e[3];const Ie=Re,_e=B===void 0?.01:B,Ue=je===void 0?4:je,$e=ce===void 0?.15:ce;let Se;e[4]!==Y?(Se=Y===void 0?[{type:"ambient",color:4210752,intensity:.4},{type:"directional",color:16777215,intensity:1,position:{x:5,y:10,z:5}}]:Y,e[4]=Y,e[5]=Se):Se=e[5];const Ve=Se,We=ue===void 0?"en":ue,[De,rt]=h.useState(void 0),[H,st]=h.useState(0),[he,it]=h.useState(0),Ze=h.useRef(null),at=h.useRef(null);let Ne,Oe;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{const xe=new ResizeObserver(fe=>{st(fe[0].target.clientWidth||620),it(fe[0].target.clientHeight||480)});return Ze.current&&xe.observe(Ze.current),()=>xe.disconnect()},Oe=[],e[6]=Ne,e[7]=Oe):(Ne=e[6],Oe=e[7]),h.useEffect(Ne,Oe);let qe;e[8]===Symbol.for("react.memo_cache_sentinel")?(qe=xe=>{rt(xe)},e[8]=qe):qe=e[8];const me=h.useEffectEvent(qe);let ke;e[9]!==R||e[10]!==me?(ke=()=>{typeof R=="string"?wt.fetchAndParseJSON(R).then(fe=>{if(R==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const nt=fe.features.map(Lt);me(nt)}else me(fe.features)}):me(R.features)},e[9]=R,e[10]=me,e[11]=ke):ke=e[11];let Pe;e[12]!==R?(Pe=[R],e[12]=R,e[13]=Pe):Pe=e[13],h.useEffect(ke,Pe);let Te;e[14]!==a||e[15]!==E?.length||e[16]!==n||e[17]!==O?(Te=a||(O==="categorical"?jt.getUniqValue(n,"x"):Ct.getJenks(n.map(zt),E?.length||4)),e[14]=a,e[15]=E?.length,e[16]=n,e[17]=O,e[18]=Te):Te=e[18];const ge=Te,Je=g?.graphContainer,Xe=m?.graphContainer;let K;e[19]!==g?.description||e[20]!==g?.title||e[21]!==n||e[22]!==p||e[23]!==c||e[24]!==w||e[25]!==m?.description||e[26]!==m?.title||e[27]!==l?(K=w||c||p?i.jsxRuntimeExports.jsx(yt.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:g?.title,description:g?.description},graphTitle:w,graphDescription:c,width:l,graphDownload:void 0,dataDownload:p?n.map(Mt).filter(Tt).length>0?n.map(Pt).filter(kt):n.filter(qt):null}):null,e[19]=g?.description,e[20]=g?.title,e[21]=n,e[22]=p,e[23]=c,e[24]=w,e[25]=m?.description,e[26]=m?.title,e[27]=l,e[28]=K):K=e[28];let Q;e[29]!==$e||e[30]!==Le||e[31]!==pe||e[32]!==Ee||e[33]!==g||e[34]!==de||e[35]!==j||e[36]!==E||e[37]!==n||e[38]!==y||e[39]!==Be||e[40]!==ge||e[41]!==ze||e[42]!==X||e[43]!==Ue||e[44]!==ie||e[45]!==Ie||e[46]!==o||e[47]!==Fe||e[48]!==ne||e[49]!==Ve||e[50]!==We||e[51]!==d||e[52]!==r||e[53]!==b||e[54]!==De||e[55]!==q||e[56]!==A||e[57]!==J||e[58]!==_e||e[59]!==C||e[60]!==Ge||e[61]!==He||e[62]!==O||e[63]!==D||e[64]!==Ae||e[65]!==m||e[66]!==he||e[67]!==H||e[68]!==F||e[69]!==re||e[70]!==l?(Q=i.jsxRuntimeExports.jsx(et.GraphArea,{ref:Ze,children:H&&he&&De?i.jsxRuntimeExports.jsx(Nt,{data:n,globeOffset:Ie,polygonData:De,colorDomain:ge,width:H,height:he,colors:E||(O==="categorical"?te.Colors[F].sequentialColors[`neutralColorsx0${ge.length}`]:te.Colors[F].sequentialColors[`neutralColorsx0${ge.length+1}`]),mapNoDataColor:r,categorical:O==="categorical",mapBorderColor:d,tooltip:re,mapProperty:b,styles:m,classNames:g,autoRotate:pe===!0?1.5:pe===!1?0:pe,enableZoom:ze,globeMaterial:ie,atmosphereColor:Le,colorLegendTitle:j,showColorScale:Ae,hoverStrokeColor:F==="light"?te.Colors.light.grays["gray-700"]:te.Colors.light.grays["gray-300"],highlightedIds:ne,resetSelectionOnDoubleClick:Ge,detailsOnClick:y,onSeriesMouseOver:J,onSeriesMouseClick:A,scale:He,polygonAltitude:_e,centerLat:Ee[0],centerLng:Ee[1],atmosphereAltitude:$e,globeCurvatureResolution:Ue,fogSettings:X,lights:Ve,highlightedAltitude:Fe,selectedId:D,collapseColorScaleByDefault:de,dimmedOpacity:Be,locale:We}):i.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(q,o||(C?q?(l||H)*C>q?(l||H)*C:q:(l||H)*C:he))}px`},className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(lt.w,{"aria-label":"Loading graph"})})}),e[29]=$e,e[30]=Le,e[31]=pe,e[32]=Ee,e[33]=g,e[34]=de,e[35]=j,e[36]=E,e[37]=n,e[38]=y,e[39]=Be,e[40]=ge,e[41]=ze,e[42]=X,e[43]=Ue,e[44]=ie,e[45]=Ie,e[46]=o,e[47]=Fe,e[48]=ne,e[49]=Ve,e[50]=We,e[51]=d,e[52]=r,e[53]=b,e[54]=De,e[55]=q,e[56]=A,e[57]=J,e[58]=_e,e[59]=C,e[60]=Ge,e[61]=He,e[62]=O,e[63]=D,e[64]=Ae,e[65]=m,e[66]=he,e[67]=H,e[68]=F,e[69]=re,e[70]=l,e[71]=Q):Q=e[71];let ee;e[72]!==g?.footnote||e[73]!==g?.source||e[74]!==G||e[75]!==f||e[76]!==m?.footnote||e[77]!==m?.source||e[78]!==l?(ee=f||G?i.jsxRuntimeExports.jsx(bt.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:f,footNote:G,width:l}):null,e[72]=g?.footnote,e[73]=g?.source,e[74]=G,e[75]=f,e[76]=m?.footnote,e[77]=m?.source,e[78]=l,e[79]=ee):ee=e[79];let Me;return e[80]!==M||e[81]!==s||e[82]!==se||e[83]!==o||e[84]!==S||e[85]!==q||e[86]!==P||e[87]!==C||e[88]!==Je||e[89]!==Xe||e[90]!==K||e[91]!==Q||e[92]!==ee||e[93]!==F||e[94]!==l?(Me=i.jsxRuntimeExports.jsxs(et.GraphContainer,{className:Je,style:Xe,id:se,ref:at,"aria-label":M,backgroundColor:s,theme:F,language:S,minHeight:q,width:l,height:o,relativeHeight:C,padding:P,children:[K,Q,ee]}),e[80]=M,e[81]=s,e[82]=se,e[83]=o,e[84]=S,e[85]=q,e[86]=P,e[87]=C,e[88]=Je,e[89]=Xe,e[90]=K,e[91]=Q,e[92]=ee,e[93]=F,e[94]=l,e[95]=Me):Me=e[95],Me}function qt(t){return t!==void 0}function kt(t){return t!==void 0}function Pt(t){return t.data}function Tt(t){return t!==void 0}function Mt(t){return t.data}function zt(t){return t.x}function Lt(t){if(t.geometry.type==="Polygon"){const x=[...t.geometry.coordinates[0]].reverse(),w={...t.geometry,coordinates:[x]};return{...t,geometry:w}}const e=[];t.geometry.coordinates.forEach(x=>{const w=[...x[0]].reverse();e.push([w])});const n={...t.geometry,coordinates:e};return{...t,geometry:n}}exports.ThreeDGlobe=Ot;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),h=require("react"),nt=require("./Spinner-WHzzloYQ.cjs"),lt=require("react-globe.gl"),ct=require("./index-DQA8q5sC.cjs"),dt=require("three"),Ye=require("./Typography-BqmyF1gP.cjs"),ut=require("./_commonjsHelpers-BH3jXuIh.cjs"),pt=require("./Tooltip-C9F3uYG0.cjs"),ht=require("./numberFormattingFunction-u2iNHL_c.cjs"),Ke=require("./index-BhI7mBJx.cjs"),mt=require("./getCentroidCoordinates-CtBGrNC8.cjs"),gt=require("./DetailsModal-Du8Fr1QD.cjs"),xt=require("./ordinal-CrsysVE-.cjs"),ft=require("./threshold-DNsSUf8Q.cjs"),vt=require("./GraphHeader.cjs"),yt=require("./GraphFooter.cjs"),bt=require("./fetchAndParseData-QTF6tjij.cjs"),re=require("./Colors.cjs"),wt=require("./getUniqValue-NX8DgwND.cjs"),jt=require("./getJenks-BzJvhy_H.cjs"),Qe=require("./GraphContainer-Cul9b74X.cjs");function Ct(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,x.get?x:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const _=Ct(dt);var Xe,et;function Et(){if(et)return Xe;et=1;var t=function(o){return o.charAt(0)==="#"?o.slice(1):o},e=function(o){var l=o.length===3||o.length===4,v=l?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),a=l?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),j=l?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),k=(l?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff";return{r:v,g:a,b:j,a:k}},n=function(o){return parseInt(o,16)},x=function(o){var l=o.r,v=o.g,a=o.b,j=o.a;return{r:n(l),g:n(v),b:n(a),a:+(n(j)/255).toFixed(2)}},w=function(o){return!isNaN(parseFloat(o))&&isFinite(o)},E=function(o,l){var v=o.r,a=o.g,j=o.b,k=o.a,P=w(l)?l:k;return"rgba(".concat(v,", ").concat(a,", ").concat(j,", ").concat(P,")")},f=function(o,l){var v=t(o),a=e(v),j=x(a);return E(j,l)};return Xe=f,Xe}var Rt=Et();const tt=ut.getDefaultExportFromCjs(Rt);function Dt(t){let e;switch(t.type){case"ambient":e=new _.AmbientLight(t.color,t.intensity);break;case"directional":e=new _.DirectionalLight(t.color,t.intensity),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z===void 0?-1:t.target.z),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;case"point":e=new _.PointLight(t.color,t.intensity,t.distance||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z));break;case"spot":e=new _.SpotLight(t.color,t.intensity,t.distance||0,t.angle||Math.PI/3,t.penumbra||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z||0),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;default:throw new Error("Unknown light type")}return e}function St(t){const{width:e,autoRotate:n,data:x,enableZoom:w,categorical:E,colorDomain:f,colors:c,globeMaterial:o,height:l,polygonData:v,mapProperty:a,mapBorderColor:j,atmosphereColor:k,tooltip:P,styles:ve,classNames:U,mapNoDataColor:se,colorLegendTitle:C,showColorScale:ie,hoverStrokeColor:ae,detailsOnClick:$,onSeriesMouseClick:V,onSeriesMouseOver:ye,resetSelectionOnDoubleClick:be,highlightedIds:T,scale:M,globeOffset:m,polygonAltitude:g,centerLng:W,centerLat:Z,atmosphereAltitude:ne,globeCurvatureResolution:J,fogSettings:z,lights:L,highlightedAltitude:le,selectedId:y,collapseColorScaleByDefault:X,dimmedOpacity:A,numberDisplayOptions:B}=t,[ce,we]=h.useState(!1),u=h.useRef(void 0),[N,H]=h.useState(void 0),[je,de]=h.useState(X===void 0?!(e<680):!X),[Y,K]=h.useState({x:0,y:0}),[S,ue]=h.useState(void 0),Q=E?xt.ordinal().domain(f).range(c):ft.threshold().domain(f).range(c);h.useEffect(()=>{u.current&&(u.current.controls().enableZoom=w)},[w]),h.useEffect(()=>{u.current&&(S||y?u.current.controls().autoRotate=!1:(u.current.controls().autoRotate=n!==0,u.current.controls().autoRotateSpeed=n))},[S,y,n]),h.useEffect(()=>{if(u.current&&y){const r=v.find(b=>b.properties[a]===y),[s,d]=mt.getCentroidCoordinates(r);u.current.pointOfView({lat:d,lng:s,altitude:M},1e3)}},[y,M,v,a]),h.useEffect(()=>{const r=u.current?.renderer().domElement;if(!r)return;const s=d=>{K({x:d.clientX,y:d.clientY})};return r.addEventListener("mousemove",s),()=>r.removeEventListener("mousemove",s)},[]),h.useEffect(()=>{u.current&&u.current.pointOfView({lat:Z,lng:W,altitude:M},1e3)},[M,W,Z]);const R=o||new _.MeshBasicMaterial({color:"#FFF"}),G=h.useCallback(()=>{if(!u.current)return;const r=u.current.scene(),s=u.current.camera();let d=[];r.traverse(p=>{p instanceof _.Light&&d.push(p)}),d=[...d,...s.children],d.forEach(p=>p.parent?.remove(p)),L.map(p=>Dt(p)).forEach((p,D)=>{L[D].type!=="ambient"&&L[D].position==="camera"?(s.add(p),L[D].type!=="point"&&s.add(p.target)):r.add(p)}),z&&(r.fog=new _.Fog(z.color,z.near,z.far))},[L,z]),O=()=>{we(!0),G()};return h.useEffect(()=>{ce&&G()},[ce,G]),i.jsxRuntimeExports.jsxs("div",{className:"relative",children:[i.jsxRuntimeExports.jsx(lt,{ref:u,height:l,width:e,globeOffset:m,lineHoverPrecision:0,polygonsData:v,polygonAltitude:r=>T?.includes(r?.properties?.[a])||r?.properties?.[a]===y||r?.properties?.[a]===S?.id||r?.properties?.[a]===N?.id?le:g,polygonCapColor:r=>{const s=y?r?.properties?.[a]===y?1:A:T?T.includes(r?.properties?.[a])?1:A:1,d=r?.properties?.[a],b=x.find(D=>D.id===d)?.x,p=b!=null?Q(b):se;return tt(p,`${s}`)},polygonSideColor:r=>{const s=r?.properties?.[a],d=x.find(D=>D.id===s)?.x,b=y?r?.properties?.[a]===y?1:A:T?T.includes(r?.properties?.[a])?1:A:1,p=d!=null?Q(d):se;return tt(p,`${b}`)},polygonStrokeColor:r=>r?.properties?.[a]===S?.id?ae:j,onGlobeClick:()=>{H(void 0)},onPolygonClick:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;(V||$)&&(ct.isEqual(N,s)&&be&&s?(H(void 0),V?.(void 0)):(H(s),V?.(s)))},onPolygonHover:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;ue(s),ye?.(s)},atmosphereColor:k,atmosphereAltitude:ne,globeCurvatureResolution:J,globeMaterial:R,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{if(u.current){u.current.pointOfView({lat:Z,lng:W});const r=u.current.scene();setTimeout(()=>{(r.children[3]?.children[0]?.children[4]?.children||[]).forEach(b=>{const p=b.children[1];p.renderOrder=2})},300);const s=u.current.camera();r.add(s),O()}}}),ie===!1?null:i.jsxRuntimeExports.jsx("div",{className:i.mo("absolute left-4 bottom-4 map-color-legend",U?.colorLegend),children:je?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{de(!1)},children:i.jsxRuntimeExports.jsx(Ke.X,{})}),i.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:E?void 0:"340px"},children:[C&&C!==""?i.jsxRuntimeExports.jsx(Ye._,{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:C}):null,E?i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((r,s)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[s%c.length]}}),i.jsxRuntimeExports.jsx(Ye._,{size:"sm",marginBottom:"none",leading:"none",children:r})]},s))}):i.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:i.jsxRuntimeExports.jsxs("g",{children:[f.map((r,s)=>i.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[i.jsxRuntimeExports.jsx("rect",{x:s*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[s],stroke:c[s]}}),i.jsxRuntimeExports.jsx("text",{x:(s+1)*320/c.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:ht.numberFormattingFunction(r,void 0,B?.precision??2,void 0,void 0,B?.locale||"en",B?.padZeros||!1)})]},s)),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("rect",{x:f.length*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[f.length],stroke:c[f.length]}})})]})})]})]}):i.jsxRuntimeExports.jsx("button",{type:"button",className:"p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button",onClick:()=>{de(!0)},children:i.jsxRuntimeExports.jsx(Ke.ExpandIcon,{})})}),S&&P?i.jsxRuntimeExports.jsx(pt.Tooltip,{data:S,body:P,xPos:Y.x,yPos:Y.y,backgroundStyle:ve?.tooltip,className:U?.tooltip}):null,$&&N!==void 0?i.jsxRuntimeExports.jsx(gt.DetailsModal,{body:$,data:N,setData:H,className:U?.modal}):null]})}function Nt(t){const e=i.compilerRuntimeExports.c(96),{data:n,mapData:x,graphTitle:w,colors:E,sources:f,graphDescription:c,height:o,width:l,footNote:v,colorDomain:a,colorLegendTitle:j,scaleType:k,padding:P,mapNoDataColor:ve,backgroundColor:U,mapBorderColor:se,relativeHeight:C,tooltip:ie,graphID:ae,mapProperty:$,dataDownload:V,language:ye,minHeight:be,theme:T,ariaLabel:M,styles:m,classNames:g,autoRotate:W,enableZoom:Z,globeMaterial:ne,centerPoint:J,atmosphereColor:z,showColorScale:L,resetSelectionOnDoubleClick:le,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,highlightedIds:B,highlightedAltitude:ce,dimmedOpacity:we,scale:u,globeOffset:N,polygonAltitude:H,globeCurvatureResolution:je,atmosphereAltitude:de,fogSettings:Y,lights:K,selectedId:S,collapseColorScaleByDefault:ue,numberDisplayOptions:Q}=t,R=x===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json":x,G=v===void 0?"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.":v,O=k===void 0?"threshold":k,r=ve===void 0?re.Colors.light.graphNoData:ve,s=U===void 0?!1:U,d=se===void 0?re.Colors.light.grays["gray-500"]:se,b=$===void 0?"ISO3":$,p=V===void 0?!1:V,D=ye===void 0?"en":ye,q=be===void 0?0:be,F=T===void 0?"light":T,pe=W===void 0?!0:W,ze=Z===void 0?!0:Z;let Ce;e[0]!==J?(Ce=J===void 0?[0,0]:J,e[0]=J,e[1]=Ce):Ce=e[1];const Ee=Ce,Le=z===void 0?"#999":z,Ae=L===void 0?!0:L,Ge=le===void 0?!0:le,Fe=ce===void 0?.1:ce,Be=we===void 0?.3:we,He=u===void 0?1:u;let Re;e[2]!==N?(Re=N===void 0?[0,0]:N,e[2]=N,e[3]=Re):Re=e[3];const Ie=Re,_e=H===void 0?.01:H,Ue=je===void 0?4:je,$e=de===void 0?.15:de;let De;e[4]!==K?(De=K===void 0?[{type:"ambient",color:4210752,intensity:.4},{type:"directional",color:16777215,intensity:1,position:{x:5,y:10,z:5}}]:K,e[4]=K,e[5]=De):De=e[5];const Ve=De,[Se,ot]=h.useState(void 0),[I,rt]=h.useState(0),[he,st]=h.useState(0),We=h.useRef(null),it=h.useRef(null);let Ne,Oe;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{const xe=new ResizeObserver(fe=>{rt(fe[0].target.clientWidth||620),st(fe[0].target.clientHeight||480)});return We.current&&xe.observe(We.current),()=>xe.disconnect()},Oe=[],e[6]=Ne,e[7]=Oe):(Ne=e[6],Oe=e[7]),h.useEffect(Ne,Oe);let qe;e[8]===Symbol.for("react.memo_cache_sentinel")?(qe=xe=>{ot(xe)},e[8]=qe):qe=e[8];const me=h.useEffectEvent(qe);let ke;e[9]!==R||e[10]!==me?(ke=()=>{typeof R=="string"?bt.fetchAndParseJSON(R).then(fe=>{if(R==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const at=fe.features.map(zt);me(at)}else me(fe.features)}):me(R.features)},e[9]=R,e[10]=me,e[11]=ke):ke=e[11];let Pe;e[12]!==R?(Pe=[R],e[12]=R,e[13]=Pe):Pe=e[13],h.useEffect(ke,Pe);let Te;e[14]!==a||e[15]!==E?.length||e[16]!==n||e[17]!==O?(Te=a||(O==="categorical"?wt.getUniqValue(n,"x"):jt.getJenks(n.map(Mt),E?.length||4)),e[14]=a,e[15]=E?.length,e[16]=n,e[17]=O,e[18]=Te):Te=e[18];const ge=Te,Ze=g?.graphContainer,Je=m?.graphContainer;let ee;e[19]!==g?.description||e[20]!==g?.title||e[21]!==n||e[22]!==p||e[23]!==c||e[24]!==w||e[25]!==m?.description||e[26]!==m?.title||e[27]!==l?(ee=w||c||p?i.jsxRuntimeExports.jsx(vt.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:g?.title,description:g?.description},graphTitle:w,graphDescription:c,width:l,graphDownload:void 0,dataDownload:p?n.map(Tt).filter(Pt).length>0?n.map(kt).filter(qt):n.filter(Ot):null}):null,e[19]=g?.description,e[20]=g?.title,e[21]=n,e[22]=p,e[23]=c,e[24]=w,e[25]=m?.description,e[26]=m?.title,e[27]=l,e[28]=ee):ee=e[28];let te;e[29]!==$e||e[30]!==Le||e[31]!==pe||e[32]!==Ee||e[33]!==g||e[34]!==ue||e[35]!==j||e[36]!==E||e[37]!==n||e[38]!==y||e[39]!==Be||e[40]!==ge||e[41]!==ze||e[42]!==Y||e[43]!==Ue||e[44]!==ne||e[45]!==Ie||e[46]!==o||e[47]!==Fe||e[48]!==B||e[49]!==Ve||e[50]!==d||e[51]!==r||e[52]!==b||e[53]!==Se||e[54]!==q||e[55]!==Q||e[56]!==A||e[57]!==X||e[58]!==_e||e[59]!==C||e[60]!==Ge||e[61]!==He||e[62]!==O||e[63]!==S||e[64]!==Ae||e[65]!==m||e[66]!==he||e[67]!==I||e[68]!==F||e[69]!==ie||e[70]!==l?(te=i.jsxRuntimeExports.jsx(Qe.GraphArea,{ref:We,children:I&&he&&Se?i.jsxRuntimeExports.jsx(St,{data:n,globeOffset:Ie,polygonData:Se,colorDomain:ge,width:I,height:he,colors:E||(O==="categorical"?re.Colors[F].sequentialColors[`neutralColorsx0${ge.length}`]:re.Colors[F].sequentialColors[`neutralColorsx0${ge.length+1}`]),mapNoDataColor:r,categorical:O==="categorical",mapBorderColor:d,tooltip:ie,mapProperty:b,styles:m,classNames:g,autoRotate:pe===!0?1.5:pe===!1?0:pe,enableZoom:ze,globeMaterial:ne,atmosphereColor:Le,colorLegendTitle:j,showColorScale:Ae,hoverStrokeColor:F==="light"?re.Colors.light.grays["gray-700"]:re.Colors.light.grays["gray-300"],highlightedIds:B,resetSelectionOnDoubleClick:Ge,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,scale:He,polygonAltitude:_e,centerLat:Ee[0],centerLng:Ee[1],atmosphereAltitude:$e,globeCurvatureResolution:Ue,fogSettings:Y,lights:Ve,highlightedAltitude:Fe,selectedId:S,collapseColorScaleByDefault:ue,dimmedOpacity:Be,numberDisplayOptions:Q}):i.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(q,o||(C?q?(l||I)*C>q?(l||I)*C:q:(l||I)*C:he))}px`},className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(nt.w,{"aria-label":"Loading graph"})})}),e[29]=$e,e[30]=Le,e[31]=pe,e[32]=Ee,e[33]=g,e[34]=ue,e[35]=j,e[36]=E,e[37]=n,e[38]=y,e[39]=Be,e[40]=ge,e[41]=ze,e[42]=Y,e[43]=Ue,e[44]=ne,e[45]=Ie,e[46]=o,e[47]=Fe,e[48]=B,e[49]=Ve,e[50]=d,e[51]=r,e[52]=b,e[53]=Se,e[54]=q,e[55]=Q,e[56]=A,e[57]=X,e[58]=_e,e[59]=C,e[60]=Ge,e[61]=He,e[62]=O,e[63]=S,e[64]=Ae,e[65]=m,e[66]=he,e[67]=I,e[68]=F,e[69]=ie,e[70]=l,e[71]=te):te=e[71];let oe;e[72]!==g?.footnote||e[73]!==g?.source||e[74]!==G||e[75]!==f||e[76]!==m?.footnote||e[77]!==m?.source||e[78]!==l?(oe=f||G?i.jsxRuntimeExports.jsx(yt.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:f,footNote:G,width:l}):null,e[72]=g?.footnote,e[73]=g?.source,e[74]=G,e[75]=f,e[76]=m?.footnote,e[77]=m?.source,e[78]=l,e[79]=oe):oe=e[79];let Me;return e[80]!==M||e[81]!==s||e[82]!==ae||e[83]!==o||e[84]!==D||e[85]!==q||e[86]!==P||e[87]!==C||e[88]!==Ze||e[89]!==Je||e[90]!==ee||e[91]!==te||e[92]!==oe||e[93]!==F||e[94]!==l?(Me=i.jsxRuntimeExports.jsxs(Qe.GraphContainer,{className:Ze,style:Je,id:ae,ref:it,"aria-label":M,backgroundColor:s,theme:F,language:D,minHeight:q,width:l,height:o,relativeHeight:C,padding:P,children:[ee,te,oe]}),e[80]=M,e[81]=s,e[82]=ae,e[83]=o,e[84]=D,e[85]=q,e[86]=P,e[87]=C,e[88]=Ze,e[89]=Je,e[90]=ee,e[91]=te,e[92]=oe,e[93]=F,e[94]=l,e[95]=Me):Me=e[95],Me}function Ot(t){return t!==void 0}function qt(t){return t!==void 0}function kt(t){return t.data}function Pt(t){return t!==void 0}function Tt(t){return t.data}function Mt(t){return t.x}function zt(t){if(t.geometry.type==="Polygon"){const x=[...t.geometry.coordinates[0]].reverse(),w={...t.geometry,coordinates:[x]};return{...t,geometry:w}}const e=[];t.geometry.coordinates.forEach(x=>{const w=[...x[0]].reverse();e.push([w])});const n={...t.geometry,coordinates:e};return{...t,geometry:n}}exports.ThreeDGlobe=Nt;
2
2
  //# sourceMappingURL=ThreeDGlobe.cjs.map