@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BiVariateChoroplethMap.js","sources":["../src/Components/Graphs/Maps/BiVariateMap/Graph.tsx","../src/Components/Graphs/Maps/BiVariateMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold } from 'd3-scale';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n BivariateMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n data: BivariateMapDataType[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n xDomain: number[];\r\n yDomain: number[];\r\n width: number;\r\n height: number;\r\n colors: string[][];\r\n xColorLegendTitle: string;\r\n yColorLegendTitle: string;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n showColorScale: boolean;\r\n collapseColorScaleByDefault?: boolean;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n xDomain,\r\n mapData,\r\n xColorLegendTitle,\r\n yDomain,\r\n yColorLegendTitle,\r\n width,\r\n height,\r\n colors,\r\n scale,\r\n centerPoint,\r\n mapBorderWidth,\r\n mapNoDataColor,\r\n mapBorderColor,\r\n tooltip,\r\n onSeriesMouseOver,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n showColorScale,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\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 mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const xRange = Array.from({ length: xDomain.length }, (_, i) => i);\r\n\r\n const yRange = Array.from({ length: yDomain.length }, (_, i) => i);\r\n const xScale = scaleThreshold<number, number>().domain(xDomain).range(xRange);\r\n const yScale = scaleThreshold<number, number>().domain(yDomain).range(yRange);\r\n\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n viewBox={`0 0 ${width} ${height}`}\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </motion.g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const xColorCoord = !checkIfNullOrUndefined(d.x)\r\n ? xScale(d.x as number)\r\n : undefined;\r\n const yColorCoord = !checkIfNullOrUndefined(d.y)\r\n ? yScale(d.y as number)\r\n : undefined;\r\n const color =\r\n xColorCoord !== undefined && yColorCoord !== undefined\r\n ? colors[yColorCoord][xColorCoord]\r\n : mapNoDataColor;\r\n\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n d={masterPath}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? mapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className='absolute left-4 bottom-4'>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{ width: '175px' }}\r\n >\r\n <div className='flex gap-1 items-center'>\r\n <svg width='136px' viewBox='0 0 136 136' className='shrink-0'>\r\n <g>\r\n {colors.map((d, i) => (\r\n <g key={i} transform={`translate(0,${100 - i * 25})`}>\r\n {d.map((el, j) => (\r\n <rect\r\n key={j}\r\n y={1}\r\n x={j * 25 + 1}\r\n fill={el}\r\n width={23}\r\n height={23}\r\n strokeWidth={selectedColor === el ? 2 : 0.25}\r\n style={{ cursor: 'pointer' }}\r\n onMouseOver={() => {\r\n setSelectedColor(el);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n <g transform='translate(0,125)'>\r\n {xDomain.map((el, j) => (\r\n <text key={j} y={10} x={(j + 1) * 25} fontSize={10} textAnchor='middle'>\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n ))}\r\n </g>\r\n {yDomain.map((el, j) => (\r\n <g\r\n key={j}\r\n transform={`translate(${\r\n Math.max(Math.min(xDomain.length + 1, 5), 4) * 25 + 10\r\n },${100 - j * 25})`}\r\n >\r\n <text\r\n x={0}\r\n transform='rotate(-90)'\r\n y={0}\r\n fontSize={10}\r\n textAnchor='middle'\r\n >\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n </g>\r\n </svg>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='leading-normal text-center shrink-0'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n writingMode: 'vertical-rl',\r\n height: '8.5rem',\r\n transform: 'rotate(180deg)',\r\n }}\r\n >\r\n {yColorLegendTitle}\r\n </P>\r\n </div>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='mt-1 leading-normal text-center'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n width: '8.5rem',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n }}\r\n >\r\n {xColorLegendTitle}\r\n </P>\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useEffect, useRef, useState } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { ascending, sort } from 'd3-array';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BivariateMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects. */\r\n data: BivariateMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for the choropleth map. Array must be 5x5 */\r\n colors?: string[][];\r\n /** Title for the first color legend */\r\n xColorLegendTitle?: string;\r\n /** Title for the second color legend */\r\n yColorLegendTitle?: string;\r\n /** Domain of x-colors for the map */\r\n xDomain?: number[];\r\n /** Domain of y-colors for the map */\r\n yDomain?: number[];\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\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 /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function BiVariateChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n colors = Colors.light.bivariateColors.colors05x05,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n xDomain,\r\n yDomain,\r\n xColorLegendTitle = 'X Color key',\r\n yColorLegendTitle = 'Y Color key',\r\n tooltip,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n showColorScale = true,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = sort(\r\n uniqBy(data, 'date', true).map(d =>\r\n parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime(),\r\n ),\r\n (a, b) => ascending(a, b),\r\n );\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].contentRect.width || 760);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 760);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n setMapShape(d);\r\n });\r\n } else {\r\n setMapShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n\r\n if (xDomain && yDomain)\r\n if (xDomain.length !== colors[0].length - 1 || yDomain.length !== colors.length - 1) {\r\n console.error(\"the xDomain and yDomain array length don't match to the color array length\");\r\n return null;\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 bi-variate choropleth map where geographic areas are colored in proportion to two variables.${\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 {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n xDomain={\r\n xDomain ||\r\n getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors[0].length,\r\n )\r\n }\r\n yDomain={\r\n yDomain ||\r\n getJenks(\r\n data.map(d => d.y as number | null | undefined),\r\n colors.length,\r\n )\r\n }\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 scale={scale}\r\n centerPoint={centerPoint}\r\n colors={colors}\r\n xColorLegendTitle={xColorLegendTitle}\r\n yColorLegendTitle={yColorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n showColorScale={showColorScale}\r\n classNames={classNames}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n detailsOnClick={detailsOnClick}\r\n zoomInteraction={zoomInteraction}\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 dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["Graph","props","data","xDomain","mapData","xColorLegendTitle","yDomain","yColorLegendTitle","width","height","colors","scale","centerPoint","mapBorderWidth","mapNoDataColor","mapBorderColor","tooltip","onSeriesMouseOver","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","showColorScale","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","showLegend","setShowLegend","useState","selectedColor","setSelectedColor","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","useRef","isInView","useInView","mapG","zoomRef","useEffect","mapGSelect","select","mapSvgSelect","zoomFilter","e","isWheel","isTouch","isDrag","zoomBehavior","zoom","transform","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","projection","geoMercator","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","xRange","_","i","yRange","xScale","scaleThreshold","yScale","handleZoom","direction","jsxs","Fragment","jsx","motion","d","el","j","masterPath","geo","path","c","k","point","AnimatePresence","index","xColorCoord","checkIfNullOrUndefined","yColorCoord","color","event","isEqual","X","numberFormattingFunction","P","Tooltip","Modal","string2HTML","BiVariateChoroplethMap","graphTitle","Colors","sources","graphDescription","footNote","padding","backgroundColor","relativeHeight","isWorldMap","graphID","graphDownload","dataDownload","showAntarctica","language","minHeight","theme","ariaLabel","timeline","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","uniqDatesSorted","sort","uniqBy","parse","a","b","ascending","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","resizeObserver","entries","fetchAndParseJSON","interval","markObj","getSliderMarks","cn","GraphHeader","Pause","Play","SliderUI","nextValue","format","getJenks","Spinner","GraphFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EO,SAASA,GAAMC,IAAc;AAClC,QAAM;AAAA,IACJ,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,IACA,6BAAAC;AAAA,EAAA,IACEhC,IACE,CAACiC,IAAYC,EAAa,IAAIC;AAAA,IAClCH,MAAgC,SAAY,EAAEzB,IAAQ,OAAO,CAACyB;AAAA,EAAA,GAE1D,CAACI,GAAeC,CAAgB,IAAIF,EAA6B,MAAS,GAE1E,CAACG,GAAgBC,CAAiB,IAAIJ,EAAc,MAAS,GAE7D,CAACK,GAAeC,CAAgB,IAAIN,EAAc,MAAS,GAC3D,CAACO,GAAQC,CAAS,IAAIR,EAA6B,MAAS,GAC5D,CAACS,IAAQC,CAAS,IAAIV,EAA6B,MAA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AAAA,wBACC,OAAO;AAAA,0BACL,QAAQ,GAAG,KAAK;AAAA,4BACdwC;AAAA,4BACA1H,MACGmH,IACGO,KACG3H,KAAS+H,KAAYX,IAAiBO,KACpC3H,KAAS+H,KAAYX,IACtBO,KACD3H,KAAS+H,KAAYX,IACxBa;AAAA,0BAAA,CACP;AAAA,wBAAA;AAAA,wBAEH,WAAU;AAAA,wBAEV,UAAA9C,gBAAAA,EAAAA,IAAC4E,IAAA,EAAQ,cAAW,gBAAA,CAAgB;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACtC;AAAA,gBAAA;AAAA,gBAGHhD,KAAWE,IACV9B,gBAAAA,EAAAA;AAAAA,kBAAC6E;AAAA,kBAAA;AAAA,oBACC,QAAQ,EAAE,UAAU9I,GAAQ,UAAU,QAAQA,GAAQ,OAAA;AAAA,oBACtD,YAAY;AAAA,sBACV,UAAUC,GAAY;AAAA,sBACtB,QAAQA,GAAY;AAAA,oBAAA;AAAA,oBAEtB,SAAA4F;AAAA,oBACA,UAAAE;AAAA,oBACA,OAAAjH;AAAA,kBAAA;AAAA,gBAAA,IAEA;AAAA,cAAA,EAAA,CACN;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"BiVariateChoroplethMap.js","sources":["../src/Components/Graphs/Maps/BiVariateMap/Graph.tsx","../src/Components/Graphs/Maps/BiVariateMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold } from 'd3-scale';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n BivariateMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n data: BivariateMapDataType[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n xDomain: number[];\r\n yDomain: number[];\r\n width: number;\r\n height: number;\r\n colors: string[][];\r\n xColorLegendTitle: string;\r\n yColorLegendTitle: string;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n showColorScale: boolean;\r\n collapseColorScaleByDefault?: boolean;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n xDomain,\r\n mapData,\r\n xColorLegendTitle,\r\n yDomain,\r\n yColorLegendTitle,\r\n width,\r\n height,\r\n colors,\r\n scale,\r\n centerPoint,\r\n mapBorderWidth,\r\n mapNoDataColor,\r\n mapBorderColor,\r\n tooltip,\r\n onSeriesMouseOver,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n showColorScale,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\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 mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const xRange = Array.from({ length: xDomain.length }, (_, i) => i);\r\n\r\n const yRange = Array.from({ length: yDomain.length }, (_, i) => i);\r\n const xScale = scaleThreshold<number, number>().domain(xDomain).range(xRange);\r\n const yScale = scaleThreshold<number, number>().domain(yDomain).range(yRange);\r\n\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n viewBox={`0 0 ${width} ${height}`}\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </motion.g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const xColorCoord = !checkIfNullOrUndefined(d.x)\r\n ? xScale(d.x as number)\r\n : undefined;\r\n const yColorCoord = !checkIfNullOrUndefined(d.y)\r\n ? yScale(d.y as number)\r\n : undefined;\r\n const color =\r\n xColorCoord !== undefined && yColorCoord !== undefined\r\n ? colors[yColorCoord][xColorCoord]\r\n : mapNoDataColor;\r\n\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n d={masterPath}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n className={`${\r\n color === mapNoDataColor\r\n ? 'stroke-primary-gray-400 dark:stroke-primary-gray-500'\r\n : 'stroke-primary-white dark:stroke-primary-gray-650'\r\n }`}\r\n style={{\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? mapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{ width: '175px' }}\r\n >\r\n <div className='flex gap-1 items-center'>\r\n <svg width='136px' viewBox='0 0 136 136' className='shrink-0'>\r\n <g>\r\n {colors.map((d, i) => (\r\n <g key={i} transform={`translate(0,${100 - i * 25})`}>\r\n {d.map((el, j) => (\r\n <rect\r\n key={j}\r\n y={1}\r\n x={j * 25 + 1}\r\n fill={el}\r\n width={23}\r\n height={23}\r\n strokeWidth={selectedColor === el ? 2 : 0.25}\r\n style={{ cursor: 'pointer' }}\r\n onMouseOver={() => {\r\n setSelectedColor(el);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n />\r\n ))}\r\n </g>\r\n ))}\r\n <g transform='translate(0,125)'>\r\n {xDomain.map((el, j) => (\r\n <text key={j} y={10} x={(j + 1) * 25} fontSize={10} textAnchor='middle'>\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n ))}\r\n </g>\r\n {yDomain.map((el, j) => (\r\n <g\r\n key={j}\r\n transform={`translate(${\r\n Math.max(Math.min(xDomain.length + 1, 5), 4) * 25 + 10\r\n },${100 - j * 25})`}\r\n >\r\n <text\r\n x={0}\r\n transform='rotate(-90)'\r\n y={0}\r\n fontSize={10}\r\n textAnchor='middle'\r\n >\r\n {typeof el === 'string' || el < 1\r\n ? el\r\n : numberFormattingFunction(el, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n </g>\r\n </svg>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='leading-normal text-center shrink-0'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n writingMode: 'vertical-rl',\r\n height: '8.5rem',\r\n transform: 'rotate(180deg)',\r\n }}\r\n >\r\n {yColorLegendTitle}\r\n </P>\r\n </div>\r\n <P\r\n marginBottom='none'\r\n size='xs'\r\n className='mt-1 leading-normal text-center'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n width: '8.5rem',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n }}\r\n >\r\n {xColorLegendTitle}\r\n </P>\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useEffect, useEffectEvent, useRef, useState } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { ascending, sort } from 'd3-array';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BivariateMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects. */\r\n data: BivariateMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for the choropleth map. Array must be 5x5 */\r\n colors?: string[][];\r\n /** Title for the first color legend */\r\n xColorLegendTitle?: string;\r\n /** Title for the second color legend */\r\n yColorLegendTitle?: string;\r\n /** Domain of x-colors for the map */\r\n xDomain?: number[];\r\n /** Domain of y-colors for the map */\r\n yDomain?: number[];\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\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 /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function BiVariateChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n colors = Colors.light.bivariateColors.colors05x05,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n xDomain,\r\n yDomain,\r\n xColorLegendTitle = 'X Color key',\r\n yColorLegendTitle = 'Y Color key',\r\n tooltip,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n showColorScale = true,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = sort(\r\n uniqBy(data, 'date', true).map(d =>\r\n parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime(),\r\n ),\r\n (a, b) => ascending(a, b),\r\n );\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n\r\n if (xDomain && yDomain)\r\n if (xDomain.length !== colors[0].length - 1 || yDomain.length !== colors.length - 1) {\r\n console.error(\"the xDomain and yDomain array length don't match to the color array length\");\r\n return null;\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 {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n xDomain={\r\n xDomain ||\r\n getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors[0].length,\r\n )\r\n }\r\n yDomain={\r\n yDomain ||\r\n getJenks(\r\n data.map(d => d.y as number | null | undefined),\r\n colors.length,\r\n )\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={colors}\r\n xColorLegendTitle={xColorLegendTitle}\r\n yColorLegendTitle={yColorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n showColorScale={showColorScale}\r\n classNames={classNames}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n detailsOnClick={detailsOnClick}\r\n zoomInteraction={zoomInteraction}\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 dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","xDomain","mapData","xColorLegendTitle","yDomain","yColorLegendTitle","width","height","colors","scale","centerPoint","mapBorderWidth","mapNoDataColor","mapBorderColor","tooltip","onSeriesMouseOver","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","showColorScale","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","showLegend","setShowLegend","useState","undefined","selectedColor","setSelectedColor","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","useRef","isInView","useInView","once","amount","mapG","zoomRef","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","xRange","Array","from","length","_","i","yRange","xScale","scaleThreshold","domain","range","yScale","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","d","position","map","layer","features","findIndex","el","id","properties","indexOf","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","index","xColorCoord","checkIfNullOrUndefined","x","yColorCoord","y","color","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","cursor","numberFormattingFunction","max","P","display","WebkitLineClamp","WebkitBoxOrient","overflow","writingMode","Tooltip","Modal","__html","string2HTML","BiVariateChoroplethMap","$","_c","graphTitle","t0","t1","sources","graphDescription","footNote","t2","t3","t4","t5","padding","t6","t7","backgroundColor","t8","t9","relativeHeight","isWorldMap","t10","t11","graphID","t12","t13","t14","graphDownload","t15","dataDownload","t16","showAntarctica","t17","language","t18","minHeight","t19","theme","t20","ariaLabel","t21","t22","t23","t24","t25","timeline","t26","Colors","light","bivariateColors","colors05x05","graphNoData","grays","t27","t28","t29","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","uniqDatesSorted","sort","uniqBy","parse","dateFormat","Date","getTime","_temp","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t30","t31","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t32","shape","onUpdateShape","useEffectEvent","t33","fetchAndParseJSON","then","d_0","t34","interval","setInterval","speed","clearInterval","markObj","getSliderMarks","console","error","t35","graphContainer","t36","t37","description","title","GraphHeader","_temp2","_temp3","_temp4","_temp5","_temp6","t38","Pause","Play","SliderUI","nextValue","nextValue_0","t39","GraphArea","d_6","date","format","_temp7","getJenks","_temp8","_temp9","Spinner","t40","footnote","source","GraphFooter","t41","GraphContainer","d_8","d_7","NAME","d_3","d_2","d_1","d_5","d_4","a","b","ascending"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,iBAAAA;AAA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sC,GAAAtC,QAAAe,IAAAf,QAAAsB,GAAAtB,QAAAxK,GAAAwK,QAAAgC,GAAAhC,QAAAkC,GAAAlC,QAAAY,IAAAZ,QAAAkB,GAAAlB,QAAA0G,IAAA1G,QAAA4G,IAAA5G,QAAA6G,IAAA7G,QAAAsH,IAAAtH,QAAA4H,IAAA5H,QAAAsI,IAAAtI,QAAAoC,IAAApC,QAAAzK,GAAAyK,SAAA0I,MAAAA,KAAA1I,EAAA,GAAA,GAvKjB0I;AAuKiB;AA7Rd,SAAAN,GAAAQ,GAAA;AAAA,SAsNuBpM,EAAC2B;AAA+B;AAtNvD,SAAAgK,GAAAU,GAAA;AAAA,SA+MuBrM,EAACyB;AAA+B;AA/MvD,SAAAgK,GAAAnL,GAAA;AAAA,SAwM4BA,EAAEE,WAAW8L,SAAU;AAAY;AAxM/D,SAAAzB,GAAA0B,GAAA;AAAA,SAuJ4BvM,MAAMpF;AAAS;AAvJ3C,SAAAgQ,GAAA4B,GAAA;AAAA,SAsJ6CxM,MAAMpF;AAAS;AAtJ5D,SAAA+P,GAAA8B,GAAA;AAAA,SAsJyBzM,EAACvH;AAAK;AAtJ/B,SAAAiS,GAAAgC,GAAA;AAAA,SAqJ2C1M,MAAMpF;AAAS;AArJ1D,SAAA6P,GAAAkC,GAAA;AAAA,SAqJuB3M,EAACvH;AAAK;AArJ7B,SAAAsP,GAAA6E,GAAAC,GAAA;AAAA,SA4DOC,GAAUF,GAAGC,CAAC;AAAC;"}
|
package/dist/BulletChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-DjM48pIC.cjs"),j=require("react"),Ne=require("./index-CQ3e6Ewi.cjs"),ke=require("./index-DQA8q5sC.cjs"),Ce=require("./Modal-CuuJdWkD.cjs"),Re=require("./index-CSNtgibC.cjs"),Me=require("./numberFormattingFunction-02t-wJta.cjs"),Ee=require("./Tooltip-Cpv0QohJ.cjs"),c=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Oe=require("./string2HTML-z7CwHXcx.cjs"),Ue=require("./XTicksAndGridLines-RKy7BVCO.cjs"),He=require("./YAxesLabels-Dqd259-t.cjs"),Ie=require("./AxisTitle-Wkz-xeQL.cjs"),Ve=require("./Axis-CkNn1wit.cjs"),ze=require("./ReferenceLine-D04j-zeV.cjs"),Te=require("./linear-BVckp9RD.cjs"),qe=require("./band-CAApY4Pd.cjs"),Ae=require("./use-in-view-CEwlc_dd.cjs"),J=require("./proxy-CKadx4lC.cjs"),Le=require("./index-Cm8NIdOO.cjs"),$e=require("./GraphFooter.cjs"),Se=require("./GraphHeader.cjs"),ve=require("./Colors.cjs"),De=require("./EmptyState-B8IpKGcL.cjs"),Be=require("./ColorLegend.cjs"),Pe=require("./XAxesLabels-CLZnBgSr.cjs"),Ge=require("./YTicksAndGridLines-qGpRo_t1.cjs");function We(we){const{data:s,barColor:p,suffix:K,prefix:S,barPadding:Q,showValues:re,showTicks:Z,leftMargin:ye,truncateBy:de,width:ee,height:te,rightMargin:be,topMargin:E,bottomMargin:ie,showLabels:o,tooltip:D,onSeriesMouseOver:V,refValues:T,highlightedDataPoints:h,maxValue:B,minValue:b,onSeriesMouseClick:F,labelOrder:ae,rtl:U,maxBarThickness:q,minBarThickness:me,resetSelectionOnDoubleClick:A,detailsOnClick:z,barAxisTitle:ne,valueColor:le,noOfTicks:O,styles:g,classNames:M,targetStyle:se,targetColor:H,qualitativeRangeColors:L,measureBarWidthFactor:u,animate:l,dimmedOpacity:N,precision:P,customLayers:$,naLabel:G}=we,y=j.useRef(null),d=Ae.useInView(y,{once:l.once,amount:l.amount}),[oe,W]=j.useState(void 0),[k,X]=j.useState(void 0),[ue,C]=j.useState(void 0),[f,w]=j.useState(void 0),x={top:ne?E+25:E,bottom:ie,left:ye,right:be},Y=ee-x.left-x.right,I=te-x.top-x.bottom,ce=Math.max(...s.filter(e=>!c.checkIfNullOrUndefined(e.size)).map(e=>e.size))<0?0:Math.max(...s.filter(e=>!c.checkIfNullOrUndefined(e.size)).map(e=>e.size)),_=Math.max(...s.filter(e=>!c.checkIfNullOrUndefined(e.target)).map(e=>e.target))<0?0:Math.max(...s.filter(e=>!c.checkIfNullOrUndefined(e.target)).map(e=>e.target)),xe=Math.max(...s.map(e=>Re.sum((e.qualitativeRange||[]).filter(r=>!c.checkIfNullOrUndefined(r)))||0)),ge=c.checkIfNullOrUndefined(B)?Math.max(...[ce,_,xe].filter(Number.isFinite))<0?0:Math.max(...[ce,_,xe].filter(Number.isFinite)):B,he=Math.min(...s.filter(e=>!c.checkIfNullOrUndefined(e.size)).map(e=>e.size))>=0?0:Math.min(...s.filter(e=>!c.checkIfNullOrUndefined(e.size)).map(e=>e.size)),R=Math.min(...s.filter(e=>!c.checkIfNullOrUndefined(e.target)).map(e=>e.target))>=0?0:Math.min(...s.filter(e=>!c.checkIfNullOrUndefined(e.target)).map(e=>e.target)),a=c.checkIfNullOrUndefined(b)?Math.min(...[he,R].filter(Number.isFinite))>=0?0:Math.min(...[he,R].filter(Number.isFinite)):b,fe=s.map((e,r)=>({...e,id:ae?`${e.label}`:`${r}`})),n=Te.linear().domain([a,ge]).range([0,Y]).nice(),v=ae||fe.map(e=>`${e.id}`),m=qe.band().domain(v).range([0,me?Math.max(I,me*v.length):q?Math.min(I,q*v.length):I]).paddingInner(Q),t=n.ticks(O);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(J.motion.svg,{width:`${ee}px`,height:`${te}px`,viewBox:`0 0 ${ee} ${te}`,direction:"ltr",ref:y,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${x.left},${x.top})`,children:[Z?i.jsxRuntimeExports.jsx(Ue.XTicksAndGridLines,{values:t.filter(e=>e!==0),x:t.filter(e=>e!==0).map(e=>n(e)),y1:0-E,y2:I+x.bottom,styles:{gridLines:g?.xAxis?.gridLines,labels:g?.xAxis?.labels},classNames:{gridLines:M?.xAxis?.gridLines,labels:M?.xAxis?.labels},suffix:K,prefix:S,labelType:"secondary",showGridLines:!0,precision:P}):null,i.jsxRuntimeExports.jsx(Ie.AxisTitle,{x:Y/2,y:0-x.top+15,style:g?.xAxis?.title,className:M?.xAxis?.title,text:ne}),i.jsxRuntimeExports.jsx(Ve.Axis,{x1:n(a<0?0:a),x2:n(a<0?0:a),y1:-2.5,y2:I+x.bottom,classNames:{axis:M?.yAxis?.axis},styles:{axis:g?.yAxis?.axis}}),$.filter(e=>e.position==="before").map(e=>e.layer),i.jsxRuntimeExports.jsxs(Le.AnimatePresence,{children:[fe.map(e=>c.checkIfNullOrUndefined(m(e.id))?null:i.jsxRuntimeExports.jsxs(J.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:r=>{W(e),w(r.clientY),C(r.clientX),V?.(e)},onClick:()=>{(F||z)&&(ke.isEqual(k,e)&&A?(X(void 0),F?.(void 0)):(X(e),F?.(e)))},onMouseMove:r=>{W(e),w(r.clientY),C(r.clientX)},onMouseLeave:()=>{W(void 0),C(void 0),w(void 0),V?.(void 0)},exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{x:0,y:m(`${e.id}`),opacity:h.length!==0?h.indexOf(e.label)!==-1?.85:N:.85},whileInView:{x:0,y:m(`${e.id}`),opacity:h.length!==0?h.indexOf(e.label)!==-1?.85:N:.85,transition:{duration:l.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:[e.qualitativeRange?e.qualitativeRange.map((r,pe)=>i.jsxRuntimeExports.jsx(J.motion.rect,{exit:{width:0,x:n(0),transition:{duration:l.duration}},variants:{initial:{x:n(0),width:0,fill:L[pe]},whileInView:{x:n(pe===0?0:Re.sum(e.qualitativeRange.filter((je,Fe)=>Fe<pe&&je))),width:n(r),fill:L[pe],transition:{duration:l.duration}}},initial:"initial",animate:d?"whileInView":"initial",y:0,height:m.bandwidth()},pe)):null,e.target&&se==="background"?i.jsxRuntimeExports.jsx(J.motion.rect,{y:0,x:e.target>=0?n(0):n(e.target),height:m.bandwidth(),style:{fill:H},exit:{width:0,x:n(0),transition:{duration:l.duration}},variants:{initial:{x:n(0),width:0},whileInView:{x:e.target>=0?n(0):n(e.target),width:e.target>=0?n(e.target)-n(0):n(0)-n(e.target),transition:{duration:l.duration}}},initial:"initial",animate:d?"whileInView":"initial"}):null,e.size?i.jsxRuntimeExports.jsx(J.motion.rect,{y:m.bandwidth()*((1-u)/2),style:{fill:p},height:m.bandwidth()*u,exit:{width:0,x:n(0),transition:{duration:l.duration}},variants:{initial:{x:n(0),width:0},whileInView:{x:e.size>=0?n(0):n(e.size),width:e.size>=0?n(e.size)-n(0):n(0)-n(e.size),transition:{duration:l.duration}}},initial:"initial",animate:d?"whileInView":"initial"}):null,e.target&&se==="line"?i.jsxRuntimeExports.jsx(J.motion.rect,{y:0,height:m.bandwidth(),style:{fill:H},width:2,exit:{opacity:0,x:n(0),transition:{duration:l.duration}},variants:{initial:{x:n(0),opacity:0},whileInView:{x:n(e.target)-1,opacity:1,transition:{duration:l.duration}}},initial:"initial",animate:d?"whileInView":"initial"}):null,o?i.jsxRuntimeExports.jsx(He.YAxesLabels,{value:`${e.label}`.length<de?`${e.label}`:`${`${e.label}`.substring(0,de)}...`,y:0,x:(e.size||0)<0?n(0):0-x.left,width:(e.size||0)<0?ee-n(0):n(0)+x.left,height:m.bandwidth(),alignment:e.size&&e.size<0?"left":"right",style:g?.yAxis?.labels,className:M?.yAxis?.labels,animate:l,isInView:d}):null,re?i.jsxRuntimeExports.jsx(J.motion.text,{y:m.bandwidth()/2,style:{textAnchor:e.size&&e.size<0?"end":"start",...g?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!le&&p.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",M?.graphObjectValues),dx:e.size&&e.size<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:l.duration}},variants:{initial:{x:n(0),opacity:0,fill:le||p},whileInView:{x:e.size?n(e.size):n(0),opacity:1,fill:le||p,transition:{duration:l.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:Me.numberFormattingFunction(e.size,G,P,S,K)}):null]},e.label)),T?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:T.map((e,r)=>i.jsxRuntimeExports.jsx(ze.RefLineX,{text:e.text,color:e.color,x:n(e.value),y1:0-x.top,y2:I+x.bottom,textSide:n(e.value)>Y*.75||U?"left":"right",classNames:e.classNames,styles:e.styles,animate:l,isInView:d},r))}):null]}),$.filter(e=>e.position==="after").map(e=>e.layer)]})}),oe&&D&&ue&&f?i.jsxRuntimeExports.jsx(Ee.Tooltip,{data:oe,body:D,xPos:ue,yPos:f,backgroundStyle:g?.tooltip,className:M?.tooltip}):null,z&&k!==void 0?i.jsxRuntimeExports.jsx(Ce.G,{open:k!==void 0,onClose:()=>{X(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof z=="string"?{__html:Oe.string2HTML(z,k)}:void 0,children:typeof z=="function"?z(k):null})}):null]})}function Xe(we){const{data:s,graphTitle:p,barColor:K=ve.Colors.primaryColors["blue-600"],suffix:S="",sources:Q,prefix:re="",graphDescription:Z,barPadding:ye=.25,showValues:de=!0,showTicks:ee=!0,leftMargin:te=100,rightMargin:be=40,truncateBy:E=999,height:ie,width:o,footNote:D,colorDomain:V,colorLegendTitle:T,highlightedDataPoints:h=[],padding:B,backgroundColor:b=!1,topMargin:F=25,bottomMargin:ae=10,showLabels:U=!0,relativeHeight:q,tooltip:me,onSeriesMouseOver:A,refValues:z,showColorScale:ne=!0,graphID:le,maxValue:O,minValue:g,onSeriesMouseClick:M,graphDownload:se=!1,dataDownload:H=!1,sortData:L,labelOrder:u,language:l="en",minHeight:N=0,theme:P="light",maxBarThickness:$,maxNumberOfBars:G,minBarThickness:y,ariaLabel:d,resetSelectionOnDoubleClick:oe=!0,detailsOnClick:W,barAxisTitle:k,noOfTicks:X=5,valueColor:ue,styles:C,classNames:f,filterNA:w=!0,targetStyle:x="line",targetColor:Y=ve.Colors.light.grays["gray-700"],qualitativeRangeColors:I,measureBarWidthFactor:ce=.4,animate:_=!1,dimmedOpacity:xe=.3,precision:ge=2,customLayers:he=[],naLabel:R="NA"}=we,[a,fe]=j.useState(0),[n,v]=j.useState(0),m=j.useRef(null),t=j.useRef(null);return j.useEffect(()=>{const e=new ResizeObserver(r=>{fe(o||r[0].target.clientWidth||620),v(ie||r[0].target.clientHeight||480)});return m.current&&(v(m.current.clientHeight||480),fe(m.current.clientWidth||620),o||e.observe(m.current)),()=>e.disconnect()},[o,ie]),i.jsxRuntimeExports.jsx("div",{className:`${P||"light"} flex ${o?"w-fit grow-0":"w-full grow"}`,dir:l==="he"||l==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:i.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 ${l||"en"}`,o?"w-fit":"w-full",f?.graphContainer),style:{...C?.graphContainer||{},...b&&b!==!0?{backgroundColor:b}:{}},id:le,ref:t,"aria-label":d||`${p?`The graph shows ${p}. `:""}This is a bar chart. ${Z?` ${Z}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:b?B||"1rem":B||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[p||Z||se||H?i.jsxRuntimeExports.jsx(Se.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:f?.title,description:f?.description},graphTitle:p,graphDescription:Z,width:o,graphDownload:se?t.current:void 0,dataDownload:H?s.map(e=>e.data).filter(e=>e!==void 0).length>0?s.map(e=>e.data).filter(e=>e!==void 0):s.filter(e=>e!==void 0):null}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:s.length===0?i.jsxRuntimeExports.jsx(De.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[ne&&s.filter(e=>e.qualitativeRange).length!==0&&V?i.jsxRuntimeExports.jsx(Be.ColorLegend,{width:o,colorLegendTitle:T,colors:I||ve.Colors[P].sequentialColors.positiveColorsx10,colorDomain:V,showNAColor:!1}):null,i.jsxRuntimeExports.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:m,"aria-label":"Graph area",children:(o||a)&&(ie||n)?i.jsxRuntimeExports.jsx(We,{data:L?Ne.orderBy(s.filter(e=>w?!c.checkIfNullOrUndefined(e.size):e),[e=>e.size===void 0?L==="asc"?-1/0:1/0:e.size],[L]).filter((e,r)=>G?r<G:!0):s.filter(e=>w?!c.checkIfNullOrUndefined(e.size):e).filter((e,r)=>G?r<G:!0),barColor:K,targetColor:Y,width:o||a,height:Math.max(N,ie||(q?N?(o||a)*q>N?(o||a)*q:N:(o||a)*q:n)),suffix:S,prefix:re,barPadding:ye,showValues:de,showTicks:ee,leftMargin:te,rightMargin:be,topMargin:F,bottomMargin:ae,truncateBy:E,showLabels:U,tooltip:me,onSeriesMouseOver:A,refValues:z,maxValue:O,minValue:g,highlightedDataPoints:h,onSeriesMouseClick:M,labelOrder:u,rtl:l==="he"||l==="ar",maxBarThickness:$,minBarThickness:y,resetSelectionOnDoubleClick:oe,detailsOnClick:W,barAxisTitle:k,noOfTicks:X,valueColor:ue,classNames:f,styles:C,targetStyle:x,qualitativeRangeColors:I||ve.Colors[P].sequentialColors.positiveColorsx10,measureBarWidthFactor:ce,animate:_===!0?{duration:.5,once:!0,amount:.5}:_||{duration:0,once:!0,amount:0},dimmedOpacity:xe,precision:ge,customLayers:he,naLabel:R}):null})]})}),Q||D?i.jsxRuntimeExports.jsx($e.GraphFooter,{sources:Q,footNote:D,width:o,styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:f?.footnote,source:f?.source}}):null]})})})})}function Ye(we){const{data:s,width:p,height:K,barColor:S,suffix:Q,prefix:re,barPadding:Z,showLabels:ye,showValues:de,showTicks:ee,truncateBy:te,rightMargin:be,topMargin:E,bottomMargin:ie,leftMargin:o,tooltip:D,onSeriesMouseOver:V,refValues:T,maxValue:h,minValue:B,highlightedDataPoints:b,onSeriesMouseClick:F,labelOrder:ae,maxBarThickness:U,minBarThickness:q,resetSelectionOnDoubleClick:me,detailsOnClick:A,barAxisTitle:z,valueColor:ne,noOfTicks:le,styles:O,classNames:g,targetStyle:M,targetColor:se,qualitativeRangeColors:H,measureBarWidthFactor:L,animate:u,dimmedOpacity:l,precision:N,customLayers:P,naLabel:$}=we,G=j.useRef(null),y=Ae.useInView(G,{once:u.once,amount:u.amount}),d={top:E,bottom:ie,left:z?o+30:o,right:be},[oe,W]=j.useState(void 0),[k,X]=j.useState(void 0),[ue,C]=j.useState(void 0),[f,w]=j.useState(void 0),x=p-d.left-d.right,Y=K-d.top-d.bottom,I=Math.max(...s.filter(t=>!c.checkIfNullOrUndefined(t.size)).map(t=>t.size))<0?0:Math.max(...s.filter(t=>!c.checkIfNullOrUndefined(t.size)).map(t=>t.size)),ce=Math.max(...s.filter(t=>!c.checkIfNullOrUndefined(t.target)).map(t=>t.target))<0?0:Math.max(...s.filter(t=>!c.checkIfNullOrUndefined(t.size)).map(t=>t.target)),_=Math.max(...s.map(t=>Re.sum((t.qualitativeRange||[]).filter(e=>!c.checkIfNullOrUndefined(e)))||0)),xe=c.checkIfNullOrUndefined(h)?Math.max(...[I,ce,_].filter(Number.isFinite))<0?0:Math.max(...[I,ce,_].filter(Number.isFinite)):h,ge=Math.min(...s.filter(t=>!c.checkIfNullOrUndefined(t.size)).map(t=>t.size))>=0?0:Math.min(...s.filter(t=>!c.checkIfNullOrUndefined(t.size)).map(t=>t.size)),he=Math.min(...s.filter(t=>!c.checkIfNullOrUndefined(t.target)).map(t=>t.target))>=0?0:Math.min(...s.filter(t=>!c.checkIfNullOrUndefined(t.target)).map(t=>t.target)),R=c.checkIfNullOrUndefined(B)?Math.min(...[ge,he].filter(Number.isFinite))>=0?0:Math.min(...[ge,he].filter(Number.isFinite)):B,a=Te.linear().domain([R,xe]).range([Y,0]).nice(),fe=s.map((t,e)=>({...t,id:ae?`${t.label}`:`${e}`})),n=ae||fe.map(t=>`${t.id}`),v=qe.band().domain(n).range([0,q?Math.max(x,q*n.length):U?Math.min(x,U*n.length):x]).paddingInner(Z),m=a.ticks(le);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(J.motion.svg,{width:`${p}px`,height:`${K}px`,viewBox:`0 0 ${p} ${K}`,direction:"ltr",ref:G,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${d.left},${d.top})`,children:[i.jsxRuntimeExports.jsx(Ve.Axis,{y1:a(R<0?0:R),y2:a(R<0?0:R),x1:0-o,x2:x+d.right,label:Me.numberFormattingFunction(R<0?0:R,$,N,re,Q),labelPos:{x:0-o,dx:0,dy:xe<0?"1em":-5,y:a(R<0?0:R)},classNames:{axis:g?.xAxis?.axis,label:g?.yAxis?.labels},styles:{axis:O?.xAxis?.axis,label:O?.yAxis?.labels}}),ee?i.jsxRuntimeExports.jsx(Ge.YTicksAndGridLines,{values:m.filter(t=>t!==0),y:m.filter(t=>t!==0).map(t=>a(t)),x1:0-o,x2:x+d.right,styles:{gridLines:O?.yAxis?.gridLines,labels:O?.yAxis?.labels},classNames:{gridLines:g?.yAxis?.gridLines,labels:g?.yAxis?.labels},suffix:Q,prefix:re,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:N}):null,i.jsxRuntimeExports.jsx(Ie.AxisTitle,{x:0-o-15,y:Y/2,style:O?.yAxis?.title,className:g?.yAxis?.title,text:z,rotate90:!0}),P.filter(t=>t.position==="before").map(t=>t.layer),i.jsxRuntimeExports.jsxs(Le.AnimatePresence,{children:[fe.map(t=>c.checkIfNullOrUndefined(v(t.id))?null:i.jsxRuntimeExports.jsxs(J.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:e=>{W(t),w(e.clientY),C(e.clientX),V?.(t)},onClick:()=>{(F||A)&&(ke.isEqual(k,t)&&me?(X(void 0),F?.(void 0)):(X(t),F?.(t)))},onMouseMove:e=>{W(t),w(e.clientY),C(e.clientX)},onMouseLeave:()=>{W(void 0),C(void 0),w(void 0),V?.(void 0)},exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{x:v(`${t.id}`),y:0,opacity:b.length!==0?b.indexOf(t.label)!==-1?.85:l:.85},whileInView:{x:v(`${t.id}`),y:0,opacity:b.length!==0?b.indexOf(t.label)!==-1?.85:l:.85,transition:{duration:u.duration}}},initial:"initial",animate:y?"whileInView":"initial",children:[t.qualitativeRange?t.qualitativeRange.map((e,r)=>i.jsxRuntimeExports.jsx(J.motion.rect,{x:0,exit:{height:0,y:a(0),transition:{duration:u.duration}},variants:{initial:{height:0,y:a(0),fill:H[r]},whileInView:{height:Math.abs(a(Re.sum(t.qualitativeRange.filter((pe,je)=>je<=r&&pe)))-a(Re.sum(t.qualitativeRange.filter((pe,je)=>je<r&&pe)))),y:a(Re.sum(t.qualitativeRange.filter((pe,je)=>je<=r&&pe))),fill:H[r],transition:{duration:u.duration}}},initial:"initial",animate:y?"whileInView":"initial",width:v.bandwidth()},r)):null,t.target&&M==="background"?i.jsxRuntimeExports.jsx(J.motion.rect,{x:0,width:v.bandwidth(),style:{fill:se},exit:{height:0,y:a(0),transition:{duration:u.duration}},variants:{initial:{height:0,y:a(0)},whileInView:{height:Math.abs(a(t.target)-a(0)),y:t.target>0?a(t.target):a(0),transition:{duration:u.duration}}},initial:"initial",animate:y?"whileInView":"initial"}):null,t.size?i.jsxRuntimeExports.jsx(J.motion.rect,{x:v.bandwidth()*((1-L)/2),width:v.bandwidth()*L,style:{fill:S},exit:{height:0,y:a(0),transition:{duration:u.duration}},variants:{initial:{height:0,y:a(0)},whileInView:{height:Math.abs(a(t.size)-a(0)),y:t.size>0?a(t.size):a(0),transition:{duration:u.duration}}},initial:"initial",animate:y?"whileInView":"initial"}):null,t.target&&M==="line"?i.jsxRuntimeExports.jsx(J.motion.rect,{x:0,width:v.bandwidth(),style:{fill:se},exit:{y:a(0),opacity:0,transition:{duration:u.duration}},variants:{initial:{y:a(0),opacity:0},whileInView:{y:a(t.target)-1,opacity:1,transition:{duration:u.duration}}},initial:"initial",animate:y?"whileInView":"initial",height:2}):null,ye?i.jsxRuntimeExports.jsx(Pe.XAxesLabels,{value:`${t.label}`.length<te?`${t.label}`:`${`${t.label}`.substring(0,te)}...`,y:(t.size||0)<0?0:a(0)+5,x:0,width:v.bandwidth(),height:(t.size||0)<0?a(0)-5:d.bottom,style:O?.xAxis?.labels,className:g?.xAxis?.labels,alignment:(t.size||0)<0?"bottom":"top",animate:u,isInView:y}):null,de?i.jsxRuntimeExports.jsx(J.motion.text,{x:v.bandwidth()/2,style:{textAnchor:"middle",...O?.graphObjectValues||{}},className:i.mo("graph-value text-sm",!ne&&S.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",g?.graphObjectValues),dy:t.size?t.size>=0?"-5px":"1em":"-5px",exit:{opacity:0,transition:{duration:u.duration}},variants:{initial:{y:a(0),opacity:0,fill:ne||S},whileInView:{y:a(t.size||0),opacity:1,fill:ne||S,transition:{duration:u.duration}}},initial:"initial",animate:y?"whileInView":"initial",children:Me.numberFormattingFunction(t.size,$,N,re,Q)}):null]},t.label)),T?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:T.map((t,e)=>i.jsxRuntimeExports.jsx(ze.RefLineY,{text:t.text,color:t.color,y:a(t.value),x1:0-o,x2:x+d.right,classNames:t.classNames,styles:t.styles,animate:u,isInView:y},e))}):null]}),P.filter(t=>t.position==="after").map(t=>t.layer)]})}),oe&&D&&ue&&f?i.jsxRuntimeExports.jsx(Ee.Tooltip,{data:oe,body:D,xPos:ue,yPos:f,backgroundStyle:O?.tooltip,className:g?.tooltip}):null,A&&k!==void 0?i.jsxRuntimeExports.jsx(Ce.G,{open:k!==void 0,onClose:()=>{X(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof A=="string"?{__html:Oe.string2HTML(A,k)}:void 0,children:typeof A=="function"?A(k):null})}):null]})}function _e(we){const{data:s,graphTitle:p,barColor:K=ve.Colors.primaryColors["blue-600"],barPadding:S=.25,showTicks:Q=!0,leftMargin:re=20,rightMargin:Z=20,topMargin:ye=20,bottomMargin:de=25,truncateBy:ee=999,showLabels:te=!0,showValues:be=!0,backgroundColor:E=!1,suffix:ie="",prefix:o="",sources:D,graphDescription:V,height:T,width:h,footNote:B,colorDomain:b,colorLegendTitle:F,padding:ae,relativeHeight:U,tooltip:q,onSeriesMouseOver:me,refValues:A,showColorScale:z=!0,graphID:ne,maxValue:le,minValue:O,highlightedDataPoints:g=[],qualitativeRangeColors:M,onSeriesMouseClick:se,graphDownload:H=!1,dataDownload:L=!1,language:u="en",theme:l="light",sortData:N,labelOrder:P,minHeight:$=0,maxBarThickness:G,maxNumberOfBars:y,minBarThickness:d,ariaLabel:oe,resetSelectionOnDoubleClick:W=!0,detailsOnClick:k,barAxisTitle:X,noOfTicks:ue=5,valueColor:C,styles:f,classNames:w,targetColor:x=ve.Colors.light.grays["gray-700"],filterNA:Y=!0,targetStyle:I="line",measureBarWidthFactor:ce=.4,animate:_=!1,dimmedOpacity:xe=.3,precision:ge=2,customLayers:he=[],naLabel:R="NA"}=we,[a,fe]=j.useState(0),[n,v]=j.useState(0),m=j.useRef(null),t=j.useRef(null);return j.useEffect(()=>{const e=new ResizeObserver(r=>{fe(h||r[0].target.clientWidth||620),v(T||r[0].target.clientHeight||480)});return m.current&&(v(m.current.clientHeight||480),fe(m.current.clientWidth||620),h||e.observe(m.current)),()=>e.disconnect()},[h,T]),i.jsxRuntimeExports.jsx("div",{className:`${l||"light"} flex ${h?"w-fit grow-0":"w-full grow"}`,dir:u==="he"||u==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:i.mo(`${E?E===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${u||"en"}`,h?"w-fit":"w-full",w?.graphContainer),style:{...f?.graphContainer||{},...E&&E!==!0?{backgroundColor:E}:{}},id:ne,ref:t,"aria-label":oe||`${p?`The graph shows ${p}. `:""}This is a grouped bar chart. ${V?` ${V}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:E?ae||"1rem":ae||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[p||V||H||L?i.jsxRuntimeExports.jsx(Se.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:w?.title,description:w?.description},graphTitle:p,graphDescription:V,width:h,graphDownload:H?t.current:void 0,dataDownload:L?s.map(e=>e.data).filter(e=>e!==void 0).length>0?s.map(e=>e.data).filter(e=>e!==void 0):s.filter(e=>e!==void 0):null}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:s.length===0?i.jsxRuntimeExports.jsx(De.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[z&&s.filter(e=>e.qualitativeRange).length!==0&&b?i.jsxRuntimeExports.jsx(Be.ColorLegend,{width:h,colorLegendTitle:F,colors:M||ve.Colors[l].sequentialColors.positiveColorsx10,colorDomain:b,showNAColor:!1}):null,i.jsxRuntimeExports.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:m,"aria-label":"Graph area",children:(h||a)&&(T||n)?i.jsxRuntimeExports.jsx(Ye,{data:N?Ne.orderBy(s.filter(e=>Y?!c.checkIfNullOrUndefined(e.size):e),[e=>e.size===void 0?N==="asc"?-1/0:1/0:e.size],[N]).filter((e,r)=>y?r<y:!0):s.filter(e=>Y?!c.checkIfNullOrUndefined(e.size):e).filter((e,r)=>y?r<y:!0),barColor:K,targetColor:x,width:h||a,refValues:A,height:Math.max($,T||(U?$?(h||a)*U>$?(h||a)*U:$:(h||a)*U:n)),suffix:ie,prefix:o,barPadding:S,showLabels:te,showValues:be,showTicks:Q,truncateBy:ee,leftMargin:re,rightMargin:Z,qualitativeRangeColors:M||ve.Colors[l].sequentialColors.positiveColorsx10,topMargin:ye,bottomMargin:de,tooltip:q,onSeriesMouseOver:me,maxValue:le,minValue:O,highlightedDataPoints:g,onSeriesMouseClick:se,labelOrder:P,maxBarThickness:G,minBarThickness:d,resetSelectionOnDoubleClick:W,detailsOnClick:k,barAxisTitle:X,noOfTicks:ue,valueColor:C,styles:f,classNames:w,targetStyle:I,dimmedOpacity:xe,measureBarWidthFactor:ce,animate:_===!0?{duration:.5,once:!0,amount:.5}:_||{duration:0,once:!0,amount:0},precision:ge,customLayers:he,naLabel:R}):null})]})}),D||B?i.jsxRuntimeExports.jsx($e.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:D,footNote:B,width:h}):null]})})})})}function Je(we){const{data:s,graphTitle:p,barColor:K,barPadding:S,showTicks:Q,leftMargin:re,rightMargin:Z,topMargin:ye,bottomMargin:de,truncateBy:ee,showLabels:te,showValues:be,backgroundColor:E,suffix:ie,prefix:o,sources:D,graphDescription:V,height:T,width:h,footNote:B,colorDomain:b,colorLegendTitle:F,padding:ae,relativeHeight:U,tooltip:q,onSeriesMouseOver:me,refValues:A,showColorScale:z,graphID:ne,maxValue:le,minValue:O,highlightedDataPoints:g,onSeriesMouseClick:M,graphDownload:se,dataDownload:H,language:L,theme:u,sortData:l,labelOrder:N,minHeight:P,maxBarThickness:$,maxNumberOfBars:G,minBarThickness:y,ariaLabel:d,resetSelectionOnDoubleClick:oe,detailsOnClick:W,barAxisTitle:k,noOfTicks:X,valueColor:ue,orientation:C="vertical",styles:f,classNames:w,filterNA:x,targetStyle:Y,targetColor:I,qualitativeRangeColors:ce,measureBarWidthFactor:_,animate:xe,dimmedOpacity:ge,precision:he,naLabel:R}=we;return C==="vertical"?i.jsxRuntimeExports.jsx(_e,{data:s,graphTitle:p,barColor:K,barPadding:S,showTicks:Q,leftMargin:re,rightMargin:Z,topMargin:ye,bottomMargin:de,truncateBy:ee,showLabels:te,showValues:be,backgroundColor:E,suffix:ie,prefix:o,sources:D,graphDescription:V,height:T,width:h,footNote:B,colorDomain:b,colorLegendTitle:F,padding:ae,relativeHeight:U,tooltip:q,onSeriesMouseOver:me,refValues:A,showColorScale:z,graphID:ne,maxValue:le,minValue:O,highlightedDataPoints:g,onSeriesMouseClick:M,graphDownload:se,dataDownload:H,language:L,theme:u,sortData:l,labelOrder:N,minHeight:P,maxBarThickness:$,maxNumberOfBars:G,minBarThickness:y,ariaLabel:d,resetSelectionOnDoubleClick:oe,styles:f,detailsOnClick:W,barAxisTitle:k,noOfTicks:X,valueColor:ue,classNames:w,filterNA:x,targetStyle:Y,targetColor:I,measureBarWidthFactor:_,qualitativeRangeColors:ce,animate:xe,dimmedOpacity:ge,precision:he,naLabel:R}):i.jsxRuntimeExports.jsx(Xe,{data:s,graphTitle:p,barColor:K,barPadding:S,showTicks:Q,leftMargin:re,rightMargin:Z,topMargin:ye,bottomMargin:de,truncateBy:ee,showLabels:te,showValues:be,backgroundColor:E,suffix:ie,prefix:o,sources:D,graphDescription:V,height:T,width:h,footNote:B,colorDomain:b,colorLegendTitle:F,padding:ae,relativeHeight:U,tooltip:q,onSeriesMouseOver:me,refValues:A,showColorScale:z,graphID:ne,maxValue:le,minValue:O,highlightedDataPoints:g,onSeriesMouseClick:M,graphDownload:se,dataDownload:H,language:L,theme:u,sortData:l,labelOrder:N,minHeight:P,maxBarThickness:$,maxNumberOfBars:G,minBarThickness:y,ariaLabel:d,resetSelectionOnDoubleClick:oe,styles:f,detailsOnClick:W,barAxisTitle:k,noOfTicks:X,valueColor:ue,classNames:w,filterNA:x,targetStyle:Y,targetColor:I,measureBarWidthFactor:_,qualitativeRangeColors:ce,animate:xe,dimmedOpacity:ge,precision:he,naLabel:R})}exports.BulletChart=Je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-CTPQjnHt.cjs"),rt=require("react"),Le=require("./index-Cno4Q0YE.cjs"),Me=require("./index-DQA8q5sC.cjs"),Ae=require("./Modal-JW_IExO3.cjs"),fe=require("./index-CSNtgibC.cjs"),we=require("./numberFormattingFunction-02t-wJta.cjs"),Re=require("./Tooltip-4dJo4_AF.cjs"),f=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Oe=require("./string2HTML-CPGr_I5E.cjs"),ke=require("./Axis-DxRV2yMi.cjs"),Ve=require("./AxisTitle-sS5bLLR7.cjs"),qe=require("./XAxesLabels-D5X8jngD.cjs"),Ne=require("./ReferenceLine-BH0qdf4R.cjs"),Te=require("./YTicksAndGridLines-4pxTRlRK.cjs"),$e=require("./XTicksAndGridLines-B6CELS7q.cjs"),Se=require("./YAxesLabels-DcS85Beo.cjs"),Ee=require("./linear-BwPAspcq.cjs"),Ie=require("./band-VYfcZeJ2.cjs"),Ce=require("./use-in-view-QcfiW0w3.cjs"),ft=require("./proxy-BxvUI_9l.cjs"),ze=require("./index-DG2bgAva.cjs"),ve=require("./Colors.cjs"),De=require("./EmptyState-sAEZ_5rU.cjs"),je=require("./GraphContainer-d8A46BK2.cjs"),Fe=require("./GraphFooter.cjs"),Ue=require("./GraphHeader.cjs"),Be=require("./ColorLegend.cjs");function Pe(e){const t=s.compilerRuntimeExports.c(154),{data:n,width:pt,height:Yt,barColor:zt,suffix:gt,prefix:V,barPadding:Lt,showLabels:qt,showValues:Wt,showTicks:ie,truncateBy:Jt,leftMargin:ne,rightMargin:Tt,topMargin:Kt,bottomMargin:re,tooltip:ut,onSeriesMouseOver:ct,refValues:yt,maxValue:g,minValue:xt,highlightedDataPoints:K,onSeriesMouseClick:nt,labelOrder:D,maxBarThickness:$t,minBarThickness:bt,resetSelectionOnDoubleClick:St,detailsOnClick:N,barAxisTitle:M,valueColor:Q,noOfTicks:vt,styles:m,classNames:a,targetStyle:h,targetColor:wt,qualitativeRangeColors:Dt,measureBarWidthFactor:d,animate:r,dimmedOpacity:c,precision:st,customLayers:Z,naLabel:E}=e,_=ne===void 0?20:ne,Ft=Tt===void 0?20:Tt,se=Kt===void 0?20:Kt,ae=re===void 0?25:re,Qt=rt.useRef(null);let le;t[0]!==r.amount||t[1]!==r.once?(le={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=le):le=t[2];const I=Ce.useInView(Qt,le),F=M?_+30:_;let Ut;t[3]!==ae||t[4]!==Ft||t[5]!==F||t[6]!==se?(Ut={top:se,bottom:ae,left:F,right:Ft},t[3]=ae,t[4]=Ft,t[5]=F,t[6]=se,t[7]=Ut):Ut=t[7];const p=Ut,[A,Zt]=rt.useState(void 0),[U,_t]=rt.useState(void 0),[tt,te]=rt.useState(void 0),[Bt,ee]=rt.useState(void 0),x=pt-p.left-p.right,mt=Yt-p.top-p.bottom;let et;t[8]!==n?(et=Math.max(...n.filter(di).map(hi))<0?0:Math.max(...n.filter(mi).map(xi)),t[8]=n,t[9]=et):et=t[9];const jt=et;let Mt;t[10]!==n?(Mt=Math.max(...n.filter(ci).map(ui))<0?0:Math.max(...n.filter(ri).map(oi)),t[10]=n,t[11]=Mt):Mt=t[11];const At=Mt;let Rt;t[12]!==n?(Rt=Math.max(...n.map(ai)),t[12]=n,t[13]=Rt):Rt=t[13];const Ot=Rt;let kt;t[14]!==jt||t[15]!==g||t[16]!==Ot||t[17]!==At?(kt=f.checkIfNullOrUndefined(g)?Math.max(...[jt,At,Ot].filter(Number.isFinite))<0?0:Math.max(...[jt,At,Ot].filter(Number.isFinite)):g,t[14]=jt,t[15]=g,t[16]=Ot,t[17]=At,t[18]=kt):kt=t[18];const Vt=kt;let Pt;t[19]!==n?(Pt=Math.min(...n.filter(si).map(ni))>=0?0:Math.min(...n.filter(ii).map(ei)),t[19]=n,t[20]=Pt):Pt=t[20];const Nt=Pt;let Et;t[21]!==n?(Et=Math.min(...n.filter(ti).map(_e))>=0?0:Math.min(...n.filter(Ze).map(Qe)),t[21]=n,t[22]=Et):Et=t[22];const ht=Et;let It;t[23]!==Nt||t[24]!==xt||t[25]!==ht?(It=f.checkIfNullOrUndefined(xt)?Math.min(...[Nt,ht].filter(Number.isFinite))>=0?0:Math.min(...[Nt,ht].filter(Number.isFinite)):xt,t[23]=Nt,t[24]=xt,t[25]=ht,t[26]=It):It=t[26];const y=It;let C,z,B,P,L,H,G,b,R,O,q,T,v,w;if(t[27]!==r||t[28]!==M||t[29]!==zt||t[30]!==Lt||t[31]!==a?.graphObjectValues||t[32]!==a?.xAxis?.axis||t[33]!==a?.xAxis?.labels||t[34]!==a?.yAxis?.gridLines||t[35]!==a?.yAxis?.labels||t[36]!==a?.yAxis?.title||t[37]!==Z||t[38]!==n||t[39]!==N||t[40]!==c||t[41]!==mt||t[42]!==x||t[43]!==Yt||t[44]!==K||t[45]!==I||t[46]!==D||t[47]!==_||t[48]!==p.bottom||t[49]!==p.left||t[50]!==p.right||t[51]!==p.top||t[52]!==$t||t[53]!==d||t[54]!==bt||t[55]!==U||t[56]!==E||t[57]!==vt||t[58]!==nt||t[59]!==ct||t[60]!==st||t[61]!==V||t[62]!==Dt||t[63]!==yt||t[64]!==St||t[65]!==qt||t[66]!==ie||t[67]!==Wt||t[68]!==m?.graphObjectValues||t[69]!==m?.xAxis?.axis||t[70]!==m?.xAxis?.labels||t[71]!==m?.yAxis?.gridLines||t[72]!==m?.yAxis?.labels||t[73]!==m?.yAxis?.title||t[74]!==gt||t[75]!==wt||t[76]!==h||t[77]!==Jt||t[78]!==Q||t[79]!==pt||t[80]!==Vt||t[81]!==y){const u=Ee.linear().domain([y,Vt]).range([mt,0]).nice();let Ht;t[96]!==D?(Ht=(l,oe)=>({...l,id:D?`${l.label}`:`${oe}`}),t[96]=D,t[97]=Ht):Ht=t[97];const ue=n.map(Ht),o=D||ue.map(Ke),k=Ie.band().domain(o).range([0,bt?Math.max(x,bt*o.length):$t?Math.min(x,$t*o.length):x]).paddingInner(Lt),J=u.ticks(vt);z=ft.motion.svg,O=`${pt}px`,q=`${Yt}px`,T=`0 0 ${pt} ${Yt}`,v="ltr",w=Qt,L=`translate(${p.left},${p.top})`;const xe=u(y<0?0:y),Gt=u(y<0?0:y),dt=y<0?0:y;let lt;t[98]!==E||t[99]!==st||t[100]!==V||t[101]!==gt||t[102]!==dt?(lt=we.numberFormattingFunction(dt,E,st,V,gt),t[98]=E,t[99]=st,t[100]=V,t[101]=gt,t[102]=dt,t[103]=lt):lt=t[103];const Xt=a?.xAxis?.axis,j=a?.yAxis?.labels;let it;t[104]!==Xt||t[105]!==j?(it={axis:Xt,label:j},t[104]=Xt,t[105]=j,t[106]=it):it=t[106];const he=m?.xAxis?.axis,me=m?.yAxis?.labels;let i;t[107]!==he||t[108]!==me?(i={axis:he,label:me},t[107]=he,t[108]=me,t[109]=i):i=t[109],H=s.jsxRuntimeExports.jsx(ke.Axis,{y1:xe,y2:Gt,x1:0-_,x2:x+p.right,label:lt,labelPos:{x:0-_,dx:0,dy:Vt<0?"1em":-5,y:u(y<0?0:y)},classNames:it,styles:i}),G=ie?s.jsxRuntimeExports.jsx(Te.YTicksAndGridLines,{values:J.filter(Je),y:J.filter(We).map(l=>u(l)),x1:0-_,x2:x+p.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:gt,prefix:V,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:st}):null;const ot=0-_-15,ce=mt/2,pe=m?.yAxis?.title,ge=a?.yAxis?.title;t[110]!==M||t[111]!==ot||t[112]!==ce||t[113]!==pe||t[114]!==ge?(b=s.jsxRuntimeExports.jsx(Ve.AxisTitle,{x:ot,y:ce,style:pe,className:ge,text:M,rotate90:!0}),t[110]=M,t[111]=ot,t[112]=ce,t[113]=pe,t[114]=ge,t[115]=b):b=t[115],t[116]!==Z?(R=Z.filter(Ye).map(Xe),t[116]=Z,t[117]=R):R=t[117],C=ze.AnimatePresence,B=ue.map(l=>f.checkIfNullOrUndefined(k(l.id))?null:s.jsxRuntimeExports.jsxs(ft.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:oe=>{Zt(l),ee(oe.clientY),te(oe.clientX),ct?.(l)},onClick:()=>{(nt||N)&&(Me.isEqual(U,l)&&St?(_t(void 0),nt?.(void 0)):(_t(l),nt?.(l)))},onMouseMove:oe=>{Zt(l),ee(oe.clientY),te(oe.clientX)},onMouseLeave:()=>{Zt(void 0),te(void 0),ee(void 0),ct?.(void 0)},exit:{opacity:0,transition:{duration:r.duration}},variants:{initial:{x:k(`${l.id}`),y:0,opacity:K.length!==0?K.indexOf(l.label)!==-1?.85:c:.85},whileInView:{x:k(`${l.id}`),y:0,opacity:K.length!==0?K.indexOf(l.label)!==-1?.85:c:.85,transition:{duration:r.duration}}},initial:"initial",animate:I?"whileInView":"initial",children:[l.qualitativeRange?l.qualitativeRange.map((oe,de)=>s.jsxRuntimeExports.jsx(ft.motion.rect,{x:0,exit:{height:0,y:u(0),transition:{duration:r.duration}},variants:{initial:{height:0,y:u(0),fill:Dt[de]},whileInView:{height:Math.abs(u(fe.sum(l.qualitativeRange.filter((ye,be)=>be<=de&&ye)))-u(fe.sum(l.qualitativeRange.filter((ye,be)=>be<de&&ye)))),y:u(fe.sum(l.qualitativeRange.filter((ye,be)=>be<=de&&ye))),fill:Dt[de],transition:{duration:r.duration}}},initial:"initial",animate:I?"whileInView":"initial",width:k.bandwidth()},de)):null,l.target&&h==="background"?s.jsxRuntimeExports.jsx(ft.motion.rect,{x:0,width:k.bandwidth(),style:{fill:wt},exit:{height:0,y:u(0),transition:{duration:r.duration}},variants:{initial:{height:0,y:u(0)},whileInView:{height:Math.abs(u(l.target)-u(0)),y:l.target>0?u(l.target):u(0),transition:{duration:r.duration}}},initial:"initial",animate:I?"whileInView":"initial"}):null,l.size?s.jsxRuntimeExports.jsx(ft.motion.rect,{x:k.bandwidth()*((1-d)/2),width:k.bandwidth()*d,style:{fill:zt},exit:{height:0,y:u(0),transition:{duration:r.duration}},variants:{initial:{height:0,y:u(0)},whileInView:{height:Math.abs(u(l.size)-u(0)),y:l.size>0?u(l.size):u(0),transition:{duration:r.duration}}},initial:"initial",animate:I?"whileInView":"initial"}):null,l.target&&h==="line"?s.jsxRuntimeExports.jsx(ft.motion.rect,{x:0,width:k.bandwidth(),style:{fill:wt},exit:{y:u(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{y:u(0),opacity:0},whileInView:{y:u(l.target)-1,opacity:1,transition:{duration:r.duration}}},initial:"initial",animate:I?"whileInView":"initial",height:2}):null,qt?s.jsxRuntimeExports.jsx(qe.XAxesLabels,{value:`${l.label}`.length<Jt?`${l.label}`:`${`${l.label}`.substring(0,Jt)}...`,y:(l.size||0)<0?0:u(0)+5,x:0,width:k.bandwidth(),height:(l.size||0)<0?u(0)-5:p.bottom,style:m?.xAxis?.labels,className:a?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:r,isInView:I}):null,Wt?s.jsxRuntimeExports.jsx(ft.motion.text,{x:k.bandwidth()/2,style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:s.mo("graph-value text-sm",!Q&&zt.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",a?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",exit:{opacity:0,transition:{duration:r.duration}},variants:{initial:{y:u(0),opacity:0,fill:Q||zt},whileInView:{y:u(l.size||0),opacity:1,fill:Q||zt,transition:{duration:r.duration}}},initial:"initial",animate:I?"whileInView":"initial",children:we.numberFormattingFunction(l.size,E,st,V,gt)}):null]},l.label)),P=yt?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:yt.map((l,oe)=>s.jsxRuntimeExports.jsx(Ne.RefLineY,{text:l.text,color:l.color,y:u(l.value),x1:0-_,x2:x+p.right,classNames:l.classNames,styles:l.styles,animate:r,isInView:I},oe))}):null,t[27]=r,t[28]=M,t[29]=zt,t[30]=Lt,t[31]=a?.graphObjectValues,t[32]=a?.xAxis?.axis,t[33]=a?.xAxis?.labels,t[34]=a?.yAxis?.gridLines,t[35]=a?.yAxis?.labels,t[36]=a?.yAxis?.title,t[37]=Z,t[38]=n,t[39]=N,t[40]=c,t[41]=mt,t[42]=x,t[43]=Yt,t[44]=K,t[45]=I,t[46]=D,t[47]=_,t[48]=p.bottom,t[49]=p.left,t[50]=p.right,t[51]=p.top,t[52]=$t,t[53]=d,t[54]=bt,t[55]=U,t[56]=E,t[57]=vt,t[58]=nt,t[59]=ct,t[60]=st,t[61]=V,t[62]=Dt,t[63]=yt,t[64]=St,t[65]=qt,t[66]=ie,t[67]=Wt,t[68]=m?.graphObjectValues,t[69]=m?.xAxis?.axis,t[70]=m?.xAxis?.labels,t[71]=m?.yAxis?.gridLines,t[72]=m?.yAxis?.labels,t[73]=m?.yAxis?.title,t[74]=gt,t[75]=wt,t[76]=h,t[77]=Jt,t[78]=Q,t[79]=pt,t[80]=Vt,t[81]=y,t[82]=C,t[83]=z,t[84]=B,t[85]=P,t[86]=L,t[87]=H,t[88]=G,t[89]=b,t[90]=R,t[91]=O,t[92]=q,t[93]=T,t[94]=v,t[95]=w}else C=t[82],z=t[83],B=t[84],P=t[85],L=t[86],H=t[87],G=t[88],b=t[89],R=t[90],O=t[91],q=t[92],T=t[93],v=t[94],w=t[95];let X;t[118]!==C||t[119]!==B||t[120]!==P?(X=s.jsxRuntimeExports.jsxs(C,{children:[B,P]}),t[118]=C,t[119]=B,t[120]=P,t[121]=X):X=t[121];let Y;t[122]!==Z?(Y=Z.filter(Ge).map(He),t[122]=Z,t[123]=Y):Y=t[123];let W;t[124]!==L||t[125]!==H||t[126]!==G||t[127]!==b||t[128]!==R||t[129]!==X||t[130]!==Y?(W=s.jsxRuntimeExports.jsxs("g",{transform:L,children:[H,G,b,R,X,Y]}),t[124]=L,t[125]=H,t[126]=G,t[127]=b,t[128]=R,t[129]=X,t[130]=Y,t[131]=W):W=t[131];let $;t[132]!==z||t[133]!==O||t[134]!==q||t[135]!==T||t[136]!==v||t[137]!==w||t[138]!==W?($=s.jsxRuntimeExports.jsx(z,{width:O,height:q,viewBox:T,direction:v,ref:w,children:W}),t[132]=z,t[133]=O,t[134]=q,t[135]=T,t[136]=v,t[137]=w,t[138]=W,t[139]=$):$=t[139];let at;t[140]!==a?.tooltip||t[141]!==tt||t[142]!==Bt||t[143]!==A||t[144]!==m?.tooltip||t[145]!==ut?(at=A&&ut&&tt&&Bt?s.jsxRuntimeExports.jsx(Re.Tooltip,{data:A,body:ut,xPos:tt,yPos:Bt,backgroundStyle:m?.tooltip,className:a?.tooltip}):null,t[140]=a?.tooltip,t[141]=tt,t[142]=Bt,t[143]=A,t[144]=m?.tooltip,t[145]=ut,t[146]=at):at=t[146];let S;t[147]!==N||t[148]!==U?(S=N&&U!==void 0?s.jsxRuntimeExports.jsx(Ae.le,{open:U!==void 0,onClose:()=>{_t(void 0)},children:s.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof N=="string"?{__html:Oe.string2HTML(N,U)}:void 0,children:typeof N=="function"?N(U):null})}):null,t[147]=N,t[148]=U,t[149]=S):S=t[149];let Ct;return t[150]!==$||t[151]!==at||t[152]!==S?(Ct=s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[$,at,S]}),t[150]=$,t[151]=at,t[152]=S,t[153]=Ct):Ct=t[153],Ct}function He(e){return e.layer}function Ge(e){return e.position==="after"}function Xe(e){return e.layer}function Ye(e){return e.position==="before"}function We(e){return e!==0}function Je(e){return e!==0}function Ke(e){return`${e.id}`}function Qe(e){return e.target}function Ze(e){return!f.checkIfNullOrUndefined(e.target)}function _e(e){return e.target}function ti(e){return!f.checkIfNullOrUndefined(e.target)}function ei(e){return e.size}function ii(e){return!f.checkIfNullOrUndefined(e.size)}function ni(e){return e.size}function si(e){return!f.checkIfNullOrUndefined(e.size)}function ai(e){return fe.sum((e.qualitativeRange||[]).filter(li))||0}function li(e){return!f.checkIfNullOrUndefined(e)}function oi(e){return e.target}function ri(e){return!f.checkIfNullOrUndefined(e.size)}function ui(e){return e.target}function ci(e){return!f.checkIfNullOrUndefined(e.target)}function xi(e){return e.size}function mi(e){return!f.checkIfNullOrUndefined(e.size)}function hi(e){return e.size}function di(e){return!f.checkIfNullOrUndefined(e.size)}function fi(e){const t=s.compilerRuntimeExports.c(146),{data:n,topMargin:pt,bottomMargin:Yt,leftMargin:zt,rightMargin:gt,barColor:V,suffix:Lt,prefix:qt,barPadding:Wt,showValues:ie,showTicks:Jt,truncateBy:ne,width:Tt,height:Kt,showLabels:re,tooltip:ut,onSeriesMouseOver:ct,refValues:yt,highlightedDataPoints:g,maxValue:xt,minValue:K,onSeriesMouseClick:nt,labelOrder:D,rtl:$t,maxBarThickness:bt,minBarThickness:St,resetSelectionOnDoubleClick:N,detailsOnClick:M,barAxisTitle:Q,valueColor:vt,noOfTicks:m,styles:a,classNames:h,targetStyle:wt,targetColor:Dt,qualitativeRangeColors:d,measureBarWidthFactor:r,animate:c,dimmedOpacity:st,precision:Z,customLayers:E,naLabel:_}=e,Ft=pt===void 0?25:pt,se=Yt===void 0?10:Yt,ae=zt===void 0?100:zt,Qt=gt===void 0?40:gt,le=rt.useRef(null);let I;t[0]!==c.amount||t[1]!==c.once?(I={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=I):I=t[2];const F=Ce.useInView(le,I),[Ut,p]=rt.useState(void 0),[A,Zt]=rt.useState(void 0),[U,_t]=rt.useState(void 0),[tt,te]=rt.useState(void 0),Bt=Q?Ft+25:Ft;let ee;t[3]!==se||t[4]!==ae||t[5]!==Qt||t[6]!==Bt?(ee={top:Bt,bottom:se,left:ae,right:Qt},t[3]=se,t[4]=ae,t[5]=Qt,t[6]=Bt,t[7]=ee):ee=t[7];const x=ee,mt=Tt-x.left-x.right,et=Kt-x.top-x.bottom;let jt;t[8]!==n?(jt=Math.max(...n.filter(Fi).map(Di))<0?0:Math.max(...n.filter(Si).map($i)),t[8]=n,t[9]=jt):jt=t[9];const Mt=jt;let At;t[10]!==n?(At=Math.max(...n.filter(Ti).map(qi))<0?0:Math.max(...n.filter(Li).map(zi)),t[10]=n,t[11]=At):At=t[11];const Rt=At;let Ot;t[12]!==n?(Ot=Math.max(...n.map(Ii)),t[12]=n,t[13]=Ot):Ot=t[13];const kt=Ot;let Vt;t[14]!==Mt||t[15]!==xt||t[16]!==kt||t[17]!==Rt?(Vt=f.checkIfNullOrUndefined(xt)?Math.max(...[Mt,Rt,kt].filter(Number.isFinite))<0?0:Math.max(...[Mt,Rt,kt].filter(Number.isFinite)):xt,t[14]=Mt,t[15]=xt,t[16]=kt,t[17]=Rt,t[18]=Vt):Vt=t[18];const Pt=Vt;let Nt;t[19]!==n?(Nt=Math.min(...n.filter(Ei).map(Ni))>=0?0:Math.min(...n.filter(Vi).map(ki)),t[19]=n,t[20]=Nt):Nt=t[20];const Et=Nt;let ht;t[21]!==n?(ht=Math.min(...n.filter(Oi).map(Ri))>=0?0:Math.min(...n.filter(Ai).map(Mi)),t[21]=n,t[22]=ht):ht=t[22];const It=ht;let y;t[23]!==Et||t[24]!==K||t[25]!==It?(y=f.checkIfNullOrUndefined(K)?Math.min(...[Et,It].filter(Number.isFinite))>=0?0:Math.min(...[Et,It].filter(Number.isFinite)):K,t[23]=Et,t[24]=K,t[25]=It,t[26]=y):y=t[26];const C=y;let z,B,P,L,H,G,b,R,O,q,T,v,w,X;if(t[27]!==c||t[28]!==Q||t[29]!==V||t[30]!==Wt||t[31]!==h?.graphObjectValues||t[32]!==h?.xAxis?.gridLines||t[33]!==h?.xAxis?.labels||t[34]!==h?.xAxis?.title||t[35]!==h?.yAxis?.axis||t[36]!==h?.yAxis?.labels||t[37]!==E||t[38]!==n||t[39]!==M||t[40]!==st||t[41]!==et||t[42]!==mt||t[43]!==Kt||t[44]!==g||t[45]!==F||t[46]!==D||t[47]!==x.bottom||t[48]!==x.left||t[49]!==x.top||t[50]!==bt||t[51]!==r||t[52]!==St||t[53]!==A||t[54]!==_||t[55]!==m||t[56]!==nt||t[57]!==ct||t[58]!==Z||t[59]!==qt||t[60]!==d||t[61]!==yt||t[62]!==N||t[63]!==$t||t[64]!==re||t[65]!==Jt||t[66]!==ie||t[67]!==a?.graphObjectValues||t[68]!==a?.xAxis?.gridLines||t[69]!==a?.xAxis?.labels||t[70]!==a?.xAxis?.title||t[71]!==a?.yAxis?.axis||t[72]!==a?.yAxis?.labels||t[73]!==Lt||t[74]!==Dt||t[75]!==wt||t[76]!==Ft||t[77]!==ne||t[78]!==vt||t[79]!==Tt||t[80]!==Pt||t[81]!==C){let Ht;t[96]!==D?(Ht=(i,ot)=>({...i,id:D?`${i.label}`:`${ot}`}),t[96]=D,t[97]=Ht):Ht=t[97];const ue=n.map(Ht),o=Ee.linear().domain([C,Pt]).range([0,mt]).nice(),k=D||ue.map(ji),J=Ie.band().domain(k).range([0,St?Math.max(et,St*k.length):bt?Math.min(et,bt*k.length):et]).paddingInner(Wt),xe=o.ticks(m);B=ft.motion.svg,q=`${Tt}px`,T=`${Kt}px`,v=`0 0 ${Tt} ${Kt}`,w="ltr",X=le,H=`translate(${x.left},${x.top})`,G=Jt?s.jsxRuntimeExports.jsx($e.XTicksAndGridLines,{values:xe.filter(wi),x:xe.filter(vi).map(i=>o(i)),y1:0-Ft,y2:et+x.bottom,styles:{gridLines:a?.xAxis?.gridLines,labels:a?.xAxis?.labels},classNames:{gridLines:h?.xAxis?.gridLines,labels:h?.xAxis?.labels},suffix:Lt,prefix:qt,labelType:"secondary",showGridLines:!0,precision:Z}):null;const Gt=mt/2,dt=0-x.top+15,lt=a?.xAxis?.title,Xt=h?.xAxis?.title;t[98]!==Q||t[99]!==Gt||t[100]!==dt||t[101]!==lt||t[102]!==Xt?(b=s.jsxRuntimeExports.jsx(Ve.AxisTitle,{x:Gt,y:dt,style:lt,className:Xt,text:Q}),t[98]=Q,t[99]=Gt,t[100]=dt,t[101]=lt,t[102]=Xt,t[103]=b):b=t[103];const j=h?.yAxis?.axis;let it;t[104]!==j?(it={axis:j},t[104]=j,t[105]=it):it=t[105];const he=a?.yAxis?.axis;let me;t[106]!==he?(me={axis:he},t[106]=he,t[107]=me):me=t[107],R=s.jsxRuntimeExports.jsx(ke.Axis,{x1:o(C<0?0:C),x2:o(C<0?0:C),y1:-2.5,y2:et+x.bottom,classNames:it,styles:me}),t[108]!==E?(O=E.filter(bi).map(yi),t[108]=E,t[109]=O):O=t[109],z=ze.AnimatePresence,P=ue.map(i=>f.checkIfNullOrUndefined(J(i.id))?null:s.jsxRuntimeExports.jsxs(ft.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:ot=>{p(i),te(ot.clientY),_t(ot.clientX),ct?.(i)},onClick:()=>{(nt||M)&&(Me.isEqual(A,i)&&N?(Zt(void 0),nt?.(void 0)):(Zt(i),nt?.(i)))},onMouseMove:ot=>{p(i),te(ot.clientY),_t(ot.clientX)},onMouseLeave:()=>{p(void 0),_t(void 0),te(void 0),ct?.(void 0)},exit:{opacity:0,transition:{duration:c.duration}},variants:{initial:{x:0,y:J(`${i.id}`),opacity:g.length!==0?g.indexOf(i.label)!==-1?.85:st:.85},whileInView:{x:0,y:J(`${i.id}`),opacity:g.length!==0?g.indexOf(i.label)!==-1?.85:st:.85,transition:{duration:c.duration}}},initial:"initial",animate:F?"whileInView":"initial",children:[i.qualitativeRange?i.qualitativeRange.map((ot,ce)=>s.jsxRuntimeExports.jsx(ft.motion.rect,{exit:{width:0,x:o(0),transition:{duration:c.duration}},variants:{initial:{x:o(0),width:0,fill:d[ce]},whileInView:{x:o(ce===0?0:fe.sum(i.qualitativeRange.filter((pe,ge)=>ge<ce&&pe))),width:o(ot),fill:d[ce],transition:{duration:c.duration}}},initial:"initial",animate:F?"whileInView":"initial",y:0,height:J.bandwidth()},ce)):null,i.target&&wt==="background"?s.jsxRuntimeExports.jsx(ft.motion.rect,{y:0,x:i.target>=0?o(0):o(i.target),height:J.bandwidth(),style:{fill:Dt},exit:{width:0,x:o(0),transition:{duration:c.duration}},variants:{initial:{x:o(0),width:0},whileInView:{x:i.target>=0?o(0):o(i.target),width:i.target>=0?o(i.target)-o(0):o(0)-o(i.target),transition:{duration:c.duration}}},initial:"initial",animate:F?"whileInView":"initial"}):null,i.size?s.jsxRuntimeExports.jsx(ft.motion.rect,{y:J.bandwidth()*((1-r)/2),style:{fill:V},height:J.bandwidth()*r,exit:{width:0,x:o(0),transition:{duration:c.duration}},variants:{initial:{x:o(0),width:0},whileInView:{x:i.size>=0?o(0):o(i.size),width:i.size>=0?o(i.size)-o(0):o(0)-o(i.size),transition:{duration:c.duration}}},initial:"initial",animate:F?"whileInView":"initial"}):null,i.target&&wt==="line"?s.jsxRuntimeExports.jsx(ft.motion.rect,{y:0,height:J.bandwidth(),style:{fill:Dt},width:2,exit:{opacity:0,x:o(0),transition:{duration:c.duration}},variants:{initial:{x:o(0),opacity:0},whileInView:{x:o(i.target)-1,opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:F?"whileInView":"initial"}):null,re?s.jsxRuntimeExports.jsx(Se.YAxesLabels,{value:`${i.label}`.length<ne?`${i.label}`:`${`${i.label}`.substring(0,ne)}...`,y:0,x:(i.size||0)<0?o(0):0-x.left,width:(i.size||0)<0?Tt-o(0):o(0)+x.left,height:J.bandwidth(),alignment:i.size&&i.size<0?"left":"right",style:a?.yAxis?.labels,className:h?.yAxis?.labels,animate:c,isInView:F}):null,ie?s.jsxRuntimeExports.jsx(ft.motion.text,{y:J.bandwidth()/2,style:{textAnchor:i.size&&i.size<0?"end":"start",...a?.graphObjectValues||{}},className:s.mo("graph-value text-sm",!vt&&V.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",h?.graphObjectValues),dx:i.size&&i.size<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:c.duration}},variants:{initial:{x:o(0),opacity:0,fill:vt||V},whileInView:{x:i.size?o(i.size):o(0),opacity:1,fill:vt||V,transition:{duration:c.duration}}},initial:"initial",animate:F?"whileInView":"initial",children:we.numberFormattingFunction(i.size,_,Z,qt,Lt)}):null]},i.label)),L=yt?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:yt.map((i,ot)=>s.jsxRuntimeExports.jsx(Ne.RefLineX,{text:i.text,color:i.color,x:o(i.value),y1:0-x.top,y2:et+x.bottom,textSide:o(i.value)>mt*.75||$t?"left":"right",classNames:i.classNames,styles:i.styles,animate:c,isInView:F},ot))}):null,t[27]=c,t[28]=Q,t[29]=V,t[30]=Wt,t[31]=h?.graphObjectValues,t[32]=h?.xAxis?.gridLines,t[33]=h?.xAxis?.labels,t[34]=h?.xAxis?.title,t[35]=h?.yAxis?.axis,t[36]=h?.yAxis?.labels,t[37]=E,t[38]=n,t[39]=M,t[40]=st,t[41]=et,t[42]=mt,t[43]=Kt,t[44]=g,t[45]=F,t[46]=D,t[47]=x.bottom,t[48]=x.left,t[49]=x.top,t[50]=bt,t[51]=r,t[52]=St,t[53]=A,t[54]=_,t[55]=m,t[56]=nt,t[57]=ct,t[58]=Z,t[59]=qt,t[60]=d,t[61]=yt,t[62]=N,t[63]=$t,t[64]=re,t[65]=Jt,t[66]=ie,t[67]=a?.graphObjectValues,t[68]=a?.xAxis?.gridLines,t[69]=a?.xAxis?.labels,t[70]=a?.xAxis?.title,t[71]=a?.yAxis?.axis,t[72]=a?.yAxis?.labels,t[73]=Lt,t[74]=Dt,t[75]=wt,t[76]=Ft,t[77]=ne,t[78]=vt,t[79]=Tt,t[80]=Pt,t[81]=C,t[82]=z,t[83]=B,t[84]=P,t[85]=L,t[86]=H,t[87]=G,t[88]=b,t[89]=R,t[90]=O,t[91]=q,t[92]=T,t[93]=v,t[94]=w,t[95]=X}else z=t[82],B=t[83],P=t[84],L=t[85],H=t[86],G=t[87],b=t[88],R=t[89],O=t[90],q=t[91],T=t[92],v=t[93],w=t[94],X=t[95];let Y;t[110]!==z||t[111]!==P||t[112]!==L?(Y=s.jsxRuntimeExports.jsxs(z,{children:[P,L]}),t[110]=z,t[111]=P,t[112]=L,t[113]=Y):Y=t[113];let W;t[114]!==E?(W=E.filter(gi).map(pi),t[114]=E,t[115]=W):W=t[115];let $;t[116]!==H||t[117]!==G||t[118]!==b||t[119]!==R||t[120]!==O||t[121]!==Y||t[122]!==W?($=s.jsxRuntimeExports.jsxs("g",{transform:H,children:[G,b,R,O,Y,W]}),t[116]=H,t[117]=G,t[118]=b,t[119]=R,t[120]=O,t[121]=Y,t[122]=W,t[123]=$):$=t[123];let at;t[124]!==B||t[125]!==q||t[126]!==T||t[127]!==v||t[128]!==w||t[129]!==X||t[130]!==$?(at=s.jsxRuntimeExports.jsx(B,{width:q,height:T,viewBox:v,direction:w,ref:X,children:$}),t[124]=B,t[125]=q,t[126]=T,t[127]=v,t[128]=w,t[129]=X,t[130]=$,t[131]=at):at=t[131];let S;t[132]!==h?.tooltip||t[133]!==U||t[134]!==tt||t[135]!==Ut||t[136]!==a?.tooltip||t[137]!==ut?(S=Ut&&ut&&U&&tt?s.jsxRuntimeExports.jsx(Re.Tooltip,{data:Ut,body:ut,xPos:U,yPos:tt,backgroundStyle:a?.tooltip,className:h?.tooltip}):null,t[132]=h?.tooltip,t[133]=U,t[134]=tt,t[135]=Ut,t[136]=a?.tooltip,t[137]=ut,t[138]=S):S=t[138];let Ct;t[139]!==M||t[140]!==A?(Ct=M&&A!==void 0?s.jsxRuntimeExports.jsx(Ae.le,{open:A!==void 0,onClose:()=>{Zt(void 0)},children:s.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof M=="string"?{__html:Oe.string2HTML(M,A)}:void 0,children:typeof M=="function"?M(A):null})}):null,t[139]=M,t[140]=A,t[141]=Ct):Ct=t[141];let u;return t[142]!==at||t[143]!==S||t[144]!==Ct?(u=s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[at,S,Ct]}),t[142]=at,t[143]=S,t[144]=Ct,t[145]=u):u=t[145],u}function pi(e){return e.layer}function gi(e){return e.position==="after"}function yi(e){return e.layer}function bi(e){return e.position==="before"}function vi(e){return e!==0}function wi(e){return e!==0}function ji(e){return`${e.id}`}function Mi(e){return e.target}function Ai(e){return!f.checkIfNullOrUndefined(e.target)}function Ri(e){return e.target}function Oi(e){return!f.checkIfNullOrUndefined(e.target)}function ki(e){return e.size}function Vi(e){return!f.checkIfNullOrUndefined(e.size)}function Ni(e){return e.size}function Ei(e){return!f.checkIfNullOrUndefined(e.size)}function Ii(e){return fe.sum((e.qualitativeRange||[]).filter(Ci))||0}function Ci(e){return!f.checkIfNullOrUndefined(e)}function zi(e){return e.target}function Li(e){return!f.checkIfNullOrUndefined(e.target)}function qi(e){return e.target}function Ti(e){return!f.checkIfNullOrUndefined(e.target)}function $i(e){return e.size}function Si(e){return!f.checkIfNullOrUndefined(e.size)}function Di(e){return e.size}function Fi(e){return!f.checkIfNullOrUndefined(e.size)}function Ui(e){const t=s.compilerRuntimeExports.c(94),{data:n,graphTitle:pt,barColor:Yt,barPadding:zt,showTicks:gt,leftMargin:V,rightMargin:Lt,topMargin:qt,bottomMargin:Wt,truncateBy:ie,showLabels:Jt,showValues:ne,backgroundColor:Tt,suffix:Kt,prefix:re,sources:ut,graphDescription:ct,height:yt,width:g,footNote:xt,colorDomain:K,colorLegendTitle:nt,padding:D,relativeHeight:$t,tooltip:bt,onSeriesMouseOver:St,refValues:N,showColorScale:M,graphID:Q,maxValue:vt,minValue:m,highlightedDataPoints:a,onSeriesMouseClick:h,valueColor:wt,orientation:Dt,styles:d,classNames:r,qualitativeRangeColors:c,targetColor:st,filterNA:Z,targetStyle:E,measureBarWidthFactor:_,animate:Ft,dimmedOpacity:se,precision:ae,customLayers:Qt,naLabel:le,graphDownload:I,dataDownload:F,language:Ut,theme:p,sortData:A,labelOrder:Zt,minHeight:U,maxBarThickness:_t,maxNumberOfBars:tt,minBarThickness:te,ariaLabel:Bt,resetSelectionOnDoubleClick:ee,detailsOnClick:x,barAxisTitle:mt,noOfTicks:et}=e,jt=Yt===void 0?ve.Colors.primaryColors["blue-600"]:Yt,Mt=zt===void 0?.25:zt,At=gt===void 0?!0:gt,Rt=ie===void 0?999:ie,Ot=Jt===void 0?!0:Jt,kt=ne===void 0?!0:ne,Vt=Tt===void 0?!1:Tt,Pt=Kt===void 0?"":Kt,Nt=re===void 0?"":re,Et=M===void 0?!0:M;let ht;t[0]!==a?(ht=a===void 0?[]:a,t[0]=a,t[1]=ht):ht=t[1];const It=ht,y=Dt===void 0?"vertical":Dt,C=st===void 0?ve.Colors.light.grays["gray-700"]:st,z=Z===void 0?!0:Z,B=E===void 0?"line":E,P=_===void 0?.4:_,L=Ft===void 0?!1:Ft,H=se===void 0?.3:se,G=ae===void 0?2:ae;let b;t[2]!==Qt?(b=Qt===void 0?[]:Qt,t[2]=Qt,t[3]=b):b=t[3];const R=b,O=le===void 0?"NA":le,q=I===void 0?!1:I,T=F===void 0?!1:F,v=Ut===void 0?"en":Ut,w=p===void 0?"light":p,X=U===void 0?0:U,Y=ee===void 0?!0:ee,W=et===void 0?5:et,[$,at]=rt.useState(0),[S,Ct]=rt.useState(0),u=rt.useRef(null),Ht=rt.useRef(null),ue=y==="horizontal"?fi:Pe;let o,k;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{const j=new ResizeObserver(it=>{at(it[0].target.clientWidth||620),Ct(it[0].target.clientHeight||480)});return u.current&&j.observe(u.current),()=>j.disconnect()},k=[],t[4]=o,t[5]=k):(o=t[4],k=t[5]),rt.useEffect(o,k);const J=r?.graphContainer,xe=d?.graphContainer;let Gt;t[6]!==r?.description||t[7]!==r?.title||t[8]!==n||t[9]!==T||t[10]!==ct||t[11]!==q||t[12]!==pt||t[13]!==d?.description||t[14]!==d?.title||t[15]!==g?(Gt=pt||ct||q||T?s.jsxRuntimeExports.jsx(Ue.GraphHeader,{styles:{title:d?.title,description:d?.description},classNames:{title:r?.title,description:r?.description},graphTitle:pt,graphDescription:ct,width:g,graphDownload:q?Ht:void 0,dataDownload:T?n.map(Yi).filter(Xi).length>0?n.map(Gi).filter(Hi):n.filter(Pi):null}):null,t[6]=r?.description,t[7]=r?.title,t[8]=n,t[9]=T,t[10]=ct,t[11]=q,t[12]=pt,t[13]=d?.description,t[14]=d?.title,t[15]=g,t[16]=Gt):Gt=t[16];let dt;t[17]!==ue||t[18]!==L||t[19]!==mt||t[20]!==jt||t[21]!==Mt||t[22]!==Wt||t[23]!==r||t[24]!==K||t[25]!==nt||t[26]!==R||t[27]!==n||t[28]!==x||t[29]!==H||t[30]!==z||t[31]!==It||t[32]!==Zt||t[33]!==v||t[34]!==V||t[35]!==_t||t[36]!==tt||t[37]!==vt||t[38]!==P||t[39]!==te||t[40]!==m||t[41]!==O||t[42]!==W||t[43]!==h||t[44]!==St||t[45]!==y||t[46]!==G||t[47]!==Nt||t[48]!==c||t[49]!==N||t[50]!==Y||t[51]!==Lt||t[52]!==Et||t[53]!==Ot||t[54]!==At||t[55]!==kt||t[56]!==A||t[57]!==d||t[58]!==Pt||t[59]!==S||t[60]!==$||t[61]!==C||t[62]!==B||t[63]!==w||t[64]!==bt||t[65]!==qt||t[66]!==Rt||t[67]!==wt||t[68]!==g?(dt=n.length===0?s.jsxRuntimeExports.jsx(De.EmptyState,{}):s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[Et&&n.filter(Bi).length!==0&&K?s.jsxRuntimeExports.jsx(Be.ColorLegend,{width:g,colorLegendTitle:nt,colors:c||ve.Colors[w].sequentialColors.positiveColorsx10,colorDomain:K,showNAColor:!1,className:r?.colorLegend}):null,s.jsxRuntimeExports.jsx(je.GraphArea,{ref:u,children:$&&S?s.jsxRuntimeExports.jsx(ue,{data:A?Le.orderBy(n.filter(j=>z?!f.checkIfNullOrUndefined(j.size):j),[j=>j.size===void 0?A==="asc"?(y==="horizontal"?1:-1)*(1/0):(y==="horizontal"?-1:1)*(1/0):j.size],[A]).filter((j,it)=>tt?it<tt:!0):n.filter(j=>z?!f.checkIfNullOrUndefined(j.size):j).filter((j,it)=>tt?it<tt:!0),barColor:jt,targetColor:C,width:$,refValues:N,height:S,suffix:Pt,prefix:Nt,barPadding:Mt,showLabels:Ot,showValues:kt,showTicks:At,truncateBy:Rt,leftMargin:V,rightMargin:Lt,qualitativeRangeColors:c||ve.Colors[w].sequentialColors.positiveColorsx10,topMargin:qt,bottomMargin:Wt,tooltip:bt,onSeriesMouseOver:St,maxValue:vt,minValue:m,highlightedDataPoints:It,onSeriesMouseClick:h,labelOrder:Zt,maxBarThickness:_t,minBarThickness:te,resetSelectionOnDoubleClick:Y,detailsOnClick:x,barAxisTitle:mt,noOfTicks:W,valueColor:wt,styles:d,classNames:r,targetStyle:B,dimmedOpacity:H,measureBarWidthFactor:P,animate:L===!0?{duration:.5,once:!0,amount:.5}:L||{duration:0,once:!0,amount:0},precision:G,customLayers:R,naLabel:O,rtl:v==="ar"||v==="he"}):null})]}),t[17]=ue,t[18]=L,t[19]=mt,t[20]=jt,t[21]=Mt,t[22]=Wt,t[23]=r,t[24]=K,t[25]=nt,t[26]=R,t[27]=n,t[28]=x,t[29]=H,t[30]=z,t[31]=It,t[32]=Zt,t[33]=v,t[34]=V,t[35]=_t,t[36]=tt,t[37]=vt,t[38]=P,t[39]=te,t[40]=m,t[41]=O,t[42]=W,t[43]=h,t[44]=St,t[45]=y,t[46]=G,t[47]=Nt,t[48]=c,t[49]=N,t[50]=Y,t[51]=Lt,t[52]=Et,t[53]=Ot,t[54]=At,t[55]=kt,t[56]=A,t[57]=d,t[58]=Pt,t[59]=S,t[60]=$,t[61]=C,t[62]=B,t[63]=w,t[64]=bt,t[65]=qt,t[66]=Rt,t[67]=wt,t[68]=g,t[69]=dt):dt=t[69];let lt;t[70]!==r?.footnote||t[71]!==r?.source||t[72]!==xt||t[73]!==ut||t[74]!==d?.footnote||t[75]!==d?.source||t[76]!==g?(lt=ut||xt?s.jsxRuntimeExports.jsx(Fe.GraphFooter,{styles:{footnote:d?.footnote,source:d?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:ut,footNote:xt,width:g}):null,t[70]=r?.footnote,t[71]=r?.source,t[72]=xt,t[73]=ut,t[74]=d?.footnote,t[75]=d?.source,t[76]=g,t[77]=lt):lt=t[77];let Xt;return t[78]!==Bt||t[79]!==Vt||t[80]!==Q||t[81]!==yt||t[82]!==v||t[83]!==X||t[84]!==D||t[85]!==$t||t[86]!==J||t[87]!==xe||t[88]!==Gt||t[89]!==dt||t[90]!==lt||t[91]!==w||t[92]!==g?(Xt=s.jsxRuntimeExports.jsxs(je.GraphContainer,{className:J,style:xe,id:Q,ref:Ht,"aria-label":Bt,backgroundColor:Vt,theme:w,language:v,minHeight:X,width:g,height:yt,relativeHeight:$t,padding:D,children:[Gt,dt,lt]}),t[78]=Bt,t[79]=Vt,t[80]=Q,t[81]=yt,t[82]=v,t[83]=X,t[84]=D,t[85]=$t,t[86]=J,t[87]=xe,t[88]=Gt,t[89]=dt,t[90]=lt,t[91]=w,t[92]=g,t[93]=Xt):Xt=t[93],Xt}function Bi(e){return e.qualitativeRange}function Pi(e){return e!==void 0}function Hi(e){return e!==void 0}function Gi(e){return e.data}function Xi(e){return e!==void 0}function Yi(e){return e.data}exports.BulletChart=Ui;
|
|
2
2
|
//# sourceMappingURL=BulletChart.cjs.map
|