@undp/data-viz 1.2.8 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +2 -0
- package/dist/AreaChart.cjs.map +1 -0
- package/dist/AreaChart.d.ts +224 -0
- package/dist/AreaChart.js +531 -0
- package/dist/AreaChart.js.map +1 -0
- package/dist/Axis-DE7dSn1_.cjs +2 -0
- package/dist/Axis-DE7dSn1_.cjs.map +1 -0
- package/dist/Axis-Ddg-seDi.js +43 -0
- package/dist/Axis-Ddg-seDi.js.map +1 -0
- package/dist/AxisTitle-BmHLMRJZ.js +20 -0
- package/dist/AxisTitle-BmHLMRJZ.js.map +1 -0
- package/dist/AxisTitle-CK9YeovX.cjs +2 -0
- package/dist/AxisTitle-CK9YeovX.cjs.map +1 -0
- package/dist/BarGraph.cjs +2 -0
- package/dist/BarGraph.cjs.map +1 -0
- package/dist/BarGraph.d.ts +460 -0
- package/dist/BarGraph.js +4044 -0
- package/dist/BarGraph.js.map +1 -0
- package/dist/BasicStatCard.cjs +2 -0
- package/dist/BasicStatCard.cjs.map +1 -0
- package/dist/BasicStatCard.d.ts +106 -0
- package/dist/BasicStatCard.js +191 -0
- package/dist/BasicStatCard.js.map +1 -0
- package/dist/BeeSwarmChart.cjs +2 -0
- package/dist/BeeSwarmChart.cjs.map +1 -0
- package/dist/BeeSwarmChart.d.ts +181 -0
- package/dist/BeeSwarmChart.js +1043 -0
- package/dist/BeeSwarmChart.js.map +1 -0
- package/dist/BiVariateChoroplethMap.cjs +2 -0
- package/dist/BiVariateChoroplethMap.cjs.map +1 -0
- package/dist/BiVariateChoroplethMap.d.ts +189 -0
- package/dist/BiVariateChoroplethMap.js +721 -0
- package/dist/BiVariateChoroplethMap.js.map +1 -0
- package/dist/BulletChart.cjs +2 -0
- package/dist/BulletChart.cjs.map +1 -0
- package/dist/BulletChart.d.ts +219 -0
- package/dist/BulletChart.js +1432 -0
- package/dist/BulletChart.js.map +1 -0
- package/dist/ButterflyChart.cjs +2 -0
- package/dist/ButterflyChart.cjs.map +1 -0
- package/dist/ButterflyChart.d.ts +201 -0
- package/dist/ButterflyChart.js +693 -0
- package/dist/ButterflyChart.js.map +1 -0
- package/dist/ChoroplethMap.cjs +2 -0
- package/dist/ChoroplethMap.cjs.map +1 -0
- package/dist/ChoroplethMap.d.ts +190 -0
- package/dist/ChoroplethMap.js +746 -0
- package/dist/ChoroplethMap.js.map +1 -0
- package/dist/CirclePackingGraph.cjs +2 -0
- package/dist/CirclePackingGraph.cjs.map +1 -0
- package/dist/CirclePackingGraph.d.ts +153 -0
- package/dist/CirclePackingGraph.js +15 -0
- package/dist/CirclePackingGraph.js.map +1 -0
- package/dist/ColorLegend.cjs +2 -0
- package/dist/ColorLegend.cjs.map +1 -0
- package/dist/ColorLegend.d.ts +17 -0
- package/dist/ColorLegend.js +48 -0
- package/dist/ColorLegend.js.map +1 -0
- package/dist/ColorLegendWithMouseOver.cjs +2 -0
- package/dist/ColorLegendWithMouseOver.cjs.map +1 -0
- package/dist/ColorLegendWithMouseOver.d.ts +16 -0
- package/dist/ColorLegendWithMouseOver.js +71 -0
- package/dist/ColorLegendWithMouseOver.js.map +1 -0
- package/dist/Colors.cjs +2 -0
- package/dist/Colors.cjs.map +1 -0
- package/dist/Colors.d.ts +174 -0
- package/dist/Colors.js +562 -0
- package/dist/Colors.js.map +1 -0
- package/dist/CopyTextButton.cjs +17 -0
- package/dist/CopyTextButton.cjs.map +1 -0
- package/dist/CopyTextButton.d.ts +13 -0
- package/dist/CopyTextButton.js +699 -0
- package/dist/CopyTextButton.js.map +1 -0
- package/dist/CsvDownloadButton.cjs +23 -0
- package/dist/CsvDownloadButton.cjs.map +1 -0
- package/dist/CsvDownloadButton.d.ts +22 -0
- package/dist/CsvDownloadButton.js +868 -0
- package/dist/CsvDownloadButton.js.map +1 -0
- package/dist/DataCards.cjs +2 -0
- package/dist/DataCards.cjs.map +1 -0
- package/dist/DataCards.d.ts +131 -0
- package/dist/DataCards.js +15 -0
- package/dist/DataCards.js.map +1 -0
- package/dist/DataTable.cjs +2 -0
- package/dist/DataTable.cjs.map +1 -0
- package/dist/DataTable.d.ts +122 -0
- package/dist/DataTable.js +332 -0
- package/dist/DataTable.js.map +1 -0
- package/dist/DifferenceLineChart.cjs +2 -0
- package/dist/DifferenceLineChart.cjs.map +1 -0
- package/dist/DifferenceLineChart.d.ts +237 -0
- package/dist/DifferenceLineChart.js +806 -0
- package/dist/DifferenceLineChart.js.map +1 -0
- package/dist/DonutChart.cjs +2 -0
- package/dist/DonutChart.cjs.map +1 -0
- package/dist/DonutChart.d.ts +148 -0
- package/dist/DonutChart.js +479 -0
- package/dist/DonutChart.js.map +1 -0
- package/dist/DotDensityMap.cjs +2 -0
- package/dist/DotDensityMap.cjs.map +1 -0
- package/dist/DotDensityMap.d.ts +191 -0
- package/dist/DotDensityMap.js +601 -0
- package/dist/DotDensityMap.js.map +1 -0
- package/dist/DropdownSelect-0I2QxaVy.cjs +29 -0
- package/dist/DropdownSelect-0I2QxaVy.cjs.map +1 -0
- package/dist/DropdownSelect-CDC9lEqU.js +4193 -0
- package/dist/DropdownSelect-CDC9lEqU.js.map +1 -0
- package/dist/DualAxisLineChart.cjs +2 -0
- package/dist/DualAxisLineChart.cjs.map +1 -0
- package/dist/DualAxisLineChart.d.ts +180 -0
- package/dist/DualAxisLineChart.js +700 -0
- package/dist/DualAxisLineChart.js.map +1 -0
- package/dist/DumbbellChart.cjs +2 -0
- package/dist/DumbbellChart.cjs.map +1 -0
- package/dist/DumbbellChart.d.ts +224 -0
- package/dist/DumbbellChart.js +1511 -0
- package/dist/DumbbellChart.js.map +1 -0
- package/dist/EmptyState-DdTp-Mdn.js +22 -0
- package/dist/EmptyState-DdTp-Mdn.js.map +1 -0
- package/dist/EmptyState-d8_8SxeW.cjs +2 -0
- package/dist/EmptyState-d8_8SxeW.cjs.map +1 -0
- package/dist/ExcelDownloadButton.cjs +2 -0
- package/dist/ExcelDownloadButton.cjs.map +1 -0
- package/dist/ExcelDownloadButton.d.ts +22 -0
- package/dist/ExcelDownloadButton.js +30 -0
- package/dist/ExcelDownloadButton.js.map +1 -0
- package/dist/FootNote.cjs +2 -0
- package/dist/FootNote.cjs.map +1 -0
- package/dist/FootNote.d.ts +12 -0
- package/dist/FootNote.js +21 -0
- package/dist/FootNote.js.map +1 -0
- package/dist/GeoHubCompareMaps.cjs +2 -0
- package/dist/GeoHubCompareMaps.cjs.map +1 -0
- package/dist/GeoHubCompareMaps.d.ts +103 -0
- package/dist/GeoHubCompareMaps.js +371 -0
- package/dist/GeoHubCompareMaps.js.map +1 -0
- package/dist/GeoHubMap.cjs +2 -0
- package/dist/GeoHubMap.cjs.map +1 -0
- package/dist/GeoHubMap.d.ts +118 -0
- package/dist/GeoHubMap.js +430 -0
- package/dist/GeoHubMap.js.map +1 -0
- package/dist/GeoHubMapWithLayerSelection.cjs +2 -0
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +117 -0
- package/dist/GeoHubMapWithLayerSelection.js +308 -0
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -0
- package/dist/GraphDescription.cjs +2 -0
- package/dist/GraphDescription.cjs.map +1 -0
- package/dist/GraphDescription.d.ts +12 -0
- package/dist/GraphDescription.js +21 -0
- package/dist/GraphDescription.js.map +1 -0
- package/dist/GraphFooter.cjs +2 -0
- package/dist/GraphFooter.cjs.map +1 -0
- package/dist/GraphFooter.d.ts +24 -0
- package/dist/GraphFooter.js +22 -0
- package/dist/GraphFooter.js.map +1 -0
- package/dist/GraphHeader.cjs +2 -0
- package/dist/GraphHeader.cjs.map +1 -0
- package/dist/GraphHeader.d.ts +22 -0
- package/dist/GraphHeader.js +64 -0
- package/dist/GraphHeader.js.map +1 -0
- package/dist/GraphTitle.cjs +2 -0
- package/dist/GraphTitle.cjs.map +1 -0
- package/dist/GraphTitle.d.ts +13 -0
- package/dist/GraphTitle.js +29 -0
- package/dist/GraphTitle.js.map +1 -0
- package/dist/GriddedGraphs.cjs +2 -0
- package/dist/GriddedGraphs.cjs.map +1 -0
- package/dist/GriddedGraphs.d.ts +540 -0
- package/dist/GriddedGraphs.js +483 -0
- package/dist/GriddedGraphs.js.map +1 -0
- package/dist/GriddedGraphsFromConfig.cjs +2 -0
- package/dist/GriddedGraphsFromConfig.cjs.map +1 -0
- package/dist/GriddedGraphsFromConfig.d.ts +543 -0
- package/dist/GriddedGraphsFromConfig.js +43 -0
- package/dist/GriddedGraphsFromConfig.js.map +1 -0
- package/dist/HeatMap.cjs +2 -0
- package/dist/HeatMap.cjs.map +1 -0
- package/dist/HeatMap.d.ts +166 -0
- package/dist/HeatMap.js +452 -0
- package/dist/HeatMap.js.map +1 -0
- package/dist/Histogram.cjs +2 -0
- package/dist/Histogram.cjs.map +1 -0
- package/dist/Histogram.d.ts +165 -0
- package/dist/Histogram.js +288 -0
- package/dist/Histogram.js.map +1 -0
- package/dist/ImageDownloadButton.cjs +2 -0
- package/dist/ImageDownloadButton.cjs.map +1 -0
- package/dist/ImageDownloadButton.d.ts +15 -0
- package/dist/ImageDownloadButton.js +29 -0
- package/dist/ImageDownloadButton.js.map +1 -0
- package/dist/LineChartWithConfidenceInterval.cjs +2 -0
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -0
- package/dist/LineChartWithConfidenceInterval.d.ts +250 -0
- package/dist/LineChartWithConfidenceInterval.js +819 -0
- package/dist/LineChartWithConfidenceInterval.js.map +1 -0
- package/dist/LinearColorLegend.cjs +2 -0
- package/dist/LinearColorLegend.cjs.map +1 -0
- package/dist/LinearColorLegend.d.ts +13 -0
- package/dist/LinearColorLegend.js +34 -0
- package/dist/LinearColorLegend.js.map +1 -0
- package/dist/Modal-CUU6ZK3U.js +1019 -0
- package/dist/Modal-CUU6ZK3U.js.map +1 -0
- package/dist/Modal-C_dl0EtQ.cjs +46 -0
- package/dist/Modal-C_dl0EtQ.cjs.map +1 -0
- package/dist/MultiGraphDashboard.cjs +2 -0
- package/dist/MultiGraphDashboard.cjs.map +1 -0
- package/dist/MultiGraphDashboard.d.ts +558 -0
- package/dist/MultiGraphDashboard.js +304 -0
- package/dist/MultiGraphDashboard.js.map +1 -0
- package/dist/MultiGraphDashboardFromConfig.cjs +2 -0
- package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +562 -0
- package/dist/MultiGraphDashboardFromConfig.js +38 -0
- package/dist/MultiGraphDashboardFromConfig.js.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +128 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +244 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +2 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +133 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +31 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -0
- package/dist/MultiLineAltChart.cjs +2 -0
- package/dist/MultiLineAltChart.cjs.map +1 -0
- package/dist/MultiLineAltChart.d.ts +244 -0
- package/dist/MultiLineAltChart.js +690 -0
- package/dist/MultiLineAltChart.js.map +1 -0
- package/dist/MultiLineChart.cjs +2 -0
- package/dist/MultiLineChart.cjs.map +1 -0
- package/dist/MultiLineChart.d.ts +246 -0
- package/dist/MultiLineChart.js +723 -0
- package/dist/MultiLineChart.js.map +1 -0
- package/dist/ParetoChart.cjs +2 -0
- package/dist/ParetoChart.cjs.map +1 -0
- package/dist/ParetoChart.d.ts +178 -0
- package/dist/ParetoChart.js +637 -0
- package/dist/ParetoChart.js.map +1 -0
- package/dist/RadarChart.cjs +2 -0
- package/dist/RadarChart.cjs.map +1 -0
- package/dist/RadarChart.d.ts +176 -0
- package/dist/RadarChart.js +678 -0
- package/dist/RadarChart.js.map +1 -0
- package/dist/ReferenceLine-C1GpoG9d.js +128 -0
- package/dist/ReferenceLine-C1GpoG9d.js.map +1 -0
- package/dist/ReferenceLine-CuFMk0cI.cjs +2 -0
- package/dist/ReferenceLine-CuFMk0cI.cjs.map +1 -0
- package/dist/RegressionLine-7_rKTHN_.cjs +2 -0
- package/dist/RegressionLine-7_rKTHN_.cjs.map +1 -0
- package/dist/RegressionLine-BFwDCTUU.js +48 -0
- package/dist/RegressionLine-BFwDCTUU.js.map +1 -0
- package/dist/SVGDownloadButton.cjs +2 -0
- package/dist/SVGDownloadButton.cjs.map +1 -0
- package/dist/SVGDownloadButton.d.ts +15 -0
- package/dist/SVGDownloadButton.js +29 -0
- package/dist/SVGDownloadButton.js.map +1 -0
- package/dist/SankeyChart.cjs +2 -0
- package/dist/SankeyChart.cjs.map +1 -0
- package/dist/SankeyChart.d.ts +178 -0
- package/dist/SankeyChart.js +990 -0
- package/dist/SankeyChart.js.map +1 -0
- package/dist/ScatterPlot.cjs +2 -0
- package/dist/ScatterPlot.cjs.map +1 -0
- package/dist/ScatterPlot.d.ts +266 -0
- package/dist/ScatterPlot.js +829 -0
- package/dist/ScatterPlot.js.map +1 -0
- package/dist/ScrollStory.cjs +2 -0
- package/dist/ScrollStory.cjs.map +1 -0
- package/dist/ScrollStory.d.ts +491 -0
- package/dist/ScrollStory.js +106 -0
- package/dist/ScrollStory.js.map +1 -0
- package/dist/SimpleLineChart.cjs +2 -0
- package/dist/SimpleLineChart.cjs.map +1 -0
- package/dist/SimpleLineChart.d.ts +230 -0
- package/dist/SimpleLineChart.js +620 -0
- package/dist/SimpleLineChart.js.map +1 -0
- package/dist/SingleGraphDashboard.cjs +2 -0
- package/dist/SingleGraphDashboard.cjs.map +1 -0
- package/dist/SingleGraphDashboard.d.ts +545 -0
- package/dist/SingleGraphDashboard.js +523 -0
- package/dist/SingleGraphDashboard.js.map +1 -0
- package/dist/SingleGraphDashboardFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardFromConfig.d.ts +547 -0
- package/dist/SingleGraphDashboardFromConfig.js +35 -0
- package/dist/SingleGraphDashboardFromConfig.js.map +1 -0
- package/dist/SlopeChart.cjs +2 -0
- package/dist/SlopeChart.cjs.map +1 -0
- package/dist/SlopeChart.d.ts +167 -0
- package/dist/SlopeChart.js +583 -0
- package/dist/SlopeChart.js.map +1 -0
- package/dist/Source.cjs +2 -0
- package/dist/Source.cjs.map +1 -0
- package/dist/Source.d.ts +16 -0
- package/dist/Source.js +41 -0
- package/dist/Source.js.map +1 -0
- package/dist/SparkLine.cjs +2 -0
- package/dist/SparkLine.cjs.map +1 -0
- package/dist/SparkLine.d.ts +139 -0
- package/dist/SparkLine.js +321 -0
- package/dist/SparkLine.js.map +1 -0
- package/dist/Spinner-C85UF28E.js +30 -0
- package/dist/Spinner-C85UF28E.js.map +1 -0
- package/dist/Spinner-DA6Z5E4n.cjs +2 -0
- package/dist/Spinner-DA6Z5E4n.cjs.map +1 -0
- package/dist/StatCardFromData.cjs +2 -0
- package/dist/StatCardFromData.cjs.map +1 -0
- package/dist/StatCardFromData.d.ts +115 -0
- package/dist/StatCardFromData.js +250 -0
- package/dist/StatCardFromData.js.map +1 -0
- package/dist/StripChart.cjs +2 -0
- package/dist/StripChart.cjs.map +1 -0
- package/dist/StripChart.d.ts +178 -0
- package/dist/StripChart.js +989 -0
- package/dist/StripChart.js.map +1 -0
- package/dist/ThreeDGlobe.cjs +2 -0
- package/dist/ThreeDGlobe.cjs.map +1 -0
- package/dist/ThreeDGlobe.d.ts +158 -0
- package/dist/ThreeDGlobe.js +452 -0
- package/dist/ThreeDGlobe.js.map +1 -0
- package/dist/ThresholdColorLegendWithMouseOver.cjs +2 -0
- package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -0
- package/dist/ThresholdColorLegendWithMouseOver.d.ts +16 -0
- package/dist/ThresholdColorLegendWithMouseOver.js +131 -0
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -0
- package/dist/Tooltip-DyM5snqx.js +46 -0
- package/dist/Tooltip-DyM5snqx.js.map +1 -0
- package/dist/Tooltip-n8z5bfav.cjs +2 -0
- package/dist/Tooltip-n8z5bfav.cjs.map +1 -0
- package/dist/TreeMapGraph.cjs +2 -0
- package/dist/TreeMapGraph.cjs.map +1 -0
- package/dist/TreeMapGraph.d.ts +158 -0
- package/dist/TreeMapGraph.js +761 -0
- package/dist/TreeMapGraph.js.map +1 -0
- package/dist/Types.cjs +2 -0
- package/dist/Types.cjs.map +1 -0
- package/dist/Types.d.ts +883 -0
- package/dist/Types.js +2 -0
- package/dist/Types.js.map +1 -0
- package/dist/Typography-Ctgfl1J5.js +140 -0
- package/dist/Typography-Ctgfl1J5.js.map +1 -0
- package/dist/Typography-k-kOjICQ.cjs +2 -0
- package/dist/Typography-k-kOjICQ.cjs.map +1 -0
- package/dist/UnitChart.cjs +2 -0
- package/dist/UnitChart.cjs.map +1 -0
- package/dist/UnitChart.d.ts +132 -0
- package/dist/UnitChart.js +217 -0
- package/dist/UnitChart.js.map +1 -0
- package/dist/XAxesLabels-CJMQbfVy.cjs +2 -0
- package/dist/XAxesLabels-CJMQbfVy.cjs.map +1 -0
- package/dist/XAxesLabels-DQFo_z2R.js +57 -0
- package/dist/XAxesLabels-DQFo_z2R.js.map +1 -0
- package/dist/XTicksAndGridLines-Bn9u5gOM.js +56 -0
- package/dist/XTicksAndGridLines-Bn9u5gOM.js.map +1 -0
- package/dist/XTicksAndGridLines-CCzXIV8d.cjs +2 -0
- package/dist/XTicksAndGridLines-CCzXIV8d.cjs.map +1 -0
- package/dist/YAxesLabels-BXLTX7AI.cjs +2 -0
- package/dist/YAxesLabels-BXLTX7AI.cjs.map +1 -0
- package/dist/YAxesLabels-H5-002X5.js +52 -0
- package/dist/YAxesLabels-H5-002X5.js.map +1 -0
- package/dist/YTicksAndGridLines-B6ah7CRf.js +56 -0
- package/dist/YTicksAndGridLines-B6ah7CRf.js.map +1 -0
- package/dist/YTicksAndGridLines-DBDuz6vb.cjs +2 -0
- package/dist/YTicksAndGridLines-DBDuz6vb.cjs.map +1 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +2 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
- package/dist/area-BE2wo7fv.js +53 -0
- package/dist/area-BE2wo7fv.js.map +1 -0
- package/dist/area-D3Qx7k7K.cjs +2 -0
- package/dist/area-D3Qx7k7K.cjs.map +1 -0
- package/dist/array-B7TkkRH0.js +89 -0
- package/dist/array-B7TkkRH0.js.map +1 -0
- package/dist/array-DKbXV8lR.cjs +2 -0
- package/dist/array-DKbXV8lR.cjs.map +1 -0
- package/dist/band-BEjh2CHI.js +47 -0
- package/dist/band-BEjh2CHI.js.map +1 -0
- package/dist/band-CAApY4Pd.cjs +2 -0
- package/dist/band-CAApY4Pd.cjs.map +1 -0
- package/dist/checkIfMultiple-BB7PlCNh.js +2759 -0
- package/dist/checkIfMultiple-BB7PlCNh.js.map +1 -0
- package/dist/checkIfMultiple-D5ysrI7G.cjs +12 -0
- package/dist/checkIfMultiple-D5ysrI7G.cjs.map +1 -0
- package/dist/checkIfNullOrUndefined-BCW3Y1ML.cjs +2 -0
- package/dist/checkIfNullOrUndefined-BCW3Y1ML.cjs.map +1 -0
- package/dist/checkIfNullOrUndefined-DmfiKkNw.js +7 -0
- package/dist/checkIfNullOrUndefined-DmfiKkNw.js.map +1 -0
- package/dist/customArea-BYNyxAkm.cjs +2 -0
- package/dist/customArea-BYNyxAkm.cjs.map +1 -0
- package/dist/customArea-CaxScFmW.js +175 -0
- package/dist/customArea-CaxScFmW.js.map +1 -0
- package/dist/defaultLocale-BEa-49Qz.js +172 -0
- package/dist/defaultLocale-BEa-49Qz.js.map +1 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs +2 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs.map +1 -0
- package/dist/delaunay-C1uAf38t.js +684 -0
- package/dist/delaunay-C1uAf38t.js.map +1 -0
- package/dist/delaunay-rcy0HhZi.cjs +2 -0
- package/dist/delaunay-rcy0HhZi.cjs.map +1 -0
- package/dist/ensureCompleteData-BBDZbDCE.js +102 -0
- package/dist/ensureCompleteData-BBDZbDCE.js.map +1 -0
- package/dist/ensureCompleteData-DqWQ2Zbi.cjs +2 -0
- package/dist/ensureCompleteData-DqWQ2Zbi.cjs.map +1 -0
- package/dist/excelDownload-BOA-lskf.js +19 -0
- package/dist/excelDownload-BOA-lskf.js.map +1 -0
- package/dist/excelDownload-BQpsCa62.cjs +2 -0
- package/dist/excelDownload-BQpsCa62.cjs.map +1 -0
- package/dist/fetchAndParseData-Bcmr659B.js +1196 -0
- package/dist/fetchAndParseData-Bcmr659B.js.map +1 -0
- package/dist/fetchAndParseData-DmgQtB9n.cjs +16 -0
- package/dist/fetchAndParseData-DmgQtB9n.cjs.map +1 -0
- package/dist/fetchAndParseData.cjs +2 -0
- package/dist/fetchAndParseData.cjs.map +1 -0
- package/dist/fetchAndParseData.d.ts +84 -0
- package/dist/fetchAndParseData.js +10 -0
- package/dist/fetchAndParseData.js.map +1 -0
- package/dist/filterData-B8ocT57s.js +14 -0
- package/dist/filterData-B8ocT57s.js.map +1 -0
- package/dist/filterData-DN6py7y_.cjs +2 -0
- package/dist/filterData-DN6py7y_.cjs.map +1 -0
- package/dist/generateRandomString-B5zBiJzS.cjs +2 -0
- package/dist/generateRandomString-B5zBiJzS.cjs.map +1 -0
- package/dist/generateRandomString-za3IQGfQ.js +11 -0
- package/dist/generateRandomString-za3IQGfQ.js.map +1 -0
- package/dist/getGraphList-DuColTJM.js +265 -0
- package/dist/getGraphList-DuColTJM.js.map +1 -0
- package/dist/getGraphList-gf02xgT2.cjs +2 -0
- package/dist/getGraphList-gf02xgT2.cjs.map +1 -0
- package/dist/getJenks-TWQvbuOz.cjs +2 -0
- package/dist/getJenks-TWQvbuOz.cjs.map +1 -0
- package/dist/getJenks-VhM3GIoC.js +23 -0
- package/dist/getJenks-VhM3GIoC.js.map +1 -0
- package/dist/getSchema.cjs +2 -0
- package/dist/getSchema.cjs.map +1 -0
- package/dist/getSchema.d.ts +3256 -0
- package/dist/getSchema.js +911 -0
- package/dist/getSchema.js.map +1 -0
- package/dist/getSliderMarks-C0jptXeP.js +1054 -0
- package/dist/getSliderMarks-C0jptXeP.js.map +1 -0
- package/dist/getSliderMarks-CtsEXiLV.cjs +6 -0
- package/dist/getSliderMarks-CtsEXiLV.cjs.map +1 -0
- package/dist/getTextColorBasedOnBgColor-B6Nk2WBf.js +28 -0
- package/dist/getTextColorBasedOnBgColor-B6Nk2WBf.js.map +1 -0
- package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs +2 -0
- package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs.map +1 -0
- package/dist/getUniqValue-BtUENB2H.js +20 -0
- package/dist/getUniqValue-BtUENB2H.js.map +1 -0
- package/dist/getUniqValue-CHqgSss5.cjs +2 -0
- package/dist/getUniqValue-CHqgSss5.cjs.map +1 -0
- package/dist/imageDownload-CgDcm1Sj.cjs +3 -0
- package/dist/imageDownload-CgDcm1Sj.cjs.map +1 -0
- package/dist/imageDownload-Dcci2LEy.js +495 -0
- package/dist/imageDownload-Dcci2LEy.js.map +1 -0
- package/dist/index-27yTRcko.js +35 -0
- package/dist/index-27yTRcko.js.map +1 -0
- package/dist/index-B0rbzOoC.cjs +2 -0
- package/dist/index-B0rbzOoC.cjs.map +1 -0
- package/dist/index-BLizQDlg.js +658 -0
- package/dist/index-BLizQDlg.js.map +1 -0
- package/dist/index-BVnYktl4.js +435 -0
- package/dist/index-BVnYktl4.js.map +1 -0
- package/dist/index-BW_-wD2k.cjs +2 -0
- package/dist/index-BW_-wD2k.cjs.map +1 -0
- package/dist/index-BXns0-ng.cjs +2 -0
- package/dist/index-BXns0-ng.cjs.map +1 -0
- package/dist/index-BczVvEBZ.cjs +2 -0
- package/dist/index-BczVvEBZ.cjs.map +1 -0
- package/dist/index-BmCqpO1B.js +342 -0
- package/dist/index-BmCqpO1B.js.map +1 -0
- package/dist/index-BxAUvrua.js +120 -0
- package/dist/index-BxAUvrua.js.map +1 -0
- package/dist/index-BzeLQvXk.cjs +2 -0
- package/dist/index-BzeLQvXk.cjs.map +1 -0
- package/dist/index-C1rRk_50.js +273 -0
- package/dist/index-C1rRk_50.js.map +1 -0
- package/dist/index-C21TvELx.cjs +2 -0
- package/dist/index-C21TvELx.cjs.map +1 -0
- package/dist/index-CHPV5EwG-BPSP-7Jg.js +3341 -0
- package/dist/index-CHPV5EwG-BPSP-7Jg.js.map +1 -0
- package/dist/index-CHPV5EwG-DDoeWRVt.cjs +44 -0
- package/dist/index-CHPV5EwG-DDoeWRVt.cjs.map +1 -0
- package/dist/index-CZbIGs8q.cjs +2 -0
- package/dist/index-CZbIGs8q.cjs.map +1 -0
- package/dist/index-CaAIPGZo.js +631 -0
- package/dist/index-CaAIPGZo.js.map +1 -0
- package/dist/index-CylX-pWB.cjs +2 -0
- package/dist/index-CylX-pWB.cjs.map +1 -0
- package/dist/index-D7ltPi18.js +26 -0
- package/dist/index-D7ltPi18.js.map +1 -0
- package/dist/index-D9h2WYDS.cjs +22 -0
- package/dist/index-D9h2WYDS.cjs.map +1 -0
- package/dist/index-DG3YrCr5-D3FrrXj8.js +459 -0
- package/dist/index-DG3YrCr5-D3FrrXj8.js.map +1 -0
- package/dist/index-DG3YrCr5-v7rayV3N.cjs +2 -0
- package/dist/index-DG3YrCr5-v7rayV3N.cjs.map +1 -0
- package/dist/index-DVOJ7vxH.cjs +10 -0
- package/dist/index-DVOJ7vxH.cjs.map +1 -0
- package/dist/index-D_n8aamX.cjs +2 -0
- package/dist/index-D_n8aamX.cjs.map +1 -0
- package/dist/index-Ds0uHjK9.cjs +2 -0
- package/dist/index-Ds0uHjK9.cjs.map +1 -0
- package/dist/index-DxagiOHo.js +707 -0
- package/dist/index-DxagiOHo.js.map +1 -0
- package/dist/index-OCoyy1wG.js +635 -0
- package/dist/index-OCoyy1wG.js.map +1 -0
- package/dist/index-UV9hjG_S.js +53 -0
- package/dist/index-UV9hjG_S.js.map +1 -0
- package/dist/index-n_RI8T0n.js +77 -0
- package/dist/index-n_RI8T0n.js.map +1 -0
- package/dist/index-tvAyXPPW-DBlMKnNB.js +47 -0
- package/dist/index-tvAyXPPW-DBlMKnNB.js.map +1 -0
- package/dist/index-tvAyXPPW-DPOG-C2i.cjs +2 -0
- package/dist/index-tvAyXPPW-DPOG-C2i.cjs.map +1 -0
- package/dist/index.cjs +1 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.js +178 -52486
- package/dist/index.js.map +1 -1
- package/dist/init-BhZylTFx.js +63 -0
- package/dist/init-BhZylTFx.js.map +1 -0
- package/dist/init-DU0ybBc_.cjs +2 -0
- package/dist/init-DU0ybBc_.cjs.map +1 -0
- package/dist/line-CPfhohvF.js +68 -0
- package/dist/line-CPfhohvF.js.map +1 -0
- package/dist/line-DHV4JwCR.cjs +2 -0
- package/dist/line-DHV4JwCR.cjs.map +1 -0
- package/dist/linear-BVckp9RD.cjs +2 -0
- package/dist/linear-BVckp9RD.cjs.map +1 -0
- package/dist/linear-DUdu7l2G.js +221 -0
- package/dist/linear-DUdu7l2G.js.map +1 -0
- package/dist/numberFormattingFunction-02t-wJta.cjs +2 -0
- package/dist/numberFormattingFunction-02t-wJta.cjs.map +1 -0
- package/dist/numberFormattingFunction-14YCbkN2.js +13 -0
- package/dist/numberFormattingFunction-14YCbkN2.js.map +1 -0
- package/dist/ordinal-BOeNbyae.cjs +2 -0
- package/dist/ordinal-BOeNbyae.cjs.map +1 -0
- package/dist/ordinal-w9Lu4Stb.js +62 -0
- package/dist/ordinal-w9Lu4Stb.js.map +1 -0
- package/dist/parse-DlCRUFh_.js +2768 -0
- package/dist/parse-DlCRUFh_.js.map +1 -0
- package/dist/parse-hMnG_lRV.cjs +2 -0
- package/dist/parse-hMnG_lRV.cjs.map +1 -0
- package/dist/pointer-CWRWOsrb.js +23 -0
- package/dist/pointer-CWRWOsrb.js.map +1 -0
- package/dist/pointer-Dkq5NV1q.cjs +2 -0
- package/dist/pointer-Dkq5NV1q.cjs.map +1 -0
- package/dist/pow-B5-jkdHU.cjs +2 -0
- package/dist/pow-B5-jkdHU.cjs.map +1 -0
- package/dist/pow-e8zx3AQJ.js +35 -0
- package/dist/pow-e8zx3AQJ.js.map +1 -0
- package/dist/proxy-DJxJg1kD.js +4612 -0
- package/dist/proxy-DJxJg1kD.js.map +1 -0
- package/dist/proxy-PQd2AItT.cjs +2 -0
- package/dist/proxy-PQd2AItT.cjs.map +1 -0
- package/dist/removeOutliers-DR48e-18.js +57 -0
- package/dist/removeOutliers-DR48e-18.js.map +1 -0
- package/dist/removeOutliers-WELHHqiI.cjs +2 -0
- package/dist/removeOutliers-WELHHqiI.cjs.map +1 -0
- package/dist/select-Bnfk0lJx.cjs +2 -0
- package/dist/select-Bnfk0lJx.cjs.map +1 -0
- package/dist/select-DKy99ogv.js +584 -0
- package/dist/select-DKy99ogv.js.map +1 -0
- package/dist/simple-statistics-flVzqVtt.js +65 -0
- package/dist/simple-statistics-flVzqVtt.js.map +1 -0
- package/dist/simple-statistics-xm8c0LQQ.cjs +2 -0
- package/dist/simple-statistics-xm8c0LQQ.cjs.map +1 -0
- package/dist/step-BZ3C8QFW.cjs +2 -0
- package/dist/step-BZ3C8QFW.cjs.map +1 -0
- package/dist/step-BrDul-H4.js +119 -0
- package/dist/step-BrDul-H4.js.map +1 -0
- package/dist/string-B8KlVSPX.js +364 -0
- package/dist/string-B8KlVSPX.js.map +1 -0
- package/dist/string-CRoCZCYa.cjs +2 -0
- package/dist/string-CRoCZCYa.cjs.map +1 -0
- package/dist/string2HTML-CWHGfz_d.js +758 -0
- package/dist/string2HTML-CWHGfz_d.js.map +1 -0
- package/dist/string2HTML-D2Avudmb.cjs +3 -0
- package/dist/string2HTML-D2Avudmb.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/svgDownload-C2-E3yf2.js +9 -0
- package/dist/svgDownload-C2-E3yf2.js.map +1 -0
- package/dist/svgDownload-D9zEGjTF.cjs +2 -0
- package/dist/svgDownload-D9zEGjTF.cjs.map +1 -0
- package/dist/threshold-DFfqcDMa.js +23 -0
- package/dist/threshold-DFfqcDMa.js.map +1 -0
- package/dist/threshold-DNsSUf8Q.cjs +2 -0
- package/dist/threshold-DNsSUf8Q.cjs.map +1 -0
- package/dist/time-Byw_jYQ7.cjs +2 -0
- package/dist/time-Byw_jYQ7.cjs.map +1 -0
- package/dist/time-BzJP5SPC.js +715 -0
- package/dist/time-BzJP5SPC.js.map +1 -0
- package/dist/timer-B39XOBYL.js +124 -0
- package/dist/timer-B39XOBYL.js.map +1 -0
- package/dist/timer-CKyBCVzT.cjs +2 -0
- package/dist/timer-CKyBCVzT.cjs.map +1 -0
- package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs +4 -0
- package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs.map +1 -0
- package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js +145 -0
- package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js.map +1 -0
- package/dist/transformData.cjs +2 -0
- package/dist/transformData.cjs.map +1 -0
- package/dist/transformData.d.ts +170 -0
- package/dist/transformData.js +10 -0
- package/dist/transformData.js.map +1 -0
- package/dist/transformDataForAggregation-BUGJnson.cjs +2 -0
- package/dist/transformDataForAggregation-BUGJnson.cjs.map +1 -0
- package/dist/transformDataForAggregation-DAQJWGNL.js +759 -0
- package/dist/transformDataForAggregation-DAQJWGNL.js.map +1 -0
- package/dist/transformDataForGraphFromFile-CrntpaMU.cjs +2 -0
- package/dist/transformDataForGraphFromFile-CrntpaMU.cjs.map +1 -0
- package/dist/transformDataForGraphFromFile-DdNiOWeC.js +24 -0
- package/dist/transformDataForGraphFromFile-DdNiOWeC.js.map +1 -0
- package/dist/use-in-view-BAHrBy6b.js +40 -0
- package/dist/use-in-view-BAHrBy6b.js.map +1 -0
- package/dist/use-in-view-BCmzDU2O.cjs +2 -0
- package/dist/use-in-view-BCmzDU2O.cjs.map +1 -0
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +217 -0
- package/dist/utils.js +27 -0
- package/dist/utils.js.map +1 -0
- package/dist/validateSchema.cjs +2 -0
- package/dist/validateSchema.cjs.map +1 -0
- package/dist/validateSchema.d.ts +68 -0
- package/dist/validateSchema.js +105 -0
- package/dist/validateSchema.js.map +1 -0
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs +27 -0
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs.map +1 -0
- package/dist/x-CnsEH4Ox-DDvAJndW.js +101 -0
- package/dist/x-CnsEH4Ox-DDvAJndW.js.map +1 -0
- package/dist/y-D0sAaVii.js +421 -0
- package/dist/y-D0sAaVii.js.map +1 -0
- package/dist/y-QcCbqrzx.cjs +2 -0
- package/dist/y-QcCbqrzx.cjs.map +1 -0
- package/dist/zoom-Lo7IAUfC.cjs +2 -0
- package/dist/zoom-Lo7IAUfC.cjs.map +1 -0
- package/dist/zoom-_lqdiGoI.js +1983 -0
- package/dist/zoom-_lqdiGoI.js.map +1 -0
- package/package.json +340 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BeeSwarmChart.cjs","sources":["../src/Components/Graphs/BeeSwarmChart/Horizontal/Graph.tsx","../src/Components/Graphs/BeeSwarmChart/Horizontal/index.tsx","../src/Components/Graphs/BeeSwarmChart/Vertical/Graph.tsx","../src/Components/Graphs/BeeSwarmChart/Vertical/index.tsx","../src/Components/Graphs/BeeSwarmChart/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { scaleLinear, scaleSqrt } from 'd3-scale';\r\nimport { forceCollide, forceManyBody, forceSimulation, forceX, forceY } from 'd3-force';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport orderBy from 'lodash.orderby';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport {\r\n BeeSwarmChartDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n ReferenceDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { XTicksAndGridLines } from '@/Components/Elements/Axes/XTicksAndGridLines';\r\nimport { RefLineX } from '@/Components/Elements/ReferenceLine';\r\n\r\ninterface BeeSwarmChartDataTypeForBubbleChart extends BeeSwarmChartDataType {\r\n x: number;\r\n y: number;\r\n vx: number;\r\n vy: number;\r\n}\r\n\r\ninterface Props {\r\n data: BeeSwarmChartDataType[];\r\n circleColors: string[];\r\n colorDomain: string[];\r\n showTicks: boolean;\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n width: number;\r\n suffix: string;\r\n prefix: string;\r\n height: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n refValues?: ReferenceDataType[];\r\n selectedColor?: string;\r\n startFromZero: boolean;\r\n radius: number;\r\n maxRadiusValue?: number;\r\n maxValue?: number;\r\n minValue?: number;\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n rtl: boolean;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n noOfTicks: number;\r\n dimmedOpacity: number;\r\n precision: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n circleColors,\r\n showTicks,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n selectedColor,\r\n startFromZero,\r\n radius,\r\n maxRadiusValue,\r\n maxValue,\r\n minValue,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n rtl,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n suffix,\r\n prefix,\r\n styles,\r\n classNames,\r\n noOfTicks,\r\n dimmedOpacity,\r\n precision,\r\n customLayers,\r\n } = props;\r\n const svgRef = useRef(null);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [finalData, setFinalData] = useState<BeeSwarmChartDataTypeForBubbleChart[] | null>(null);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const dataOrdered =\r\n data.filter(d => !checkIfNullOrUndefined(d.radius)).length === 0\r\n ? data\r\n : orderBy(\r\n data.filter(d => !checkIfNullOrUndefined(d.radius)),\r\n 'radius',\r\n 'desc',\r\n );\r\n const xMaxValue = !checkIfNullOrUndefined(maxValue)\r\n ? (maxValue as number)\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) < 0 &&\r\n !startFromZero\r\n ? 0\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const xMinValue = !checkIfNullOrUndefined(minValue)\r\n ? (minValue as number)\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) >=\r\n 0 && !startFromZero\r\n ? 0\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt()\r\n .domain([\r\n 0,\r\n checkIfNullOrUndefined(maxRadiusValue)\r\n ? Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n : (maxRadiusValue as number),\r\n ])\r\n .range([0.25, radius])\r\n .nice()\r\n : undefined;\r\n const x = scaleLinear().domain([xMinValue, xMaxValue]).range([0, graphWidth]).nice();\r\n const xTicks = x.ticks(noOfTicks);\r\n\r\n useEffect(() => {\r\n setFinalData(null);\r\n const dataTemp = (dataOrdered as BeeSwarmChartDataType[]).filter(d => d.position);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n forceSimulation(dataTemp as any)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .force('x', forceX((d: any) => x(d.position as number)).strength(5))\r\n .force('y', forceY(_d => graphHeight / 2).strength(1))\r\n .force(\r\n 'collide',\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n forceCollide((d: any) => (radiusScale ? radiusScale(d.radius || 0) + 1 : radius + 1)),\r\n )\r\n .force('charge', forceManyBody().strength(-15))\r\n .alphaDecay(0.05)\r\n .tick(10000)\r\n .on('tick', () => {\r\n setFinalData(dataTemp as BeeSwarmChartDataTypeForBubbleChart[]);\r\n })\r\n .on('end', () => {\r\n setFinalData(dataTemp as BeeSwarmChartDataTypeForBubbleChart[]);\r\n });\r\n }, [data, radius, graphHeight, graphWidth, xMinValue, xMaxValue, dataOrdered, x, radiusScale]);\r\n\r\n return (\r\n <>\r\n {finalData ? (\r\n <svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {showTicks ? (\r\n <>\r\n <Axis\r\n x1={x(xMinValue < 0 ? 0 : xMinValue)}\r\n x2={x(xMinValue < 0 ? 0 : xMinValue)}\r\n y1={0 - margin.top}\r\n y2={graphHeight + margin.bottom}\r\n label={numberFormattingFunction(\r\n xMinValue < 0 ? 0 : xMinValue,\r\n 'NA',\r\n precision,\r\n prefix,\r\n suffix,\r\n )}\r\n labelPos={{\r\n x: x(xMinValue < 0 ? 0 : xMinValue),\r\n y: 0 - topMargin,\r\n dy: '0.75em',\r\n dx: 3,\r\n }}\r\n classNames={{\r\n axis: classNames?.xAxis?.axis,\r\n label: classNames?.yAxis?.labels,\r\n }}\r\n styles={{\r\n axis: styles?.xAxis?.axis,\r\n label: styles?.yAxis?.labels,\r\n }}\r\n />\r\n <XTicksAndGridLines\r\n values={xTicks.filter(d => d !== 0)}\r\n x={xTicks.filter(d => d !== 0).map(d => x(d))}\r\n y1={0 - topMargin}\r\n y2={graphHeight + margin.bottom}\r\n styles={{\r\n gridLines: styles?.xAxis?.gridLines,\r\n labels: styles?.xAxis?.labels,\r\n }}\r\n classNames={{\r\n gridLines: classNames?.xAxis?.gridLines,\r\n labels: classNames?.xAxis?.labels,\r\n }}\r\n suffix={suffix}\r\n prefix={prefix}\r\n labelType='secondary'\r\n showGridLines\r\n precision={precision}\r\n />\r\n </>\r\n ) : null}\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {finalData.map(d => (\r\n <g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n transform={`translate(${d.x},${d.y})`}\r\n opacity={\r\n selectedColor\r\n ? d.color\r\n ? circleColors[colorDomain.indexOf(d.color)] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85\r\n }\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 onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\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 onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <circle\r\n cx={0}\r\n cy={0}\r\n fill={\r\n data.filter(el => el.color).length === 0\r\n ? circleColors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : circleColors[colorDomain.indexOf(d.color)]\r\n }\r\n radius={radiusScale ? radiusScale(d.radius || 0) : radius}\r\n />\r\n {(radiusScale ? radiusScale(d.radius || 0) : radius) > 10 && showLabels ? (\r\n <g>\r\n <foreignObject\r\n y={0 - (radiusScale ? radiusScale(d.radius || 0) : radius)}\r\n x={0 - (radiusScale ? radiusScale(d.radius || 0) : radius)}\r\n width={2 * (radiusScale ? radiusScale(d.radius || 0) : radius)}\r\n height={2 * (radiusScale ? radiusScale(d.radius || 0) : radius)}\r\n >\r\n <div className='flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-1.5'>\r\n {showLabels ? (\r\n <p\r\n className={cn(\r\n 'text-center leading-none m-0',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n fontSize: `${Math.min(\r\n Math.max(\r\n Math.round(\r\n (radiusScale ? radiusScale(d.radius || 0) : radius) / 4,\r\n ),\r\n 10,\r\n ),\r\n Math.max(\r\n Math.round(\r\n ((radiusScale ? radiusScale(d.radius || 0) : radius) * 12) /\r\n `${d.label}`.length,\r\n ),\r\n 10,\r\n ),\r\n 20,\r\n )}px`,\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? circleColors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : circleColors[colorDomain.indexOf(d.color)],\r\n ),\r\n hyphens: 'auto',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {d.label}\r\n </p>\r\n ) : null}\r\n </div>\r\n </foreignObject>\r\n </g>\r\n ) : null}\r\n </g>\r\n ))}\r\n {refValues ? (\r\n <>\r\n {refValues.map((el, i) => (\r\n <RefLineX\r\n key={i}\r\n text={el.text}\r\n color={el.color}\r\n x={x(el.value as number)}\r\n y1={0 - margin.top}\r\n y2={graphHeight + margin.bottom}\r\n textSide={x(el.value as number) > graphWidth * 0.75 || rtl ? 'left' : 'right'}\r\n classNames={el.classNames}\r\n styles={el.styles}\r\n isInView={true}\r\n />\r\n ))}\r\n </>\r\n ) : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </svg>\r\n ) : (\r\n <div style={{ width: `${width}px`, height: `${height}px` }}>\r\n <div className='flex m-auto items-center justify-center p-0 leading-none text-base h-40'>\r\n <Spinner />\r\n </div>\r\n </div>\r\n )}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import uniqBy from 'lodash.uniqby';\r\nimport { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BeeSwarmChartDataType,\r\n Languages,\r\n ReferenceDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n data: BeeSwarmChartDataType[];\r\n colors?: string | string[];\r\n graphTitle?: string | React.ReactNode;\r\n graphDescription?: string | React.ReactNode;\r\n footNote?: string | React.ReactNode;\r\n width?: number;\r\n height?: number;\r\n sources?: SourcesDataType[];\r\n showTicks?: boolean;\r\n leftMargin?: number;\r\n rightMargin?: number;\r\n colorDomain?: string[];\r\n colorLegendTitle?: string;\r\n backgroundColor?: string | boolean;\r\n padding?: string;\r\n topMargin?: number;\r\n bottomMargin?: number;\r\n relativeHeight?: number;\r\n showLabels?: boolean;\r\n showColorScale?: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n refValues?: ReferenceDataType[];\r\n graphID?: string;\r\n radius?: number;\r\n maxRadiusValue?: number;\r\n maxValue?: number;\r\n minValue?: number;\r\n highlightedDataPoints?: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n graphDownload?: boolean;\r\n dataDownload?: boolean;\r\n language?: Languages;\r\n showNAColor?: boolean;\r\n minHeight?: number;\r\n theme?: 'light' | 'dark';\r\n ariaLabel?: string;\r\n resetSelectionOnDoubleClick?: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n suffix?: string;\r\n prefix?: string;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n noOfTicks?: number;\r\n dimmedOpacity?: number;\r\n precision?: number;\r\n customLayers?: CustomLayerDataType[];\r\n}\r\n\r\nexport function HorizontalBeeSwarmChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n backgroundColor = false,\r\n topMargin = 25,\r\n bottomMargin = 10,\r\n leftMargin = 10,\r\n rightMargin = 10,\r\n showLabels = true,\r\n showTicks = true,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n showColorScale,\r\n graphID,\r\n radius = 5,\r\n maxRadiusValue,\r\n maxValue,\r\n minValue,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n suffix = '',\r\n prefix = '',\r\n styles,\r\n classNames,\r\n noOfTicks,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n customLayers = [],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a bee swarm chart showing the distribution along the x-axes. ${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale !== false && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={\r\n showNAColor === undefined || showNAColor === null ? true : showNAColor\r\n }\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center w-full leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n circleColors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) ||\r\n Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n width={width || svgWidth}\r\n selectedColor={selectedColor}\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 showTicks={showTicks}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n refValues={refValues}\r\n startFromZero={false}\r\n radius={radius}\r\n maxRadiusValue={maxRadiusValue}\r\n maxValue={maxValue}\r\n minValue={minValue}\r\n highlightedDataPoints={highlightedDataPoints}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n rtl={language === 'he' || language === 'ar'}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n suffix={suffix}\r\n prefix={prefix}\r\n styles={styles}\r\n classNames={classNames}\r\n noOfTicks={noOfTicks || 5}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import isEqual from 'fast-deep-equal';\r\nimport { scaleLinear, scaleSqrt } from 'd3-scale';\r\nimport { forceCollide, forceManyBody, forceSimulation, forceX, forceY } from 'd3-force';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport orderBy from 'lodash.orderby';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport {\r\n BeeSwarmChartDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n ReferenceDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { RefLineY } from '@/Components/Elements/ReferenceLine';\r\nimport { YTicksAndGridLines } from '@/Components/Elements/Axes/YTicksAndGridLines';\r\n\r\ninterface BeeSwarmChartDataTypeForBubbleChart extends BeeSwarmChartDataType {\r\n x: number;\r\n y: number;\r\n vx: number;\r\n vy: number;\r\n}\r\n\r\ninterface Props {\r\n data: BeeSwarmChartDataType[];\r\n circleColors: string[];\r\n colorDomain: string[];\r\n showTicks: boolean;\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n refValues?: ReferenceDataType[];\r\n selectedColor?: string;\r\n startFromZero: boolean;\r\n radius: number;\r\n maxRadiusValue?: number;\r\n maxValue?: number;\r\n minValue?: number;\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n noOfTicks: number;\r\n dimmedOpacity: number;\r\n precision: number;\r\n customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n circleColors,\r\n showTicks,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n suffix,\r\n prefix,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n selectedColor,\r\n startFromZero,\r\n radius,\r\n maxRadiusValue,\r\n maxValue,\r\n minValue,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n noOfTicks,\r\n dimmedOpacity,\r\n precision,\r\n customLayers,\r\n } = props;\r\n const svgRef = useRef(null);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [finalData, setFinalData] = useState<BeeSwarmChartDataTypeForBubbleChart[] | null>(null);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const dataOrdered =\r\n data.filter(d => !checkIfNullOrUndefined(d.radius)).length === 0\r\n ? data\r\n : orderBy(\r\n data.filter(d => !checkIfNullOrUndefined(d.radius)),\r\n 'radius',\r\n 'desc',\r\n );\r\n const yMaxValue = !checkIfNullOrUndefined(maxValue)\r\n ? (maxValue as number)\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) < 0 &&\r\n !startFromZero\r\n ? 0\r\n : Math.max(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n const yMinValue = !checkIfNullOrUndefined(minValue)\r\n ? (minValue as number)\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position)) >=\r\n 0 && !startFromZero\r\n ? 0\r\n : Math.min(...data.filter(d => !checkIfNullOrUndefined(d.position)).map(d => d.position));\r\n\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt()\r\n .domain([\r\n 0,\r\n checkIfNullOrUndefined(maxRadiusValue)\r\n ? Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n : (maxRadiusValue as number),\r\n ])\r\n .range([0.25, radius])\r\n .nice()\r\n : undefined;\r\n const y = scaleLinear().domain([yMinValue, yMaxValue]).range([graphHeight, 0]).nice();\r\n const yTicks = y.ticks(noOfTicks);\r\n\r\n useEffect(() => {\r\n setFinalData(null);\r\n const dataTemp = (dataOrdered as BeeSwarmChartDataType[]).filter(d => d.position);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n forceSimulation(dataTemp as any)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .force('y', forceY((d: any) => y(d.position as number)).strength(5))\r\n .force('x', forceX(_d => graphWidth / 2).strength(1))\r\n .force(\r\n 'collide',\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n forceCollide((d: any) => (radiusScale ? radiusScale(d.radius || 0) + 1 : radius + 1)),\r\n )\r\n .force('charge', forceManyBody().strength(-15))\r\n .alphaDecay(0.05)\r\n .tick(10000)\r\n .on('tick', () => {\r\n setFinalData(dataTemp as BeeSwarmChartDataTypeForBubbleChart[]);\r\n })\r\n .on('end', () => {\r\n setFinalData(dataTemp as BeeSwarmChartDataTypeForBubbleChart[]);\r\n });\r\n }, [data, radius, graphHeight, graphWidth, yMinValue, yMaxValue, dataOrdered, y, radiusScale]);\r\n\r\n return (\r\n <>\r\n {finalData ? (\r\n <svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n {showTicks ? (\r\n <>\r\n <Axis\r\n y1={y(yMinValue < 0 ? 0 : yMinValue)}\r\n y2={y(yMinValue < 0 ? 0 : yMinValue)}\r\n x1={0 - margin.left}\r\n x2={graphWidth + margin.right}\r\n label={numberFormattingFunction(\r\n yMinValue < 0 ? 0 : yMinValue,\r\n 'NA',\r\n precision,\r\n prefix,\r\n suffix,\r\n )}\r\n labelPos={{\r\n x: 0 - margin.left,\r\n y: y(yMinValue < 0 ? 0 : yMinValue),\r\n dx: 0,\r\n dy: yMaxValue < 0 ? '1em' : -5,\r\n }}\r\n classNames={{\r\n axis: classNames?.xAxis?.axis,\r\n label: classNames?.yAxis?.labels,\r\n }}\r\n styles={{\r\n axis: styles?.xAxis?.axis,\r\n label: styles?.yAxis?.labels,\r\n }}\r\n />\r\n <YTicksAndGridLines\r\n values={yTicks.filter(d => d !== 0)}\r\n y={yTicks.filter(d => d !== 0).map(d => y(d))}\r\n x1={0 - margin.left}\r\n x2={graphWidth + margin.right}\r\n styles={{\r\n gridLines: styles?.yAxis?.gridLines,\r\n labels: styles?.yAxis?.labels,\r\n }}\r\n classNames={{\r\n gridLines: classNames?.yAxis?.gridLines,\r\n labels: classNames?.yAxis?.labels,\r\n }}\r\n suffix={suffix}\r\n prefix={prefix}\r\n labelType='secondary'\r\n showGridLines\r\n labelPos='vertical'\r\n precision={precision}\r\n />\r\n </>\r\n ) : null}\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {finalData.map(d => (\r\n <g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n transform={`translate(${d.x},${d.y})`}\r\n opacity={\r\n selectedColor\r\n ? d.color\r\n ? circleColors[colorDomain.indexOf(d.color)] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85\r\n }\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 onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\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 onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <circle\r\n cx={0}\r\n cy={0}\r\n r={radiusScale ? radiusScale(d.radius || 0) : radius}\r\n fill={\r\n data.filter(el => el.color).length === 0\r\n ? circleColors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : circleColors[colorDomain.indexOf(d.color)]\r\n }\r\n />\r\n {(radiusScale ? radiusScale(d.radius || 0) : radius) > 10 && showLabels ? (\r\n <g>\r\n <foreignObject\r\n y={0 - (radiusScale ? radiusScale(d.radius || 0) : radius)}\r\n x={0 - (radiusScale ? radiusScale(d.radius || 0) : radius)}\r\n width={2 * (radiusScale ? radiusScale(d.radius || 0) : radius)}\r\n height={2 * (radiusScale ? radiusScale(d.radius || 0) : radius)}\r\n >\r\n <div className='flex flex-col justify-center items-center h-inherit py-0 px-1.5'>\r\n {showLabels ? (\r\n <p\r\n className={cn(\r\n 'text-center leading-none m-0',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n fontSize: `${Math.min(\r\n Math.max(\r\n Math.round(\r\n (radiusScale ? radiusScale(d.radius || 0) : radius) / 4,\r\n ),\r\n 10,\r\n ),\r\n Math.max(\r\n Math.round(\r\n ((radiusScale ? radiusScale(d.radius || 0) : radius) * 12) /\r\n `${d.label}`.length,\r\n ),\r\n 10,\r\n ),\r\n 20,\r\n )}px`,\r\n hyphens: 'auto',\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? circleColors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : circleColors[colorDomain.indexOf(d.color)],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {d.label}\r\n </p>\r\n ) : null}\r\n </div>\r\n </foreignObject>\r\n </g>\r\n ) : null}\r\n </g>\r\n ))}\r\n {refValues ? (\r\n <>\r\n {refValues.map((el, i) => (\r\n <RefLineY\r\n key={i}\r\n text={el.text}\r\n color={el.color}\r\n y={y(el.value as number)}\r\n x1={0 - margin.left}\r\n x2={graphWidth + margin.right}\r\n classNames={el.classNames}\r\n styles={el.styles}\r\n isInView={true}\r\n />\r\n ))}\r\n </>\r\n ) : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </svg>\r\n ) : (\r\n <div style={{ width: `${width}px`, height: `${height}px` }}>\r\n <div className='flex m-auto items-center justify-center p-0 leading-none text-base h-40'>\r\n <Spinner />\r\n </div>\r\n </div>\r\n )}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import uniqBy from 'lodash.uniqby';\r\nimport { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n BeeSwarmChartDataType,\r\n Languages,\r\n ReferenceDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n data: BeeSwarmChartDataType[];\r\n colors?: string | string[];\r\n graphTitle?: string | React.ReactNode;\r\n graphDescription?: string | React.ReactNode;\r\n footNote?: string | React.ReactNode;\r\n width?: number;\r\n height?: number;\r\n suffix?: string;\r\n prefix?: string;\r\n sources?: SourcesDataType[];\r\n showTicks?: boolean;\r\n leftMargin?: number;\r\n rightMargin?: number;\r\n colorDomain?: string[];\r\n colorLegendTitle?: string;\r\n backgroundColor?: string | boolean;\r\n padding?: string;\r\n topMargin?: number;\r\n bottomMargin?: number;\r\n relativeHeight?: number;\r\n showLabels?: boolean;\r\n showColorScale?: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n refValues?: ReferenceDataType[];\r\n graphID?: string;\r\n radius?: number;\r\n maxRadiusValue?: number;\r\n maxValue?: number;\r\n minValue?: number;\r\n highlightedDataPoints?: (string | number)[];\r\n dimmedOpacity?: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n graphDownload?: boolean;\r\n dataDownload?: boolean;\r\n language?: Languages;\r\n showNAColor?: boolean;\r\n minHeight?: number;\r\n theme?: 'light' | 'dark';\r\n ariaLabel?: string;\r\n resetSelectionOnDoubleClick?: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n noOfTicks?: number;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n precision?: number;\r\n customLayers?: CustomLayerDataType[];\r\n}\r\n\r\nexport function VerticalBeeSwarmChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n topMargin = 25,\r\n bottomMargin = 10,\r\n leftMargin = 100,\r\n rightMargin = 40,\r\n showLabels = true,\r\n showTicks = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n showColorScale,\r\n graphID,\r\n radius = 5,\r\n maxRadiusValue,\r\n maxValue,\r\n minValue,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor = true,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n suffix = '',\r\n prefix = '',\r\n styles,\r\n classNames,\r\n noOfTicks,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n customLayers = [],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a bee swarm chart showing the distribution along the y-axes. ${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv.current : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale !== false && data.filter(el => el.color).length !== 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={\r\n (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center w-full leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n circleColors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) ||\r\n Colors[theme].categoricalColors.colors\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain ||\r\n (uniqBy(\r\n data.filter(el => el.color),\r\n 'color',\r\n ).map(d => d.color) as string[])\r\n }\r\n width={width || svgWidth}\r\n selectedColor={selectedColor}\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 showTicks={showTicks}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n refValues={refValues}\r\n startFromZero={false}\r\n radius={radius}\r\n maxRadiusValue={maxRadiusValue}\r\n maxValue={maxValue}\r\n minValue={minValue}\r\n highlightedDataPoints={highlightedDataPoints}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n suffix={suffix}\r\n prefix={prefix}\r\n noOfTicks={noOfTicks || 5}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import { HorizontalBeeSwarmChart } from './Horizontal';\r\nimport { VerticalBeeSwarmChart } from './Vertical';\r\n\r\nimport {\r\n ReferenceDataType,\r\n SourcesDataType,\r\n Languages,\r\n BeeSwarmChartDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: BeeSwarmChartDataType[];\r\n\r\n /** Orientation of the graph */\r\n orientation?: 'vertical' | 'horizontal';\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for circle */\r\n colors?: string | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n\r\n // Values and Ticks\r\n /** Maximum value for the radius of the circle */\r\n maxRadiusValue?: number;\r\n /** Minimum value for position of the circle */\r\n minValue?: number;\r\n /** Maximum value for position of the circle */\r\n maxValue?: number;\r\n /** Reference values for comparison */\r\n refValues?: ReferenceDataType[];\r\n /** Number of ticks on the axis */\r\n noOfTicks?: number;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showTicks?: boolean;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Maximum radius of the circles */\r\n radius?: number;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function BeeSwarmChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n backgroundColor,\r\n topMargin,\r\n bottomMargin,\r\n leftMargin,\r\n rightMargin,\r\n showLabels,\r\n showTicks,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n refValues,\r\n showColorScale,\r\n graphID,\r\n radius,\r\n maxRadiusValue,\r\n maxValue,\r\n minValue,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload,\r\n dataDownload,\r\n language,\r\n showNAColor,\r\n minHeight,\r\n theme,\r\n ariaLabel,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n noOfTicks,\r\n orientation = 'vertical',\r\n styles,\r\n classNames,\r\n dimmedOpacity,\r\n precision,\r\n customLayers,\r\n } = props;\r\n\r\n if (orientation === 'vertical')\r\n return (\r\n <VerticalBeeSwarmChart\r\n data={data}\r\n graphTitle={graphTitle}\r\n backgroundColor={backgroundColor}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n showLabels={showLabels}\r\n showTicks={showTicks}\r\n colors={colors}\r\n sources={sources}\r\n graphDescription={graphDescription}\r\n height={height}\r\n width={width}\r\n footNote={footNote}\r\n colorDomain={colorDomain}\r\n colorLegendTitle={colorLegendTitle}\r\n padding={padding}\r\n relativeHeight={relativeHeight}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n refValues={refValues}\r\n showColorScale={showColorScale}\r\n graphID={graphID}\r\n radius={radius}\r\n maxRadiusValue={maxRadiusValue}\r\n maxValue={maxValue}\r\n minValue={minValue}\r\n highlightedDataPoints={highlightedDataPoints}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n language={language}\r\n showNAColor={showNAColor}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n detailsOnClick={detailsOnClick}\r\n classNames={classNames}\r\n noOfTicks={noOfTicks}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n );\r\n return (\r\n <HorizontalBeeSwarmChart\r\n data={data}\r\n graphTitle={graphTitle}\r\n backgroundColor={backgroundColor}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n showLabels={showLabels}\r\n showTicks={showTicks}\r\n colors={colors}\r\n sources={sources}\r\n graphDescription={graphDescription}\r\n height={height}\r\n width={width}\r\n footNote={footNote}\r\n colorDomain={colorDomain}\r\n colorLegendTitle={colorLegendTitle}\r\n padding={padding}\r\n relativeHeight={relativeHeight}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n refValues={refValues}\r\n showColorScale={showColorScale}\r\n graphID={graphID}\r\n radius={radius}\r\n maxRadiusValue={maxRadiusValue}\r\n maxValue={maxValue}\r\n minValue={minValue}\r\n highlightedDataPoints={highlightedDataPoints}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n graphDownload={graphDownload}\r\n dataDownload={dataDownload}\r\n language={language}\r\n showNAColor={showNAColor}\r\n minHeight={minHeight}\r\n theme={theme}\r\n ariaLabel={ariaLabel}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n detailsOnClick={detailsOnClick}\r\n classNames={classNames}\r\n noOfTicks={noOfTicks}\r\n dimmedOpacity={dimmedOpacity}\r\n precision={precision}\r\n customLayers={customLayers}\r\n />\r\n );\r\n}\r\n"],"names":["Graph","props","data","circleColors","showTicks","leftMargin","width","height","colorDomain","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","refValues","selectedColor","startFromZero","radius","maxRadiusValue","maxValue","minValue","highlightedDataPoints","onSeriesMouseClick","rtl","resetSelectionOnDoubleClick","detailsOnClick","suffix","prefix","styles","classNames","noOfTicks","dimmedOpacity","precision","customLayers","svgRef","useRef","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","finalData","setFinalData","eventX","setEventX","eventY","setEventY","margin","graphWidth","graphHeight","dataOrdered","d","checkIfNullOrUndefined","orderBy","xMaxValue","xMinValue","radiusScale","scaleSqrt","x","scaleLinear","xTicks","useEffect","dataTemp","forceSimulation","forceX","forceY","_d","forceCollide","forceManyBody","jsxs","Fragment","jsx","Axis","numberFormattingFunction","XTicksAndGridLines","event","isEqual","el","Colors","cn","getTextColorBasedOnBgColor","i","RefLineX","Spinner","Tooltip","Modal","string2HTML","HorizontalBeeSwarmChart","graphTitle","backgroundColor","colors","sources","graphDescription","footNote","colorLegendTitle","padding","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","language","showNAColor","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","resizeObserver","entries","GraphHeader","EmptyState","ColorLegendWithMouseOver","uniqBy","GraphFooter","yMaxValue","yMinValue","y","yTicks","YTicksAndGridLines","RefLineY","VerticalBeeSwarmChart","BeeSwarmChart","orientation"],"mappings":"q/BAyEO,SAASA,GAAMC,GAAc,CAClC,KAAM,CACJ,KAAAC,EACA,aAAAC,EACA,UAAAC,EACA,WAAAC,GACA,MAAAC,EACA,OAAAC,EACA,YAAAC,EACA,YAAAC,GACA,UAAAC,EACA,aAAAC,EACA,WAAAC,EACA,QAAAC,EACA,kBAAAC,EACA,UAAAC,EACA,cAAAC,EACA,cAAAC,EACA,OAAAC,EACA,eAAAC,EACA,SAAAC,EACA,SAAAC,EACA,sBAAAC,EACA,mBAAAC,EACA,IAAAC,GACA,4BAAAC,EACA,eAAAC,EACA,OAAAC,EACA,OAAAC,EACA,OAAAC,EACA,WAAAC,EACA,UAAAC,EACA,cAAAC,EACA,UAAAC,EACA,aAAAC,CAAA,EACEjC,GACEkC,EAASC,EAAAA,OAAO,IAAI,EAEpB,CAACC,EAAeC,CAAgB,EAAIC,EAAAA,SAAc,MAAS,EAE3D,CAACC,EAAgBC,CAAiB,EAAIF,EAAAA,SAAc,MAAS,EAC7D,CAACG,EAAWC,CAAY,EAAIJ,EAAAA,SAAuD,IAAI,EACvF,CAACK,GAAQC,CAAS,EAAIN,EAAAA,SAA6B,MAAS,EAC5D,CAACO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AAuF,EACA,QAAAC,EACA,iBAAAC,EACA,OAAAtF,EACA,MAAAD,EACA,SAAAwF,EACA,YAAAtF,EACA,iBAAAuF,EACA,QAAAC,EACA,eAAAC,EACA,QAAApF,EACA,kBAAAC,EACA,UAAAC,EACA,eAAAmF,GACA,QAAAC,EACA,OAAAjF,EACA,eAAAC,EACA,SAAAC,EACA,SAAAC,EACA,sBAAAC,EACA,mBAAAC,EACA,cAAA6E,EACA,aAAAC,EACA,SAAAC,EACA,YAAAC,EACA,UAAAC,EACA,MAAAC,EACA,UAAAC,EACA,4BAAAjF,EACA,OAAAI,EACA,eAAAH,EACA,WAAAI,EACA,UAAAC,EACA,cAAAC,EACA,UAAAC,EACA,aAAAC,CAAA,CAAA,CAGN"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare interface AxesClassNameObject {
|
|
4
|
+
gridLines?: string;
|
|
5
|
+
labels?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
axis?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare interface AxesStyleObject {
|
|
11
|
+
gridLines?: React.CSSProperties;
|
|
12
|
+
labels?: React.CSSProperties;
|
|
13
|
+
title?: React.CSSProperties;
|
|
14
|
+
axis?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare function BeeSwarmChart(props: Props): JSX.Element;
|
|
18
|
+
|
|
19
|
+
declare interface BeeSwarmChartDataType {
|
|
20
|
+
label: string | number;
|
|
21
|
+
position: number;
|
|
22
|
+
radius?: number;
|
|
23
|
+
color?: string;
|
|
24
|
+
data?: object;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare interface ClassNameObject {
|
|
28
|
+
title?: string;
|
|
29
|
+
footnote?: string;
|
|
30
|
+
source?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
tooltip?: string;
|
|
33
|
+
xAxis?: AxesClassNameObject;
|
|
34
|
+
yAxis?: AxesClassNameObject;
|
|
35
|
+
legend?: string;
|
|
36
|
+
graphContainer?: string;
|
|
37
|
+
graphObjectValues?: string;
|
|
38
|
+
dataConnectors?: string;
|
|
39
|
+
mouseOverLine?: string;
|
|
40
|
+
regLine?: string;
|
|
41
|
+
dataCards?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare interface CustomLayerDataType {
|
|
45
|
+
position: 'before' | 'after';
|
|
46
|
+
layer: React.ReactNode;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
|
|
50
|
+
|
|
51
|
+
declare interface Props {
|
|
52
|
+
/** Array of data objects */
|
|
53
|
+
data: BeeSwarmChartDataType[];
|
|
54
|
+
/** Orientation of the graph */
|
|
55
|
+
orientation?: 'vertical' | 'horizontal';
|
|
56
|
+
/** Title of the graph */
|
|
57
|
+
graphTitle?: string | React.ReactNode;
|
|
58
|
+
/** Description of the graph */
|
|
59
|
+
graphDescription?: string | React.ReactNode;
|
|
60
|
+
/** Footnote for the graph */
|
|
61
|
+
footNote?: string | React.ReactNode;
|
|
62
|
+
/** Source data for the graph */
|
|
63
|
+
sources?: SourcesDataType[];
|
|
64
|
+
/** Accessibility label */
|
|
65
|
+
ariaLabel?: string;
|
|
66
|
+
/** Color or array of colors for circle */
|
|
67
|
+
colors?: string | string[];
|
|
68
|
+
/** Domain of colors for the graph */
|
|
69
|
+
colorDomain?: string[];
|
|
70
|
+
/** Title for the color legend */
|
|
71
|
+
colorLegendTitle?: string;
|
|
72
|
+
/** Background color of the graph */
|
|
73
|
+
backgroundColor?: string | boolean;
|
|
74
|
+
/** Custom styles for the graph. Each object should be a valid React CSS style object. */
|
|
75
|
+
styles?: StyleObject;
|
|
76
|
+
/** Custom class names */
|
|
77
|
+
classNames?: ClassNameObject;
|
|
78
|
+
/** Width of the graph */
|
|
79
|
+
width?: number;
|
|
80
|
+
/** Height of the graph */
|
|
81
|
+
height?: number;
|
|
82
|
+
/** Minimum height of the graph */
|
|
83
|
+
minHeight?: number;
|
|
84
|
+
/** Relative height scaling factor. This overwrites the height props */
|
|
85
|
+
relativeHeight?: number;
|
|
86
|
+
/** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
|
|
87
|
+
padding?: string;
|
|
88
|
+
/** Left margin of the graph */
|
|
89
|
+
leftMargin?: number;
|
|
90
|
+
/** Right margin of the graph */
|
|
91
|
+
rightMargin?: number;
|
|
92
|
+
/** Top margin of the graph */
|
|
93
|
+
topMargin?: number;
|
|
94
|
+
/** Bottom margin of the graph */
|
|
95
|
+
bottomMargin?: number;
|
|
96
|
+
/** Maximum value for the radius of the circle */
|
|
97
|
+
maxRadiusValue?: number;
|
|
98
|
+
/** Minimum value for position of the circle */
|
|
99
|
+
minValue?: number;
|
|
100
|
+
/** Maximum value for position of the circle */
|
|
101
|
+
maxValue?: number;
|
|
102
|
+
/** Reference values for comparison */
|
|
103
|
+
refValues?: ReferenceDataType[];
|
|
104
|
+
/** Number of ticks on the axis */
|
|
105
|
+
noOfTicks?: number;
|
|
106
|
+
/** Toggle visibility of labels */
|
|
107
|
+
showLabels?: boolean;
|
|
108
|
+
/** Toggle visibility of values */
|
|
109
|
+
showTicks?: boolean;
|
|
110
|
+
/** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */
|
|
111
|
+
showColorScale?: boolean;
|
|
112
|
+
/** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */
|
|
113
|
+
showNAColor?: boolean;
|
|
114
|
+
/** Data points to highlight. Use the label value from data to highlight the data point */
|
|
115
|
+
highlightedDataPoints?: (string | number)[];
|
|
116
|
+
/** Defines the opacity of the non-highlighted data */
|
|
117
|
+
dimmedOpacity?: number;
|
|
118
|
+
/** Maximum radius of the circles */
|
|
119
|
+
radius?: number;
|
|
120
|
+
/** Specifies the number of decimal places to display in the value. */
|
|
121
|
+
precision?: number;
|
|
122
|
+
/** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */
|
|
123
|
+
customLayers?: CustomLayerDataType[];
|
|
124
|
+
/** Enable graph download option as png */
|
|
125
|
+
graphDownload?: boolean;
|
|
126
|
+
/** Enable data download option as a csv */
|
|
127
|
+
dataDownload?: boolean;
|
|
128
|
+
/** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */
|
|
129
|
+
resetSelectionOnDoubleClick?: boolean;
|
|
130
|
+
/** 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 */
|
|
131
|
+
tooltip?: string | ((_d: any) => React.ReactNode);
|
|
132
|
+
/** 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 */
|
|
133
|
+
detailsOnClick?: string | ((_d: any) => React.ReactNode);
|
|
134
|
+
/** Callback for mouse over event */
|
|
135
|
+
onSeriesMouseOver?: (_d: any) => void;
|
|
136
|
+
/** Callback for mouse click event */
|
|
137
|
+
onSeriesMouseClick?: (_d: any) => void;
|
|
138
|
+
/** Language setting */
|
|
139
|
+
language?: Languages;
|
|
140
|
+
/** Color theme */
|
|
141
|
+
theme?: 'light' | 'dark';
|
|
142
|
+
/** Unique ID for the graph */
|
|
143
|
+
graphID?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare interface ReferenceDataType {
|
|
147
|
+
value: number | null;
|
|
148
|
+
text: string;
|
|
149
|
+
color?: string;
|
|
150
|
+
styles?: {
|
|
151
|
+
line?: React.CSSProperties;
|
|
152
|
+
text?: React.CSSProperties;
|
|
153
|
+
};
|
|
154
|
+
classNames?: {
|
|
155
|
+
line?: string;
|
|
156
|
+
text?: string;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare interface SourcesDataType {
|
|
161
|
+
source: string;
|
|
162
|
+
link?: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare interface StyleObject {
|
|
166
|
+
title?: React.CSSProperties;
|
|
167
|
+
footnote?: React.CSSProperties;
|
|
168
|
+
source?: React.CSSProperties;
|
|
169
|
+
description?: React.CSSProperties;
|
|
170
|
+
graphContainer?: React.CSSProperties;
|
|
171
|
+
tooltip?: React.CSSProperties;
|
|
172
|
+
xAxis?: AxesStyleObject;
|
|
173
|
+
yAxis?: AxesStyleObject;
|
|
174
|
+
graphObjectValues?: React.CSSProperties;
|
|
175
|
+
dataConnectors?: React.CSSProperties;
|
|
176
|
+
mouseOverLine?: React.CSSProperties;
|
|
177
|
+
regLine?: React.CSSProperties;
|
|
178
|
+
dataCards?: React.CSSProperties;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export { }
|