@undp/data-viz 1.5.7 → 1.5.9

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 (342) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +13 -13
  3. package/dist/{Axis-Ddg-seDi.js → Axis-4gUOL8B7.js} +2 -2
  4. package/dist/{Axis-Ddg-seDi.js.map → Axis-4gUOL8B7.js.map} +1 -1
  5. package/dist/{Axis-DE7dSn1_.cjs → Axis-CkNn1wit.cjs} +2 -2
  6. package/dist/{Axis-DE7dSn1_.cjs.map → Axis-CkNn1wit.cjs.map} +1 -1
  7. package/dist/{AxisTitle-CK9YeovX.cjs → AxisTitle-Wkz-xeQL.cjs} +2 -2
  8. package/dist/{AxisTitle-CK9YeovX.cjs.map → AxisTitle-Wkz-xeQL.cjs.map} +1 -1
  9. package/dist/{AxisTitle-BmHLMRJZ.js → AxisTitle-v6_xcXZ-.js} +2 -2
  10. package/dist/{AxisTitle-BmHLMRJZ.js.map → AxisTitle-v6_xcXZ-.js.map} +1 -1
  11. package/dist/BarGraph.cjs +1 -1
  12. package/dist/BarGraph.cjs.map +1 -1
  13. package/dist/BarGraph.js +666 -664
  14. package/dist/BarGraph.js.map +1 -1
  15. package/dist/BasicStatCard.cjs +1 -1
  16. package/dist/BasicStatCard.js +2 -2
  17. package/dist/BeeSwarmChart.cjs +1 -1
  18. package/dist/BeeSwarmChart.js +42 -42
  19. package/dist/BiVariateChoroplethMap.cjs +1 -1
  20. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  21. package/dist/BiVariateChoroplethMap.d.ts +2 -0
  22. package/dist/BiVariateChoroplethMap.js +257 -264
  23. package/dist/BiVariateChoroplethMap.js.map +1 -1
  24. package/dist/BulletChart.cjs +1 -1
  25. package/dist/BulletChart.cjs.map +1 -1
  26. package/dist/BulletChart.js +223 -221
  27. package/dist/BulletChart.js.map +1 -1
  28. package/dist/ButterflyChart.cjs +1 -1
  29. package/dist/ButterflyChart.cjs.map +1 -1
  30. package/dist/ButterflyChart.js +84 -82
  31. package/dist/ButterflyChart.js.map +1 -1
  32. package/dist/ChoroplethMap.cjs +1 -1
  33. package/dist/ChoroplethMap.cjs.map +1 -1
  34. package/dist/ChoroplethMap.d.ts +2 -0
  35. package/dist/ChoroplethMap.js +296 -304
  36. package/dist/ChoroplethMap.js.map +1 -1
  37. package/dist/CirclePackingGraph.cjs +1 -1
  38. package/dist/CirclePackingGraph.js +3 -3
  39. package/dist/ColorLegend.cjs +1 -1
  40. package/dist/ColorLegend.js +2 -2
  41. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  42. package/dist/ColorLegendWithMouseOver.js +2 -2
  43. package/dist/CopyTextButton.cjs +4 -4
  44. package/dist/CopyTextButton.cjs.map +1 -1
  45. package/dist/CopyTextButton.js +27 -27
  46. package/dist/CopyTextButton.js.map +1 -1
  47. package/dist/CsvDownloadButton.cjs +1 -1
  48. package/dist/CsvDownloadButton.js +2 -2
  49. package/dist/DataCards.cjs +3 -3
  50. package/dist/DataCards.cjs.map +1 -1
  51. package/dist/DataCards.js +16 -16
  52. package/dist/DataCards.js.map +1 -1
  53. package/dist/DataTable.cjs +1 -1
  54. package/dist/DataTable.js +3 -3
  55. package/dist/DifferenceLineChart.cjs +1 -1
  56. package/dist/DifferenceLineChart.cjs.map +1 -1
  57. package/dist/DifferenceLineChart.js +133 -131
  58. package/dist/DifferenceLineChart.js.map +1 -1
  59. package/dist/DonutChart.cjs +1 -1
  60. package/dist/DonutChart.js +20 -20
  61. package/dist/DotDensityMap.cjs +1 -1
  62. package/dist/DotDensityMap.cjs.map +1 -1
  63. package/dist/DotDensityMap.d.ts +2 -0
  64. package/dist/DotDensityMap.js +282 -289
  65. package/dist/DotDensityMap.js.map +1 -1
  66. package/dist/{DropdownSelect-CtOKZHD0.js → DropdownSelect-6kjXM6oW.js} +2 -2
  67. package/dist/DropdownSelect-6kjXM6oW.js.map +1 -0
  68. package/dist/{DropdownSelect-DBDM64B5.cjs → DropdownSelect-vt8yiB-g.cjs} +5 -5
  69. package/dist/DropdownSelect-vt8yiB-g.cjs.map +1 -0
  70. package/dist/DualAxisLineChart.cjs +1 -1
  71. package/dist/DualAxisLineChart.cjs.map +1 -1
  72. package/dist/DualAxisLineChart.js +141 -121
  73. package/dist/DualAxisLineChart.js.map +1 -1
  74. package/dist/DumbbellChart.cjs +1 -1
  75. package/dist/DumbbellChart.cjs.map +1 -1
  76. package/dist/DumbbellChart.js +307 -307
  77. package/dist/DumbbellChart.js.map +1 -1
  78. package/dist/{EmptyState-DdTp-Mdn.js → EmptyState-36lXXyui.js} +4 -4
  79. package/dist/{EmptyState-DdTp-Mdn.js.map → EmptyState-36lXXyui.js.map} +1 -1
  80. package/dist/{EmptyState-d8_8SxeW.cjs → EmptyState-B8IpKGcL.cjs} +2 -2
  81. package/dist/{EmptyState-d8_8SxeW.cjs.map → EmptyState-B8IpKGcL.cjs.map} +1 -1
  82. package/dist/ExcelDownloadButton.cjs +1 -1
  83. package/dist/ExcelDownloadButton.js +2 -2
  84. package/dist/FootNote.cjs +1 -1
  85. package/dist/FootNote.js +2 -2
  86. package/dist/GeoHubCompareMaps.cjs +1 -1
  87. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  88. package/dist/GeoHubCompareMaps.js +65 -80
  89. package/dist/GeoHubCompareMaps.js.map +1 -1
  90. package/dist/GeoHubMap.cjs +1 -1
  91. package/dist/GeoHubMap.cjs.map +1 -1
  92. package/dist/GeoHubMap.js +95 -125
  93. package/dist/GeoHubMap.js.map +1 -1
  94. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  95. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
  96. package/dist/GeoHubMapWithLayerSelection.js +73 -88
  97. package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
  98. package/dist/GraphDescription.cjs +1 -1
  99. package/dist/GraphDescription.js +2 -2
  100. package/dist/{GraphEl-CqWzvOyr.js → GraphEl-2IiUDxjR.js} +15 -12
  101. package/dist/GraphEl-2IiUDxjR.js.map +1 -0
  102. package/dist/GraphEl-qrlfGPe3.cjs +2 -0
  103. package/dist/GraphEl-qrlfGPe3.cjs.map +1 -0
  104. package/dist/GraphFooter.cjs +1 -1
  105. package/dist/GraphFooter.js +1 -1
  106. package/dist/GraphHeader.cjs +1 -1
  107. package/dist/GraphHeader.js +1 -1
  108. package/dist/GraphTitle.cjs +1 -1
  109. package/dist/GraphTitle.js +2 -2
  110. package/dist/GriddedGraphs.cjs +1 -1
  111. package/dist/GriddedGraphs.d.ts +1 -0
  112. package/dist/GriddedGraphs.js +5 -5
  113. package/dist/GriddedGraphsFromConfig.cjs +1 -1
  114. package/dist/GriddedGraphsFromConfig.d.ts +1 -0
  115. package/dist/GriddedGraphsFromConfig.js +2 -2
  116. package/dist/HeatMap.cjs +1 -1
  117. package/dist/HeatMap.js +19 -19
  118. package/dist/Histogram.cjs +1 -1
  119. package/dist/Histogram.js +3 -3
  120. package/dist/ImageDownloadButton.cjs +1 -1
  121. package/dist/ImageDownloadButton.js +2 -2
  122. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  123. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  124. package/dist/LineChartWithConfidenceInterval.js +204 -184
  125. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  126. package/dist/LinearColorLegend.cjs +1 -1
  127. package/dist/LinearColorLegend.js +2 -2
  128. package/dist/{Modal-DVVwpKhP.js → Modal-Cg8daIlV.js} +198 -187
  129. package/dist/Modal-Cg8daIlV.js.map +1 -0
  130. package/dist/Modal-CuuJdWkD.cjs +46 -0
  131. package/dist/Modal-CuuJdWkD.cjs.map +1 -0
  132. package/dist/MultiGraphDashboard.cjs +1 -1
  133. package/dist/MultiGraphDashboard.d.ts +1 -0
  134. package/dist/MultiGraphDashboard.js +3 -3
  135. package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
  136. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
  137. package/dist/MultiGraphDashboardFromConfig.js +2 -2
  138. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  139. package/dist/MultiGraphDashboardWideToLongFormat.js +4 -4
  140. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
  141. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -2
  142. package/dist/MultiLineAltChart.cjs +1 -1
  143. package/dist/MultiLineAltChart.cjs.map +1 -1
  144. package/dist/MultiLineAltChart.js +172 -173
  145. package/dist/MultiLineAltChart.js.map +1 -1
  146. package/dist/MultiLineChart.cjs +1 -1
  147. package/dist/MultiLineChart.cjs.map +1 -1
  148. package/dist/MultiLineChart.js +89 -78
  149. package/dist/MultiLineChart.js.map +1 -1
  150. package/dist/ParetoChart.cjs +1 -1
  151. package/dist/ParetoChart.cjs.map +1 -1
  152. package/dist/ParetoChart.js +186 -181
  153. package/dist/ParetoChart.js.map +1 -1
  154. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  155. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
  156. package/dist/PerformanceIntensiveMultiGraphDashboard.js +3 -3
  157. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
  158. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
  159. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +2 -2
  160. package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
  161. package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
  162. package/dist/PerformanceIntensiveScrollStory.js +3 -3
  163. package/dist/RadarChart.cjs +1 -1
  164. package/dist/RadarChart.cjs.map +1 -1
  165. package/dist/RadarChart.js +256 -244
  166. package/dist/RadarChart.js.map +1 -1
  167. package/dist/{ReferenceLine-CfAW3vKJ.js → ReferenceLine-CPMaAX0r.js} +3 -3
  168. package/dist/{ReferenceLine-CfAW3vKJ.js.map → ReferenceLine-CPMaAX0r.js.map} +1 -1
  169. package/dist/{ReferenceLine-CFVBBN__.cjs → ReferenceLine-D04j-zeV.cjs} +2 -2
  170. package/dist/{ReferenceLine-CFVBBN__.cjs.map → ReferenceLine-D04j-zeV.cjs.map} +1 -1
  171. package/dist/{RegressionLine-mH7UKOPi.js → RegressionLine-CW7iViH2.js} +13 -12
  172. package/dist/RegressionLine-CW7iViH2.js.map +1 -0
  173. package/dist/RegressionLine-D-49RaHa.cjs +2 -0
  174. package/dist/RegressionLine-D-49RaHa.cjs.map +1 -0
  175. package/dist/SVGDownloadButton.cjs +1 -1
  176. package/dist/SVGDownloadButton.js +2 -2
  177. package/dist/SankeyChart.cjs +1 -1
  178. package/dist/SankeyChart.js +27 -27
  179. package/dist/ScatterPlot.cjs +1 -1
  180. package/dist/ScatterPlot.cjs.map +1 -1
  181. package/dist/ScatterPlot.js +145 -144
  182. package/dist/ScatterPlot.js.map +1 -1
  183. package/dist/ScrollStory.cjs +1 -1
  184. package/dist/ScrollStory.d.ts +1 -0
  185. package/dist/ScrollStory.js +3 -3
  186. package/dist/SimpleLineChart.cjs +1 -1
  187. package/dist/SimpleLineChart.cjs.map +1 -1
  188. package/dist/SimpleLineChart.js +53 -48
  189. package/dist/SimpleLineChart.js.map +1 -1
  190. package/dist/SingleGraphDashboard.cjs +1 -1
  191. package/dist/SingleGraphDashboard.d.ts +1 -0
  192. package/dist/SingleGraphDashboard.js +6 -6
  193. package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
  194. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
  195. package/dist/SingleGraphDashboardFromConfig.js +2 -2
  196. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  197. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
  198. package/dist/SingleGraphDashboardGeoHubMaps.js +2 -2
  199. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
  200. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
  201. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +2 -2
  202. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  203. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  204. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
  205. package/dist/SingleGraphDashboardThreeDGraphs.js +14 -13
  206. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  207. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
  208. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
  209. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +2 -2
  210. package/dist/SlopeChart.cjs +1 -1
  211. package/dist/SlopeChart.cjs.map +1 -1
  212. package/dist/SlopeChart.js +137 -133
  213. package/dist/SlopeChart.js.map +1 -1
  214. package/dist/Source.cjs +1 -1
  215. package/dist/Source.js +2 -2
  216. package/dist/SparkLine.cjs +1 -1
  217. package/dist/SparkLine.js +2 -2
  218. package/dist/{Spinner-C85UF28E.js → Spinner-Bpz70q_g.js} +2 -2
  219. package/dist/{Spinner-C85UF28E.js.map → Spinner-Bpz70q_g.js.map} +1 -1
  220. package/dist/{Spinner-DA6Z5E4n.cjs → Spinner-C6wLp85s.cjs} +2 -2
  221. package/dist/{Spinner-DA6Z5E4n.cjs.map → Spinner-C6wLp85s.cjs.map} +1 -1
  222. package/dist/StatCardFromData.cjs +1 -1
  223. package/dist/StatCardFromData.js +2 -2
  224. package/dist/StripChart.cjs +1 -1
  225. package/dist/StripChart.cjs.map +1 -1
  226. package/dist/StripChart.js +307 -295
  227. package/dist/StripChart.js.map +1 -1
  228. package/dist/ThreeDGlobe.cjs +1 -1
  229. package/dist/ThreeDGlobe.cjs.map +1 -1
  230. package/dist/ThreeDGlobe.d.ts +2 -0
  231. package/dist/ThreeDGlobe.js +220 -228
  232. package/dist/ThreeDGlobe.js.map +1 -1
  233. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  234. package/dist/ThresholdColorLegendWithMouseOver.js +2 -2
  235. package/dist/{Tooltip-CVCGWyzw.js → Tooltip-6LIdPQGC.js} +2 -2
  236. package/dist/{Tooltip-CVCGWyzw.js.map → Tooltip-6LIdPQGC.js.map} +1 -1
  237. package/dist/{Tooltip-De16GWhY.cjs → Tooltip-Cpv0QohJ.cjs} +2 -2
  238. package/dist/{Tooltip-De16GWhY.cjs.map → Tooltip-Cpv0QohJ.cjs.map} +1 -1
  239. package/dist/TreeMapGraph.cjs +1 -1
  240. package/dist/TreeMapGraph.js +24 -24
  241. package/dist/Types.d.ts +1 -0
  242. package/dist/{Typography-k-kOjICQ.cjs → Typography-BDULiwlF.cjs} +2 -2
  243. package/dist/{Typography-k-kOjICQ.cjs.map → Typography-BDULiwlF.cjs.map} +1 -1
  244. package/dist/{Typography-Ctgfl1J5.js → Typography-LmZ9LEpe.js} +2 -2
  245. package/dist/{Typography-Ctgfl1J5.js.map → Typography-LmZ9LEpe.js.map} +1 -1
  246. package/dist/UnitChart.cjs +1 -1
  247. package/dist/UnitChart.cjs.map +1 -1
  248. package/dist/UnitChart.js +25 -26
  249. package/dist/UnitChart.js.map +1 -1
  250. package/dist/{XAxesLabels-Drf7M3YK.cjs → XAxesLabels-CLZnBgSr.cjs} +2 -2
  251. package/dist/{XAxesLabels-Drf7M3YK.cjs.map → XAxesLabels-CLZnBgSr.cjs.map} +1 -1
  252. package/dist/{XAxesLabels-loO78vUO.js → XAxesLabels-SOSmso5J.js} +3 -3
  253. package/dist/{XAxesLabels-loO78vUO.js.map → XAxesLabels-SOSmso5J.js.map} +1 -1
  254. package/dist/{XTicksAndGridLines-Bn9u5gOM.js → XTicksAndGridLines-DuydSnZ_.js} +2 -2
  255. package/dist/{XTicksAndGridLines-Bn9u5gOM.js.map → XTicksAndGridLines-DuydSnZ_.js.map} +1 -1
  256. package/dist/{XTicksAndGridLines-CCzXIV8d.cjs → XTicksAndGridLines-RKy7BVCO.cjs} +2 -2
  257. package/dist/{XTicksAndGridLines-CCzXIV8d.cjs.map → XTicksAndGridLines-RKy7BVCO.cjs.map} +1 -1
  258. package/dist/{YAxesLabels-DECkMgq8.js → YAxesLabels-DlDyLvhi.js} +3 -3
  259. package/dist/{YAxesLabels-DECkMgq8.js.map → YAxesLabels-DlDyLvhi.js.map} +1 -1
  260. package/dist/{YAxesLabels-yRFFdx1s.cjs → YAxesLabels-Dqd259-t.cjs} +2 -2
  261. package/dist/{YAxesLabels-yRFFdx1s.cjs.map → YAxesLabels-Dqd259-t.cjs.map} +1 -1
  262. package/dist/{YTicksAndGridLines-B6ah7CRf.js → YTicksAndGridLines-7t4MKtGw.js} +2 -2
  263. package/dist/{YTicksAndGridLines-B6ah7CRf.js.map → YTicksAndGridLines-7t4MKtGw.js.map} +1 -1
  264. package/dist/{YTicksAndGridLines-DBDuz6vb.cjs → YTicksAndGridLines-qGpRo_t1.cjs} +2 -2
  265. package/dist/{YTicksAndGridLines-DBDuz6vb.cjs.map → YTicksAndGridLines-qGpRo_t1.cjs.map} +1 -1
  266. package/dist/checkIfMultiple-Dko_cBvE.cjs +12 -0
  267. package/dist/checkIfMultiple-Dko_cBvE.cjs.map +1 -0
  268. package/dist/{checkIfMultiple-ChTJk2Tk.js → checkIfMultiple-u2SmbiCf.js} +11 -11
  269. package/dist/checkIfMultiple-u2SmbiCf.js.map +1 -0
  270. package/dist/{customArea-CK768gCn.cjs → customArea-1G1S78s_.cjs} +2 -2
  271. package/dist/{customArea-CK768gCn.cjs.map → customArea-1G1S78s_.cjs.map} +1 -1
  272. package/dist/{customArea-B-dWU0zZ.js → customArea-x4L4xwLl.js} +3 -3
  273. package/dist/{customArea-B-dWU0zZ.js.map → customArea-x4L4xwLl.js.map} +1 -1
  274. package/dist/getCentroidCoordinates-Dfk6IqEG.js.map +1 -1
  275. package/dist/getCentroidCoordinates-DxTBqzp2.cjs.map +1 -1
  276. package/dist/getSliderMarks-CUxPy36E.cjs +6 -0
  277. package/dist/getSliderMarks-CUxPy36E.cjs.map +1 -0
  278. package/dist/{getSliderMarks-9cNoRkDx.js → getSliderMarks-_pYOWEtO.js} +3 -3
  279. package/dist/getSliderMarks-_pYOWEtO.js.map +1 -0
  280. package/dist/{index-BYzIB5V6.cjs → index-BHe3wsWF.cjs} +2 -2
  281. package/dist/{index-BYzIB5V6.cjs.map → index-BHe3wsWF.cjs.map} +1 -1
  282. package/dist/{index-DKCxu1Gh.js → index-Bw_eHBVN.js} +3 -3
  283. package/dist/{index-DKCxu1Gh.js.map → index-Bw_eHBVN.js.map} +1 -1
  284. package/dist/{index-BW_-wD2k.cjs → index-C0bpbS4F.cjs} +2 -2
  285. package/dist/{index-BW_-wD2k.cjs.map → index-C0bpbS4F.cjs.map} +1 -1
  286. package/dist/{index-37q0ULNQ.js → index-CE9pmfxt.js} +17 -17
  287. package/dist/{index-37q0ULNQ.js.map → index-CE9pmfxt.js.map} +1 -1
  288. package/dist/{index-CVlCtJbC.cjs → index-CEJwW3lL.cjs} +2 -2
  289. package/dist/{index-CVlCtJbC.cjs.map → index-CEJwW3lL.cjs.map} +1 -1
  290. package/dist/{index-CHPV5EwG-BPSP-7Jg.js → index-CHPV5EwG-DBWUSD9b.js} +539 -543
  291. package/dist/index-CHPV5EwG-DBWUSD9b.js.map +1 -0
  292. package/dist/index-CHPV5EwG-DjM48pIC.cjs +44 -0
  293. package/dist/index-CHPV5EwG-DjM48pIC.cjs.map +1 -0
  294. package/dist/{index-BW8iNx7E.cjs → index-Cm8NIdOO.cjs} +2 -2
  295. package/dist/{index-BW8iNx7E.cjs.map → index-Cm8NIdOO.cjs.map} +1 -1
  296. package/dist/{index-tvAyXPPW-DBlMKnNB.js → index-Cw8sCyo_-BuI_jX5Z.js} +3 -3
  297. package/dist/{index-tvAyXPPW-DBlMKnNB.js.map → index-Cw8sCyo_-BuI_jX5Z.js.map} +1 -1
  298. package/dist/index-Cw8sCyo_-gxT8ADyn.cjs +2 -0
  299. package/dist/index-Cw8sCyo_-gxT8ADyn.cjs.map +1 -0
  300. package/dist/{index-CNvov0eg.js → index-Cwgh7i7X.js} +3 -3
  301. package/dist/{index-CNvov0eg.js.map → index-Cwgh7i7X.js.map} +1 -1
  302. package/dist/{index-DG3YrCr5-D3FrrXj8.js → index-Dzc_aaI9-BKklH89r.js} +2 -2
  303. package/dist/{index-DG3YrCr5-D3FrrXj8.js.map → index-Dzc_aaI9-BKklH89r.js.map} +1 -1
  304. package/dist/{index-DG3YrCr5-v7rayV3N.cjs → index-Dzc_aaI9-RIk2GRHD.cjs} +2 -2
  305. package/dist/{index-DG3YrCr5-v7rayV3N.cjs.map → index-Dzc_aaI9-RIk2GRHD.cjs.map} +1 -1
  306. package/dist/{index-BmCqpO1B.js → index-zZjQEHlm.js} +2 -2
  307. package/dist/{index-BmCqpO1B.js.map → index-zZjQEHlm.js.map} +1 -1
  308. package/dist/index.cjs +1 -1
  309. package/dist/index.d.ts +9 -0
  310. package/dist/index.js +1 -1
  311. package/dist/{proxy-CkpFesk1.js → proxy-BYIC9BuT.js} +2 -2
  312. package/dist/{proxy-CkpFesk1.js.map → proxy-BYIC9BuT.js.map} +1 -1
  313. package/dist/{proxy-BHRoeZgd.cjs → proxy-CKadx4lC.cjs} +2 -2
  314. package/dist/{proxy-BHRoeZgd.cjs.map → proxy-CKadx4lC.cjs.map} +1 -1
  315. package/dist/style.css +1 -1
  316. package/dist/{use-in-view-sQJZ_xDO.cjs → use-in-view-CEwlc_dd.cjs} +2 -2
  317. package/dist/{use-in-view-sQJZ_xDO.cjs.map → use-in-view-CEwlc_dd.cjs.map} +1 -1
  318. package/dist/{use-in-view-yS6jzJAp.js → use-in-view-DR-UTB96.js} +2 -2
  319. package/dist/{use-in-view-yS6jzJAp.js.map → use-in-view-DR-UTB96.js.map} +1 -1
  320. package/package.json +4 -4
  321. package/dist/DropdownSelect-CtOKZHD0.js.map +0 -1
  322. package/dist/DropdownSelect-DBDM64B5.cjs.map +0 -1
  323. package/dist/GraphEl-C6yjl1VM.cjs +0 -2
  324. package/dist/GraphEl-C6yjl1VM.cjs.map +0 -1
  325. package/dist/GraphEl-CqWzvOyr.js.map +0 -1
  326. package/dist/Modal-DVVwpKhP.js.map +0 -1
  327. package/dist/Modal-tXZlLE5s.cjs +0 -46
  328. package/dist/Modal-tXZlLE5s.cjs.map +0 -1
  329. package/dist/RegressionLine-mH7UKOPi.js.map +0 -1
  330. package/dist/RegressionLine-xKdiJ8sw.cjs +0 -2
  331. package/dist/RegressionLine-xKdiJ8sw.cjs.map +0 -1
  332. package/dist/checkIfMultiple-BXbHUCWM.cjs +0 -12
  333. package/dist/checkIfMultiple-BXbHUCWM.cjs.map +0 -1
  334. package/dist/checkIfMultiple-ChTJk2Tk.js.map +0 -1
  335. package/dist/getSliderMarks-9cNoRkDx.js.map +0 -1
  336. package/dist/getSliderMarks-CRIbTGYV.cjs +0 -6
  337. package/dist/getSliderMarks-CRIbTGYV.cjs.map +0 -1
  338. package/dist/index-CHPV5EwG-BPSP-7Jg.js.map +0 -1
  339. package/dist/index-CHPV5EwG-DDoeWRVt.cjs +0 -44
  340. package/dist/index-CHPV5EwG-DDoeWRVt.cjs.map +0 -1
  341. package/dist/index-tvAyXPPW-DPOG-C2i.cjs +0 -2
  342. package/dist/index-tvAyXPPW-DPOG-C2i.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"LineChartWithConfidenceInterval.cjs","sources":["../src/Components/Graphs/LineCharts/LineChartWithConfidenceInterval/Graph.tsx","../src/Components/Graphs/LineCharts/LineChartWithConfidenceInterval/index.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\r\nimport {\r\n line,\r\n curveMonotoneX,\r\n area,\r\n curveLinear,\r\n curveStep,\r\n curveStepAfter,\r\n curveStepBefore,\r\n} from 'd3-shape';\r\nimport { scaleLinear, scaleTime } from 'd3-scale';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { bisectCenter } from 'd3-array';\r\nimport { pointer, select } from 'd3-selection';\r\nimport { linearRegression, linearRegressionLine } from 'simple-statistics';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { motion, useInView } from 'motion/react';\r\nimport orderBy from 'lodash.orderby';\r\n\r\nimport {\r\n AnimateDataType,\r\n AnnotationSettingsDataType,\r\n ClassNameObject,\r\n CurveTypes,\r\n CustomHighlightAreaSettingsDataType,\r\n CustomLayerDataType,\r\n HighlightAreaSettingsDataType,\r\n LineChartWithConfidenceIntervalDataType,\r\n ReferenceDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { getLineEndPoint } from '@/Utils/getLineEndPoint';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { RefLineY } from '@/Components/Elements/ReferenceLine';\r\nimport { RegressionLine } from '@/Components/Elements/RegressionLine';\r\nimport { Annotation } from '@/Components/Elements/Annotations';\r\nimport { YTicksAndGridLines } from '@/Components/Elements/Axes/YTicksAndGridLines';\r\nimport { CustomArea } from '@/Components/Elements/HighlightArea/customArea';\r\nimport { HighlightArea } from '@/Components/Elements/HighlightArea';\r\n\r\ninterface Props {\r\n data: LineChartWithConfidenceIntervalDataType[];\r\n lineColor: string;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n dateFormat: string;\r\n showValues?: boolean;\r\n noOfXTicks: number;\r\n rightMargin: number;\r\n leftMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n refValues: ReferenceDataType[];\r\n highlightAreaSettings: HighlightAreaSettingsDataType[];\r\n maxValue?: number;\r\n minValue?: number;\r\n animate: AnimateDataType;\r\n rtl: boolean;\r\n strokeWidth: number;\r\n showDots: boolean;\r\n annotations: AnnotationSettingsDataType[];\r\n customHighlightAreaSettings: CustomHighlightAreaSettingsDataType[];\r\n regressionLine: boolean | string;\r\n showIntervalDots: boolean;\r\n showIntervalValues: boolean;\r\n intervalLineStrokeWidth: number;\r\n intervalLineColors: [string, string];\r\n intervalAreaColor: string;\r\n intervalAreaOpacity: number;\r\n yAxisTitle?: string;\r\n noOfYTicks: number;\r\n minDate?: string | number;\r\n maxDate?: string | number;\r\n curveType: CurveTypes;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n precision: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\ninterface FormattedDataType {\r\n y: number;\r\n date: Date;\r\n yMin: number;\r\n yMax: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n lineColor,\r\n suffix,\r\n prefix,\r\n dateFormat,\r\n highlightAreaSettings,\r\n showValues,\r\n noOfXTicks,\r\n rightMargin,\r\n leftMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n minValue,\r\n maxValue,\r\n animate,\r\n rtl,\r\n strokeWidth,\r\n showDots,\r\n annotations,\r\n customHighlightAreaSettings,\r\n regressionLine,\r\n showIntervalDots,\r\n showIntervalValues,\r\n intervalLineStrokeWidth,\r\n intervalLineColors,\r\n intervalAreaColor,\r\n intervalAreaOpacity,\r\n yAxisTitle,\r\n noOfYTicks,\r\n minDate,\r\n maxDate,\r\n curveType,\r\n styles,\r\n classNames,\r\n precision,\r\n customLayers,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const [hasAnimatedOnce, setHasAnimatedOnce] = useState(false);\r\n\r\n useEffect(() => {\r\n if (isInView && !hasAnimatedOnce) {\r\n const timeout = setTimeout(\r\n () => {\r\n setHasAnimatedOnce(true);\r\n },\r\n (animate.duration + 0.5) * 1000,\r\n );\r\n return () => clearTimeout(timeout);\r\n }\r\n }, [isInView, hasAnimatedOnce, animate.duration]);\r\n const curve =\r\n curveType === 'linear'\r\n ? curveLinear\r\n : curveType === 'step'\r\n ? curveStep\r\n : curveType === 'stepAfter'\r\n ? curveStepAfter\r\n : curveType === 'stepBefore'\r\n ? curveStepBefore\r\n : curveMonotoneX;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = 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: yAxisTitle ? leftMargin + 30 : leftMargin,\r\n right: rightMargin,\r\n };\r\n const MouseoverRectRef = useRef(null);\r\n const dataFormatted: FormattedDataType[] = orderBy(\r\n data\r\n .filter(d => !checkIfNullOrUndefined(d.y))\r\n .map(d => ({\r\n date: parse(`${d.date}`, dateFormat, new Date()),\r\n y: d.y as number,\r\n yMin: checkIfNullOrUndefined(d.yMin) ? (d.y as number) : (d.yMin as number),\r\n yMax: checkIfNullOrUndefined(d.yMax) ? (d.y as number) : (d.yMax as number),\r\n data: d.data,\r\n })),\r\n ['date'],\r\n ['asc'],\r\n );\r\n const highlightAreaSettingsFormatted = highlightAreaSettings.map(d => ({\r\n ...d,\r\n coordinates: [\r\n d.coordinates[0] === null ? null : parse(`${d.coordinates[0]}`, dateFormat, new Date()),\r\n d.coordinates[1] === null ? null : parse(`${d.coordinates[1]}`, dateFormat, new Date()),\r\n ],\r\n }));\r\n const customHighlightAreaSettingsFormatted = customHighlightAreaSettings.map(d => ({\r\n ...d,\r\n coordinates: d.coordinates.map((el, j) =>\r\n j % 2 === 0 ? parse(`${el}`, dateFormat, new Date()) : (el as number),\r\n ),\r\n }));\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n const minYear = minDate ? parse(`${minDate}`, dateFormat, new Date()) : dataFormatted[0].date;\r\n const maxYear = maxDate\r\n ? parse(`${maxDate}`, dateFormat, new Date())\r\n : dataFormatted[dataFormatted.length - 1].date;\r\n const minParam: number = !checkIfNullOrUndefined(minValue)\r\n ? (minValue as number)\r\n : Math.min(...dataFormatted.map(d => Math.min(d.y, d.yMax, d.yMin)))\r\n ? Math.min(...dataFormatted.map(d => Math.min(d.y, d.yMax, d.yMin))) > 0\r\n ? 0\r\n : Math.min(...dataFormatted.map(d => Math.min(d.y, d.yMax, d.yMin)))\r\n : 0;\r\n const maxParam: number = Math.max(...dataFormatted.map(d => Math.max(d.y, d.yMax, d.yMin)))\r\n ? Math.max(...dataFormatted.map(d => Math.max(d.y, d.yMax, d.yMin)))\r\n : 0;\r\n const x = scaleTime().domain([minYear, maxYear]).range([0, graphWidth]);\r\n const y = scaleLinear()\r\n .domain([\r\n minParam,\r\n checkIfNullOrUndefined(maxValue) ? (maxParam > 0 ? maxParam : 0) : (maxValue as number),\r\n ])\r\n .range([graphHeight, 0])\r\n .nice();\r\n\r\n const lineShape = line<FormattedDataType>()\r\n .x(d => x(d.date))\r\n .y(d => y(d.y))\r\n .curve(curve);\r\n\r\n const lineShapeMin = line<FormattedDataType>()\r\n .x(d => x(d.date))\r\n .y(d => y(d.yMin))\r\n .curve(curve);\r\n\r\n const lineShapeMax = line<FormattedDataType>()\r\n .x(d => x(d.date))\r\n .y(d => y(d.yMax))\r\n .curve(curve);\r\n\r\n const areaShape = area<FormattedDataType>()\r\n .x(d => x(d.date))\r\n .y0(d => y(d.yMin))\r\n .y1(d => y(d.yMax))\r\n .curve(curve);\r\n\r\n const yTicks = y.ticks(noOfYTicks);\r\n\r\n const xTicks = x.ticks(noOfXTicks);\r\n\r\n useEffect(() => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mousemove = (event: any) => {\r\n const selectedData =\r\n dataFormatted[\r\n bisectCenter(\r\n dataFormatted.map(d => d.date),\r\n x.invert(pointer(event)[0]),\r\n 0,\r\n )\r\n ];\r\n setMouseOverData(selectedData || dataFormatted[dataFormatted.length - 1]);\r\n onSeriesMouseOver?.(selectedData || dataFormatted[dataFormatted.length - 1]);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n };\r\n const mouseout = () => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n };\r\n select(MouseoverRectRef.current).on('mousemove', mousemove).on('mouseout', mouseout);\r\n }, [x, dataFormatted, onSeriesMouseOver]);\r\n const regressionLineParam = linearRegression(\r\n dataFormatted\r\n .filter(d => !checkIfNullOrUndefined(d.date) && !checkIfNullOrUndefined(d.y))\r\n .map(d => [x(d.date), y(d.y as number)]),\r\n );\r\n const predict = linearRegressionLine(regressionLineParam);\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 <HighlightArea\r\n areaSettings={highlightAreaSettingsFormatted}\r\n width={graphWidth}\r\n height={graphHeight}\r\n scale={x}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n <CustomArea\r\n areaSettings={customHighlightAreaSettingsFormatted}\r\n scaleX={x}\r\n scaleY={y}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n <g>\r\n <YTicksAndGridLines\r\n values={yTicks.filter(d => d !== 0)}\r\n y={yTicks.filter(d => d !== 0).map(d => y(d))}\r\n x1={0 - leftMargin}\r\n x2={graphWidth + margin.right}\r\n styles={{\r\n gridLines: styles?.yAxis?.gridLines,\r\n labels: styles?.yAxis?.labels,\r\n }}\r\n classNames={{\r\n gridLines: classNames?.yAxis?.gridLines,\r\n labels: classNames?.yAxis?.labels,\r\n }}\r\n suffix={suffix}\r\n prefix={prefix}\r\n labelType='secondary'\r\n showGridLines\r\n labelPos='vertical'\r\n precision={precision}\r\n />\r\n <Axis\r\n y1={y(minParam < 0 ? 0 : minParam)}\r\n y2={y(minParam < 0 ? 0 : minParam)}\r\n x1={0 - leftMargin}\r\n x2={graphWidth + margin.right}\r\n label={numberFormattingFunction(\r\n minParam < 0 ? 0 : minParam,\r\n 'NA',\r\n precision,\r\n prefix,\r\n suffix,\r\n )}\r\n labelPos={{\r\n x: 0 - leftMargin,\r\n y: y(minParam < 0 ? 0 : minParam),\r\n dx: 0,\r\n dy: maxParam < 0 ? '1em' : -5,\r\n }}\r\n classNames={{\r\n axis: classNames?.xAxis?.axis,\r\n label: classNames?.yAxis?.labels,\r\n }}\r\n styles={{\r\n axis: styles?.xAxis?.axis,\r\n label: styles?.yAxis?.labels,\r\n }}\r\n />\r\n <AxisTitle\r\n x={0 - leftMargin + 15}\r\n y={graphHeight / 2}\r\n style={styles?.yAxis?.title}\r\n className={classNames?.yAxis?.title}\r\n text={yAxisTitle}\r\n rotate90\r\n />\r\n </g>\r\n <g>\r\n {xTicks.map((d, i) => (\r\n <g key={i}>\r\n <text\r\n y={graphHeight}\r\n x={x(d)}\r\n style={{ textAnchor: 'middle' }}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs'\r\n dy={15}\r\n >\r\n {format(d, dateFormat)}\r\n </text>\r\n </g>\r\n ))}\r\n </g>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <motion.path\r\n style={{\r\n fill: intervalAreaColor,\r\n }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, d: areaShape(dataFormatted) || '' },\r\n whileInView: {\r\n opacity: intervalAreaOpacity,\r\n d: areaShape(dataFormatted) || '',\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n {intervalLineStrokeWidth ? (\r\n <>\r\n <motion.path\r\n style={{\r\n stroke: intervalLineColors[0],\r\n fill: 'none',\r\n strokeWidth: intervalLineStrokeWidth,\r\n }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: lineShapeMin(dataFormatted) || '',\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: lineShapeMin(dataFormatted) || '',\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 />\r\n <motion.path\r\n style={{\r\n stroke: intervalLineColors[1],\r\n fill: 'none',\r\n strokeWidth: intervalLineStrokeWidth,\r\n }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: lineShapeMax(dataFormatted) || '',\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: lineShapeMax(dataFormatted) || '',\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 />\r\n </>\r\n ) : null}\r\n <motion.path\r\n style={{\r\n stroke: lineColor,\r\n fill: 'none',\r\n strokeWidth,\r\n }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: lineShape(dataFormatted) || '',\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: lineShape(dataFormatted) || '',\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 />\r\n {mouseOverData ? (\r\n <line\r\n y1={0}\r\n y2={graphHeight}\r\n x1={x(mouseOverData.date)}\r\n x2={x(mouseOverData.date)}\r\n className={cn(\r\n 'undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100',\r\n classNames?.mouseOverLine,\r\n )}\r\n style={styles?.mouseOverLine}\r\n />\r\n ) : null}\r\n <g>\r\n {dataFormatted.map((d, i) => (\r\n <motion.g key={i}>\r\n {!checkIfNullOrUndefined(d.y) ? (\r\n <>\r\n {showDots ? (\r\n <motion.circle\r\n r={\r\n graphWidth / dataFormatted.length < 5\r\n ? 0\r\n : graphWidth / dataFormatted.length < 20\r\n ? 2\r\n : 4\r\n }\r\n style={{ fill: lineColor }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, cx: x(d.date), cy: y(d.y) },\r\n whileInView: {\r\n opacity: 1,\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n cx: x(d.date),\r\n cy: y(d.y),\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n ) : null}\r\n {showIntervalDots ? (\r\n <>\r\n <motion.circle\r\n r={\r\n graphWidth / dataFormatted.length < 5\r\n ? 0\r\n : graphWidth / dataFormatted.length < 20\r\n ? 2\r\n : 4\r\n }\r\n style={{ fill: intervalLineColors[0] }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, cx: x(d.date), cy: y(d.yMin) },\r\n whileInView: {\r\n opacity: 1,\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n cx: x(d.date),\r\n cy: y(d.yMin),\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n <motion.circle\r\n r={\r\n graphWidth / dataFormatted.length < 5\r\n ? 0\r\n : graphWidth / dataFormatted.length < 20\r\n ? 2\r\n : 4\r\n }\r\n style={{ fill: intervalLineColors[1] }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, cx: x(d.date), cy: y(d.yMax) },\r\n whileInView: {\r\n opacity: 1,\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n cx: x(d.date),\r\n cy: y(d.yMax),\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n </>\r\n ) : null}\r\n {showValues ? (\r\n <motion.text\r\n dy={-8}\r\n style={{\r\n fill: lineColor,\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-value text-xs font-bold',\r\n classNames?.graphObjectValues,\r\n )}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, x: x(d.date), y: y(d.y) },\r\n whileInView: {\r\n opacity: 1,\r\n x: x(d.date),\r\n y: y(d.y),\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n >\r\n {numberFormattingFunction(d.y, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n ) : null}\r\n {showIntervalValues ? (\r\n <>\r\n <motion.text\r\n dy='1em'\r\n style={{\r\n fill: intervalLineColors[0],\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn('text-xs font-bold', classNames?.graphObjectValues)}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, x: x(d.date), y: y(d.yMin) },\r\n whileInView: {\r\n opacity: 1,\r\n x: x(d.date),\r\n y: y(d.yMin),\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n >\r\n {numberFormattingFunction(d.yMin, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n <motion.text\r\n dy={-8}\r\n style={{\r\n fill: intervalLineColors[1],\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn('text-xs font-bold', classNames?.graphObjectValues)}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, x: x(d.date), y: y(d.yMax) },\r\n whileInView: {\r\n opacity: 1,\r\n x: x(d.date),\r\n y: y(d.yMax),\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n >\r\n {numberFormattingFunction(d.yMax, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n </>\r\n ) : null}\r\n </>\r\n ) : null}\r\n </motion.g>\r\n ))}\r\n </g>\r\n {refValues ? (\r\n <>\r\n {refValues.map((el, i) => (\r\n <RefLineY\r\n key={i}\r\n text={el.text}\r\n color={el.color}\r\n y={y(el.value as number)}\r\n x1={0 - leftMargin}\r\n x2={graphWidth + margin.right}\r\n classNames={el.classNames}\r\n styles={el.styles}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n ))}\r\n </>\r\n ) : null}\r\n <g>\r\n {annotations.map((d, i) => {\r\n const endPoints = getLineEndPoint(\r\n {\r\n x: d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0),\r\n y: d.yCoordinate\r\n ? y(d.yCoordinate as number) + (d.yOffset || 0) - 8\r\n : 0 + (d.yOffset || 0) - 8,\r\n },\r\n {\r\n x: d.xCoordinate ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) : 0,\r\n y: d.yCoordinate ? y(d.yCoordinate as number) : 0,\r\n },\r\n checkIfNullOrUndefined(d.connectorRadius) ? 3.5 : (d.connectorRadius as number),\r\n );\r\n const connectorSettings = d.showConnector\r\n ? {\r\n y1: endPoints.y,\r\n x1: endPoints.x,\r\n y2: d.yCoordinate\r\n ? y(d.yCoordinate as number) + (d.yOffset || 0)\r\n : 0 + (d.yOffset || 0),\r\n x2: d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0),\r\n cy: d.yCoordinate ? y(d.yCoordinate as number) : 0,\r\n cx: d.xCoordinate ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) : 0,\r\n circleRadius: checkIfNullOrUndefined(d.connectorRadius)\r\n ? 3.5\r\n : (d.connectorRadius as number),\r\n strokeWidth: d.showConnector === true ? 2 : Math.min(d.showConnector || 0, 1),\r\n }\r\n : undefined;\r\n const labelSettings = {\r\n y: d.yCoordinate\r\n ? y(d.yCoordinate as number) + (d.yOffset || 0) - 8\r\n : 0 + (d.yOffset || 0) - 8,\r\n x: rtl\r\n ? 0\r\n : d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0),\r\n width: rtl\r\n ? d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0)\r\n : graphWidth +\r\n margin.right -\r\n (d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0)),\r\n maxWidth: d.maxWidth,\r\n fontWeight: d.fontWeight,\r\n align: d.align,\r\n };\r\n return (\r\n <Annotation\r\n key={i}\r\n color={d.color}\r\n connectorsSettings={connectorSettings}\r\n labelSettings={labelSettings}\r\n text={d.text}\r\n classNames={d.classNames}\r\n styles={d.styles}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n );\r\n })}\r\n </g>\r\n <g>\r\n {regressionLine ? (\r\n <RegressionLine\r\n x1={0}\r\n x2={graphWidth}\r\n y1={predict(0)}\r\n y2={predict(graphWidth)}\r\n graphHeight={graphHeight}\r\n graphWidth={graphWidth}\r\n className={classNames?.regLine}\r\n style={styles?.regLine}\r\n color={typeof regressionLine === 'string' ? regressionLine : undefined}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n ) : null}\r\n </g>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n <rect\r\n ref={MouseoverRectRef}\r\n style={{\r\n fill: 'none',\r\n pointerEvents: 'all',\r\n }}\r\n width={graphWidth}\r\n height={graphHeight}\r\n />\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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n AnnotationSettingsDataType,\r\n CustomHighlightAreaSettingsDataType,\r\n Languages,\r\n LineChartWithConfidenceIntervalDataType,\r\n ReferenceDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n HighlightAreaSettingsDataType,\r\n CurveTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ColorLegend } from '@/Components/Elements/ColorLegend';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: LineChartWithConfidenceIntervalDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors of the line */\r\n lineColor?: string;\r\n /** Colors of the interval area */\r\n intervalAreaColor?: string;\r\n /** Colors of the top and bottom lines of the interval */\r\n intervalLineColors?: [string, string];\r\n /** Colors for the legend */\r\n colorLegendColors?: string[];\r\n /** Domain of colors for the legend */\r\n colorLegendDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: 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 /** Reference values for comparison */\r\n refValues?: ReferenceDataType[];\r\n /** Maximum value of the date for the chart */\r\n maxDate?: string | number;\r\n /** Minimum value of the date for the chart */\r\n minDate?: string | number;\r\n /** No. of ticks on the x-axis */\r\n noOfXTicks?: number;\r\n /** No. of ticks on the y-axis */\r\n noOfYTicks?: number;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of values of the interval area */\r\n showIntervalValues?: boolean;\r\n /** Toggle visibility of dots on the line */\r\n showDots?: boolean;\r\n /** Toggle visibility of dots on the line of te interval area */\r\n showIntervalDots?: boolean;\r\n /** Stroke width of the line */\r\n strokeWidth?: number;\r\n /** Stroke width of the lines of the interval area */\r\n intervalLineStrokeWidth?: number;\r\n /** Opacity of the interval area */\r\n intervalAreaOpacity?: number;\r\n /** Toggle the initial animation of the line. If the type is number then it uses the number as the time in seconds for animation. */\r\n animate?: boolean | AnimateDataType;\r\n /** Format of the date in the data object. Available formats can be found [here](https://date-fns.org/docs/format) */\r\n dateFormat?: string;\r\n /** Title for the Y-axis */\r\n yAxisTitle?: string;\r\n /** Annotations on the chart */\r\n annotations?: AnnotationSettingsDataType[];\r\n /** Highlighted area(square) on the chart */\r\n highlightAreaSettings?: HighlightAreaSettingsDataType[];\r\n /** Highlighted area(custom shape) on the chart */\r\n customHighlightAreaSettings?: CustomHighlightAreaSettingsDataType[];\r\n /** Toggles the visibility of the regression line for the data. If the type is string then string is use to define the color of the line. */\r\n regressionLine?: boolean | string;\r\n /** Curve type for the line */\r\n curveType?: CurveTypes;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n\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 /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_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 LineChartWithConfidenceInterval(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n noOfXTicks = 10,\r\n dateFormat = 'yyyy',\r\n showValues = false,\r\n backgroundColor = false,\r\n padding,\r\n lineColor,\r\n leftMargin = 30,\r\n rightMargin = 30,\r\n topMargin = 20,\r\n bottomMargin = 25,\r\n tooltip,\r\n refValues = [],\r\n highlightAreaSettings = [],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n graphID,\r\n minValue,\r\n maxValue,\r\n regressionLine = false,\r\n showIntervalDots = false,\r\n showIntervalValues = false,\r\n intervalLineStrokeWidth = 0,\r\n intervalLineColors = [Colors.light.grays['gray-500'], Colors.light.grays['gray-500']],\r\n intervalAreaColor = Colors.primaryColors['blue-100'],\r\n intervalAreaOpacity = 0.4,\r\n graphDownload = false,\r\n dataDownload = false,\r\n animate = false,\r\n language = 'en',\r\n minHeight = 0,\r\n strokeWidth = 2,\r\n showDots = true,\r\n annotations = [],\r\n customHighlightAreaSettings = [],\r\n theme = 'light',\r\n ariaLabel,\r\n yAxisTitle,\r\n noOfYTicks = 5,\r\n minDate,\r\n maxDate,\r\n colorLegendTitle,\r\n colorLegendColors,\r\n colorLegendDomain,\r\n curveType = 'curve',\r\n styles,\r\n classNames,\r\n precision = 2,\r\n customLayers = [],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n width ? 'w-fit' : 'w-full',\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a line chart that highlights the difference between two datasets over time.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {colorLegendColors && colorLegendDomain ? (\r\n <ColorLegend\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={colorLegendColors}\r\n colorDomain={colorLegendDomain}\r\n showNAColor={false}\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n lineColor={lineColor || Colors.primaryColors['blue-600']}\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n suffix={suffix}\r\n prefix={prefix}\r\n dateFormat={dateFormat}\r\n showValues={showValues}\r\n noOfXTicks={noOfXTicks}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n highlightAreaSettings={highlightAreaSettings}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n refValues={refValues}\r\n minValue={minValue}\r\n maxValue={maxValue}\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 rtl={language === 'he' || language === 'ar'}\r\n strokeWidth={strokeWidth}\r\n showDots={showDots}\r\n annotations={annotations}\r\n customHighlightAreaSettings={customHighlightAreaSettings}\r\n regressionLine={regressionLine}\r\n showIntervalDots={showIntervalDots}\r\n showIntervalValues={showIntervalValues}\r\n intervalLineStrokeWidth={intervalLineStrokeWidth}\r\n intervalLineColors={intervalLineColors}\r\n intervalAreaColor={intervalAreaColor}\r\n intervalAreaOpacity={intervalAreaOpacity}\r\n yAxisTitle={yAxisTitle}\r\n noOfYTicks={noOfYTicks}\r\n minDate={minDate}\r\n maxDate={maxDate}\r\n curveType={curveType}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["Graph","props","data","width","height","lineColor","suffix","prefix","dateFormat","highlightAreaSettings","showValues","noOfXTicks","rightMargin","leftMargin","topMargin","bottomMargin","tooltip","onSeriesMouseOver","refValues","minValue","maxValue","animate","rtl","strokeWidth","showDots","annotations","customHighlightAreaSettings","regressionLine","showIntervalDots","showIntervalValues","intervalLineStrokeWidth","intervalLineColors","intervalAreaColor","intervalAreaOpacity","yAxisTitle","noOfYTicks","minDate","maxDate","curveType","styles","classNames","precision","customLayers","svgRef","useRef","isInView","useInView","hasAnimatedOnce","setHasAnimatedOnce","useState","useEffect","timeout","curve","curveLinear","curveStep","curveStepAfter","curveStepBefore","curveMonotoneX","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","margin","MouseoverRectRef","dataFormatted","orderBy","d","checkIfNullOrUndefined","parse","highlightAreaSettingsFormatted","customHighlightAreaSettingsFormatted","el","j","graphWidth","graphHeight","minYear","maxYear","minParam","maxParam","x","scaleTime","y","scaleLinear","lineShape","line","lineShapeMin","lineShapeMax","areaShape","area","yTicks","xTicks","mousemove","event","selectedData","bisectCenter","pointer","mouseout","select","regressionLineParam","linearRegression","predict","linearRegressionLine","jsxs","Fragment","jsx","motion","HighlightArea","CustomArea","YTicksAndGridLines","Axis","numberFormattingFunction","AxisTitle","i","format","cn","RefLineY","endPoints","getLineEndPoint","connectorSettings","labelSettings","Annotation","RegressionLine","Tooltip","LineChartWithConfidenceInterval","graphTitle","sources","graphDescription","footNote","backgroundColor","padding","relativeHeight","graphID","Colors","graphDownload","dataDownload","language","minHeight","theme","ariaLabel","colorLegendTitle","colorLegendColors","colorLegendDomain","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","resizeObserver","entries","GraphHeader","EmptyState","ColorLegend","GraphFooter"],"mappings":"srCAiGO,SAASA,GAAMC,GAAc,CAClC,KAAM,CACJ,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,UAAAC,EACA,OAAAC,EACA,OAAAC,EACA,WAAAC,EACA,sBAAAC,EACA,WAAAC,EACA,WAAAC,GACA,YAAAC,GACA,WAAAC,EACA,UAAAC,EACA,aAAAC,EACA,QAAAC,EACA,kBAAAC,EACA,UAAAC,EACA,SAAAC,EACA,SAAAC,EACA,QAAAC,EACA,IAAAC,EACA,YAAAC,GACA,SAAAC,EACA,YAAAC,GACA,4BAAAC,GACA,eAAAC,EACA,iBAAAC,GACA,mBAAAC,GACA,wBAAAC,EACA,mBAAAC,EACA,kBAAAC,GACA,oBAAAC,GACA,WAAAC,EACA,WAAAC,GACA,QAAAC,EACA,QAAAC,EACA,UAAAC,EACA,OAAAC,EACA,WAAAC,EACA,UAAAC,EACA,aAAAC,CAAA,EACEzC,GACE0C,GAASC,EAAAA,OAAO,IAAI,EACpBC,EAAWC,GAAAA,UAAUH,GAAQ,CACjC,KAAMtB,EAAQ,KACd,OAAQA,EAAQ,MAAA,CACjB,EACK,CAAC0B,EAAiBC,EAAkB,EAAIC,EAAAA,SAAS,EAAK,EAE5DC,EAAAA,UAAU,IAAM,CACd,GAAIL,GAAY,CAACE,EAAiB,CAChC,MAAMI,EAAU,WACd,IAAM,CACJH,GAAmB,EAAI,CACzB,GACC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AA,EAEpD,IAAKoH,IAAa,MAAQA,IAAa,KACvC,YAAAlH,EACA,SAAAC,EACA,YAAAC,GACA,4BAAAC,EACA,eAAAC,GACA,iBAAAC,EACA,mBAAAC,EACA,wBAAAC,GACA,mBAAAC,GACA,kBAAAC,EACA,oBAAAC,GACA,WAAAC,EACA,WAAAC,EACA,QAAAC,GACA,QAAAC,GACA,UAAAC,EACA,OAAAC,EACA,WAAAC,EACA,UAAAC,GACA,aAAAC,EAAA,CAAA,EAEA,IAAA,CAAA,CACN,CAAA,CACF,CAAA,CAEJ,EACCqF,GAAWE,EACVvB,EAAAA,kBAAAA,IAACiD,GAAAA,YAAA,CACC,OAAQ,CAAE,SAAUpH,GAAQ,SAAU,OAAQA,GAAQ,MAAA,EACtD,WAAY,CACV,SAAUC,GAAY,SACtB,OAAQA,GAAY,MAAA,EAEtB,QAAAuF,EACA,SAAAE,EACA,MAAA9H,CAAA,CAAA,EAEA,IAAA,CAAA,CACN,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAGN"}
1
+ {"version":3,"file":"LineChartWithConfidenceInterval.cjs","sources":["../src/Components/Graphs/LineCharts/LineChartWithConfidenceInterval/Graph.tsx","../src/Components/Graphs/LineCharts/LineChartWithConfidenceInterval/index.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\r\nimport {\r\n line,\r\n curveMonotoneX,\r\n area,\r\n curveLinear,\r\n curveStep,\r\n curveStepAfter,\r\n curveStepBefore,\r\n} from 'd3-shape';\r\nimport { scaleLinear, scaleTime } from 'd3-scale';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { bisectCenter } from 'd3-array';\r\nimport { pointer, select } from 'd3-selection';\r\nimport { linearRegression, linearRegressionLine } from 'simple-statistics';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { motion, useInView } from 'motion/react';\r\nimport orderBy from 'lodash.orderby';\r\n\r\nimport {\r\n AnimateDataType,\r\n AnnotationSettingsDataType,\r\n ClassNameObject,\r\n CurveTypes,\r\n CustomHighlightAreaSettingsDataType,\r\n CustomLayerDataType,\r\n HighlightAreaSettingsDataType,\r\n LineChartWithConfidenceIntervalDataType,\r\n ReferenceDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { getLineEndPoint } from '@/Utils/getLineEndPoint';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { RefLineY } from '@/Components/Elements/ReferenceLine';\r\nimport { RegressionLine } from '@/Components/Elements/RegressionLine';\r\nimport { Annotation } from '@/Components/Elements/Annotations';\r\nimport { YTicksAndGridLines } from '@/Components/Elements/Axes/YTicksAndGridLines';\r\nimport { CustomArea } from '@/Components/Elements/HighlightArea/customArea';\r\nimport { HighlightArea } from '@/Components/Elements/HighlightArea';\r\n\r\ninterface Props {\r\n data: LineChartWithConfidenceIntervalDataType[];\r\n lineColor: string;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n dateFormat: string;\r\n showValues?: boolean;\r\n noOfXTicks: number;\r\n rightMargin: number;\r\n leftMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n refValues: ReferenceDataType[];\r\n highlightAreaSettings: HighlightAreaSettingsDataType[];\r\n maxValue?: number;\r\n minValue?: number;\r\n animate: AnimateDataType;\r\n rtl: boolean;\r\n strokeWidth: number;\r\n showDots: boolean;\r\n annotations: AnnotationSettingsDataType[];\r\n customHighlightAreaSettings: CustomHighlightAreaSettingsDataType[];\r\n regressionLine: boolean | string;\r\n showIntervalDots: boolean;\r\n showIntervalValues: boolean;\r\n intervalLineStrokeWidth: number;\r\n intervalLineColors: [string, string];\r\n intervalAreaColor: string;\r\n intervalAreaOpacity: number;\r\n yAxisTitle?: string;\r\n noOfYTicks: number;\r\n minDate?: string | number;\r\n maxDate?: string | number;\r\n curveType: CurveTypes;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n precision: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\ninterface FormattedDataType {\r\n y: number;\r\n date: Date;\r\n yMin: number;\r\n yMax: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n lineColor,\r\n suffix,\r\n prefix,\r\n dateFormat,\r\n highlightAreaSettings,\r\n showValues,\r\n noOfXTicks,\r\n rightMargin,\r\n leftMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n minValue,\r\n maxValue,\r\n animate,\r\n rtl,\r\n strokeWidth,\r\n showDots,\r\n annotations,\r\n customHighlightAreaSettings,\r\n regressionLine,\r\n showIntervalDots,\r\n showIntervalValues,\r\n intervalLineStrokeWidth,\r\n intervalLineColors,\r\n intervalAreaColor,\r\n intervalAreaOpacity,\r\n yAxisTitle,\r\n noOfYTicks,\r\n minDate,\r\n maxDate,\r\n curveType,\r\n styles,\r\n classNames,\r\n precision,\r\n customLayers,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const [hasAnimatedOnce, setHasAnimatedOnce] = useState(false);\r\n\r\n useEffect(() => {\r\n if (isInView && !hasAnimatedOnce) {\r\n const timeout = setTimeout(\r\n () => {\r\n setHasAnimatedOnce(true);\r\n },\r\n (animate.duration + 0.5) * 1000,\r\n );\r\n return () => clearTimeout(timeout);\r\n }\r\n }, [isInView, hasAnimatedOnce, animate.duration]);\r\n const curve =\r\n curveType === 'linear'\r\n ? curveLinear\r\n : curveType === 'step'\r\n ? curveStep\r\n : curveType === 'stepAfter'\r\n ? curveStepAfter\r\n : curveType === 'stepBefore'\r\n ? curveStepBefore\r\n : curveMonotoneX;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = 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: yAxisTitle ? leftMargin + 30 : leftMargin,\r\n right: rightMargin,\r\n };\r\n const MouseoverRectRef = useRef(null);\r\n const dataFormatted: FormattedDataType[] = orderBy(\r\n data\r\n .filter(d => !checkIfNullOrUndefined(d.y))\r\n .map(d => ({\r\n date: parse(`${d.date}`, dateFormat, new Date()),\r\n y: d.y as number,\r\n yMin: checkIfNullOrUndefined(d.yMin) ? (d.y as number) : (d.yMin as number),\r\n yMax: checkIfNullOrUndefined(d.yMax) ? (d.y as number) : (d.yMax as number),\r\n data: d.data,\r\n })),\r\n ['date'],\r\n ['asc'],\r\n );\r\n const highlightAreaSettingsFormatted = highlightAreaSettings.map(d => ({\r\n ...d,\r\n coordinates: [\r\n d.coordinates[0] === null ? null : parse(`${d.coordinates[0]}`, dateFormat, new Date()),\r\n d.coordinates[1] === null ? null : parse(`${d.coordinates[1]}`, dateFormat, new Date()),\r\n ],\r\n }));\r\n const customHighlightAreaSettingsFormatted = customHighlightAreaSettings.map(d => ({\r\n ...d,\r\n coordinates: d.coordinates.map((el, j) =>\r\n j % 2 === 0 ? parse(`${el}`, dateFormat, new Date()) : (el as number),\r\n ),\r\n }));\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n const minYear = minDate ? parse(`${minDate}`, dateFormat, new Date()) : dataFormatted[0].date;\r\n const maxYear = maxDate\r\n ? parse(`${maxDate}`, dateFormat, new Date())\r\n : dataFormatted[dataFormatted.length - 1].date;\r\n const minParam: number = !checkIfNullOrUndefined(minValue)\r\n ? (minValue as number)\r\n : Math.min(...dataFormatted.map(d => Math.min(d.y, d.yMax, d.yMin)))\r\n ? Math.min(...dataFormatted.map(d => Math.min(d.y, d.yMax, d.yMin))) > 0\r\n ? 0\r\n : Math.min(...dataFormatted.map(d => Math.min(d.y, d.yMax, d.yMin)))\r\n : 0;\r\n const maxParam: number = Math.max(...dataFormatted.map(d => Math.max(d.y, d.yMax, d.yMin)))\r\n ? Math.max(...dataFormatted.map(d => Math.max(d.y, d.yMax, d.yMin)))\r\n : 0;\r\n const x = scaleTime().domain([minYear, maxYear]).range([0, graphWidth]);\r\n const y = scaleLinear()\r\n .domain([\r\n minParam,\r\n checkIfNullOrUndefined(maxValue) ? (maxParam > 0 ? maxParam : 0) : (maxValue as number),\r\n ])\r\n .range([graphHeight, 0])\r\n .nice();\r\n\r\n const lineShape = line<FormattedDataType>()\r\n .x(d => x(d.date))\r\n .y(d => y(d.y))\r\n .curve(curve);\r\n\r\n const lineShapeMin = line<FormattedDataType>()\r\n .x(d => x(d.date))\r\n .y(d => y(d.yMin))\r\n .curve(curve);\r\n\r\n const lineShapeMax = line<FormattedDataType>()\r\n .x(d => x(d.date))\r\n .y(d => y(d.yMax))\r\n .curve(curve);\r\n\r\n const areaShape = area<FormattedDataType>()\r\n .x(d => x(d.date))\r\n .y0(d => y(d.yMin))\r\n .y1(d => y(d.yMax))\r\n .curve(curve);\r\n\r\n const yTicks = y.ticks(noOfYTicks);\r\n\r\n const xTicks = x.ticks(noOfXTicks);\r\n\r\n useEffect(() => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mousemove = (event: any) => {\r\n const selectedData =\r\n dataFormatted[\r\n bisectCenter(\r\n dataFormatted.map(d => d.date),\r\n x.invert(pointer(event)[0]),\r\n 0,\r\n )\r\n ];\r\n setMouseOverData(selectedData || dataFormatted[dataFormatted.length - 1]);\r\n onSeriesMouseOver?.(selectedData || dataFormatted[dataFormatted.length - 1]);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n };\r\n const mouseout = () => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n };\r\n select(MouseoverRectRef.current).on('mousemove', mousemove).on('mouseout', mouseout);\r\n }, [x, dataFormatted, onSeriesMouseOver]);\r\n const regressionLineParam = linearRegression(\r\n dataFormatted\r\n .filter(d => !checkIfNullOrUndefined(d.date) && !checkIfNullOrUndefined(d.y))\r\n .map(d => [x(d.date), y(d.y as number)]),\r\n );\r\n const predict = linearRegressionLine(regressionLineParam);\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 <HighlightArea\r\n areaSettings={highlightAreaSettingsFormatted}\r\n width={graphWidth}\r\n height={graphHeight}\r\n scale={x}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n <CustomArea\r\n areaSettings={customHighlightAreaSettingsFormatted}\r\n scaleX={x}\r\n scaleY={y}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n <g>\r\n <YTicksAndGridLines\r\n values={yTicks.filter(d => d !== 0)}\r\n y={yTicks.filter(d => d !== 0).map(d => y(d))}\r\n x1={0 - leftMargin}\r\n x2={graphWidth + margin.right}\r\n styles={{\r\n gridLines: styles?.yAxis?.gridLines,\r\n labels: styles?.yAxis?.labels,\r\n }}\r\n classNames={{\r\n gridLines: classNames?.yAxis?.gridLines,\r\n labels: classNames?.yAxis?.labels,\r\n }}\r\n suffix={suffix}\r\n prefix={prefix}\r\n labelType='secondary'\r\n showGridLines\r\n labelPos='vertical'\r\n precision={precision}\r\n />\r\n <Axis\r\n y1={y(minParam < 0 ? 0 : minParam)}\r\n y2={y(minParam < 0 ? 0 : minParam)}\r\n x1={0 - leftMargin}\r\n x2={graphWidth + margin.right}\r\n label={numberFormattingFunction(\r\n minParam < 0 ? 0 : minParam,\r\n 'NA',\r\n precision,\r\n prefix,\r\n suffix,\r\n )}\r\n labelPos={{\r\n x: 0 - leftMargin,\r\n y: y(minParam < 0 ? 0 : minParam),\r\n dx: 0,\r\n dy: maxParam < 0 ? '1em' : -5,\r\n }}\r\n classNames={{\r\n axis: classNames?.xAxis?.axis,\r\n label: classNames?.yAxis?.labels,\r\n }}\r\n styles={{\r\n axis: styles?.xAxis?.axis,\r\n label: styles?.yAxis?.labels,\r\n }}\r\n />\r\n <AxisTitle\r\n x={0 - leftMargin + 15}\r\n y={graphHeight / 2}\r\n style={styles?.yAxis?.title}\r\n className={classNames?.yAxis?.title}\r\n text={yAxisTitle}\r\n rotate90\r\n />\r\n </g>\r\n <g>\r\n {xTicks.map((d, i) => (\r\n <g key={i}>\r\n <text\r\n y={graphHeight}\r\n x={x(d)}\r\n style={{ textAnchor: 'middle' }}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs'\r\n dy={15}\r\n >\r\n {format(d, dateFormat)}\r\n </text>\r\n </g>\r\n ))}\r\n </g>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <motion.path\r\n style={{\r\n fill: intervalAreaColor,\r\n }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, d: areaShape(dataFormatted) || '' },\r\n whileInView: {\r\n opacity: intervalAreaOpacity,\r\n d: areaShape(dataFormatted) || '',\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n {intervalLineStrokeWidth ? (\r\n <>\r\n <motion.path\r\n style={{\r\n stroke: intervalLineColors[0],\r\n fill: 'none',\r\n strokeWidth: intervalLineStrokeWidth,\r\n }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: lineShapeMin(dataFormatted) || '',\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: lineShapeMin(dataFormatted) || '',\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 />\r\n <motion.path\r\n style={{\r\n stroke: intervalLineColors[1],\r\n fill: 'none',\r\n strokeWidth: intervalLineStrokeWidth,\r\n }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: lineShapeMax(dataFormatted) || '',\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: lineShapeMax(dataFormatted) || '',\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 />\r\n </>\r\n ) : null}\r\n <motion.path\r\n style={{\r\n stroke: lineColor,\r\n fill: 'none',\r\n strokeWidth,\r\n }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n pathLength: 0,\r\n d: lineShape(dataFormatted) || '',\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n pathLength: 1,\r\n d: lineShape(dataFormatted) || '',\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 />\r\n {mouseOverData ? (\r\n <line\r\n y1={0}\r\n y2={graphHeight}\r\n x1={x(mouseOverData.date)}\r\n x2={x(mouseOverData.date)}\r\n className={cn(\r\n 'undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100',\r\n classNames?.mouseOverLine,\r\n )}\r\n style={styles?.mouseOverLine}\r\n />\r\n ) : null}\r\n <g>\r\n {dataFormatted.map((d, i) => (\r\n <motion.g key={i}>\r\n {!checkIfNullOrUndefined(d.y) ? (\r\n <>\r\n {showDots ? (\r\n <motion.circle\r\n r={\r\n graphWidth / dataFormatted.length < 5\r\n ? 0\r\n : graphWidth / dataFormatted.length < 20\r\n ? 2\r\n : 4\r\n }\r\n style={{ fill: lineColor }}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, cx: x(d.date), cy: y(d.y) },\r\n whileInView: {\r\n opacity: 1,\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n cx: x(d.date),\r\n cy: y(d.y),\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n ) : null}\r\n {showIntervalDots ? (\r\n <>\r\n <motion.circle\r\n r={\r\n graphWidth / dataFormatted.length < 5\r\n ? 0\r\n : graphWidth / dataFormatted.length < 20\r\n ? 2\r\n : 4\r\n }\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n fill: intervalLineColors[0],\r\n cx: x(d.date),\r\n cy: y(d.yMin),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n cx: x(d.date),\r\n cy: y(d.yMin),\r\n fill: intervalLineColors[0],\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n <motion.circle\r\n r={\r\n graphWidth / dataFormatted.length < 5\r\n ? 0\r\n : graphWidth / dataFormatted.length < 20\r\n ? 2\r\n : 4\r\n }\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n fill: intervalLineColors[1],\r\n cx: x(d.date),\r\n cy: y(d.yMax),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n fill: intervalLineColors[1],\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n cx: x(d.date),\r\n cy: y(d.yMax),\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n </>\r\n ) : null}\r\n {showValues ? (\r\n <motion.text\r\n dy={-8}\r\n style={{\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn(\r\n 'graph-value text-xs font-bold',\r\n classNames?.graphObjectValues,\r\n )}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: { opacity: 0, fill: lineColor, x: x(d.date), y: y(d.y) },\r\n whileInView: {\r\n opacity: 1,\r\n x: x(d.date),\r\n fill: lineColor,\r\n y: y(d.y),\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n >\r\n {numberFormattingFunction(d.y, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n ) : null}\r\n {showIntervalValues ? (\r\n <>\r\n <motion.text\r\n dy='1em'\r\n style={{\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn('text-xs font-bold', classNames?.graphObjectValues)}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n fill: intervalLineColors[0],\r\n x: x(d.date),\r\n y: y(d.yMin),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: x(d.date),\r\n y: y(d.yMin),\r\n fill: intervalLineColors[0],\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n >\r\n {numberFormattingFunction(d.yMin, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n <motion.text\r\n dy={-8}\r\n style={{\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn('text-xs font-bold', classNames?.graphObjectValues)}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n fill: intervalLineColors[1],\r\n x: x(d.date),\r\n y: y(d.yMax),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n fill: intervalLineColors[1],\r\n x: x(d.date),\r\n y: y(d.yMax),\r\n transition: {\r\n duration: hasAnimatedOnce ? animate.duration : 0.5,\r\n delay: hasAnimatedOnce ? 0 : animate.duration,\r\n },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n >\r\n {numberFormattingFunction(d.yMax, 'NA', precision, prefix, suffix)}\r\n </motion.text>\r\n </>\r\n ) : null}\r\n </>\r\n ) : null}\r\n </motion.g>\r\n ))}\r\n </g>\r\n {refValues ? (\r\n <>\r\n {refValues.map((el, i) => (\r\n <RefLineY\r\n key={i}\r\n text={el.text}\r\n color={el.color}\r\n y={y(el.value as number)}\r\n x1={0 - leftMargin}\r\n x2={graphWidth + margin.right}\r\n classNames={el.classNames}\r\n styles={el.styles}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n ))}\r\n </>\r\n ) : null}\r\n <g>\r\n {annotations.map((d, i) => {\r\n const endPoints = getLineEndPoint(\r\n {\r\n x: d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0),\r\n y: d.yCoordinate\r\n ? y(d.yCoordinate as number) + (d.yOffset || 0) - 8\r\n : 0 + (d.yOffset || 0) - 8,\r\n },\r\n {\r\n x: d.xCoordinate ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) : 0,\r\n y: d.yCoordinate ? y(d.yCoordinate as number) : 0,\r\n },\r\n checkIfNullOrUndefined(d.connectorRadius) ? 3.5 : (d.connectorRadius as number),\r\n );\r\n const connectorSettings = d.showConnector\r\n ? {\r\n y1: endPoints.y,\r\n x1: endPoints.x,\r\n y2: d.yCoordinate\r\n ? y(d.yCoordinate as number) + (d.yOffset || 0)\r\n : 0 + (d.yOffset || 0),\r\n x2: d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0),\r\n cy: d.yCoordinate ? y(d.yCoordinate as number) : 0,\r\n cx: d.xCoordinate ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) : 0,\r\n circleRadius: checkIfNullOrUndefined(d.connectorRadius)\r\n ? 3.5\r\n : (d.connectorRadius as number),\r\n strokeWidth: d.showConnector === true ? 2 : Math.min(d.showConnector || 0, 1),\r\n }\r\n : undefined;\r\n const labelSettings = {\r\n y: d.yCoordinate\r\n ? y(d.yCoordinate as number) + (d.yOffset || 0) - 8\r\n : 0 + (d.yOffset || 0) - 8,\r\n x: rtl\r\n ? 0\r\n : d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0),\r\n width: rtl\r\n ? d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0)\r\n : graphWidth +\r\n margin.right -\r\n (d.xCoordinate\r\n ? x(parse(`${d.xCoordinate}`, dateFormat, new Date())) + (d.xOffset || 0)\r\n : 0 + (d.xOffset || 0)),\r\n maxWidth: d.maxWidth,\r\n fontWeight: d.fontWeight,\r\n align: d.align,\r\n };\r\n return (\r\n <Annotation\r\n key={i}\r\n color={d.color}\r\n connectorsSettings={connectorSettings}\r\n labelSettings={labelSettings}\r\n text={d.text}\r\n classNames={d.classNames}\r\n styles={d.styles}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n );\r\n })}\r\n </g>\r\n <g>\r\n {regressionLine ? (\r\n <RegressionLine\r\n x1={0}\r\n x2={graphWidth}\r\n y1={predict(0)}\r\n y2={predict(graphWidth)}\r\n graphHeight={graphHeight}\r\n graphWidth={graphWidth}\r\n className={classNames?.regLine}\r\n style={styles?.regLine}\r\n color={typeof regressionLine === 'string' ? regressionLine : undefined}\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n ) : null}\r\n </g>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n <rect\r\n ref={MouseoverRectRef}\r\n style={{\r\n fill: 'none',\r\n pointerEvents: 'all',\r\n }}\r\n width={graphWidth}\r\n height={graphHeight}\r\n />\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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n AnnotationSettingsDataType,\r\n CustomHighlightAreaSettingsDataType,\r\n Languages,\r\n LineChartWithConfidenceIntervalDataType,\r\n ReferenceDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n HighlightAreaSettingsDataType,\r\n CurveTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ColorLegend } from '@/Components/Elements/ColorLegend';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: LineChartWithConfidenceIntervalDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors of the line */\r\n lineColor?: string;\r\n /** Colors of the interval area */\r\n intervalAreaColor?: string;\r\n /** Colors of the top and bottom lines of the interval */\r\n intervalLineColors?: [string, string];\r\n /** Colors for the legend */\r\n colorLegendColors?: string[];\r\n /** Domain of colors for the legend */\r\n colorLegendDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: 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 /** Reference values for comparison */\r\n refValues?: ReferenceDataType[];\r\n /** Maximum value of the date for the chart */\r\n maxDate?: string | number;\r\n /** Minimum value of the date for the chart */\r\n minDate?: string | number;\r\n /** No. of ticks on the x-axis */\r\n noOfXTicks?: number;\r\n /** No. of ticks on the y-axis */\r\n noOfYTicks?: number;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\r\n /** Toggle visibility of values of the interval area */\r\n showIntervalValues?: boolean;\r\n /** Toggle visibility of dots on the line */\r\n showDots?: boolean;\r\n /** Toggle visibility of dots on the line of te interval area */\r\n showIntervalDots?: boolean;\r\n /** Stroke width of the line */\r\n strokeWidth?: number;\r\n /** Stroke width of the lines of the interval area */\r\n intervalLineStrokeWidth?: number;\r\n /** Opacity of the interval area */\r\n intervalAreaOpacity?: number;\r\n /** Toggle the initial animation of the line. If the type is number then it uses the number as the time in seconds for animation. */\r\n animate?: boolean | AnimateDataType;\r\n /** Format of the date in the data object. Available formats can be found [here](https://date-fns.org/docs/format) */\r\n dateFormat?: string;\r\n /** Title for the Y-axis */\r\n yAxisTitle?: string;\r\n /** Annotations on the chart */\r\n annotations?: AnnotationSettingsDataType[];\r\n /** Highlighted area(square) on the chart */\r\n highlightAreaSettings?: HighlightAreaSettingsDataType[];\r\n /** Highlighted area(custom shape) on the chart */\r\n customHighlightAreaSettings?: CustomHighlightAreaSettingsDataType[];\r\n /** Toggles the visibility of the regression line for the data. If the type is string then string is use to define the color of the line. */\r\n regressionLine?: boolean | string;\r\n /** Curve type for the line */\r\n curveType?: CurveTypes;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n\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 /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_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 LineChartWithConfidenceInterval(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n noOfXTicks = 10,\r\n dateFormat = 'yyyy',\r\n showValues = false,\r\n backgroundColor = false,\r\n padding,\r\n lineColor,\r\n leftMargin = 30,\r\n rightMargin = 30,\r\n topMargin = 20,\r\n bottomMargin = 25,\r\n tooltip,\r\n refValues = [],\r\n highlightAreaSettings = [],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n graphID,\r\n minValue,\r\n maxValue,\r\n regressionLine = false,\r\n showIntervalDots = false,\r\n showIntervalValues = false,\r\n intervalLineStrokeWidth = 0,\r\n intervalLineColors = [Colors.light.grays['gray-500'], Colors.light.grays['gray-500']],\r\n intervalAreaColor = Colors.primaryColors['blue-100'],\r\n intervalAreaOpacity = 0.4,\r\n graphDownload = false,\r\n dataDownload = false,\r\n animate = false,\r\n language = 'en',\r\n minHeight = 0,\r\n strokeWidth = 2,\r\n showDots = true,\r\n annotations = [],\r\n customHighlightAreaSettings = [],\r\n theme = 'light',\r\n ariaLabel,\r\n yAxisTitle,\r\n noOfYTicks = 5,\r\n minDate,\r\n maxDate,\r\n colorLegendTitle,\r\n colorLegendColors,\r\n colorLegendDomain,\r\n curveType = 'curve',\r\n styles,\r\n classNames,\r\n precision = 2,\r\n customLayers = [],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n width ? 'w-fit' : 'w-full',\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a line chart that highlights the difference between two datasets over time.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {colorLegendColors && colorLegendDomain ? (\r\n <ColorLegend\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={colorLegendColors}\r\n colorDomain={colorLegendDomain}\r\n showNAColor={false}\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n lineColor={lineColor || Colors.primaryColors['blue-600']}\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n suffix={suffix}\r\n prefix={prefix}\r\n dateFormat={dateFormat}\r\n showValues={showValues}\r\n noOfXTicks={noOfXTicks}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n tooltip={tooltip}\r\n highlightAreaSettings={highlightAreaSettings}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n refValues={refValues}\r\n minValue={minValue}\r\n maxValue={maxValue}\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 rtl={language === 'he' || language === 'ar'}\r\n strokeWidth={strokeWidth}\r\n showDots={showDots}\r\n annotations={annotations}\r\n customHighlightAreaSettings={customHighlightAreaSettings}\r\n regressionLine={regressionLine}\r\n showIntervalDots={showIntervalDots}\r\n showIntervalValues={showIntervalValues}\r\n intervalLineStrokeWidth={intervalLineStrokeWidth}\r\n intervalLineColors={intervalLineColors}\r\n intervalAreaColor={intervalAreaColor}\r\n intervalAreaOpacity={intervalAreaOpacity}\r\n yAxisTitle={yAxisTitle}\r\n noOfYTicks={noOfYTicks}\r\n minDate={minDate}\r\n maxDate={maxDate}\r\n curveType={curveType}\r\n styles={styles}\r\n classNames={classNames}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["Graph","props","data","width","height","lineColor","suffix","prefix","dateFormat","highlightAreaSettings","showValues","noOfXTicks","rightMargin","leftMargin","topMargin","bottomMargin","tooltip","onSeriesMouseOver","refValues","minValue","maxValue","animate","rtl","strokeWidth","showDots","annotations","customHighlightAreaSettings","regressionLine","showIntervalDots","showIntervalValues","intervalLineStrokeWidth","intervalLineColors","intervalAreaColor","intervalAreaOpacity","yAxisTitle","noOfYTicks","minDate","maxDate","curveType","styles","classNames","precision","customLayers","svgRef","useRef","isInView","useInView","hasAnimatedOnce","setHasAnimatedOnce","useState","useEffect","timeout","curve","curveLinear","curveStep","curveStepAfter","curveStepBefore","curveMonotoneX","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","margin","MouseoverRectRef","dataFormatted","orderBy","d","checkIfNullOrUndefined","parse","highlightAreaSettingsFormatted","customHighlightAreaSettingsFormatted","el","j","graphWidth","graphHeight","minYear","maxYear","minParam","maxParam","x","scaleTime","y","scaleLinear","lineShape","line","lineShapeMin","lineShapeMax","areaShape","area","yTicks","xTicks","mousemove","event","selectedData","bisectCenter","pointer","mouseout","select","regressionLineParam","linearRegression","predict","linearRegressionLine","jsxs","Fragment","jsx","motion","HighlightArea","CustomArea","YTicksAndGridLines","Axis","numberFormattingFunction","AxisTitle","i","format","cn","RefLineY","endPoints","getLineEndPoint","connectorSettings","labelSettings","Annotation","RegressionLine","Tooltip","LineChartWithConfidenceInterval","graphTitle","sources","graphDescription","footNote","backgroundColor","padding","relativeHeight","graphID","Colors","graphDownload","dataDownload","language","minHeight","theme","ariaLabel","colorLegendTitle","colorLegendColors","colorLegendDomain","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","resizeObserver","entries","GraphHeader","EmptyState","ColorLegend","GraphFooter"],"mappings":"srCAiGO,SAASA,GAAMC,GAAc,CAClC,KAAM,CACJ,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,UAAAC,EACA,OAAAC,EACA,OAAAC,EACA,WAAAC,EACA,sBAAAC,EACA,WAAAC,EACA,WAAAC,GACA,YAAAC,GACA,WAAAC,EACA,UAAAC,EACA,aAAAC,EACA,QAAAC,EACA,kBAAAC,EACA,UAAAC,EACA,SAAAC,EACA,SAAAC,EACA,QAAAC,EACA,IAAAC,EACA,YAAAC,GACA,SAAAC,EACA,YAAAC,GACA,4BAAAC,GACA,eAAAC,EACA,iBAAAC,GACA,mBAAAC,GACA,wBAAAC,EACA,mBAAAC,EACA,kBAAAC,GACA,oBAAAC,GACA,WAAAC,EACA,WAAAC,GACA,QAAAC,EACA,QAAAC,EACA,UAAAC,EACA,OAAAC,EACA,WAAAC,EACA,UAAAC,EACA,aAAAC,CAAA,EACEzC,GACE0C,GAASC,EAAAA,OAAO,IAAI,EACpBC,EAAWC,GAAAA,UAAUH,GAAQ,CACjC,KAAMtB,EAAQ,KACd,OAAQA,EAAQ,MAAA,CACjB,EACK,CAAC0B,EAAiBC,EAAkB,EAAIC,EAAAA,SAAS,EAAK,EAE5DC,EAAAA,UAAU,IAAM,CACd,GAAIL,GAAY,CAACE,EAAiB,CAChC,MAAMI,EAAU,WACd,IAAM,CACJH,GAAmB,EAA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