@undp/data-viz 1.5.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.d.ts +1 -0
- package/dist/AreaChart.js +420 -520
- package/dist/AreaChart.js.map +1 -1
- package/dist/Axis-CRyfcLjc.js +32 -0
- package/dist/Axis-CRyfcLjc.js.map +1 -0
- package/dist/Axis-DxRV2yMi.cjs +2 -0
- package/dist/Axis-DxRV2yMi.cjs.map +1 -0
- package/dist/AxisTitle-jeI7am8o.js +29 -0
- package/dist/AxisTitle-jeI7am8o.js.map +1 -0
- package/dist/AxisTitle-sS5bLLR7.cjs +2 -0
- package/dist/AxisTitle-sS5bLLR7.cjs.map +1 -0
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +1 -0
- package/dist/BarGraph.js +2185 -4042
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.d.ts +1 -0
- package/dist/BasicStatCard.js +118 -186
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +5 -0
- package/dist/BeeSwarmChart.js +518 -1016
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +1 -0
- package/dist/BiVariateChoroplethMap.js +456 -697
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +1 -0
- package/dist/BulletChart.js +863 -1414
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +1 -0
- package/dist/ButterflyChart.js +474 -684
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +1 -0
- package/dist/ChoroplethMap.js +468 -722
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +1 -0
- package/dist/CirclePackingGraph.js +5 -6
- package/dist/CirclePackingGraph.js.map +1 -1
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.cjs.map +1 -1
- package/dist/ColorLegend.js +57 -44
- package/dist/ColorLegend.js.map +1 -1
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.cjs.map +1 -1
- package/dist/ColorLegendWithMouseOver.js +60 -65
- package/dist/ColorLegendWithMouseOver.js.map +1 -1
- package/dist/Colors.cjs.map +1 -1
- package/dist/Colors.js +44 -430
- package/dist/Colors.js.map +1 -1
- package/dist/CopyTextButton.cjs +3 -3
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +537 -455
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +7 -7
- package/dist/CsvDownloadButton.cjs.map +1 -1
- package/dist/CsvDownloadButton.js +442 -447
- package/dist/CsvDownloadButton.js.map +1 -1
- package/dist/Data/barChart.json +70 -0
- package/dist/Data/basic.csv +20 -0
- package/dist/DataCards.cjs +5 -5
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.d.ts +1 -0
- package/dist/DataCards.js +488 -581
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.d.ts +1 -0
- package/dist/DataTable.js +183 -326
- package/dist/DataTable.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.d.ts +1 -0
- package/dist/DifferenceLineChart.js +731 -795
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +1 -4
- package/dist/DonutChart.js +260 -444
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +1 -0
- package/dist/DotDensityMap.js +387 -574
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{DropdownSelect-6kjXM6oW.js → DropdownSelect-BbdPQa2k.js} +1401 -1374
- package/dist/DropdownSelect-BbdPQa2k.js.map +1 -0
- package/dist/DropdownSelect-Doz3mCrM.cjs +29 -0
- package/dist/DropdownSelect-Doz3mCrM.cjs.map +1 -0
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +1 -0
- package/dist/DualAxisLineChart.js +620 -714
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +1 -0
- package/dist/DumbbellChart.js +789 -1499
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/EmptyState-BZo1BbAn.js +15 -0
- package/dist/{EmptyState-36lXXyui.js.map → EmptyState-BZo1BbAn.js.map} +1 -1
- package/dist/EmptyState-sAEZ_5rU.cjs +2 -0
- package/dist/{EmptyState-B8IpKGcL.cjs.map → EmptyState-sAEZ_5rU.cjs.map} +1 -1
- package/dist/ExcelDownloadButton.cjs +1 -1
- package/dist/ExcelDownloadButton.cjs.map +1 -1
- package/dist/ExcelDownloadButton.js +20 -24
- package/dist/ExcelDownloadButton.js.map +1 -1
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.cjs.map +1 -1
- package/dist/FootNote.js +26 -17
- package/dist/FootNote.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.d.ts +1 -0
- package/dist/GeoHubCompareMaps.js +267 -342
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.cjs.map +1 -1
- package/dist/GeoHubMap.d.ts +1 -0
- package/dist/GeoHubMap.js +214 -379
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.d.ts +1 -0
- package/dist/GeoHubMapWithLayerSelection.js +192 -278
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/GraphContainer-CRqzdKu2.js +78 -0
- package/dist/GraphContainer-CRqzdKu2.js.map +1 -0
- package/dist/GraphContainer-d8A46BK2.cjs +2 -0
- package/dist/GraphContainer-d8A46BK2.cjs.map +1 -0
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.cjs.map +1 -1
- package/dist/GraphDescription.js +23 -17
- package/dist/GraphDescription.js.map +1 -1
- package/dist/{GraphEl-2IiUDxjR.js → GraphEl-BZne2JIx.js} +181 -202
- package/dist/GraphEl-BZne2JIx.js.map +1 -0
- package/dist/GraphEl-D5MUfp45.cjs +2 -0
- package/dist/GraphEl-D5MUfp45.cjs.map +1 -0
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.cjs.map +1 -1
- package/dist/GraphFooter.js +28 -18
- package/dist/GraphFooter.js.map +1 -1
- package/dist/GraphHeader.cjs +1 -1
- package/dist/GraphHeader.cjs.map +1 -1
- package/dist/GraphHeader.d.ts +2 -1
- package/dist/GraphHeader.js +45 -59
- package/dist/GraphHeader.js.map +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.cjs.map +1 -1
- package/dist/GraphTitle.js +29 -24
- package/dist/GraphTitle.js.map +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +216 -450
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.cjs.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/GriddedGraphsFromConfig.js +22 -36
- package/dist/GriddedGraphsFromConfig.js.map +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +1 -0
- package/dist/HeatMap.js +278 -446
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +1 -0
- package/dist/Histogram.js +154 -264
- package/dist/Histogram.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.cjs.map +1 -1
- package/dist/ImageDownloadButton.d.ts +2 -1
- package/dist/ImageDownloadButton.js +21 -25
- package/dist/ImageDownloadButton.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +1 -0
- package/dist/LineChartWithConfidenceInterval.js +677 -827
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.cjs.map +1 -1
- package/dist/LinearColorLegend.js +49 -30
- package/dist/LinearColorLegend.js.map +1 -1
- package/dist/Modal-DGcuAHyK.js +1047 -0
- package/dist/Modal-DGcuAHyK.js.map +1 -0
- package/dist/Modal-JW_IExO3.cjs +46 -0
- package/dist/Modal-JW_IExO3.cjs.map +1 -0
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboard.js +126 -292
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.js +22 -31
- package/dist/MultiGraphDashboardFromConfig.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +139 -223
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +25 -27
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +1 -0
- package/dist/MultiLineAltChart.js +582 -659
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.d.ts +1 -0
- package/dist/MultiLineChart.js +617 -724
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +1 -0
- package/dist/ParetoChart.js +531 -635
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +148 -337
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +22 -31
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js.map +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -1
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.js +93 -114
- package/dist/PerformanceIntensiveScrollStory.js.map +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +1 -0
- package/dist/RadarChart.js +426 -575
- package/dist/RadarChart.js.map +1 -1
- package/dist/ReferenceLine-2XCwHXQ4.js +162 -0
- package/dist/ReferenceLine-2XCwHXQ4.js.map +1 -0
- package/dist/ReferenceLine-BH0qdf4R.cjs +2 -0
- package/dist/ReferenceLine-BH0qdf4R.cjs.map +1 -0
- package/dist/RegressionLine-BOTTNSrr.cjs +2 -0
- package/dist/RegressionLine-BOTTNSrr.cjs.map +1 -0
- package/dist/RegressionLine-DAcY2DjT.js +87 -0
- package/dist/RegressionLine-DAcY2DjT.js.map +1 -0
- package/dist/SVGDownloadButton.cjs +1 -1
- package/dist/SVGDownloadButton.cjs.map +1 -1
- package/dist/SVGDownloadButton.js +21 -25
- package/dist/SVGDownloadButton.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +1 -0
- package/dist/SankeyChart.js +665 -854
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +1 -0
- package/dist/ScatterPlot.js +675 -815
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.cjs.map +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/ScrollStory.js +85 -97
- package/dist/ScrollStory.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.d.ts +1 -0
- package/dist/SimpleLineChart.js +505 -613
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -1
- package/dist/SingleGraphDashboard.js +284 -508
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -1
- package/dist/SingleGraphDashboardFromConfig.js +25 -31
- package/dist/SingleGraphDashboardFromConfig.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +150 -168
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +25 -21
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +363 -593
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +25 -31
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js.map +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.d.ts +1 -0
- package/dist/SlopeChart.js +539 -573
- package/dist/SlopeChart.js.map +1 -1
- package/dist/Source-DYMJRrsq.cjs +2 -0
- package/dist/Source-DYMJRrsq.cjs.map +1 -0
- package/dist/Source-DwTHB8fn.js +78 -0
- package/dist/Source-DwTHB8fn.js.map +1 -0
- package/dist/Source.cjs +1 -1
- package/dist/Source.cjs.map +1 -1
- package/dist/Source.js +4 -38
- package/dist/Source.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.cjs.map +1 -1
- package/dist/SparkLine.d.ts +1 -0
- package/dist/SparkLine.js +286 -314
- package/dist/SparkLine.js.map +1 -1
- package/dist/Spinner-D7rnnwnA.js +47 -0
- package/dist/Spinner-D7rnnwnA.js.map +1 -0
- package/dist/Spinner-DRMBUsX7.cjs +2 -0
- package/dist/Spinner-DRMBUsX7.cjs.map +1 -0
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.d.ts +1 -0
- package/dist/StatCardFromData.js +161 -243
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +1 -0
- package/dist/StripChart.js +665 -983
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +1 -0
- package/dist/ThreeDGlobe.js +356 -519
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +96 -126
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
- package/dist/Tooltip-4dJo4_AF.cjs +2 -0
- package/dist/Tooltip-4dJo4_AF.cjs.map +1 -0
- package/dist/Tooltip-CwWUegPB.js +43 -0
- package/dist/Tooltip-CwWUegPB.js.map +1 -0
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +1 -0
- package/dist/TreeMapGraph.js +479 -617
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +1 -0
- package/dist/Typography-DX7PlgQU.cjs +2 -0
- package/dist/Typography-DX7PlgQU.cjs.map +1 -0
- package/dist/Typography-PxtFcnJb.js +142 -0
- package/dist/Typography-PxtFcnJb.js.map +1 -0
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.d.ts +1 -0
- package/dist/UnitChart.js +160 -212
- package/dist/UnitChart.js.map +1 -1
- package/dist/XAxesLabels-D5X8jngD.cjs +2 -0
- package/dist/XAxesLabels-D5X8jngD.cjs.map +1 -0
- package/dist/XAxesLabels-DNO0KmjL.js +73 -0
- package/dist/XAxesLabels-DNO0KmjL.js.map +1 -0
- package/dist/XTicksAndGridLines-B6CELS7q.cjs +2 -0
- package/dist/XTicksAndGridLines-B6CELS7q.cjs.map +1 -0
- package/dist/XTicksAndGridLines-CObVFSm4.js +38 -0
- package/dist/XTicksAndGridLines-CObVFSm4.js.map +1 -0
- package/dist/YAxesLabels-DcS85Beo.cjs +2 -0
- package/dist/YAxesLabels-DcS85Beo.cjs.map +1 -0
- package/dist/YAxesLabels-Dnnng49-.js +70 -0
- package/dist/YAxesLabels-Dnnng49-.js.map +1 -0
- package/dist/YTicksAndGridLines-4pxTRlRK.cjs +2 -0
- package/dist/YTicksAndGridLines-4pxTRlRK.cjs.map +1 -0
- package/dist/YTicksAndGridLines-Blepl7XF.js +38 -0
- package/dist/YTicksAndGridLines-Blepl7XF.js.map +1 -0
- package/dist/{band-BEjh2CHI.js → band-CyHaVft5.js} +3 -3
- package/dist/{band-BEjh2CHI.js.map → band-CyHaVft5.js.map} +1 -1
- package/dist/{band-CAApY4Pd.cjs → band-VYfcZeJ2.cjs} +2 -2
- package/dist/{band-CAApY4Pd.cjs.map → band-VYfcZeJ2.cjs.map} +1 -1
- package/dist/checkIfMultiple-Y9iKaV_u.js +950 -0
- package/dist/checkIfMultiple-Y9iKaV_u.js.map +1 -0
- package/dist/checkIfMultiple-wg6hJLXy.cjs +12 -0
- package/dist/checkIfMultiple-wg6hJLXy.cjs.map +1 -0
- package/dist/customArea-BUhPiPT6.js +163 -0
- package/dist/{customArea-x4L4xwLl.js.map → customArea-BUhPiPT6.js.map} +1 -1
- package/dist/customArea-CMF5g-C3.cjs +2 -0
- package/dist/{customArea-1G1S78s_.cjs.map → customArea-CMF5g-C3.cjs.map} +1 -1
- package/dist/delaunay-C1uAf38t.js.map +1 -1
- package/dist/delaunay-rcy0HhZi.cjs.map +1 -1
- package/dist/{ensureCompleteData-DlmibgaI.js → ensureCompleteData-DNKEGRiP.js} +12 -32
- package/dist/{ensureCompleteData-DlmibgaI.js.map → ensureCompleteData-DNKEGRiP.js.map} +1 -1
- package/dist/{ensureCompleteData-DkQYPeDa.cjs → ensureCompleteData-I6nYmT8E.cjs} +2 -2
- package/dist/{ensureCompleteData-DkQYPeDa.cjs.map → ensureCompleteData-I6nYmT8E.cjs.map} +1 -1
- package/dist/{excelDownload-BOA-lskf.js → excelDownload-BEC1AyQW.js} +12 -2
- package/dist/{excelDownload-BOA-lskf.js.map → excelDownload-BEC1AyQW.js.map} +1 -1
- package/dist/excelDownload-BQpsCa62.cjs.map +1 -1
- package/dist/{fetchAndParseData-sapWbnYk.js → fetchAndParseData-BpqkBPQL.js} +15 -28
- package/dist/{fetchAndParseData-sapWbnYk.js.map → fetchAndParseData-BpqkBPQL.js.map} +1 -1
- package/dist/fetchAndParseData-l5HGMAEs.cjs +16 -0
- package/dist/{fetchAndParseData-Ba-_CgxS.cjs.map → fetchAndParseData-l5HGMAEs.cjs.map} +1 -1
- package/dist/fetchAndParseData.cjs +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/{filterData-9nEcQ-Jp.js → filterData-DsAiFzKY.js} +3 -5
- package/dist/{filterData-9nEcQ-Jp.js.map → filterData-DsAiFzKY.js.map} +1 -1
- package/dist/{filterData-BoYadk0l.cjs → filterData-T5DQBE9b.cjs} +2 -2
- package/dist/{filterData-BoYadk0l.cjs.map → filterData-T5DQBE9b.cjs.map} +1 -1
- package/dist/generateRandomString-B5zBiJzS.cjs.map +1 -1
- package/dist/generateRandomString-za3IQGfQ.js.map +1 -1
- package/dist/{getCentroidCoordinates-Dfk6IqEG.js → getCentroidCoordinates-D7r34N4w.js} +2 -2
- package/dist/{getCentroidCoordinates-Dfk6IqEG.js.map → getCentroidCoordinates-D7r34N4w.js.map} +1 -1
- package/dist/{getCentroidCoordinates-DxTBqzp2.cjs → getCentroidCoordinates-Dng1HVjO.cjs} +2 -2
- package/dist/{getCentroidCoordinates-DxTBqzp2.cjs.map → getCentroidCoordinates-Dng1HVjO.cjs.map} +1 -1
- package/dist/getGraphList-BpEWn1Tk.js +227 -0
- package/dist/{getGraphList-DuColTJM.js.map → getGraphList-BpEWn1Tk.js.map} +1 -1
- package/dist/getGraphList-gf02xgT2.cjs.map +1 -1
- package/dist/getJenks-BbngDoBQ.js.map +1 -1
- package/dist/getJenks-GYmdwBqm.cjs.map +1 -1
- package/dist/getNoOfTicks-C_1CFXv_.cjs +2 -0
- package/dist/getNoOfTicks-C_1CFXv_.cjs.map +1 -0
- package/dist/getNoOfTicks-CpmRjcRF.js +7 -0
- package/dist/getNoOfTicks-CpmRjcRF.js.map +1 -0
- package/dist/getSchema.cjs.map +1 -1
- package/dist/getSchema.js +445 -231
- package/dist/getSchema.js.map +1 -1
- package/dist/getSliderMarks-BmADcPQt.cjs +6 -0
- package/dist/getSliderMarks-BmADcPQt.cjs.map +1 -0
- package/dist/getSliderMarks-HIDJ0_Cd.js +1033 -0
- package/dist/getSliderMarks-HIDJ0_Cd.js.map +1 -0
- package/dist/{getTextColorBasedOnBgColor-B6Nk2WBf.js → getTextColorBasedOnBgColor-CDY808zi.js} +11 -3
- package/dist/{getTextColorBasedOnBgColor-B6Nk2WBf.js.map → getTextColorBasedOnBgColor-CDY808zi.js.map} +1 -1
- package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs.map +1 -1
- package/dist/{getUniqValue-DiCh_MOD.js → getUniqValue-BKHCm3zE.js} +2 -4
- package/dist/{getUniqValue-DiCh_MOD.js.map → getUniqValue-BKHCm3zE.js.map} +1 -1
- package/dist/getUniqValue-RViz8tTw.cjs.map +1 -1
- package/dist/{imageDownload-Dcci2LEy.js → imageDownload-BX6SILNZ.js} +4 -2
- package/dist/{imageDownload-Dcci2LEy.js.map → imageDownload-BX6SILNZ.js.map} +1 -1
- package/dist/imageDownload-CgDcm1Sj.cjs.map +1 -1
- package/dist/{index-DvVprvy6.js → index-BZQYSqar.js} +7 -7
- package/dist/{index-DvVprvy6.js.map → index-BZQYSqar.js.map} +1 -1
- package/dist/index-B_sAFsEV.cjs +2 -0
- package/dist/{index-BHe3wsWF.cjs.map → index-B_sAFsEV.cjs.map} +1 -1
- package/dist/index-BqfRwk1n.js +146 -0
- package/dist/index-BqfRwk1n.js.map +1 -0
- package/dist/{index-V_JXij1_.js → index-BuwmuDFJ.js} +3 -3
- package/dist/{index-V_JXij1_.js.map → index-BuwmuDFJ.js.map} +1 -1
- package/dist/index-C6LorfZ-.cjs +2 -0
- package/dist/index-C6LorfZ-.cjs.map +1 -0
- package/dist/index-CHPV5EwG-CTPQjnHt.cjs +84 -0
- package/dist/index-CHPV5EwG-CTPQjnHt.cjs.map +1 -0
- package/dist/{index-CHPV5EwG-DBWUSD9b.js → index-CHPV5EwG-Curnpaqc.js} +724 -625
- package/dist/index-CHPV5EwG-Curnpaqc.js.map +1 -0
- package/dist/index-Ceppbd8C.js +342 -0
- package/dist/index-Ceppbd8C.js.map +1 -0
- package/dist/index-Cno4Q0YE.cjs +2 -0
- package/dist/{index-CQ3e6Ewi.cjs.map → index-Cno4Q0YE.cjs.map} +1 -1
- package/dist/{index-Cw8sCyo_-BuI_jX5Z.js → index-Cw8sCyo_-B2hEKjzG.js} +16 -16
- package/dist/{index-Cw8sCyo_-BuI_jX5Z.js.map → index-Cw8sCyo_-B2hEKjzG.js.map} +1 -1
- package/dist/{index-Cw8sCyo_-gxT8ADyn.cjs → index-Cw8sCyo_-BrHiWiRF.cjs} +2 -2
- package/dist/{index-Cw8sCyo_-gxT8ADyn.cjs.map → index-Cw8sCyo_-BrHiWiRF.cjs.map} +1 -1
- package/dist/index-CyZ1lmi_.cjs +2 -0
- package/dist/{index-D72cOtq7.cjs.map → index-CyZ1lmi_.cjs.map} +1 -1
- package/dist/index-D491FEn1.js +184 -0
- package/dist/index-D491FEn1.js.map +1 -0
- package/dist/index-DG2bgAva.cjs +10 -0
- package/dist/index-DG2bgAva.cjs.map +1 -0
- package/dist/index-DRXx7m-C.cjs +2 -0
- package/dist/index-DRXx7m-C.cjs.map +1 -0
- package/dist/index-DxXnJ8Ti.cjs +2 -0
- package/dist/index-DxXnJ8Ti.cjs.map +1 -0
- package/dist/{index-Dzc_aaI9-BKklH89r.js → index-Dzc_aaI9-Bb7gobH_.js} +2 -2
- package/dist/{index-Dzc_aaI9-BKklH89r.js.map → index-Dzc_aaI9-Bb7gobH_.js.map} +1 -1
- package/dist/{index-Dzc_aaI9-RIk2GRHD.cjs → index-Dzc_aaI9-BmkfPMyc.cjs} +2 -2
- package/dist/{index-Dzc_aaI9-RIk2GRHD.cjs.map → index-Dzc_aaI9-BmkfPMyc.cjs.map} +1 -1
- package/dist/{index-9tDEUqOZ.js → index-GEsywGxz.js} +9 -9
- package/dist/index-GEsywGxz.js.map +1 -0
- package/dist/index-SKgJALZg.js +99 -0
- package/dist/{index-Bw_eHBVN.js.map → index-SKgJALZg.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.js +13 -13
- package/dist/{init-BhZylTFx.js → init-BJFW6EwE.js} +3 -3
- package/dist/{init-BhZylTFx.js.map → init-BJFW6EwE.js.map} +1 -1
- package/dist/{linear-BVckp9RD.cjs → linear-BwPAspcq.cjs} +2 -2
- package/dist/{linear-BVckp9RD.cjs.map → linear-BwPAspcq.cjs.map} +1 -1
- package/dist/{linear-DUdu7l2G.js → linear-BwnDd9KF.js} +3 -3
- package/dist/{linear-DUdu7l2G.js.map → linear-BwnDd9KF.js.map} +1 -1
- package/dist/numberFormattingFunction-02t-wJta.cjs.map +1 -1
- package/dist/numberFormattingFunction-14YCbkN2.js.map +1 -1
- package/dist/{ordinal-BOeNbyae.cjs → ordinal-CrsysVE-.cjs} +2 -2
- package/dist/ordinal-CrsysVE-.cjs.map +1 -0
- package/dist/{ordinal-w9Lu4Stb.js → ordinal-P77xw8aL.js} +24 -24
- package/dist/ordinal-P77xw8aL.js.map +1 -0
- package/dist/{pow-e8zx3AQJ.js → pow-DE4c7dbW.js} +3 -3
- package/dist/{pow-e8zx3AQJ.js.map → pow-DE4c7dbW.js.map} +1 -1
- package/dist/{pow-B5-jkdHU.cjs → pow-DgrUorRi.cjs} +2 -2
- package/dist/{pow-B5-jkdHU.cjs.map → pow-DgrUorRi.cjs.map} +1 -1
- package/dist/{proxy-BYIC9BuT.js → proxy-BxkFHwUw.js} +144 -134
- package/dist/proxy-BxkFHwUw.js.map +1 -0
- package/dist/proxy-BxvUI_9l.cjs +2 -0
- package/dist/proxy-BxvUI_9l.cjs.map +1 -0
- package/dist/{removeOutliers-DR48e-18.js → removeOutliers-BqW0sPqj.js} +2 -5
- package/dist/{removeOutliers-DR48e-18.js.map → removeOutliers-BqW0sPqj.js.map} +1 -1
- package/dist/removeOutliers-WELHHqiI.cjs.map +1 -1
- package/dist/{sort-DfK1b0F5.js → sort-BIvMlUH1.js} +5 -5
- package/dist/{sort-DfK1b0F5.js.map → sort-BIvMlUH1.js.map} +1 -1
- package/dist/{string-CRoCZCYa.cjs → string-C-kRh1bQ.cjs} +2 -2
- package/dist/{string-CRoCZCYa.cjs.map → string-C-kRh1bQ.cjs.map} +1 -1
- package/dist/{string-B8KlVSPX.js → string-C_xJ4Wg4.js} +3 -3
- package/dist/{string-B8KlVSPX.js.map → string-C_xJ4Wg4.js.map} +1 -1
- package/dist/string2HTML-CPGr_I5E.cjs +3 -0
- package/dist/{string2HTML-z7CwHXcx.cjs.map → string2HTML-CPGr_I5E.cjs.map} +1 -1
- package/dist/{string2HTML-oFCROsus.js → string2HTML-DhG75NqA.js} +15 -9
- package/dist/{string2HTML-oFCROsus.js.map → string2HTML-DhG75NqA.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{svgDownload-C2-E3yf2.js → svgDownload-BAoarWNt.js} +4 -2
- package/dist/{svgDownload-C2-E3yf2.js.map → svgDownload-BAoarWNt.js.map} +1 -1
- package/dist/svgDownload-D9zEGjTF.cjs.map +1 -1
- package/dist/{threshold-DFfqcDMa.js → threshold-Bgr20hik.js} +2 -2
- package/dist/{threshold-DFfqcDMa.js.map → threshold-Bgr20hik.js.map} +1 -1
- package/dist/{time-Byw_jYQ7.cjs → time-CZd5YLSP.cjs} +2 -2
- package/dist/{time-Byw_jYQ7.cjs.map → time-CZd5YLSP.cjs.map} +1 -1
- package/dist/{time-BzJP5SPC.js → time-DCCfQk3V.js} +3 -3
- package/dist/{time-BzJP5SPC.js.map → time-DCCfQk3V.js.map} +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +3 -3
- package/dist/transformDataForAggregation-CE3bAlHU.js +585 -0
- package/dist/{transformDataForAggregation-sBpdlX8n.js.map → transformDataForAggregation-CE3bAlHU.js.map} +1 -1
- package/dist/transformDataForAggregation-KXGm6flX.cjs.map +1 -1
- package/dist/transformDataForGraphFromFile-BExxcITV.js +14 -0
- package/dist/{transformDataForGraphFromFile-ComYvzuz.js.map → transformDataForGraphFromFile-BExxcITV.js.map} +1 -1
- package/dist/{transformDataForGraphFromFile-DVZodTHd.cjs → transformDataForGraphFromFile-DaJHQCsL.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-DVZodTHd.cjs.map → transformDataForGraphFromFile-DaJHQCsL.cjs.map} +1 -1
- package/dist/transformDataForSelect-D8AuvYdf.js.map +1 -1
- package/dist/transformDataForSelect-YmStusCI.cjs.map +1 -1
- package/dist/uniqBy-BHy4I8PK.js.map +1 -1
- package/dist/uniqBy-O05lp2S5.cjs.map +1 -1
- package/dist/{use-in-view-DR-UTB96.js → use-in-view-Cxa7y1TH.js} +2 -2
- package/dist/use-in-view-Cxa7y1TH.js.map +1 -0
- package/dist/use-in-view-QcfiW0w3.cjs +2 -0
- package/dist/use-in-view-QcfiW0w3.cjs.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +8 -8
- package/dist/validateSchema.cjs.map +1 -1
- package/dist/validateSchema.js +33 -29
- package/dist/validateSchema.js.map +1 -1
- package/dist/{x-BBpi7a_7-Dz2vKSfu.cjs → x-BBpi7a_7-mTo40uId.cjs} +2 -2
- package/dist/{x-BBpi7a_7-Dz2vKSfu.cjs.map → x-BBpi7a_7-mTo40uId.cjs.map} +1 -1
- package/dist/{y-D0sAaVii.js → y-BqfogMAB.js} +3 -3
- package/dist/{y-D0sAaVii.js.map → y-BqfogMAB.js.map} +1 -1
- package/dist/{zoom-QipiAl5W.js → zoom-C9MFjAaV.js} +5 -5
- package/dist/{zoom-QipiAl5W.js.map → zoom-C9MFjAaV.js.map} +1 -1
- package/dist/zoom-DPw8bba-.cjs +2 -0
- package/dist/{zoom-BiMNsz72.cjs.map → zoom-DPw8bba-.cjs.map} +1 -1
- package/package.json +7 -6
- package/dist/Axis-4gUOL8B7.js +0 -43
- package/dist/Axis-4gUOL8B7.js.map +0 -1
- package/dist/Axis-CkNn1wit.cjs +0 -2
- package/dist/Axis-CkNn1wit.cjs.map +0 -1
- package/dist/AxisTitle-Wkz-xeQL.cjs +0 -2
- package/dist/AxisTitle-Wkz-xeQL.cjs.map +0 -1
- package/dist/AxisTitle-v6_xcXZ-.js +0 -20
- package/dist/AxisTitle-v6_xcXZ-.js.map +0 -1
- package/dist/DropdownSelect-6kjXM6oW.js.map +0 -1
- package/dist/DropdownSelect-vt8yiB-g.cjs +0 -29
- package/dist/DropdownSelect-vt8yiB-g.cjs.map +0 -1
- package/dist/EmptyState-36lXXyui.js +0 -22
- package/dist/EmptyState-B8IpKGcL.cjs +0 -2
- package/dist/GraphEl-2IiUDxjR.js.map +0 -1
- package/dist/GraphEl-qrlfGPe3.cjs +0 -2
- package/dist/GraphEl-qrlfGPe3.cjs.map +0 -1
- package/dist/Modal-Cg8daIlV.js +0 -1030
- package/dist/Modal-Cg8daIlV.js.map +0 -1
- package/dist/Modal-CuuJdWkD.cjs +0 -46
- package/dist/Modal-CuuJdWkD.cjs.map +0 -1
- package/dist/ReferenceLine-CPMaAX0r.js +0 -128
- package/dist/ReferenceLine-CPMaAX0r.js.map +0 -1
- package/dist/ReferenceLine-D04j-zeV.cjs +0 -2
- package/dist/ReferenceLine-D04j-zeV.cjs.map +0 -1
- package/dist/RegressionLine-CW7iViH2.js +0 -49
- package/dist/RegressionLine-CW7iViH2.js.map +0 -1
- package/dist/RegressionLine-D-49RaHa.cjs +0 -2
- package/dist/RegressionLine-D-49RaHa.cjs.map +0 -1
- package/dist/Spinner-Bpz70q_g.js +0 -30
- package/dist/Spinner-Bpz70q_g.js.map +0 -1
- package/dist/Spinner-C6wLp85s.cjs +0 -2
- package/dist/Spinner-C6wLp85s.cjs.map +0 -1
- package/dist/Tooltip-6LIdPQGC.js +0 -46
- package/dist/Tooltip-6LIdPQGC.js.map +0 -1
- package/dist/Tooltip-Cpv0QohJ.cjs +0 -2
- package/dist/Tooltip-Cpv0QohJ.cjs.map +0 -1
- package/dist/Typography-BDULiwlF.cjs +0 -2
- package/dist/Typography-BDULiwlF.cjs.map +0 -1
- package/dist/Typography-LmZ9LEpe.js +0 -140
- package/dist/Typography-LmZ9LEpe.js.map +0 -1
- package/dist/XAxesLabels-CLZnBgSr.cjs +0 -2
- package/dist/XAxesLabels-CLZnBgSr.cjs.map +0 -1
- package/dist/XAxesLabels-SOSmso5J.js +0 -57
- package/dist/XAxesLabels-SOSmso5J.js.map +0 -1
- package/dist/XTicksAndGridLines-DuydSnZ_.js +0 -56
- package/dist/XTicksAndGridLines-DuydSnZ_.js.map +0 -1
- package/dist/XTicksAndGridLines-RKy7BVCO.cjs +0 -2
- package/dist/XTicksAndGridLines-RKy7BVCO.cjs.map +0 -1
- package/dist/YAxesLabels-DlDyLvhi.js +0 -52
- package/dist/YAxesLabels-DlDyLvhi.js.map +0 -1
- package/dist/YAxesLabels-Dqd259-t.cjs +0 -2
- package/dist/YAxesLabels-Dqd259-t.cjs.map +0 -1
- package/dist/YTicksAndGridLines-7t4MKtGw.js +0 -56
- package/dist/YTicksAndGridLines-7t4MKtGw.js.map +0 -1
- package/dist/YTicksAndGridLines-qGpRo_t1.cjs +0 -2
- package/dist/YTicksAndGridLines-qGpRo_t1.cjs.map +0 -1
- package/dist/checkIfMultiple-Dko_cBvE.cjs +0 -12
- package/dist/checkIfMultiple-Dko_cBvE.cjs.map +0 -1
- package/dist/checkIfMultiple-u2SmbiCf.js +0 -912
- package/dist/checkIfMultiple-u2SmbiCf.js.map +0 -1
- package/dist/customArea-1G1S78s_.cjs +0 -2
- package/dist/customArea-x4L4xwLl.js +0 -175
- package/dist/fetchAndParseData-Ba-_CgxS.cjs +0 -16
- package/dist/getGraphList-DuColTJM.js +0 -265
- package/dist/getSliderMarks-CUxPy36E.cjs +0 -6
- package/dist/getSliderMarks-CUxPy36E.cjs.map +0 -1
- package/dist/getSliderMarks-_pYOWEtO.js +0 -1023
- package/dist/getSliderMarks-_pYOWEtO.js.map +0 -1
- package/dist/index-9tDEUqOZ.js.map +0 -1
- package/dist/index-BHe3wsWF.cjs +0 -2
- package/dist/index-Bw_eHBVN.js +0 -77
- package/dist/index-C0bpbS4F.cjs +0 -2
- package/dist/index-C0bpbS4F.cjs.map +0 -1
- package/dist/index-CE9pmfxt.js +0 -430
- package/dist/index-CE9pmfxt.js.map +0 -1
- package/dist/index-CEJwW3lL.cjs +0 -2
- package/dist/index-CEJwW3lL.cjs.map +0 -1
- package/dist/index-CHPV5EwG-DBWUSD9b.js.map +0 -1
- package/dist/index-CHPV5EwG-DjM48pIC.cjs +0 -44
- package/dist/index-CHPV5EwG-DjM48pIC.cjs.map +0 -1
- package/dist/index-CQ3e6Ewi.cjs +0 -2
- package/dist/index-Cm8NIdOO.cjs +0 -10
- package/dist/index-Cm8NIdOO.cjs.map +0 -1
- package/dist/index-CoZbeNM9.cjs +0 -2
- package/dist/index-CoZbeNM9.cjs.map +0 -1
- package/dist/index-Cwgh7i7X.js +0 -122
- package/dist/index-Cwgh7i7X.js.map +0 -1
- package/dist/index-D72cOtq7.cjs +0 -2
- package/dist/index-zZjQEHlm.js +0 -342
- package/dist/index-zZjQEHlm.js.map +0 -1
- package/dist/ordinal-BOeNbyae.cjs.map +0 -1
- package/dist/ordinal-w9Lu4Stb.js.map +0 -1
- package/dist/proxy-BYIC9BuT.js.map +0 -1
- package/dist/proxy-CKadx4lC.cjs +0 -2
- package/dist/proxy-CKadx4lC.cjs.map +0 -1
- package/dist/string2HTML-z7CwHXcx.cjs +0 -3
- package/dist/transformDataForAggregation-sBpdlX8n.js +0 -755
- package/dist/transformDataForGraphFromFile-ComYvzuz.js +0 -24
- package/dist/use-in-view-CEwlc_dd.cjs +0 -2
- package/dist/use-in-view-CEwlc_dd.cjs.map +0 -1
- package/dist/use-in-view-DR-UTB96.js.map +0 -1
- package/dist/zoom-BiMNsz72.cjs +0 -2
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
|
+
import { RefObject } from 'react';
|
|
3
4
|
|
|
4
5
|
export declare function ImageDownloadButton(props: Props): JSX_2.Element;
|
|
5
6
|
|
|
6
7
|
declare interface Props {
|
|
7
8
|
buttonContent?: string | JSX.Element;
|
|
8
9
|
buttonType?: 'primary' | 'primary-without-icon' | 'secondary' | 'secondary-without-icon' | 'tertiary';
|
|
9
|
-
nodeID: string |
|
|
10
|
+
nodeID: string | RefObject<HTMLDivElement | null>;
|
|
10
11
|
filename?: string;
|
|
11
12
|
buttonSmall?: boolean;
|
|
12
13
|
className?: string;
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
function
|
|
5
|
-
const {
|
|
6
|
-
nodeID:
|
|
7
|
-
filename:
|
|
8
|
-
buttonContent:
|
|
9
|
-
buttonType:
|
|
10
|
-
buttonSmall:
|
|
11
|
-
className:
|
|
12
|
-
} =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"aria-label": "Click to download the graph as image",
|
|
22
|
-
children: a || /* @__PURE__ */ t.jsx(s, {})
|
|
23
|
-
}
|
|
24
|
-
);
|
|
1
|
+
import { c as y, j as p } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
+
import { I as b, x } from "./index-D491FEn1.js";
|
|
3
|
+
import { i as u } from "./imageDownload-BX6SILNZ.js";
|
|
4
|
+
function j(f) {
|
|
5
|
+
const e = y.c(10), {
|
|
6
|
+
nodeID: t,
|
|
7
|
+
filename: m,
|
|
8
|
+
buttonContent: i,
|
|
9
|
+
buttonType: c,
|
|
10
|
+
buttonSmall: g,
|
|
11
|
+
className: d
|
|
12
|
+
} = f, a = m === void 0 ? "image" : m, l = c === void 0 ? "tertiary" : c, s = `undp-viz-download-button ${g ? "p-2" : "py-4 px-6"} ${d === void 0 ? "" : d} border border-primary-gray-400 dark:border-primary-gray-550`;
|
|
13
|
+
let o;
|
|
14
|
+
e[0] !== a || e[1] !== t ? (o = () => {
|
|
15
|
+
typeof t == "string" ? document.getElementById(t) ? u(document.getElementById(t), a) : console.error("Cannot find the html element") : u(t.current, a);
|
|
16
|
+
}, e[0] = a, e[1] = t, e[2] = o) : o = e[2];
|
|
17
|
+
let n;
|
|
18
|
+
e[3] !== i ? (n = i || /* @__PURE__ */ p.jsx(b, {}), e[3] = i, e[4] = n) : n = e[4];
|
|
19
|
+
let r;
|
|
20
|
+
return e[5] !== l || e[6] !== s || e[7] !== o || e[8] !== n ? (r = /* @__PURE__ */ p.jsx(x, { variant: l, className: s, onClick: o, "aria-label": "Click to download the graph as image", children: n }), e[5] = l, e[6] = s, e[7] = o, e[8] = n, e[9] = r) : r = e[9], r;
|
|
25
21
|
}
|
|
26
22
|
export {
|
|
27
|
-
|
|
23
|
+
j as ImageDownloadButton
|
|
28
24
|
};
|
|
29
25
|
//# sourceMappingURL=ImageDownloadButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageDownloadButton.js","sources":["../src/Components/Actions/ImageDownloadButton.tsx"],"sourcesContent":["import { JSX } from 'react';\r\nimport { Button } from '@undp/design-system-react/Button';\r\n\r\nimport { imageDownload } from '@/Utils/imageDownload';\r\nimport { ImageDown } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n buttonContent?: string | JSX.Element;\r\n buttonType?:\r\n | 'primary'\r\n | 'primary-without-icon'\r\n | 'secondary'\r\n | 'secondary-without-icon'\r\n | 'tertiary';\r\n nodeID: string |
|
|
1
|
+
{"version":3,"file":"ImageDownloadButton.js","sources":["../src/Components/Actions/ImageDownloadButton.tsx"],"sourcesContent":["import { JSX, RefObject } from 'react';\r\nimport { Button } from '@undp/design-system-react/Button';\r\n\r\nimport { imageDownload } from '@/Utils/imageDownload';\r\nimport { ImageDown } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n buttonContent?: string | JSX.Element;\r\n buttonType?:\r\n | 'primary'\r\n | 'primary-without-icon'\r\n | 'secondary'\r\n | 'secondary-without-icon'\r\n | 'tertiary';\r\n nodeID: string | RefObject<HTMLDivElement | null>;\r\n filename?: string;\r\n buttonSmall?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function ImageDownloadButton(props: Props) {\r\n const {\r\n nodeID,\r\n filename = 'image',\r\n buttonContent,\r\n buttonType = 'tertiary',\r\n buttonSmall,\r\n className = '',\r\n } = props;\r\n return (\r\n <Button\r\n variant={buttonType}\r\n className={`undp-viz-download-button ${\r\n buttonSmall ? 'p-2' : 'py-4 px-6'\r\n } ${className} border border-primary-gray-400 dark:border-primary-gray-550`}\r\n onClick={() => {\r\n if (typeof nodeID === 'string') {\r\n if (document.getElementById(nodeID)) {\r\n imageDownload(document.getElementById(nodeID) as HTMLElement, filename);\r\n } else {\r\n console.error('Cannot find the html element');\r\n }\r\n } else {\r\n imageDownload(nodeID.current as HTMLDivElement, filename);\r\n }\r\n }}\r\n aria-label='Click to download the graph as image'\r\n >\r\n {buttonContent || <ImageDown />}\r\n </Button>\r\n );\r\n}\r\n"],"names":["ImageDownloadButton","props","$","_c","nodeID","filename","t0","buttonContent","buttonType","t1","buttonSmall","className","t2","undefined","t3","t4","document","getElementById","imageDownload","console","error","current","t5","ImageDown","t6","jsx","Button"],"mappings":";;;AAoBO,SAAAA,EAAA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Property(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DjM48pIC.cjs"),p=require("react"),y=require("./parse-hMnG_lRV.cjs"),kt=require("./simple-statistics-xm8c0LQQ.cjs"),qt=require("./index-CQ3e6Ewi.cjs"),ot=require("./numberFormattingFunction-02t-wJta.cjs"),$t=require("./Tooltip-Cpv0QohJ.cjs"),R=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),bt=require("./customArea-1G1S78s_.cjs"),Ft=require("./AxisTitle-Wkz-xeQL.cjs"),Tt=require("./Axis-CkNn1wit.cjs"),Wt=require("./ReferenceLine-D04j-zeV.cjs"),Ht=require("./RegressionLine-D-49RaHa.cjs"),Pt=require("./YTicksAndGridLines-qGpRo_t1.cjs"),Ut=require("./index-BHe3wsWF.cjs"),Yt=require("./time-Byw_jYQ7.cjs"),Gt=require("./linear-BVckp9RD.cjs"),lt=require("./line-DHV4JwCR.cjs"),ct=require("./step-BZ3C8QFW.cjs"),Xt=require("./area-D3Qx7k7K.cjs"),Bt=require("./select-Bnfk0lJx.cjs"),zt=require("./init-DU0ybBc_.cjs"),Jt=require("./pointer-Dkq5NV1q.cjs"),Kt=require("./use-in-view-CEwlc_dd.cjs"),j=require("./proxy-CKadx4lC.cjs"),Qt=require("./GraphFooter.cjs"),Zt=require("./GraphHeader.cjs"),xt=require("./Colors.cjs"),_t=require("./ColorLegend.cjs"),te=require("./EmptyState-B8IpKGcL.cjs");function ee(ut){const{data:A,width:C,height:$,lineColor:I,suffix:L,prefix:w,dateFormat:o,highlightAreaSettings:m,showValues:G,noOfXTicks:mt,rightMargin:ht,leftMargin:E,topMargin:b,bottomMargin:X,tooltip:B,onSeriesMouseOver:F,refValues:z,minValue:J,maxValue:K,animate:a,rtl:Q,strokeWidth:yt,showDots:D,annotations:pt,customHighlightAreaSettings:dt,regressionLine:T,showIntervalDots:gt,showIntervalValues:ft,intervalLineStrokeWidth:W,intervalLineColors:d,intervalAreaColor:jt,intervalAreaOpacity:wt,yAxisTitle:Z,noOfYTicks:vt,minDate:H,maxDate:P,curveType:N,styles:c,classNames:x,precision:V,customLayers:_}=ut,tt=p.useRef(null),l=Kt.useInView(tt,{once:a.once,amount:a.amount}),[u,Rt]=p.useState(!1);p.useEffect(()=>{if(l&&!u){const t=setTimeout(()=>{Rt(!0)},(a.duration+.5)*1e3);return()=>clearTimeout(t)}},[l,u,a.duration]);const S=N==="linear"?lt.curveLinear:N==="step"?ct.curveStep:N==="stepAfter"?ct.stepAfter:N==="stepBefore"?ct.stepBefore:ct.monotoneX,[k,et]=p.useState(void 0),[it,nt]=p.useState(void 0),[U,Y]=p.useState(void 0),g={top:b,bottom:X,left:Z?E+30:E,right:ht},M=p.useRef(null),n=qt.orderBy(A.filter(t=>!R.checkIfNullOrUndefined(t.y)).map(t=>({date:y.parse(`${t.date}`,o,new Date),y:t.y,yMin:R.checkIfNullOrUndefined(t.yMin)?t.y:t.yMin,yMax:R.checkIfNullOrUndefined(t.yMax)?t.y:t.yMax,data:t.data})),["date"],["asc"]),Et=m.map(t=>({...t,coordinates:[t.coordinates[0]===null?null:y.parse(`${t.coordinates[0]}`,o,new Date),t.coordinates[1]===null?null:y.parse(`${t.coordinates[1]}`,o,new Date)]})),Mt=dt.map(t=>({...t,coordinates:t.coordinates.map((f,O)=>O%2===0?y.parse(`${f}`,o,new Date):f)})),r=C-g.left-g.right,v=$-g.top-g.bottom,at=H?y.parse(`${H}`,o,new Date):n[0].date,st=P?y.parse(`${P}`,o,new Date):n[n.length-1].date,h=R.checkIfNullOrUndefined(J)?Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin)))?Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin)))>0?0:Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin))):0:J,q=Math.max(...n.map(t=>Math.max(t.y,t.yMax,t.yMin)))?Math.max(...n.map(t=>Math.max(t.y,t.yMax,t.yMin))):0,i=Yt.time().domain([at,st]).range([0,r]),s=Gt.linear().domain([h,R.checkIfNullOrUndefined(K)?q>0?q:0:K]).range([v,0]).nice(),Ot=lt.line().x(t=>i(t.date)).y(t=>s(t.y)).curve(S),At=lt.line().x(t=>i(t.date)).y(t=>s(t.yMin)).curve(S),It=lt.line().x(t=>i(t.date)).y(t=>s(t.yMax)).curve(S),Lt=Xt.area().x(t=>i(t.date)).y0(t=>s(t.yMin)).y1(t=>s(t.yMax)).curve(S),Nt=s.ticks(vt),Dt=i.ticks(mt);p.useEffect(()=>{const t=O=>{const rt=n[zt.bisectCenter(n.map(Ct=>Ct.date),i.invert(Jt.pointer(O)[0]),0)];et(rt||n[n.length-1]),F?.(rt||n[n.length-1]),Y(O.clientY),nt(O.clientX)},f=()=>{et(void 0),nt(void 0),Y(void 0),F?.(void 0)};Bt.select(M.current).on("mousemove",t).on("mouseout",f)},[i,n,F]);const St=kt.linearRegression(n.filter(t=>!R.checkIfNullOrUndefined(t.date)&&!R.checkIfNullOrUndefined(t.y)).map(t=>[i(t.date),s(t.y)])),Vt=kt.linearRegressionLine(St);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(j.motion.svg,{width:`${C}px`,height:`${$}px`,viewBox:`0 0 ${C} ${$}`,direction:"ltr",ref:tt,children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${g.left},${g.top})`,children:[e.jsxRuntimeExports.jsx(Ut.HighlightArea,{areaSettings:Et,width:r,height:v,scale:i,animate:a,isInView:l}),e.jsxRuntimeExports.jsx(bt.CustomArea,{areaSettings:Mt,scaleX:i,scaleY:s,animate:a,isInView:l}),e.jsxRuntimeExports.jsxs("g",{children:[e.jsxRuntimeExports.jsx(Pt.YTicksAndGridLines,{values:Nt.filter(t=>t!==0),y:Nt.filter(t=>t!==0).map(t=>s(t)),x1:0-E,x2:r+g.right,styles:{gridLines:c?.yAxis?.gridLines,labels:c?.yAxis?.labels},classNames:{gridLines:x?.yAxis?.gridLines,labels:x?.yAxis?.labels},suffix:L,prefix:w,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:V}),e.jsxRuntimeExports.jsx(Tt.Axis,{y1:s(h<0?0:h),y2:s(h<0?0:h),x1:0-E,x2:r+g.right,label:ot.numberFormattingFunction(h<0?0:h,"NA",V,w,L),labelPos:{x:0-E,y:s(h<0?0:h),dx:0,dy:q<0?"1em":-5},classNames:{axis:x?.xAxis?.axis,label:x?.yAxis?.labels},styles:{axis:c?.xAxis?.axis,label:c?.yAxis?.labels}}),e.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:0-E+15,y:v/2,style:c?.yAxis?.title,className:x?.yAxis?.title,text:Z,rotate90:!0})]}),e.jsxRuntimeExports.jsx("g",{children:Dt.map((t,f)=>e.jsxRuntimeExports.jsx("g",{children:e.jsxRuntimeExports.jsx("text",{y:v,x:i(t),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:y.format(t,o)})},f))}),_.filter(t=>t.position==="before").map(t=>t.layer),e.jsxRuntimeExports.jsx(j.motion.path,{style:{fill:jt},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,d:Lt(n)||""},whileInView:{opacity:wt,d:Lt(n)||"",transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),W?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(j.motion.path,{style:{stroke:d[0],fill:"none",strokeWidth:W},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:At(n)||"",opacity:1},whileInView:{pathLength:1,d:At(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),e.jsxRuntimeExports.jsx(j.motion.path,{style:{stroke:d[1],fill:"none",strokeWidth:W},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:It(n)||"",opacity:1},whileInView:{pathLength:1,d:It(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"})]}):null,e.jsxRuntimeExports.jsx(j.motion.path,{style:{stroke:I,fill:"none",strokeWidth:yt},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:Ot(n)||"",opacity:1},whileInView:{pathLength:1,d:Ot(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),k?e.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:i(k.date),x2:i(k.date),className:e.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",x?.mouseOverLine),style:c?.mouseOverLine}):null,e.jsxRuntimeExports.jsx("g",{children:n.map((t,f)=>e.jsxRuntimeExports.jsx(j.motion.g,{children:R.checkIfNullOrUndefined(t.y)?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[D?e.jsxRuntimeExports.jsx(j.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,style:{fill:I},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,cx:i(t.date),cy:s(t.y)},whileInView:{opacity:1,transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.y)}},initial:"initial",animate:l?"whileInView":"initial"}):null,gt?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(j.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,fill:d[0],cx:i(t.date),cy:s(t.yMin)},whileInView:{opacity:1,transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.yMin),fill:d[0]}},initial:"initial",animate:l?"whileInView":"initial"}),e.jsxRuntimeExports.jsx(j.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,fill:d[1],cx:i(t.date),cy:s(t.yMax)},whileInView:{opacity:1,fill:d[1],transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.yMax)}},initial:"initial",animate:l?"whileInView":"initial"})]}):null,G?e.jsxRuntimeExports.jsx(j.motion.text,{dy:-8,style:{textAnchor:"middle",...c?.graphObjectValues||{}},className:e.mo("graph-value text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,fill:I,x:i(t.date),y:s(t.y)},whileInView:{opacity:1,x:i(t.date),fill:I,y:s(t.y),transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:ot.numberFormattingFunction(t.y,"NA",V,w,L)}):null,ft?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(j.motion.text,{dy:"1em",style:{textAnchor:"middle",...c?.graphObjectValues||{}},className:e.mo("text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,fill:d[0],x:i(t.date),y:s(t.yMin)},whileInView:{opacity:1,x:i(t.date),y:s(t.yMin),fill:d[0],transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:ot.numberFormattingFunction(t.yMin,"NA",V,w,L)}),e.jsxRuntimeExports.jsx(j.motion.text,{dy:-8,style:{textAnchor:"middle",...c?.graphObjectValues||{}},className:e.mo("text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,fill:d[1],x:i(t.date),y:s(t.yMax)},whileInView:{opacity:1,fill:d[1],x:i(t.date),y:s(t.yMax),transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:ot.numberFormattingFunction(t.yMax,"NA",V,w,L)})]}):null]})},f))}),z?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:z.map((t,f)=>e.jsxRuntimeExports.jsx(Wt.RefLineY,{text:t.text,color:t.color,y:s(t.value),x1:0-E,x2:r+g.right,classNames:t.classNames,styles:t.styles,animate:a,isInView:l},f))}):null,e.jsxRuntimeExports.jsx("g",{children:pt.map((t,f)=>{const O=bt.getLineEndPoint({x:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date)):0,y:t.yCoordinate?s(t.yCoordinate):0},R.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),rt=t.showConnector?{y1:O.y,x1:O.x,y2:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?s(t.yCoordinate):0,cx:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date)):0,circleRadius:R.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,Ct={y:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:Q?0:t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),width:Q?t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0):r+g.right-(t.xCoordinate?i(y.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return e.jsxRuntimeExports.jsx(bt.Annotation,{color:t.color,connectorsSettings:rt,labelSettings:Ct,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:l},f)})}),e.jsxRuntimeExports.jsx("g",{children:T?e.jsxRuntimeExports.jsx(Ht.RegressionLine,{x1:0,x2:r,y1:Vt(0),y2:Vt(r),graphHeight:v,graphWidth:r,className:x?.regLine,style:c?.regLine,color:typeof T=="string"?T:void 0,animate:a,isInView:l}):null}),_.filter(t=>t.position==="after").map(t=>t.layer),e.jsxRuntimeExports.jsx("rect",{ref:M,style:{fill:"none",pointerEvents:"all"},width:r,height:v})]})}),k&&B&&it&&U?e.jsxRuntimeExports.jsx($t.Tooltip,{data:k,body:B,xPos:it,yPos:U,backgroundStyle:c?.tooltip,className:x?.tooltip}):null]})}function ie(ut){const{data:A,graphTitle:C,suffix:$="",sources:I,prefix:L="",graphDescription:w,height:o,width:m,footNote:G,noOfXTicks:mt=10,dateFormat:ht="yyyy",showValues:E=!1,backgroundColor:b=!1,padding:X,lineColor:B,leftMargin:F=30,rightMargin:z=30,topMargin:J=20,bottomMargin:K=25,tooltip:a,refValues:Q=[],highlightAreaSettings:yt=[],relativeHeight:D,onSeriesMouseOver:pt,graphID:dt,minValue:T,maxValue:gt,regressionLine:ft=!1,showIntervalDots:W=!1,showIntervalValues:d=!1,intervalLineStrokeWidth:jt=0,intervalLineColors:wt=[xt.Colors.light.grays["gray-500"],xt.Colors.light.grays["gray-500"]],intervalAreaColor:Z=xt.Colors.primaryColors["blue-100"],intervalAreaOpacity:vt=.4,graphDownload:H=!1,dataDownload:P=!1,animate:N=!1,language:c="en",minHeight:x=0,strokeWidth:V=2,showDots:_=!0,annotations:tt=[],customHighlightAreaSettings:l=[],theme:u="light",ariaLabel:Rt,yAxisTitle:S,noOfYTicks:k=5,minDate:et,maxDate:it,colorLegendTitle:nt,colorLegendColors:U,colorLegendDomain:Y,curveType:g="curve",styles:M,classNames:n,precision:Et=2,customLayers:Mt=[]}=ut,[r,v]=p.useState(0),[at,st]=p.useState(0),h=p.useRef(null),q=p.useRef(null);return p.useEffect(()=>{const i=new ResizeObserver(s=>{v(m||s[0].target.clientWidth||620),st(o||s[0].target.clientHeight||480)});return h.current&&(st(h.current.clientHeight||480),v(h.current.clientWidth||620),m||i.observe(h.current)),()=>i.disconnect()},[m,o]),e.jsxRuntimeExports.jsx("div",{className:`${u||"light"} flex ${m?"w-fit grow-0":"w-full grow"}`,dir:c==="he"||c==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${b?b===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${c||"en"}`,m?"w-fit":"w-full",n?.graphContainer),style:{...M?.graphContainer||{},...b&&b!==!0?{backgroundColor:b}:{}},id:dt,ref:q,"aria-label":Rt||`${C?`The graph shows ${C}. `:""}This is a line chart that highlights the difference between two datasets over time.${w?` ${w}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:b?X||"1rem":X||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[C||w||H||P?e.jsxRuntimeExports.jsx(Zt.GraphHeader,{styles:{title:M?.title,description:M?.description},classNames:{title:n?.title,description:n?.description},graphTitle:C,graphDescription:w,width:m,graphDownload:H?q.current:void 0,dataDownload:P?A.map(i=>i.data).filter(i=>i!==void 0).length>0?A.map(i=>i.data).filter(i=>i!==void 0):A.filter(i=>i!==void 0):null}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:A.length===0?e.jsxRuntimeExports.jsx(te.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[U&&Y?e.jsxRuntimeExports.jsx(_t.ColorLegend,{width:m,colorLegendTitle:nt,colors:U,colorDomain:Y,showNAColor:!1}):null,e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:h,"aria-label":"Graph area",children:(m||r)&&(o||at)?e.jsxRuntimeExports.jsx(ee,{data:A,lineColor:B||xt.Colors.primaryColors["blue-600"],width:m||r,height:Math.max(x,o||(D?x?(m||r)*D>x?(m||r)*D:x:(m||r)*D:at)),suffix:$,prefix:L,dateFormat:ht,showValues:E,noOfXTicks:mt,leftMargin:F,rightMargin:z,topMargin:J,bottomMargin:K,tooltip:a,highlightAreaSettings:yt,onSeriesMouseOver:pt,refValues:Q,minValue:T,maxValue:gt,animate:N===!0?{duration:.5,once:!0,amount:.5}:N||{duration:0,once:!0,amount:0},rtl:c==="he"||c==="ar",strokeWidth:V,showDots:_,annotations:tt,customHighlightAreaSettings:l,regressionLine:ft,showIntervalDots:W,showIntervalValues:d,intervalLineStrokeWidth:jt,intervalLineColors:wt,intervalAreaColor:Z,intervalAreaOpacity:vt,yAxisTitle:S,noOfYTicks:k,minDate:et,maxDate:it,curveType:g,styles:M,classNames:n,precision:Et,customLayers:Mt}):null})]})}),I||G?e.jsxRuntimeExports.jsx(Qt.GraphFooter,{styles:{footnote:M?.footnote,source:M?.source},classNames:{footnote:n?.footnote,source:n?.source},sources:I,footNote:G,width:m}):null]})})})})}exports.LineChartWithConfidenceInterval=ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),E=require("react"),w=require("./parse-hMnG_lRV.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-4dJo4_AF.cjs"),F=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-CMF5g-C3.cjs"),Fe=require("./AxisTitle-sS5bLLR7.cjs"),We=require("./Axis-DxRV2yMi.cjs"),He=require("./ReferenceLine-BH0qdf4R.cjs"),Ge=require("./RegressionLine-BOTTNSrr.cjs"),Pe=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Ye=require("./index-B_sAFsEV.cjs"),Ue=require("./time-CZd5YLSP.cjs"),Xe=require("./linear-BwPAspcq.cjs"),Ae=require("./line-DHV4JwCR.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-D3Qx7k7K.cjs"),ze=require("./select-Bnfk0lJx.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-QcfiW0w3.cjs"),O=require("./proxy-BxvUI_9l.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),ke=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-sAEZ_5rU.cjs"),De=require("./GraphContainer-d8A46BK2.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:A,width:J,height:qt,lineColor:b,suffix:V,prefix:C,dateFormat:l,highlightAreaSettings:h,showValues:Tt,noOfXTicks:me,rightMargin:$t,leftMargin:N,topMargin:Ft,bottomMargin:xt,tooltip:K,onSeriesMouseOver:Wt,refValues:_t,minValue:te,maxValue:mt,animate:o,rtl:pt,strokeWidth:Q,showDots:ee,annotations:ie,customHighlightAreaSettings:dt,regressionLine:ht,showIntervalDots:ne,showIntervalValues:pe,intervalLineStrokeWidth:Ht,intervalLineColors:R,intervalAreaColor:Gt,intervalAreaOpacity:Pt,yAxisTitle:ft,noOfYTicks:de,minDate:oe,maxDate:se,curveType:yt,styles:f,classNames:y,precision:S,customLayers:W}=n,gt=E.useRef(null);let H;t[0]!==o.amount||t[1]!==o.once?(H={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=H):H=t[2];const c=Qe.useInView(gt,H),[m,ae]=E.useState(!1);let vt,Z;t[3]!==o.duration||t[4]!==m||t[5]!==c?(vt=()=>{if(c&&!m){const e=setTimeout(()=>{ae(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},Z=[c,m,o.duration],t[3]=o.duration,t[4]=m,t[5]=c,t[6]=vt,t[7]=Z):(vt=t[6],Z=t[7]),E.useEffect(vt,Z);const _=yt==="linear"?Ae.curveLinear:yt==="step"?be.curveStep:yt==="stepAfter"?be.stepAfter:yt==="stepBefore"?be.stepBefore:be.monotoneX,[k,jt]=E.useState(void 0),[G,re]=E.useState(void 0),[x,p]=E.useState(void 0),Yt=ft?N+30:N;let P;t[8]!==xt||t[9]!==$t||t[10]!==Yt||t[11]!==Ft?(P={top:Ft,bottom:xt,left:Yt,right:$t},t[8]=xt,t[9]=$t,t[10]=Yt,t[11]=Ft,t[12]=P):P=t[12];const v=P,tt=E.useRef(null);let et;t[13]!==l?(et=e=>({date:w.parse(`${e.date}`,l,new Date),y:e.y,yMin:F.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:F.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=et):et=t[14];const a=Te.orderBy(A.filter(yi).map(et),["date"],["asc"]);let it;if(t[15]!==l||t[16]!==h){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:w.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:w.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],it=h.map(e),t[15]=l,t[16]=h,t[17]=it}else it=t[17];const wt=it;let nt;if(t[20]!==dt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((z,Zt)=>Zt%2===0?w.parse(`${z}`,l,new Date):z)}),t[23]=l,t[24]=e):e=t[24],nt=dt.map(e),t[20]=dt,t[21]=l,t[22]=nt}else nt=t[22];const le=nt,u=J-v.left-v.right,g=qt-v.top-v.bottom,Ut=oe?w.parse(`${oe}`,l,new Date):a[0].date,ce=se?w.parse(`${se}`,l,new Date):a[a.length-1].date,j=F.checkIfNullOrUndefined(te)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:te,Y=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([Ut,ce]).range([0,u]);let ot;t[25]!==Y||t[26]!==mt?(ot=F.checkIfNullOrUndefined(mt)?Y>0?Y:0:mt,t[25]=Y,t[26]=mt,t[27]=ot):ot=t[27];const r=Xe.linear().domain([j,ot]).range([g,0]).nice(),Xt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(_),Rt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(_),Bt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(_),zt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(_),Jt=r.ticks(de),Kt=s.ticks(me);E.useEffect(()=>{const e=z=>{const Zt=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(z)[0]),0)];jt(Zt||a[a.length-1]),Wt?.(Zt||a[a.length-1]),p(z.clientY),re(z.clientX)},d=()=>{jt(void 0),re(void 0),p(void 0),Wt?.(void 0)};ze.select(tt.current).on("mousemove",e).on("mouseout",d)},[s,a,Wt]);const Qt=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Et=Se.linearRegressionLine(Qt);let M;t[28]!==o||t[29]!==g||t[30]!==u||t[31]!==wt||t[32]!==c||t[33]!==s?(M=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:wt,width:u,height:g,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=g,t[30]=u,t[31]=wt,t[32]=c,t[33]=s,t[34]=M):M=t[34];const Ct=f?.yAxis?.gridLines,Mt=f?.yAxis?.labels;let st;t[35]!==Ct||t[36]!==Mt?(st={gridLines:Ct,labels:Mt},t[35]=Ct,t[36]=Mt,t[37]=st):st=t[37];const at=y?.yAxis?.gridLines,Ot=y?.yAxis?.labels;let U;t[38]!==at||t[39]!==Ot?(U={gridLines:at,labels:Ot},t[38]=at,t[39]=Ot,t[40]=U):U=t[40];const At=r(j<0?0:j),bt=r(j<0?0:j),kt=0-N,Lt=u+v.right,It=j<0?0:j;let L;t[41]!==S||t[42]!==C||t[43]!==V||t[44]!==It?(L=Oe.numberFormattingFunction(It,"NA",S,C,V),t[41]=S,t[42]=C,t[43]=V,t[44]=It,t[45]=L):L=t[45];const Vt=0-N,X=r(j<0?0:j),ue=Y<0?"1em":-5;let I;t[46]!==Vt||t[47]!==X||t[48]!==ue?(I={x:Vt,y:X,dx:0,dy:ue},t[46]=Vt,t[47]=X,t[48]=ue,t[49]=I):I=t[49];const xe=y?.xAxis?.axis,Nt=y?.yAxis?.labels;let B;t[50]!==xe||t[51]!==Nt?(B={axis:xe,label:Nt},t[50]=xe,t[51]=Nt,t[52]=B):B=t[52];const rt=f?.xAxis?.axis,lt=f?.yAxis?.labels;let D;t[53]!==rt||t[54]!==lt?(D={axis:rt,label:lt},t[53]=rt,t[54]=lt,t[55]=D):D=t[55];let ct;t[56]!==At||t[57]!==bt||t[58]!==kt||t[59]!==Lt||t[60]!==L||t[61]!==I||t[62]!==B||t[63]!==D?(ct=i.jsxRuntimeExports.jsx(We.Axis,{y1:At,y2:bt,x1:kt,x2:Lt,label:L,labelPos:I,classNames:B,styles:D}),t[56]=At,t[57]=bt,t[58]=kt,t[59]=Lt,t[60]=L,t[61]=I,t[62]=B,t[63]=D,t[64]=ct):ct=t[64];const q=0-N+15,T=g/2,$=f?.yAxis?.title,ut=y?.yAxis?.title;let St;t[65]!==q||t[66]!==T||t[67]!==$||t[68]!==ut||t[69]!==ft?(St=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:q,y:T,style:$,className:ut,text:ft,rotate90:!0}),t[65]=q,t[66]=T,t[67]=$,t[68]=ut,t[69]=ft,t[70]=St):St=t[70];let Dt;t[71]!==W?(Dt=W.filter(ri).map(ai),t[71]=W,t[72]=Dt):Dt=t[72];let he;t[73]!==Gt?(he={fill:Gt},t[73]=Gt,t[74]=he):he=t[74];let fe;t[75]!==o.duration?(fe={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=fe):fe=t[76];let ye;t[77]!==b||t[78]!==Q?(ye={stroke:b,fill:"none",strokeWidth:Q},t[77]=b,t[78]=Q,t[79]=ye):ye=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const Le=a.map((e,d)=>i.jsxRuntimeExports.jsx(O.motion.g,{children:F.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[ee?i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ne?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:R[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(O.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:R[1],transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Tt?i.jsxRuntimeExports.jsx(O.motion.text,{dy:-8,style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",S,C,V)}):null,pe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.text,{dy:"1em",style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:R[0],transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",S,C,V)}),i.jsxRuntimeExports.jsx(O.motion.text,{dy:-8,style:{textAnchor:"middle",...f?.graphObjectValues||{}},className:i.mo("text-xs font-bold",y?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:R[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:R[1],x:s(e.date),y:r(e.yMax),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",S,C,V)})]}):null]})},d));let ve;t[82]!==Le?(ve=i.jsxRuntimeExports.jsx("g",{children:Le}),t[82]=Le,t[83]=ve):ve=t[83];const Ie=ie.map((e,d)=>{const z=Ne.getLineEndPoint({x:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},F.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),Zt=e.showConnector?{y1:z.y,x1:z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:F.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:pt?0:e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:pt?e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+v.right-(e.xCoordinate?s(w.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:Zt,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=ht?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Et(0),y2:Et(u),graphHeight:g,graphWidth:u,className:y?.regLine,style:f?.regLine,color:typeof ht=="string"?ht:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==W?(Re=W.filter(si).map(oi),t[88]=W,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==tt||t[92]!==g||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:tt,style:Ee,width:u,height:g}),t[91]=tt,t[92]=g,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==y?.tooltip||t[96]!==G||t[97]!==x||t[98]!==k||t[99]!==f?.tooltip||t[100]!==K?(Me=k&&K&&G&&x?i.jsxRuntimeExports.jsx($e.Tooltip,{data:k,body:K,xPos:G,yPos:x,backgroundStyle:f?.tooltip,className:y?.tooltip}):null,t[95]=y?.tooltip,t[96]=G,t[97]=x,t[98]=k,t[99]=f?.tooltip,t[100]=K,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.svg,{width:`${J}px`,height:`${qt}px`,viewBox:`0 0 ${J} ${qt}`,direction:"ltr",ref:gt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${v.left},${v.top})`,children:[M,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:le,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Jt.filter(ci),y:Jt.filter(li).map(e=>r(e)),x1:0-N,x2:u+v.right,styles:st,classNames:U,suffix:V,prefix:C,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:S}),ct,St]}),i.jsxRuntimeExports.jsx("g",{children:Kt.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:g,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:w.format(e,l)})},d))}),Dt,i.jsxRuntimeExports.jsx(O.motion.path,{style:he,exit:fe,variants:{initial:{opacity:0,d:zt(a)||""},whileInView:{opacity:Pt,d:zt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Ht?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(O.motion.path,{style:{stroke:R[0],fill:"none",strokeWidth:Ht},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Rt(a)||"",opacity:1},whileInView:{pathLength:1,d:Rt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(O.motion.path,{style:{stroke:R[1],fill:"none",strokeWidth:Ht},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Bt(a)||"",opacity:1},whileInView:{pathLength:1,d:Bt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(O.motion.path,{style:ye,exit:ge,variants:{initial:{pathLength:0,d:Xt(a)||"",opacity:1},whileInView:{pathLength:1,d:Xt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),k?i.jsxRuntimeExports.jsx("line",{y1:0,y2:g,x1:s(k.date),x2:s(k.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",y?.mouseOverLine),style:f?.mouseOverLine}):null,ve,_t?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-N,x2:u+v.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!F.checkIfNullOrUndefined(n.date)&&!F.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!F.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(95),{data:A,graphTitle:J,suffix:qt,sources:b,prefix:V,graphDescription:C,height:l,width:h,footNote:Tt,noOfXTicks:me,dateFormat:$t,showValues:N,backgroundColor:Ft,padding:xt,lineColor:K,leftMargin:Wt,rightMargin:_t,topMargin:te,bottomMargin:mt,tooltip:o,refValues:pt,highlightAreaSettings:Q,relativeHeight:ee,onSeriesMouseOver:ie,graphID:dt,minValue:ht,maxValue:ne,regressionLine:pe,showIntervalDots:Ht,showIntervalValues:R,intervalLineStrokeWidth:Gt,intervalLineColors:Pt,intervalAreaColor:ft,intervalAreaOpacity:de,graphDownload:oe,dataDownload:se,animate:yt,language:f,minHeight:y,strokeWidth:S,showDots:W,annotations:gt,customHighlightAreaSettings:H,theme:c,ariaLabel:m,yAxisTitle:ae,noOfYTicks:vt,minDate:Z,maxDate:_,colorLegendTitle:k,colorLegendColors:jt,colorLegendDomain:G,curveType:re,styles:x,classNames:p,precision:Yt,customLayers:P}=n,v=qt===void 0?"":qt,tt=V===void 0?"":V,et=me===void 0?10:me,a=$t===void 0?"yyyy":$t,it=N===void 0?!1:N,wt=Ft===void 0?!1:Ft,nt=Wt===void 0?30:Wt,le=_t===void 0?30:_t,u=te===void 0?20:te,g=mt===void 0?25:mt;let Ut;t[0]!==pt?(Ut=pt===void 0?[]:pt,t[0]=pt,t[1]=Ut):Ut=t[1];const ce=Ut;let j;t[2]!==Q?(j=Q===void 0?[]:Q,t[2]=Q,t[3]=j):j=t[3];const Y=j,s=pe===void 0?!1:pe,ot=Ht===void 0?!1:Ht,r=R===void 0?!1:R,Xt=Gt===void 0?0:Gt;let Rt;t[4]!==Pt?(Rt=Pt===void 0?[ke.Colors.light.grays["gray-500"],ke.Colors.light.grays["gray-500"]]:Pt,t[4]=Pt,t[5]=Rt):Rt=t[5];const Bt=Rt,zt=ft===void 0?ke.Colors.primaryColors["blue-100"]:ft,Jt=de===void 0?.4:de,Kt=oe===void 0?!1:oe,Qt=se===void 0?!1:se,Et=yt===void 0?!1:yt,M=f===void 0?"en":f,Ct=y===void 0?0:y,Mt=S===void 0?2:S,st=W===void 0?!0:W;let at;t[6]!==gt?(at=gt===void 0?[]:gt,t[6]=gt,t[7]=at):at=t[7];const Ot=at;let U;t[8]!==H?(U=H===void 0?[]:H,t[8]=H,t[9]=U):U=t[9];const At=U,bt=c===void 0?"light":c,kt=vt===void 0?5:vt,Lt=re===void 0?"curve":re,It=Yt===void 0?2:Yt;let L;t[10]!==P?(L=P===void 0?[]:P,t[10]=P,t[11]=L):L=t[11];const Vt=L,[X,ue]=E.useState(0),[I,xe]=E.useState(0),Nt=E.useRef(null),B=E.useRef(null);let rt,lt;t[12]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{const St=new ResizeObserver(Dt=>{ue(Dt[0].target.clientWidth||620),xe(Dt[0].target.clientHeight||480)});return Nt.current&&St.observe(Nt.current),()=>St.disconnect()},lt=[],t[12]=rt,t[13]=lt):(rt=t[12],lt=t[13]),E.useEffect(rt,lt);const D=p?.graphContainer,ct=x?.graphContainer;let q;t[14]!==p?.description||t[15]!==p?.title||t[16]!==A||t[17]!==Qt||t[18]!==C||t[19]!==Kt||t[20]!==J||t[21]!==x?.description||t[22]!==x?.title||t[23]!==h?(q=J||C||Kt||Qt?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:x?.title,description:x?.description},classNames:{title:p?.title,description:p?.description},graphTitle:J,graphDescription:C,width:h,graphDownload:Kt?B:void 0,dataDownload:Qt?A.map(Ei).filter(Ri).length>0?A.map(wi).filter(ji):A.filter(vi):null}):null,t[14]=p?.description,t[15]=p?.title,t[16]=A,t[17]=Qt,t[18]=C,t[19]=Kt,t[20]=J,t[21]=x?.description,t[22]=x?.title,t[23]=h,t[24]=q):q=t[24];let T;t[25]!==Et||t[26]!==Ot||t[27]!==g||t[28]!==p||t[29]!==jt||t[30]!==G||t[31]!==k||t[32]!==Lt||t[33]!==At||t[34]!==Vt||t[35]!==A||t[36]!==a||t[37]!==Y||t[38]!==zt||t[39]!==Jt||t[40]!==Bt||t[41]!==Xt||t[42]!==M||t[43]!==nt||t[44]!==K||t[45]!==_||t[46]!==ne||t[47]!==Z||t[48]!==ht||t[49]!==et||t[50]!==kt||t[51]!==ie||t[52]!==It||t[53]!==tt||t[54]!==ce||t[55]!==s||t[56]!==le||t[57]!==st||t[58]!==ot||t[59]!==r||t[60]!==it||t[61]!==Mt||t[62]!==x||t[63]!==v||t[64]!==I||t[65]!==X||t[66]!==o||t[67]!==u||t[68]!==h||t[69]!==ae?(T=A.length===0?i.jsxRuntimeExports.jsx(ei.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[jt&&G?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:h,colorLegendTitle:k,colors:jt,colorDomain:G,showNAColor:!1,className:p?.colorLegend}):null,i.jsxRuntimeExports.jsx(De.GraphArea,{ref:Nt,children:X&&I?i.jsxRuntimeExports.jsx(ni,{data:A,lineColor:K||ke.Colors.primaryColors["blue-600"],width:X,height:I,suffix:v,prefix:tt,dateFormat:a,showValues:it,noOfXTicks:et??ii.getNoOfTicks(X),leftMargin:nt,rightMargin:le,topMargin:u,bottomMargin:g,tooltip:o,highlightAreaSettings:Y,onSeriesMouseOver:ie,refValues:ce,minValue:ht,maxValue:ne,animate:Et===!0?{duration:.5,once:!0,amount:.5}:Et||{duration:0,once:!0,amount:0},rtl:M==="he"||M==="ar",strokeWidth:Mt,showDots:st,annotations:Ot,customHighlightAreaSettings:At,regressionLine:s,showIntervalDots:ot,showIntervalValues:r,intervalLineStrokeWidth:Xt,intervalLineColors:Bt,intervalAreaColor:zt,intervalAreaOpacity:Jt,yAxisTitle:ae,noOfYTicks:kt,minDate:Z,maxDate:_,curveType:Lt,styles:x,classNames:p,precision:It,customLayers:Vt}):null})]}),t[25]=Et,t[26]=Ot,t[27]=g,t[28]=p,t[29]=jt,t[30]=G,t[31]=k,t[32]=Lt,t[33]=At,t[34]=Vt,t[35]=A,t[36]=a,t[37]=Y,t[38]=zt,t[39]=Jt,t[40]=Bt,t[41]=Xt,t[42]=M,t[43]=nt,t[44]=K,t[45]=_,t[46]=ne,t[47]=Z,t[48]=ht,t[49]=et,t[50]=kt,t[51]=ie,t[52]=It,t[53]=tt,t[54]=ce,t[55]=s,t[56]=le,t[57]=st,t[58]=ot,t[59]=r,t[60]=it,t[61]=Mt,t[62]=x,t[63]=v,t[64]=I,t[65]=X,t[66]=o,t[67]=u,t[68]=h,t[69]=ae,t[70]=T):T=t[70];let $;t[71]!==p?.footnote||t[72]!==p?.source||t[73]!==Tt||t[74]!==b||t[75]!==x?.footnote||t[76]!==x?.source||t[77]!==h?($=b||Tt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:x?.footnote,source:x?.source},classNames:{footnote:p?.footnote,source:p?.source},sources:b,footNote:Tt,width:h}):null,t[71]=p?.footnote,t[72]=p?.source,t[73]=Tt,t[74]=b,t[75]=x?.footnote,t[76]=x?.source,t[77]=h,t[78]=$):$=t[78];let ut;return t[79]!==m||t[80]!==wt||t[81]!==dt||t[82]!==l||t[83]!==M||t[84]!==Ct||t[85]!==xt||t[86]!==ee||t[87]!==D||t[88]!==ct||t[89]!==q||t[90]!==T||t[91]!==$||t[92]!==bt||t[93]!==h?(ut=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:D,style:ct,id:dt,ref:B,"aria-label":m,backgroundColor:wt,theme:bt,language:M,minHeight:Ct,width:h,height:l,relativeHeight:ee,padding:xt,children:[q,T,$]}),t[79]=m,t[80]=wt,t[81]=dt,t[82]=l,t[83]=M,t[84]=Ct,t[85]=xt,t[86]=ee,t[87]=D,t[88]=ct,t[89]=q,t[90]=T,t[91]=$,t[92]=bt,t[93]=h,t[94]=ut):ut=t[94],ut}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
|
|
2
2
|
//# sourceMappingURL=LineChartWithConfidenceInterval.cjs.map
|
|
@@ -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 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,SAAS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AAA,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\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\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getNoOfTicks } from '@/Utils/getNoOfTicks';\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(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {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 className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <Graph\r\n data={data}\r\n lineColor={lineColor || Colors.primaryColors['blue-600']}\r\n width={svgWidth}\r\n height={svgHeight}\r\n suffix={suffix}\r\n prefix={prefix}\r\n dateFormat={dateFormat}\r\n showValues={showValues}\r\n noOfXTicks={noOfXTicks ?? getNoOfTicks(svgWidth)}\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 </GraphArea>\r\n </>\r\n )}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","$","_c","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","t0","amount","once","isInView","useInView","hasAnimatedOnce","setHasAnimatedOnce","useState","t1","t2","duration","timeout","setTimeout","clearTimeout","useEffect","curve","curveLinear","curveStep","curveStepAfter","curveStepBefore","curveMonotoneX","mouseOverData","setMouseOverData","undefined","eventX","setEventX","eventY","setEventY","t3","t4","top","bottom","left","right","margin","MouseoverRectRef","t5","d_0","date","parse","d","Date","y","yMin","checkIfNullOrUndefined","yMax","dataFormatted","orderBy","filter","_temp","map","t6","t7","d_1","coordinates","highlightAreaSettingsFormatted","t8","d_2","el","j","customHighlightAreaSettingsFormatted","graphWidth","graphHeight","minYear","maxYear","length","minParam","Math","min","_temp2","_temp3","_temp4","maxParam","max","_temp5","_temp6","x","scaleTime","domain","range","scaleLinear","nice","lineShape","line","d_8","lineShapeMin","d_10","lineShapeMax","d_12","areaShape","area","d_14","y0","d_15","y1","d_16","yTicks","ticks","xTicks","mousemove","event","selectedData","bisectCenter","_temp7","invert","pointer","clientY","clientX","mouseout","select","current","on","regressionLineParam","linearRegression","_temp8","d_19","predict","linearRegressionLine","t9","jsx","HighlightArea","t10","yAxis","gridLines","t11","labels","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","numberFormattingFunction","t22","t23","t24","t25","dx","dy","t26","xAxis","axis","t27","t28","label","t29","t30","t31","t32","Axis","t33","t34","t35","title","t36","t37","AxisTitle","t38","_temp1","_temp10","t39","fill","t40","opacity","transition","t41","stroke","t42","t43","d_26","i_0","motion","jsxs","Fragment","initial","cx","cy","whileInView","delay","textAnchor","graphObjectValues","cn","i","t44","t45","d_27","i_2","endPoints","getLineEndPoint","xCoordinate","xOffset","yCoordinate","yOffset","connectorRadius","connectorSettings","showConnector","x1","y2","x2","circleRadius","labelSettings","maxWidth","fontWeight","align","Annotation","color","text","t46","t47","RegressionLine","regLine","t48","t49","_temp11","_temp12","t50","Symbol","for","pointerEvents","t51","t52","Tooltip","CustomArea","YTicksAndGridLines","_temp9","_temp0","d_22","d_23","format","pathLength","mouseOverLine","el_0","i_1","RefLineY","value","d_29","layer","d_28","position","d_25","d_24","d_21","d_20","d_18","d_17","d_6","d_7","d_3","d_4","d_5","LineChartWithConfidenceInterval","graphTitle","sources","graphDescription","footNote","backgroundColor","padding","relativeHeight","graphID","graphDownload","dataDownload","language","minHeight","theme","ariaLabel","colorLegendTitle","colorLegendColors","colorLegendDomain","Colors","light","grays","primaryColors","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","graphContainer","description","GraphHeader","EmptyState","ColorLegend","colorLegend","GraphArea","getNoOfTicks","footnote","source","GraphFooter","GraphContainer"],"mappings":"4wCAiGO,SAAAA,GAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,GAAA,EACL,CAAAC,KAAAA,EAAAC,MAAAA,EAAAC,OAAAA,GAAAC,UAAAA,EAAAC,OAAAA,EAAAC,OAAAA,EAAAC,WAAAA,EAAAC,sBAAAA,EAAAC,WAAAA,GAAAC,WAAAA,GAAAC,YAAAA,GAAAC,WAAAA,EAAAC,UAAAA,GAAAC,aAAAA,GAAAC,QAAAA,EAAAC,kBAAAA,GAAAC,UAAAA,GAAAC,SAAAA,GAAAC,SAAAA,GAAAC,QAAAA,EAAAC,IAAAA,GAAAC,YAAAA,EAAAC,SAAAA,GAAAC,YAAAA,GAAAC,4BAAAA,GAAAC,eAAAA,GAAAC,iBAAAA,GAAAC,mBAAAA,GAAAC,wBAAAA,GAAAC,mBAAAA,EAAAC,kBAAAA,GAAAC,oBAAAA,GAAAC,WAAAA,GAAAC,WAAAA,GAAAC,QAAAA,GAAAC,QAAAA,GAAAC,UAAAA,GAAAC,OAAAA,EAAAC,WAAAA,EAAAC,UAAAA,EAAAC,aAAAA,CAAAA,EA0CI3C,EACJ4C,GAAeC,EAAAA,OAAO,IAAI,EAAE,IAAAC,EAAA7C,EAAA,CAAA,IAAAqB,EAAAyB,QAAA9C,EAAA,CAAA,IAAAqB,EAAA0B,MACOF,EAAA,CAAAE,KAC3B1B,EAAO0B,KAAKD,OACVzB,EAAOyB,MAAAA,EAChB9C,EAAA,CAAA,EAAAqB,EAAAyB,OAAA9C,EAAA,CAAA,EAAAqB,EAAA0B,KAAA/C,KAAA6C,GAAAA,EAAA7C,EAAA,CAAA,EAHD,MAA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