@undp/data-viz 1.3.0 → 1.4.0
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.js +530 -1
- package/dist/AreaChart.js.map +1 -1
- package/dist/Axis-DE7dSn1_.cjs +2 -0
- package/dist/{Axis-BlyBRMNw.cjs.map → Axis-DE7dSn1_.cjs.map} +1 -1
- package/dist/{Axis-CvK-w3E2.js → Axis-Ddg-seDi.js} +10 -11
- package/dist/{Axis-CvK-w3E2.js.map → Axis-Ddg-seDi.js.map} +1 -1
- package/dist/AxisTitle-BmHLMRJZ.js +20 -0
- package/dist/{AxisTitle-BeMxcw5I.js.map → AxisTitle-BmHLMRJZ.js.map} +1 -1
- package/dist/AxisTitle-CK9YeovX.cjs +2 -0
- package/dist/{AxisTitle-BY8MI9jC.cjs.map → AxisTitle-CK9YeovX.cjs.map} +1 -1
- package/dist/BarGraph.cjs +2 -0
- package/dist/BarGraph.cjs.map +1 -0
- package/dist/BarGraph.js +4043 -1
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +2 -0
- package/dist/BasicStatCard.cjs.map +1 -0
- package/dist/BasicStatCard.js +190 -1
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +2 -0
- package/dist/BeeSwarmChart.cjs.map +1 -0
- package/dist/BeeSwarmChart.d.ts +0 -8
- package/dist/BeeSwarmChart.js +1042 -1
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +2 -0
- package/dist/BiVariateChoroplethMap.cjs.map +1 -0
- package/dist/BiVariateChoroplethMap.js +720 -1
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +2 -0
- package/dist/BulletChart.cjs.map +1 -0
- package/dist/BulletChart.js +1431 -1
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +2 -0
- package/dist/ButterflyChart.cjs.map +1 -0
- package/dist/ButterflyChart.js +692 -1
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +2 -0
- package/dist/ChoroplethMap.cjs.map +1 -0
- package/dist/ChoroplethMap.js +745 -1
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +2 -0
- package/dist/CirclePackingGraph.cjs.map +1 -0
- package/dist/CirclePackingGraph.d.ts +0 -8
- package/dist/CirclePackingGraph.js +14 -1
- package/dist/CirclePackingGraph.js.map +1 -1
- package/dist/ColorLegend.cjs +2 -0
- package/dist/ColorLegend.cjs.map +1 -0
- package/dist/ColorLegend.js +47 -1
- package/dist/ColorLegend.js.map +1 -1
- package/dist/ColorLegendWithMouseOver.cjs +2 -0
- package/dist/ColorLegendWithMouseOver.cjs.map +1 -0
- package/dist/ColorLegendWithMouseOver.js +70 -1
- package/dist/ColorLegendWithMouseOver.js.map +1 -1
- package/dist/Colors.cjs +2 -0
- package/dist/Colors.cjs.map +1 -0
- package/dist/Colors.js +561 -1
- package/dist/Colors.js.map +1 -1
- package/dist/CopyTextButton.cjs +17 -0
- package/dist/CopyTextButton.cjs.map +1 -0
- package/dist/CopyTextButton.js +698 -16
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +23 -0
- package/dist/CsvDownloadButton.cjs.map +1 -0
- package/dist/CsvDownloadButton.js +852 -7
- package/dist/CsvDownloadButton.js.map +1 -1
- package/dist/DataCards.cjs +22 -0
- package/dist/DataCards.cjs.map +1 -0
- package/dist/DataCards.js +624 -1
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +2 -0
- package/dist/DataTable.cjs.map +1 -0
- package/dist/DataTable.js +331 -1
- package/dist/DataTable.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +2 -0
- package/dist/DifferenceLineChart.cjs.map +1 -0
- package/dist/DifferenceLineChart.js +805 -1
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +2 -0
- package/dist/DonutChart.cjs.map +1 -0
- package/dist/DonutChart.js +478 -1
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +2 -0
- package/dist/DotDensityMap.cjs.map +1 -0
- package/dist/DotDensityMap.js +600 -1
- package/dist/DotDensityMap.js.map +1 -1
- 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.js +699 -1
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +2 -0
- package/dist/DumbbellChart.cjs.map +1 -0
- package/dist/DumbbellChart.js +1510 -1
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{EmptyState-b2Ln487i.js → EmptyState-DdTp-Mdn.js} +8 -8
- package/dist/{EmptyState-b2Ln487i.js.map → EmptyState-DdTp-Mdn.js.map} +1 -1
- package/dist/EmptyState-d8_8SxeW.cjs +2 -0
- package/dist/{EmptyState-BQguKAp5.cjs.map → EmptyState-d8_8SxeW.cjs.map} +1 -1
- package/dist/ExcelDownloadButton.cjs +2 -0
- package/dist/ExcelDownloadButton.cjs.map +1 -0
- package/dist/ExcelDownloadButton.js +29 -1
- package/dist/ExcelDownloadButton.js.map +1 -1
- package/dist/FootNote.cjs +2 -0
- package/dist/FootNote.cjs.map +1 -0
- package/dist/FootNote.js +20 -1
- package/dist/FootNote.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +2 -0
- package/dist/GeoHubCompareMaps.cjs.map +1 -0
- package/dist/GeoHubCompareMaps.js +370 -1
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +2 -0
- package/dist/GeoHubMap.cjs.map +1 -0
- package/dist/GeoHubMap.js +429 -1
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +2 -0
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -0
- package/dist/GeoHubMapWithLayerSelection.js +307 -1
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/GraphDescription.cjs +2 -0
- package/dist/GraphDescription.cjs.map +1 -0
- package/dist/GraphDescription.js +20 -1
- package/dist/GraphDescription.js.map +1 -1
- package/dist/GraphEl-B6SoGRFW.cjs +2 -0
- package/dist/GraphEl-B6SoGRFW.cjs.map +1 -0
- package/dist/{checkIfMultiple-CaefP4X2.js → GraphEl-Cw2tDUb3.js} +123 -662
- package/dist/GraphEl-Cw2tDUb3.js.map +1 -0
- package/dist/GraphFooter.cjs +2 -0
- package/dist/GraphFooter.cjs.map +1 -0
- package/dist/GraphFooter.js +21 -1
- package/dist/GraphFooter.js.map +1 -1
- package/dist/GraphHeader.cjs +2 -0
- package/dist/GraphHeader.cjs.map +1 -0
- package/dist/GraphHeader.js +63 -1
- package/dist/GraphHeader.js.map +1 -1
- package/dist/GraphTitle.cjs +2 -0
- package/dist/GraphTitle.cjs.map +1 -0
- package/dist/GraphTitle.js +28 -1
- package/dist/GraphTitle.js.map +1 -1
- package/dist/GriddedGraphs.cjs +2 -0
- package/dist/GriddedGraphs.cjs.map +1 -0
- package/dist/GriddedGraphs.d.ts +2 -4
- package/dist/GriddedGraphs.js +483 -1
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.cjs +2 -0
- package/dist/GriddedGraphsFromConfig.cjs.map +1 -0
- package/dist/GriddedGraphsFromConfig.d.ts +2 -4
- package/dist/GriddedGraphsFromConfig.js +42 -1
- package/dist/GriddedGraphsFromConfig.js.map +1 -1
- package/dist/HeatMap.cjs +2 -0
- package/dist/HeatMap.cjs.map +1 -0
- package/dist/HeatMap.js +451 -1
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +2 -0
- package/dist/Histogram.cjs.map +1 -0
- package/dist/Histogram.js +287 -1
- package/dist/Histogram.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +2 -0
- package/dist/ImageDownloadButton.cjs.map +1 -0
- package/dist/ImageDownloadButton.js +28 -1
- package/dist/ImageDownloadButton.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +2 -0
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -0
- package/dist/LineChartWithConfidenceInterval.js +818 -1
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +2 -0
- package/dist/LinearColorLegend.cjs.map +1 -0
- package/dist/LinearColorLegend.js +33 -1
- package/dist/LinearColorLegend.js.map +1 -1
- 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 +16 -12
- package/dist/MultiGraphDashboard.js +303 -1
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs +2 -0
- package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +16 -12
- package/dist/MultiGraphDashboardFromConfig.js +37 -1
- package/dist/MultiGraphDashboardFromConfig.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +243 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +2 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +30 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +2 -0
- package/dist/MultiLineAltChart.cjs.map +1 -0
- package/dist/MultiLineAltChart.js +689 -1
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +2 -0
- package/dist/MultiLineChart.cjs.map +1 -0
- package/dist/MultiLineChart.js +722 -1
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +2 -0
- package/dist/ParetoChart.cjs.map +1 -0
- package/dist/ParetoChart.js +636 -1
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +566 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +353 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +570 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +38 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js.map +1 -0
- package/dist/PerformanceIntensiveScrollStory.cjs +2 -0
- package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +493 -0
- package/dist/PerformanceIntensiveScrollStory.js +122 -0
- package/dist/PerformanceIntensiveScrollStory.js.map +1 -0
- package/dist/RadarChart.cjs +2 -0
- package/dist/RadarChart.cjs.map +1 -0
- package/dist/RadarChart.js +677 -1
- package/dist/RadarChart.js.map +1 -1
- package/dist/{ReferenceLine-BgDdQbDI.js → ReferenceLine-C1GpoG9d.js} +33 -34
- 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-BfpCuD7B.cjs.map → RegressionLine-7_rKTHN_.cjs.map} +1 -1
- package/dist/{RegressionLine-cSljpHaE.js → RegressionLine-BFwDCTUU.js} +17 -18
- package/dist/{RegressionLine-cSljpHaE.js.map → RegressionLine-BFwDCTUU.js.map} +1 -1
- package/dist/SVGDownloadButton.cjs +2 -0
- package/dist/SVGDownloadButton.cjs.map +1 -0
- package/dist/SVGDownloadButton.js +28 -1
- package/dist/SVGDownloadButton.js.map +1 -1
- package/dist/SankeyChart.cjs +2 -0
- package/dist/SankeyChart.cjs.map +1 -0
- package/dist/SankeyChart.js +989 -1
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +2 -0
- package/dist/ScatterPlot.cjs.map +1 -0
- package/dist/ScatterPlot.js +828 -1
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.cjs +2 -0
- package/dist/ScrollStory.cjs.map +1 -0
- package/dist/ScrollStory.d.ts +3 -5
- package/dist/ScrollStory.js +105 -1
- package/dist/ScrollStory.js.map +1 -1
- package/dist/SimpleLineChart.cjs +2 -0
- package/dist/SimpleLineChart.cjs.map +1 -0
- package/dist/SimpleLineChart.js +619 -1
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +2 -0
- package/dist/SingleGraphDashboard.cjs.map +1 -0
- package/dist/SingleGraphDashboard.d.ts +2 -5
- package/dist/SingleGraphDashboard.js +522 -1
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -4
- package/dist/SingleGraphDashboardFromConfig.js +34 -1
- package/dist/SingleGraphDashboardFromConfig.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +428 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +185 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +432 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +25 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +540 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +610 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +543 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +35 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js.map +1 -0
- package/dist/SlopeChart.cjs +2 -0
- package/dist/SlopeChart.cjs.map +1 -0
- package/dist/SlopeChart.js +582 -1
- package/dist/SlopeChart.js.map +1 -1
- package/dist/Source.cjs +2 -0
- package/dist/Source.cjs.map +1 -0
- package/dist/Source.js +40 -1
- package/dist/Source.js.map +1 -1
- package/dist/SparkLine.cjs +2 -0
- package/dist/SparkLine.cjs.map +1 -0
- package/dist/SparkLine.js +320 -1
- package/dist/SparkLine.js.map +1 -1
- 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.js +249 -1
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +2 -0
- package/dist/StripChart.cjs.map +1 -0
- package/dist/StripChart.js +988 -1
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +2 -0
- package/dist/ThreeDGlobe.cjs.map +1 -0
- package/dist/ThreeDGlobe.js +451 -1
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +2 -0
- package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -0
- package/dist/ThresholdColorLegendWithMouseOver.js +130 -1
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
- package/dist/{Tooltip-CzZ1wFyF.js → Tooltip-DyM5snqx.js} +15 -16
- package/dist/{Tooltip-CzZ1wFyF.js.map → Tooltip-DyM5snqx.js.map} +1 -1
- package/dist/Tooltip-n8z5bfav.cjs +2 -0
- package/dist/{Tooltip-BM18N_3l.cjs.map → Tooltip-n8z5bfav.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +2 -0
- package/dist/TreeMapGraph.cjs.map +1 -0
- package/dist/TreeMapGraph.js +760 -1
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.cjs +2 -0
- package/dist/Types.cjs.map +1 -0
- package/dist/Types.d.ts +38 -11
- package/dist/Types.js +1 -1
- 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.js +216 -1
- package/dist/UnitChart.js.map +1 -1
- package/dist/XAxesLabels-CJMQbfVy.cjs +2 -0
- package/dist/{XAxesLabels-C9REbQQs.cjs.map → XAxesLabels-CJMQbfVy.cjs.map} +1 -1
- package/dist/{XAxesLabels-DVw7Lvuz.js → XAxesLabels-DQFo_z2R.js} +21 -22
- package/dist/{XAxesLabels-DVw7Lvuz.js.map → XAxesLabels-DQFo_z2R.js.map} +1 -1
- package/dist/{XTicksAndGridLines-CUefTINd.js → XTicksAndGridLines-Bn9u5gOM.js} +19 -20
- package/dist/{XTicksAndGridLines-CUefTINd.js.map → XTicksAndGridLines-Bn9u5gOM.js.map} +1 -1
- package/dist/XTicksAndGridLines-CCzXIV8d.cjs +2 -0
- package/dist/{XTicksAndGridLines-DuK35ROS.cjs.map → XTicksAndGridLines-CCzXIV8d.cjs.map} +1 -1
- package/dist/YAxesLabels-BXLTX7AI.cjs +2 -0
- package/dist/{YAxesLabels-DhBdLk3Z.cjs.map → YAxesLabels-BXLTX7AI.cjs.map} +1 -1
- package/dist/{YAxesLabels-CYVY053X.js → YAxesLabels-H5-002X5.js} +11 -12
- package/dist/{YAxesLabels-CYVY053X.js.map → YAxesLabels-H5-002X5.js.map} +1 -1
- package/dist/{YTicksAndGridLines-BJRXuBdC.js → YTicksAndGridLines-B6ah7CRf.js} +14 -15
- package/dist/{YTicksAndGridLines-BJRXuBdC.js.map → YTicksAndGridLines-B6ah7CRf.js.map} +1 -1
- package/dist/YTicksAndGridLines-DBDuz6vb.cjs +2 -0
- package/dist/{YTicksAndGridLines-CtLvzExe.cjs.map → YTicksAndGridLines-DBDuz6vb.cjs.map} +1 -1
- package/dist/checkIfMultiple-CYp3vADF.js +912 -0
- package/dist/checkIfMultiple-CYp3vADF.js.map +1 -0
- package/dist/checkIfMultiple-Do4kADNr.cjs +12 -0
- package/dist/checkIfMultiple-Do4kADNr.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-B47Ew5cT.cjs.map → customArea-BYNyxAkm.cjs.map} +1 -1
- package/dist/{customArea-I3MsoqIl.js → customArea-CaxScFmW.js} +29 -30
- package/dist/{customArea-I3MsoqIl.js.map → customArea-CaxScFmW.js.map} +1 -1
- 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.js +9 -15
- package/dist/fetchAndParseData.js.map +1 -1
- 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 +7 -5
- package/dist/getSchema.js +910 -1
- package/dist/getSchema.js.map +1 -1
- 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-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-DXmF_0ez.js → index-BmCqpO1B.js} +74 -40
- package/dist/index-BmCqpO1B.js.map +1 -0
- package/dist/{index-Db-Yg_Ud.js → index-BxAUvrua.js} +19 -19
- package/dist/{index-Db-Yg_Ud.js.map → index-BxAUvrua.js.map} +1 -1
- 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-CylX-pWB.cjs +2 -0
- package/dist/{index-BYroABPm.cjs.map → index-CylX-pWB.cjs.map} +1 -1
- 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-a2C2Bqn2.cjs.map → index-DVOJ7vxH.cjs.map} +1 -1
- package/dist/index-D_n8aamX.cjs +2 -0
- package/dist/index-D_n8aamX.cjs.map +1 -0
- package/dist/{index-DzdwZ2OA.js → index-n_RI8T0n.js} +3 -3
- package/dist/{index-DzdwZ2OA.js.map → index-n_RI8T0n.js.map} +1 -1
- 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 +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +331 -168
- package/dist/index.js +194 -1
- package/dist/index.js.map +1 -1
- 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/{use-in-view-CZPXmTZM.js → proxy-DJxJg1kD.js} +699 -732
- package/dist/proxy-DJxJg1kD.js.map +1 -0
- package/dist/{use-in-view-Dl1CsAIo.cjs → proxy-PQd2AItT.cjs} +2 -2
- 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/{string2HTML-BX0oNw83.js → string2HTML-CWHGfz_d.js} +2 -2
- package/dist/{string2HTML-BX0oNw83.js.map → string2HTML-CWHGfz_d.js.map} +1 -1
- package/dist/{string2HTML-X4ZYX5jI.cjs → string2HTML-D2Avudmb.cjs} +2 -2
- package/dist/{string2HTML-X4ZYX5jI.cjs.map → string2HTML-D2Avudmb.cjs.map} +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/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-CdcwlnNe.js +759 -0
- package/dist/transformDataForAggregation-CdcwlnNe.js.map +1 -0
- package/dist/transformDataForAggregation-Du-Hei-W.cjs +2 -0
- package/dist/transformDataForAggregation-Du-Hei-W.cjs.map +1 -0
- package/dist/transformDataForGraphFromFile-CA0rw80A.js +24 -0
- package/dist/transformDataForGraphFromFile-CA0rw80A.js.map +1 -0
- package/dist/transformDataForGraphFromFile-D9G3ToQf.cjs +2 -0
- package/dist/transformDataForGraphFromFile-D9G3ToQf.cjs.map +1 -0
- package/dist/transformDataForSelect-D8AuvYdf.js +14 -0
- package/dist/transformDataForSelect-D8AuvYdf.js.map +1 -0
- package/dist/transformDataForSelect-YmStusCI.cjs +2 -0
- package/dist/transformDataForSelect-YmStusCI.cjs.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 +2 -4
- package/dist/validateSchema.js +104 -1
- package/dist/validateSchema.js.map +1 -1
- 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/package.json +50 -90
- package/dist/Axis-BlyBRMNw.cjs +0 -2
- package/dist/AxisTitle-BY8MI9jC.cjs +0 -2
- package/dist/AxisTitle-BeMxcw5I.js +0 -21
- package/dist/DropdownSelect-CuzV7gdj.cjs +0 -29
- package/dist/DropdownSelect-CuzV7gdj.cjs.map +0 -1
- package/dist/DropdownSelect-DmZsXrhY.js +0 -2698
- package/dist/DropdownSelect-DmZsXrhY.js.map +0 -1
- package/dist/EmptyState-BQguKAp5.cjs +0 -2
- package/dist/Modal-C9txyGOk.js +0 -723
- package/dist/Modal-C9txyGOk.js.map +0 -1
- package/dist/Modal-cQF2UQIa.cjs +0 -46
- package/dist/Modal-cQF2UQIa.cjs.map +0 -1
- package/dist/ReferenceLine-BgDdQbDI.js.map +0 -1
- package/dist/ReferenceLine-Bsb5jeE4.cjs +0 -2
- package/dist/ReferenceLine-Bsb5jeE4.cjs.map +0 -1
- package/dist/RegressionLine-BfpCuD7B.cjs +0 -2
- package/dist/Spinner-DN3s4S0H.js +0 -17
- package/dist/Spinner-DN3s4S0H.js.map +0 -1
- package/dist/Spinner-UmN-KPe9.cjs +0 -2
- package/dist/Spinner-UmN-KPe9.cjs.map +0 -1
- package/dist/Tooltip-BM18N_3l.cjs +0 -2
- package/dist/Typography-CDR-DAHH.cjs +0 -2
- package/dist/Typography-CDR-DAHH.cjs.map +0 -1
- package/dist/Typography-XJoSE-By.js +0 -58
- package/dist/Typography-XJoSE-By.js.map +0 -1
- package/dist/XAxesLabels-C9REbQQs.cjs +0 -2
- package/dist/XTicksAndGridLines-DuK35ROS.cjs +0 -2
- package/dist/YAxesLabels-DhBdLk3Z.cjs +0 -2
- package/dist/YTicksAndGridLines-CtLvzExe.cjs +0 -2
- package/dist/checkIfMultiple-CaefP4X2.js.map +0 -1
- package/dist/checkIfMultiple-D3h8to1T.cjs +0 -12
- package/dist/checkIfMultiple-D3h8to1T.cjs.map +0 -1
- package/dist/checkIfNullOrUndefined.d.ts +0 -15
- package/dist/checkIfNullOrUndefined.js +0 -2
- package/dist/checkIfNullOrUndefined.js.map +0 -1
- package/dist/customArea-B47Ew5cT.cjs +0 -2
- package/dist/excelDownload.d.ts +0 -31
- package/dist/excelDownload.js +0 -2
- package/dist/excelDownload.js.map +0 -1
- package/dist/generateCodes.d.ts +0 -25
- package/dist/generateCodes.js +0 -2
- package/dist/generateCodes.js.map +0 -1
- package/dist/getJenks.d.ts +0 -17
- package/dist/getJenks.js +0 -2
- package/dist/getJenks.js.map +0 -1
- package/dist/getPercentileValue.d.ts +0 -13
- package/dist/getPercentileValue.js +0 -2
- package/dist/getPercentileValue.js.map +0 -1
- package/dist/getQueryParamsFromLink.d.ts +0 -18
- package/dist/getQueryParamsFromLink.js +0 -2
- package/dist/getQueryParamsFromLink.js.map +0 -1
- package/dist/getSliderMarks-CWajGCGq.js +0 -719
- package/dist/getSliderMarks-CWajGCGq.js.map +0 -1
- package/dist/getSliderMarks-DDJ1CdhL.cjs +0 -6
- package/dist/getSliderMarks-DDJ1CdhL.cjs.map +0 -1
- package/dist/getTextColorBasedOnBgColor.d.ts +0 -13
- package/dist/getTextColorBasedOnBgColor.js +0 -2
- package/dist/getTextColorBasedOnBgColor.js.map +0 -1
- package/dist/getUniqValue.d.ts +0 -18
- package/dist/getUniqValue.js +0 -2
- package/dist/getUniqValue.js.map +0 -1
- package/dist/graphList.d.ts +0 -9
- package/dist/graphList.js +0 -2
- package/dist/graphList.js.map +0 -1
- package/dist/imageDownload.d.ts +0 -16
- package/dist/imageDownload.js +0 -3
- package/dist/imageDownload.js.map +0 -1
- package/dist/index-01r5X3Gr-9jE0ObrK.cjs +0 -2
- package/dist/index-01r5X3Gr-9jE0ObrK.cjs.map +0 -1
- package/dist/index-01r5X3Gr-kH7FxQ7P.js +0 -451
- package/dist/index-01r5X3Gr-kH7FxQ7P.js.map +0 -1
- package/dist/index-BGMGC-HN.cjs +0 -22
- package/dist/index-BGMGC-HN.cjs.map +0 -1
- package/dist/index-BHm2KTjD-2e-Fu8L-.js +0 -702
- package/dist/index-BHm2KTjD-2e-Fu8L-.js.map +0 -1
- package/dist/index-BHm2KTjD-D8FylaKc.cjs +0 -44
- package/dist/index-BHm2KTjD-D8FylaKc.cjs.map +0 -1
- package/dist/index-BIPNFFja.js +0 -506
- package/dist/index-BIPNFFja.js.map +0 -1
- package/dist/index-BYroABPm.cjs +0 -2
- package/dist/index-CEc_9zWy.cjs +0 -2
- package/dist/index-CEc_9zWy.cjs.map +0 -1
- package/dist/index-CbVeVrla.cjs +0 -2
- package/dist/index-CbVeVrla.cjs.map +0 -1
- package/dist/index-CqzhBPuO-CfQywbdq.js +0 -41
- package/dist/index-CqzhBPuO-CfQywbdq.js.map +0 -1
- package/dist/index-CqzhBPuO-raKZqS7l.cjs +0 -2
- package/dist/index-CqzhBPuO-raKZqS7l.cjs.map +0 -1
- package/dist/index-DSnvdkHZ.js +0 -495
- package/dist/index-DSnvdkHZ.js.map +0 -1
- package/dist/index-DXmF_0ez.js.map +0 -1
- package/dist/index-a2C2Bqn2.cjs +0 -10
- package/dist/numberFormattingFunction.d.ts +0 -22
- package/dist/numberFormattingFunction.js +0 -2
- package/dist/numberFormattingFunction.js.map +0 -1
- package/dist/removeOutliers.d.ts +0 -16
- package/dist/removeOutliers.js +0 -2
- package/dist/removeOutliers.js.map +0 -1
- package/dist/svgDownload.d.ts +0 -16
- package/dist/svgDownload.js +0 -2
- package/dist/svgDownload.js.map +0 -1
- package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js +0 -139
- package/dist/toConsumableArray-BSMMWi3w-Cu4vcE-m.js.map +0 -1
- package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs +0 -4
- package/dist/toConsumableArray-BSMMWi3w-DJL7-zAp.cjs.map +0 -1
- package/dist/transformColumnsToArray.d.ts +0 -38
- package/dist/transformColumnsToArray.js +0 -2
- package/dist/transformColumnsToArray.js.map +0 -1
- package/dist/transformDataForAggregation.d.ts +0 -38
- package/dist/transformDataForAggregation.js +0 -2
- package/dist/transformDataForAggregation.js.map +0 -1
- package/dist/transformDataForGraph.d.ts +0 -47
- package/dist/transformDataForGraph.js +0 -2
- package/dist/transformDataForGraph.js.map +0 -1
- package/dist/transformDataForGraphFromFile.d.ts +0 -66
- package/dist/transformDataForGraphFromFile.js +0 -2
- package/dist/transformDataForGraphFromFile.js.map +0 -1
- package/dist/use-in-view-CZPXmTZM.js.map +0 -1
- package/dist/use-in-view-Dl1CsAIo.cjs.map +0 -1
- package/dist/x-Dft9NVe_-DcB7wtv5.js +0 -61
- package/dist/x-Dft9NVe_-DcB7wtv5.js.map +0 -1
- package/dist/x-Dft9NVe_-LeyJu02C.cjs +0 -27
- package/dist/x-Dft9NVe_-LeyJu02C.cjs.map +0 -1
|
@@ -1,2 +1,819 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BHm2KTjD-D8FylaKc.cjs"),d=require("react"),G=require("./Typography-CDR-DAHH.cjs"),p=require("./parse-hMnG_lRV.cjs"),$t=require("./index-BzeLQvXk.cjs"),Dt=require("./simple-statistics-xm8c0LQQ.cjs"),lt=require("./numberFormattingFunction.js"),Tt=require("./Tooltip-BM18N_3l.cjs"),v=require("./checkIfNullOrUndefined.js"),Ot=require("./customArea-B47Ew5cT.cjs"),Ft=require("./AxisTitle-BY8MI9jC.cjs"),Wt=require("./Axis-BlyBRMNw.cjs"),Ht=require("./ReferenceLine-Bsb5jeE4.cjs"),Pt=require("./RegressionLine-BfpCuD7B.cjs"),Ut=require("./YTicksAndGridLines-CtLvzExe.cjs"),Yt=require("./index-BYroABPm.cjs"),y=require("./use-in-view-Dl1CsAIo.cjs"),Gt=require("./time-Byw_jYQ7.cjs"),Xt=require("./linear-BVckp9RD.cjs"),ct=require("./line-DHV4JwCR.cjs"),xt=require("./step-BZ3C8QFW.cjs"),Bt=require("./area-D3Qx7k7K.cjs"),zt=require("./select-Bnfk0lJx.cjs"),Kt=require("./init-DU0ybBc_.cjs"),Jt=require("./pointer-Dkq5NV1q.cjs"),Qt=require("./GraphFooter.js"),Zt=require("./GraphHeader.js"),ut=require("./Colors.js"),_t=require("./ColorLegend.js"),te=require("./EmptyState-BQguKAp5.cjs");function ee(mt){const{data:A,width:M,height:$,lineColor:V,suffix:I,prefix:j,dateFormat:o,highlightAreaSettings:h,showValues:X,noOfXTicks:ht,rightMargin:pt,leftMargin:R,topMargin:C,bottomMargin:B,tooltip:z,onSeriesMouseOver:T,refValues:K,minValue:J,maxValue:Q,animate:a,rtl:Z,strokeWidth:yt,showDots:D,annotations:dt,customHighlightAreaSettings:gt,regressionLine:F,showIntervalDots:ft,showIntervalValues:jt,intervalLineStrokeWidth:W,intervalLineColors:b,intervalAreaColor:wt,intervalAreaOpacity:vt,yAxisTitle:_,noOfYTicks:Rt,minDate:H,maxDate:P,curveType:L,styles:c,classNames:x,precision:N,customLayers:tt}=mt,et=d.useRef(null),l=y.useInView(et,{once:a.once,amount:a.amount}),[u,Et]=d.useState(!1);d.useEffect(()=>{if(l&&!u){const t=setTimeout(()=>{Et(!0)},(a.duration+.5)*1e3);return()=>clearTimeout(t)}},[l,u,a.duration]);const S=L==="linear"?ct.curveLinear:L==="step"?xt.curveStep:L==="stepAfter"?xt.stepAfter:L==="stepBefore"?xt.stepBefore:xt.monotoneX,[k,it]=d.useState(void 0),[nt,at]=d.useState(void 0),[U,Y]=d.useState(void 0),f={top:C,bottom:B,left:_?R+30:R,right:pt},E=d.useRef(null),n=$t.sortBy(A.filter(t=>!v.checkIfNullOrUndefined(t.y)).map(t=>({date:p.parse(`${t.date}`,o,new Date),y:t.y,yMin:v.checkIfNullOrUndefined(t.yMin)?t.y:t.yMin,yMax:v.checkIfNullOrUndefined(t.yMax)?t.y:t.yMax,data:t.data})),"date"),Mt=h.map(t=>({...t,coordinates:[t.coordinates[0]===null?null:p.parse(`${t.coordinates[0]}`,o,new Date),t.coordinates[1]===null?null:p.parse(`${t.coordinates[1]}`,o,new Date)]})),Ct=gt.map(t=>({...t,coordinates:t.coordinates.map((g,O)=>O%2===0?p.parse(`${g}`,o,new Date):g)})),r=M-f.left-f.right,w=$-f.top-f.bottom,st=H?p.parse(`${H}`,o,new Date):n[0].date,rt=P?p.parse(`${P}`,o,new Date):n[n.length-1].date,m=v.checkIfNullOrUndefined(J)?Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin)))?Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin)))>0?0:Math.min(...n.map(t=>Math.min(t.y,t.yMax,t.yMin))):0:J,q=Math.max(...n.map(t=>Math.max(t.y,t.yMax,t.yMin)))?Math.max(...n.map(t=>Math.max(t.y,t.yMax,t.yMin))):0,i=Gt.time().domain([st,rt]).range([0,r]),s=Xt.linear().domain([m,v.checkIfNullOrUndefined(Q)?q>0?q:0:Q]).range([w,0]).nice(),At=ct.line().x(t=>i(t.date)).y(t=>s(t.y)).curve(S),It=ct.line().x(t=>i(t.date)).y(t=>s(t.yMin)).curve(S),Lt=ct.line().x(t=>i(t.date)).y(t=>s(t.yMax)).curve(S),Nt=Bt.area().x(t=>i(t.date)).y0(t=>s(t.yMin)).y1(t=>s(t.yMax)).curve(S),kt=s.ticks(Rt),St=i.ticks(ht);d.useEffect(()=>{const t=O=>{const ot=n[Kt.bisectCenter(n.map(bt=>bt.date),i.invert(Jt.pointer(O)[0]),1)];it(ot||n[n.length-1]),T?.(ot||n[n.length-1]),Y(O.clientY),at(O.clientX)},g=()=>{it(void 0),at(void 0),Y(void 0),T?.(void 0)};zt.select(E.current).on("mousemove",t).on("mouseout",g)},[i,n,T]);const qt=Dt.linearRegression(n.filter(t=>!v.checkIfNullOrUndefined(t.date)&&!v.checkIfNullOrUndefined(t.y)).map(t=>[i(t.date),s(t.y)])),Vt=Dt.linearRegressionLine(qt);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(y.motion.svg,{width:`${M}px`,height:`${$}px`,viewBox:`0 0 ${M} ${$}`,direction:"ltr",ref:et,children:e.jsxRuntimeExports.jsxs("g",{transform:`translate(${f.left},${f.top})`,children:[e.jsxRuntimeExports.jsx(Yt.HighlightArea,{areaSettings:Mt,width:r,height:w,scale:i,animate:a,isInView:l}),e.jsxRuntimeExports.jsx(Ot.CustomArea,{areaSettings:Ct,scaleX:i,scaleY:s,animate:a,isInView:l}),e.jsxRuntimeExports.jsxs("g",{children:[e.jsxRuntimeExports.jsx(Ut.YTicksAndGridLines,{values:kt.filter(t=>t!==0),y:kt.filter(t=>t!==0).map(t=>s(t)),x1:0-R,x2:r+f.right,styles:{gridLines:c?.yAxis?.gridLines,labels:c?.yAxis?.labels},classNames:{gridLines:x?.yAxis?.gridLines,labels:x?.yAxis?.labels},suffix:I,prefix:j,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:N}),e.jsxRuntimeExports.jsx(Wt.Axis,{y1:s(m<0?0:m),y2:s(m<0?0:m),x1:0-R,x2:r+f.right,label:lt.numberFormattingFunction(m<0?0:m,"NA",N,j,I),labelPos:{x:0-R,y:s(m<0?0:m),dx:0,dy:q<0?"1em":-5},classNames:{axis:x?.xAxis?.axis,label:x?.yAxis?.labels},styles:{axis:c?.xAxis?.axis,label:c?.yAxis?.labels}}),e.jsxRuntimeExports.jsx(Ft.AxisTitle,{x:0-R+15,y:w/2,style:c?.yAxis?.title,className:x?.yAxis?.title,text:_,rotate90:!0})]}),e.jsxRuntimeExports.jsx("g",{children:St.map((t,g)=>e.jsxRuntimeExports.jsx("g",{children:e.jsxRuntimeExports.jsx("text",{y:w,x:i(t),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:p.format(t,o)})},g))}),tt.filter(t=>t.position==="before").map(t=>t.layer),e.jsxRuntimeExports.jsx(y.motion.path,{style:{fill:wt},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,d:Nt(n)||""},whileInView:{opacity:vt,d:Nt(n)||"",transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),W?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(y.motion.path,{style:{stroke:b[0],fill:"none",strokeWidth:W},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:It(n)||"",opacity:1},whileInView:{pathLength:1,d:It(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),e.jsxRuntimeExports.jsx(y.motion.path,{style:{stroke:b[1],fill:"none",strokeWidth:W},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:Lt(n)||"",opacity:1},whileInView:{pathLength:1,d:Lt(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"})]}):null,e.jsxRuntimeExports.jsx(y.motion.path,{style:{stroke:V,fill:"none",strokeWidth:yt},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{pathLength:0,d:At(n)||"",opacity:1},whileInView:{pathLength:1,d:At(n)||"",opacity:1,transition:{duration:a.duration}}},initial:"initial",animate:l?"whileInView":"initial"}),k?e.jsxRuntimeExports.jsx("line",{y1:0,y2:w,x1:i(k.date),x2:i(k.date),className:G.cnExports.cn("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",x?.mouseOverLine),style:c?.mouseOverLine}):null,e.jsxRuntimeExports.jsx("g",{children:n.map((t,g)=>e.jsxRuntimeExports.jsx(y.motion.g,{children:v.checkIfNullOrUndefined(t.y)?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[D?e.jsxRuntimeExports.jsx(y.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,style:{fill:V},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,cx:i(t.date),cy:s(t.y)},whileInView:{opacity:1,transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.y)}},initial:"initial",animate:l?"whileInView":"initial"}):null,ft?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(y.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,style:{fill:b[0]},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,cx:i(t.date),cy:s(t.yMin)},whileInView:{opacity:1,transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.yMin)}},initial:"initial",animate:l?"whileInView":"initial"}),e.jsxRuntimeExports.jsx(y.motion.circle,{r:r/n.length<5?0:r/n.length<20?2:4,style:{fill:b[1]},exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,cx:i(t.date),cy:s(t.yMax)},whileInView:{opacity:1,transition:{duration:u?a.duration:.5,delay:u?0:a.duration},cx:i(t.date),cy:s(t.yMax)}},initial:"initial",animate:l?"whileInView":"initial"})]}):null,X?e.jsxRuntimeExports.jsx(y.motion.text,{dy:-8,style:{fill:V,textAnchor:"middle",...c?.graphObjectValues||{}},className:G.cnExports.cn("graph-value text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,x:i(t.date),y:s(t.y)},whileInView:{opacity:1,x:i(t.date),y:s(t.y),transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:lt.numberFormattingFunction(t.y,"NA",N,j,I)}):null,jt?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(y.motion.text,{dy:"1em",style:{fill:b[0],textAnchor:"middle",...c?.graphObjectValues||{}},className:G.cnExports.cn("text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,x:i(t.date),y:s(t.yMin)},whileInView:{opacity:1,x:i(t.date),y:s(t.yMin),transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:lt.numberFormattingFunction(t.yMin,"NA",N,j,I)}),e.jsxRuntimeExports.jsx(y.motion.text,{dy:-8,style:{fill:b[1],textAnchor:"middle",...c?.graphObjectValues||{}},className:G.cnExports.cn("text-xs font-bold",x?.graphObjectValues),exit:{opacity:0,transition:{duration:a.duration}},variants:{initial:{opacity:0,x:i(t.date),y:s(t.yMax)},whileInView:{opacity:1,x:i(t.date),y:s(t.yMax),transition:{duration:u?a.duration:.5,delay:u?0:a.duration}}},initial:"initial",animate:l?"whileInView":"initial",children:lt.numberFormattingFunction(t.yMax,"NA",N,j,I)})]}):null]})},g))}),K?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:K.map((t,g)=>e.jsxRuntimeExports.jsx(Ht.RefLineY,{text:t.text,color:t.color,y:s(t.value),x1:0-R,x2:r+f.right,classNames:t.classNames,styles:t.styles,animate:a,isInView:l},g))}):null,e.jsxRuntimeExports.jsx("g",{children:dt.map((t,g)=>{const O=Ot.getLineEndPoint({x:t.xCoordinate?i(p.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),y:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8},{x:t.xCoordinate?i(p.parse(`${t.xCoordinate}`,o,new Date)):0,y:t.yCoordinate?s(t.yCoordinate):0},v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius),ot=t.showConnector?{y1:O.y,x1:O.x,y2:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0):0+(t.yOffset||0),x2:t.xCoordinate?i(p.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),cy:t.yCoordinate?s(t.yCoordinate):0,cx:t.xCoordinate?i(p.parse(`${t.xCoordinate}`,o,new Date)):0,circleRadius:v.checkIfNullOrUndefined(t.connectorRadius)?3.5:t.connectorRadius,strokeWidth:t.showConnector===!0?2:Math.min(t.showConnector||0,1)}:void 0,bt={y:t.yCoordinate?s(t.yCoordinate)+(t.yOffset||0)-8:0+(t.yOffset||0)-8,x:Z?0:t.xCoordinate?i(p.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0),width:Z?t.xCoordinate?i(p.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0):r-(t.xCoordinate?i(p.parse(`${t.xCoordinate}`,o,new Date))+(t.xOffset||0):0+(t.xOffset||0)),maxWidth:t.maxWidth,fontWeight:t.fontWeight,align:t.align};return e.jsxRuntimeExports.jsx(Ot.Annotation,{color:t.color,connectorsSettings:ot,labelSettings:bt,text:t.text,classNames:t.classNames,styles:t.styles,animate:a,isInView:l},g)})}),e.jsxRuntimeExports.jsx("g",{children:F?e.jsxRuntimeExports.jsx(Pt.RegressionLine,{x1:0,x2:r,y1:Vt(0),y2:Vt(r),graphHeight:w,graphWidth:r,className:x?.regLine,style:c?.regLine,color:typeof F=="string"?F:void 0,animate:a,isInView:l}):null}),tt.filter(t=>t.position==="after").map(t=>t.layer),e.jsxRuntimeExports.jsx("rect",{ref:E,style:{fill:"none",pointerEvents:"all"},width:r,height:w})]})}),k&&z&&nt&&U?e.jsxRuntimeExports.jsx(Tt.Tooltip,{data:k,body:z,xPos:nt,yPos:U,backgroundStyle:c?.tooltip,className:x?.tooltip}):null]})}function ie(mt){const{data:A,graphTitle:M,suffix:$="",sources:V,prefix:I="",graphDescription:j,height:o,width:h,footNote:X,noOfXTicks:ht=10,dateFormat:pt="yyyy",showValues:R=!1,backgroundColor:C=!1,padding:B,lineColor:z,leftMargin:T=30,rightMargin:K=30,topMargin:J=20,bottomMargin:Q=25,tooltip:a,refValues:Z=[],highlightAreaSettings:yt=[],relativeHeight:D,onSeriesMouseOver:dt,graphID:gt,minValue:F,maxValue:ft,regressionLine:jt=!1,showIntervalDots:W=!1,showIntervalValues:b=!1,intervalLineStrokeWidth:wt=0,intervalLineColors:vt=[ut.Colors.light.grays["gray-500"],ut.Colors.light.grays["gray-500"]],intervalAreaColor:_=ut.Colors.primaryColors["blue-100"],intervalAreaOpacity:Rt=.4,graphDownload:H=!1,dataDownload:P=!1,animate:L=!1,language:c="en",minHeight:x=0,strokeWidth:N=2,showDots:tt=!0,annotations:et=[],customHighlightAreaSettings:l=[],theme:u="light",ariaLabel:Et,yAxisTitle:S,noOfYTicks:k=5,minDate:it,maxDate:nt,colorLegendTitle:at,colorLegendColors:U,colorLegendDomain:Y,curveType:f="curve",styles:E,classNames:n,precision:Mt=2,customLayers:Ct=[]}=mt,[r,w]=d.useState(0),[st,rt]=d.useState(0),m=d.useRef(null),q=d.useRef(null);return d.useEffect(()=>{const i=new ResizeObserver(s=>{w(h||s[0].target.clientWidth||620),rt(o||s[0].target.clientHeight||480)});return m.current&&(rt(m.current.clientHeight||480),w(m.current.clientWidth||620),h||i.observe(m.current)),()=>i.disconnect()},[h,o]),e.jsxRuntimeExports.jsx("div",{className:`${u||"light"} flex ${h?"w-fit grow-0":"w-full grow"}`,dir:c==="he"||c==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:G.cnExports.cn(`${C?C===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${c||"en"}`,n?.graphContainer),style:{...E?.graphContainer||{},...C&&C!==!0?{backgroundColor:C}:{}},id:gt,ref:q,"aria-label":Et||`${M?`The graph shows ${M}. `:""}This is a line chart that highlights the difference between two datasets over time.${j?` ${j}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:C?B||"1rem":B||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[M||j||H||P?e.jsxRuntimeExports.jsx(Zt.GraphHeader,{styles:{title:E?.title,description:E?.description},classNames:{title:n?.title,description:n?.description},graphTitle:M,graphDescription:j,width:h,graphDownload:H?q.current:void 0,dataDownload:P?A.map(i=>i.data).filter(i=>i!==void 0).length>0?A.map(i=>i.data).filter(i=>i!==void 0):A.filter(i=>i!==void 0):null}):null,e.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:A.length===0?e.jsxRuntimeExports.jsx(te.EmptyState,{}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[U&&Y?e.jsxRuntimeExports.jsx(_t.ColorLegend,{width:h,colorLegendTitle:at,colors:U,colorDomain:Y,showNAColor:!1}):null,e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:m,"aria-label":"Graph area",children:(h||r)&&(o||st)?e.jsxRuntimeExports.jsx(ee,{data:A,lineColor:z||ut.Colors.primaryColors["blue-600"],width:h||r,height:Math.max(x,o||(D?x?(h||r)*D>x?(h||r)*D:x:(h||r)*D:st)),suffix:$,prefix:I,dateFormat:pt,showValues:R,noOfXTicks:ht,leftMargin:T,rightMargin:K,topMargin:J,bottomMargin:Q,tooltip:a,highlightAreaSettings:yt,onSeriesMouseOver:dt,refValues:Z,minValue:F,maxValue:ft,animate:L===!0?{duration:.5,once:!0,amount:.5}:L||{duration:0,once:!0,amount:0},rtl:c==="he"||c==="ar",strokeWidth:N,showDots:tt,annotations:et,customHighlightAreaSettings:l,regressionLine:jt,showIntervalDots:W,showIntervalValues:b,intervalLineStrokeWidth:wt,intervalLineColors:vt,intervalAreaColor:_,intervalAreaOpacity:Rt,yAxisTitle:S,noOfYTicks:k,minDate:it,maxDate:nt,curveType:f,styles:E,classNames:n,precision:Mt,customLayers:Ct}):null})]})}),V||X?e.jsxRuntimeExports.jsx(Qt.GraphFooter,{styles:{footnote:E?.footnote,source:E?.source},classNames:{footnote:n?.footnote,source:n?.source},sources:V,footNote:X,width:h}):null]})})})})}exports.LineChartWithConfidenceInterval=ie;
|
|
1
|
+
import { j as i, m as B } from "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
2
|
+
import { useRef as mt, useState as R, useEffect as Vt } from "react";
|
|
3
|
+
import { p as u, f as Rt } from "./parse-DlCRUFh_.js";
|
|
4
|
+
import { s as Wt } from "./index-DxagiOHo.js";
|
|
5
|
+
import { l as Ft, a as Ht } from "./simple-statistics-flVzqVtt.js";
|
|
6
|
+
import { n as lt } from "./numberFormattingFunction-14YCbkN2.js";
|
|
7
|
+
import { T as Yt } from "./Tooltip-DyM5snqx.js";
|
|
8
|
+
import { c as v } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
9
|
+
import { C as Pt, g as Et, A as Xt } from "./customArea-CaxScFmW.js";
|
|
10
|
+
import { A as Gt } from "./AxisTitle-BmHLMRJZ.js";
|
|
11
|
+
import { A as Bt } from "./Axis-Ddg-seDi.js";
|
|
12
|
+
import { R as zt } from "./ReferenceLine-C1GpoG9d.js";
|
|
13
|
+
import { R as Ut } from "./RegressionLine-BFwDCTUU.js";
|
|
14
|
+
import { Y as qt } from "./YTicksAndGridLines-B6ah7CRf.js";
|
|
15
|
+
import { H as Jt } from "./index-n_RI8T0n.js";
|
|
16
|
+
import { u as Kt } from "./use-in-view-BAHrBy6b.js";
|
|
17
|
+
import { t as Qt } from "./time-BzJP5SPC.js";
|
|
18
|
+
import { a as Zt } from "./linear-DUdu7l2G.js";
|
|
19
|
+
import { l as Ot, c as _t } from "./line-CPfhohvF.js";
|
|
20
|
+
import { c as ti, s as ii, a as ei, m as ai } from "./step-BrDul-H4.js";
|
|
21
|
+
import { a as ni } from "./area-BE2wo7fv.js";
|
|
22
|
+
import { s as oi } from "./select-DKy99ogv.js";
|
|
23
|
+
import { m as g } from "./proxy-DJxJg1kD.js";
|
|
24
|
+
import { a as ri } from "./init-BhZylTFx.js";
|
|
25
|
+
import { p as si } from "./pointer-CWRWOsrb.js";
|
|
26
|
+
import { GraphFooter as li } from "./GraphFooter.js";
|
|
27
|
+
import { GraphHeader as ci } from "./GraphHeader.js";
|
|
28
|
+
import { Colors as ct } from "./Colors.js";
|
|
29
|
+
import { ColorLegend as mi } from "./ColorLegend.js";
|
|
30
|
+
import { E as yi } from "./EmptyState-DdTp-Mdn.js";
|
|
31
|
+
function xi(yt) {
|
|
32
|
+
const {
|
|
33
|
+
data: V,
|
|
34
|
+
width: C,
|
|
35
|
+
height: W,
|
|
36
|
+
lineColor: k,
|
|
37
|
+
suffix: L,
|
|
38
|
+
prefix: f,
|
|
39
|
+
dateFormat: s,
|
|
40
|
+
highlightAreaSettings: h,
|
|
41
|
+
showValues: z,
|
|
42
|
+
noOfXTicks: xt,
|
|
43
|
+
rightMargin: ht,
|
|
44
|
+
leftMargin: j,
|
|
45
|
+
topMargin: b,
|
|
46
|
+
bottomMargin: U,
|
|
47
|
+
tooltip: q,
|
|
48
|
+
onSeriesMouseOver: F,
|
|
49
|
+
refValues: J,
|
|
50
|
+
minValue: K,
|
|
51
|
+
maxValue: Q,
|
|
52
|
+
animate: n,
|
|
53
|
+
rtl: Z,
|
|
54
|
+
strokeWidth: ut,
|
|
55
|
+
showDots: $,
|
|
56
|
+
annotations: pt,
|
|
57
|
+
customHighlightAreaSettings: gt,
|
|
58
|
+
regressionLine: H,
|
|
59
|
+
showIntervalDots: dt,
|
|
60
|
+
showIntervalValues: ft,
|
|
61
|
+
intervalLineStrokeWidth: Y,
|
|
62
|
+
intervalLineColors: A,
|
|
63
|
+
intervalAreaColor: wt,
|
|
64
|
+
intervalAreaOpacity: vt,
|
|
65
|
+
yAxisTitle: _,
|
|
66
|
+
noOfYTicks: jt,
|
|
67
|
+
minDate: P,
|
|
68
|
+
maxDate: E,
|
|
69
|
+
curveType: D,
|
|
70
|
+
styles: c,
|
|
71
|
+
classNames: m,
|
|
72
|
+
precision: N,
|
|
73
|
+
customLayers: tt
|
|
74
|
+
} = yt, it = mt(null), l = Kt(it, {
|
|
75
|
+
once: n.once,
|
|
76
|
+
amount: n.amount
|
|
77
|
+
}), [y, Mt] = R(!1);
|
|
78
|
+
Vt(() => {
|
|
79
|
+
if (l && !y) {
|
|
80
|
+
const t = setTimeout(
|
|
81
|
+
() => {
|
|
82
|
+
Mt(!0);
|
|
83
|
+
},
|
|
84
|
+
(n.duration + 0.5) * 1e3
|
|
85
|
+
);
|
|
86
|
+
return () => clearTimeout(t);
|
|
87
|
+
}
|
|
88
|
+
}, [l, y, n.duration]);
|
|
89
|
+
const S = D === "linear" ? _t : D === "step" ? ti : D === "stepAfter" ? ii : D === "stepBefore" ? ei : ai, [I, et] = R(void 0), [at, nt] = R(void 0), [X, G] = R(void 0), d = {
|
|
90
|
+
top: b,
|
|
91
|
+
bottom: U,
|
|
92
|
+
left: _ ? j + 30 : j,
|
|
93
|
+
right: ht
|
|
94
|
+
}, M = mt(null), a = Wt(
|
|
95
|
+
V.filter((t) => !v(t.y)).map((t) => ({
|
|
96
|
+
date: u(`${t.date}`, s, /* @__PURE__ */ new Date()),
|
|
97
|
+
y: t.y,
|
|
98
|
+
yMin: v(t.yMin) ? t.y : t.yMin,
|
|
99
|
+
yMax: v(t.yMax) ? t.y : t.yMax,
|
|
100
|
+
data: t.data
|
|
101
|
+
})),
|
|
102
|
+
"date"
|
|
103
|
+
), Ct = h.map((t) => ({
|
|
104
|
+
...t,
|
|
105
|
+
coordinates: [
|
|
106
|
+
t.coordinates[0] === null ? null : u(`${t.coordinates[0]}`, s, /* @__PURE__ */ new Date()),
|
|
107
|
+
t.coordinates[1] === null ? null : u(`${t.coordinates[1]}`, s, /* @__PURE__ */ new Date())
|
|
108
|
+
]
|
|
109
|
+
})), bt = gt.map((t) => ({
|
|
110
|
+
...t,
|
|
111
|
+
coordinates: t.coordinates.map(
|
|
112
|
+
(p, O) => O % 2 === 0 ? u(`${p}`, s, /* @__PURE__ */ new Date()) : p
|
|
113
|
+
)
|
|
114
|
+
})), r = C - d.left - d.right, w = W - d.top - d.bottom, ot = P ? u(`${P}`, s, /* @__PURE__ */ new Date()) : a[0].date, rt = E ? u(`${E}`, s, /* @__PURE__ */ new Date()) : a[a.length - 1].date, x = v(K) ? Math.min(...a.map((t) => Math.min(t.y, t.yMax, t.yMin))) ? Math.min(...a.map((t) => Math.min(t.y, t.yMax, t.yMin))) > 0 ? 0 : Math.min(...a.map((t) => Math.min(t.y, t.yMax, t.yMin))) : 0 : K, T = Math.max(...a.map((t) => Math.max(t.y, t.yMax, t.yMin))) ? Math.max(...a.map((t) => Math.max(t.y, t.yMax, t.yMin))) : 0, e = Qt().domain([ot, rt]).range([0, r]), o = Zt().domain([
|
|
115
|
+
x,
|
|
116
|
+
v(Q) ? T > 0 ? T : 0 : Q
|
|
117
|
+
]).range([w, 0]).nice(), Lt = Ot().x((t) => e(t.date)).y((t) => o(t.y)).curve(S), Dt = Ot().x((t) => e(t.date)).y((t) => o(t.yMin)).curve(S), Nt = Ot().x((t) => e(t.date)).y((t) => o(t.yMax)).curve(S), It = ni().x((t) => e(t.date)).y0((t) => o(t.yMin)).y1((t) => o(t.yMax)).curve(S), kt = o.ticks(jt), St = e.ticks(xt);
|
|
118
|
+
Vt(() => {
|
|
119
|
+
const t = (O) => {
|
|
120
|
+
const st = a[ri(
|
|
121
|
+
a.map((At) => At.date),
|
|
122
|
+
e.invert(si(O)[0]),
|
|
123
|
+
1
|
|
124
|
+
)];
|
|
125
|
+
et(st || a[a.length - 1]), F?.(st || a[a.length - 1]), G(O.clientY), nt(O.clientX);
|
|
126
|
+
}, p = () => {
|
|
127
|
+
et(void 0), nt(void 0), G(void 0), F?.(void 0);
|
|
128
|
+
};
|
|
129
|
+
oi(M.current).on("mousemove", t).on("mouseout", p);
|
|
130
|
+
}, [e, a, F]);
|
|
131
|
+
const Tt = Ft(
|
|
132
|
+
a.filter((t) => !v(t.date) && !v(t.y)).map((t) => [e(t.date), o(t.y)])
|
|
133
|
+
), $t = Ht(Tt);
|
|
134
|
+
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
135
|
+
/* @__PURE__ */ i.jsx(
|
|
136
|
+
g.svg,
|
|
137
|
+
{
|
|
138
|
+
width: `${C}px`,
|
|
139
|
+
height: `${W}px`,
|
|
140
|
+
viewBox: `0 0 ${C} ${W}`,
|
|
141
|
+
direction: "ltr",
|
|
142
|
+
ref: it,
|
|
143
|
+
children: /* @__PURE__ */ i.jsxs("g", { transform: `translate(${d.left},${d.top})`, children: [
|
|
144
|
+
/* @__PURE__ */ i.jsx(
|
|
145
|
+
Jt,
|
|
146
|
+
{
|
|
147
|
+
areaSettings: Ct,
|
|
148
|
+
width: r,
|
|
149
|
+
height: w,
|
|
150
|
+
scale: e,
|
|
151
|
+
animate: n,
|
|
152
|
+
isInView: l
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ i.jsx(
|
|
156
|
+
Pt,
|
|
157
|
+
{
|
|
158
|
+
areaSettings: bt,
|
|
159
|
+
scaleX: e,
|
|
160
|
+
scaleY: o,
|
|
161
|
+
animate: n,
|
|
162
|
+
isInView: l
|
|
163
|
+
}
|
|
164
|
+
),
|
|
165
|
+
/* @__PURE__ */ i.jsxs("g", { children: [
|
|
166
|
+
/* @__PURE__ */ i.jsx(
|
|
167
|
+
qt,
|
|
168
|
+
{
|
|
169
|
+
values: kt.filter((t) => t !== 0),
|
|
170
|
+
y: kt.filter((t) => t !== 0).map((t) => o(t)),
|
|
171
|
+
x1: 0 - j,
|
|
172
|
+
x2: r + d.right,
|
|
173
|
+
styles: {
|
|
174
|
+
gridLines: c?.yAxis?.gridLines,
|
|
175
|
+
labels: c?.yAxis?.labels
|
|
176
|
+
},
|
|
177
|
+
classNames: {
|
|
178
|
+
gridLines: m?.yAxis?.gridLines,
|
|
179
|
+
labels: m?.yAxis?.labels
|
|
180
|
+
},
|
|
181
|
+
suffix: L,
|
|
182
|
+
prefix: f,
|
|
183
|
+
labelType: "secondary",
|
|
184
|
+
showGridLines: !0,
|
|
185
|
+
labelPos: "vertical",
|
|
186
|
+
precision: N
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
/* @__PURE__ */ i.jsx(
|
|
190
|
+
Bt,
|
|
191
|
+
{
|
|
192
|
+
y1: o(x < 0 ? 0 : x),
|
|
193
|
+
y2: o(x < 0 ? 0 : x),
|
|
194
|
+
x1: 0 - j,
|
|
195
|
+
x2: r + d.right,
|
|
196
|
+
label: lt(
|
|
197
|
+
x < 0 ? 0 : x,
|
|
198
|
+
"NA",
|
|
199
|
+
N,
|
|
200
|
+
f,
|
|
201
|
+
L
|
|
202
|
+
),
|
|
203
|
+
labelPos: {
|
|
204
|
+
x: 0 - j,
|
|
205
|
+
y: o(x < 0 ? 0 : x),
|
|
206
|
+
dx: 0,
|
|
207
|
+
dy: T < 0 ? "1em" : -5
|
|
208
|
+
},
|
|
209
|
+
classNames: {
|
|
210
|
+
axis: m?.xAxis?.axis,
|
|
211
|
+
label: m?.yAxis?.labels
|
|
212
|
+
},
|
|
213
|
+
styles: {
|
|
214
|
+
axis: c?.xAxis?.axis,
|
|
215
|
+
label: c?.yAxis?.labels
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ i.jsx(
|
|
220
|
+
Gt,
|
|
221
|
+
{
|
|
222
|
+
x: 0 - j + 15,
|
|
223
|
+
y: w / 2,
|
|
224
|
+
style: c?.yAxis?.title,
|
|
225
|
+
className: m?.yAxis?.title,
|
|
226
|
+
text: _,
|
|
227
|
+
rotate90: !0
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
] }),
|
|
231
|
+
/* @__PURE__ */ i.jsx("g", { children: St.map((t, p) => /* @__PURE__ */ i.jsx("g", { children: /* @__PURE__ */ i.jsx(
|
|
232
|
+
"text",
|
|
233
|
+
{
|
|
234
|
+
y: w,
|
|
235
|
+
x: e(t),
|
|
236
|
+
style: { textAnchor: "middle" },
|
|
237
|
+
className: "fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",
|
|
238
|
+
dy: 15,
|
|
239
|
+
children: Rt(t, s)
|
|
240
|
+
}
|
|
241
|
+
) }, p)) }),
|
|
242
|
+
tt.filter((t) => t.position === "before").map((t) => t.layer),
|
|
243
|
+
/* @__PURE__ */ i.jsx(
|
|
244
|
+
g.path,
|
|
245
|
+
{
|
|
246
|
+
style: {
|
|
247
|
+
fill: wt
|
|
248
|
+
},
|
|
249
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
250
|
+
variants: {
|
|
251
|
+
initial: { opacity: 0, d: It(a) || "" },
|
|
252
|
+
whileInView: {
|
|
253
|
+
opacity: vt,
|
|
254
|
+
d: It(a) || "",
|
|
255
|
+
transition: { duration: n.duration }
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
initial: "initial",
|
|
259
|
+
animate: l ? "whileInView" : "initial"
|
|
260
|
+
}
|
|
261
|
+
),
|
|
262
|
+
Y ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
263
|
+
/* @__PURE__ */ i.jsx(
|
|
264
|
+
g.path,
|
|
265
|
+
{
|
|
266
|
+
style: {
|
|
267
|
+
stroke: A[0],
|
|
268
|
+
fill: "none",
|
|
269
|
+
strokeWidth: Y
|
|
270
|
+
},
|
|
271
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
272
|
+
variants: {
|
|
273
|
+
initial: {
|
|
274
|
+
pathLength: 0,
|
|
275
|
+
d: Dt(a) || "",
|
|
276
|
+
opacity: 1
|
|
277
|
+
},
|
|
278
|
+
whileInView: {
|
|
279
|
+
pathLength: 1,
|
|
280
|
+
d: Dt(a) || "",
|
|
281
|
+
opacity: 1,
|
|
282
|
+
transition: { duration: n.duration }
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
initial: "initial",
|
|
286
|
+
animate: l ? "whileInView" : "initial"
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
/* @__PURE__ */ i.jsx(
|
|
290
|
+
g.path,
|
|
291
|
+
{
|
|
292
|
+
style: {
|
|
293
|
+
stroke: A[1],
|
|
294
|
+
fill: "none",
|
|
295
|
+
strokeWidth: Y
|
|
296
|
+
},
|
|
297
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
298
|
+
variants: {
|
|
299
|
+
initial: {
|
|
300
|
+
pathLength: 0,
|
|
301
|
+
d: Nt(a) || "",
|
|
302
|
+
opacity: 1
|
|
303
|
+
},
|
|
304
|
+
whileInView: {
|
|
305
|
+
pathLength: 1,
|
|
306
|
+
d: Nt(a) || "",
|
|
307
|
+
opacity: 1,
|
|
308
|
+
transition: { duration: n.duration }
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
initial: "initial",
|
|
312
|
+
animate: l ? "whileInView" : "initial"
|
|
313
|
+
}
|
|
314
|
+
)
|
|
315
|
+
] }) : null,
|
|
316
|
+
/* @__PURE__ */ i.jsx(
|
|
317
|
+
g.path,
|
|
318
|
+
{
|
|
319
|
+
style: {
|
|
320
|
+
stroke: k,
|
|
321
|
+
fill: "none",
|
|
322
|
+
strokeWidth: ut
|
|
323
|
+
},
|
|
324
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
325
|
+
variants: {
|
|
326
|
+
initial: {
|
|
327
|
+
pathLength: 0,
|
|
328
|
+
d: Lt(a) || "",
|
|
329
|
+
opacity: 1
|
|
330
|
+
},
|
|
331
|
+
whileInView: {
|
|
332
|
+
pathLength: 1,
|
|
333
|
+
d: Lt(a) || "",
|
|
334
|
+
opacity: 1,
|
|
335
|
+
transition: { duration: n.duration }
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
initial: "initial",
|
|
339
|
+
animate: l ? "whileInView" : "initial"
|
|
340
|
+
}
|
|
341
|
+
),
|
|
342
|
+
I ? /* @__PURE__ */ i.jsx(
|
|
343
|
+
"line",
|
|
344
|
+
{
|
|
345
|
+
y1: 0,
|
|
346
|
+
y2: w,
|
|
347
|
+
x1: e(I.date),
|
|
348
|
+
x2: e(I.date),
|
|
349
|
+
className: B(
|
|
350
|
+
"undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",
|
|
351
|
+
m?.mouseOverLine
|
|
352
|
+
),
|
|
353
|
+
style: c?.mouseOverLine
|
|
354
|
+
}
|
|
355
|
+
) : null,
|
|
356
|
+
/* @__PURE__ */ i.jsx("g", { children: a.map((t, p) => /* @__PURE__ */ i.jsx(g.g, { children: v(t.y) ? null : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
357
|
+
$ ? /* @__PURE__ */ i.jsx(
|
|
358
|
+
g.circle,
|
|
359
|
+
{
|
|
360
|
+
r: r / a.length < 5 ? 0 : r / a.length < 20 ? 2 : 4,
|
|
361
|
+
style: { fill: k },
|
|
362
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
363
|
+
variants: {
|
|
364
|
+
initial: { opacity: 0, cx: e(t.date), cy: o(t.y) },
|
|
365
|
+
whileInView: {
|
|
366
|
+
opacity: 1,
|
|
367
|
+
transition: {
|
|
368
|
+
duration: y ? n.duration : 0.5,
|
|
369
|
+
delay: y ? 0 : n.duration
|
|
370
|
+
},
|
|
371
|
+
cx: e(t.date),
|
|
372
|
+
cy: o(t.y)
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
initial: "initial",
|
|
376
|
+
animate: l ? "whileInView" : "initial"
|
|
377
|
+
}
|
|
378
|
+
) : null,
|
|
379
|
+
dt ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
380
|
+
/* @__PURE__ */ i.jsx(
|
|
381
|
+
g.circle,
|
|
382
|
+
{
|
|
383
|
+
r: r / a.length < 5 ? 0 : r / a.length < 20 ? 2 : 4,
|
|
384
|
+
style: { fill: A[0] },
|
|
385
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
386
|
+
variants: {
|
|
387
|
+
initial: { opacity: 0, cx: e(t.date), cy: o(t.yMin) },
|
|
388
|
+
whileInView: {
|
|
389
|
+
opacity: 1,
|
|
390
|
+
transition: {
|
|
391
|
+
duration: y ? n.duration : 0.5,
|
|
392
|
+
delay: y ? 0 : n.duration
|
|
393
|
+
},
|
|
394
|
+
cx: e(t.date),
|
|
395
|
+
cy: o(t.yMin)
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
initial: "initial",
|
|
399
|
+
animate: l ? "whileInView" : "initial"
|
|
400
|
+
}
|
|
401
|
+
),
|
|
402
|
+
/* @__PURE__ */ i.jsx(
|
|
403
|
+
g.circle,
|
|
404
|
+
{
|
|
405
|
+
r: r / a.length < 5 ? 0 : r / a.length < 20 ? 2 : 4,
|
|
406
|
+
style: { fill: A[1] },
|
|
407
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
408
|
+
variants: {
|
|
409
|
+
initial: { opacity: 0, cx: e(t.date), cy: o(t.yMax) },
|
|
410
|
+
whileInView: {
|
|
411
|
+
opacity: 1,
|
|
412
|
+
transition: {
|
|
413
|
+
duration: y ? n.duration : 0.5,
|
|
414
|
+
delay: y ? 0 : n.duration
|
|
415
|
+
},
|
|
416
|
+
cx: e(t.date),
|
|
417
|
+
cy: o(t.yMax)
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
initial: "initial",
|
|
421
|
+
animate: l ? "whileInView" : "initial"
|
|
422
|
+
}
|
|
423
|
+
)
|
|
424
|
+
] }) : null,
|
|
425
|
+
z ? /* @__PURE__ */ i.jsx(
|
|
426
|
+
g.text,
|
|
427
|
+
{
|
|
428
|
+
dy: -8,
|
|
429
|
+
style: {
|
|
430
|
+
fill: k,
|
|
431
|
+
textAnchor: "middle",
|
|
432
|
+
...c?.graphObjectValues || {}
|
|
433
|
+
},
|
|
434
|
+
className: B(
|
|
435
|
+
"graph-value text-xs font-bold",
|
|
436
|
+
m?.graphObjectValues
|
|
437
|
+
),
|
|
438
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
439
|
+
variants: {
|
|
440
|
+
initial: { opacity: 0, x: e(t.date), y: o(t.y) },
|
|
441
|
+
whileInView: {
|
|
442
|
+
opacity: 1,
|
|
443
|
+
x: e(t.date),
|
|
444
|
+
y: o(t.y),
|
|
445
|
+
transition: {
|
|
446
|
+
duration: y ? n.duration : 0.5,
|
|
447
|
+
delay: y ? 0 : n.duration
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
initial: "initial",
|
|
452
|
+
animate: l ? "whileInView" : "initial",
|
|
453
|
+
children: lt(t.y, "NA", N, f, L)
|
|
454
|
+
}
|
|
455
|
+
) : null,
|
|
456
|
+
ft ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
457
|
+
/* @__PURE__ */ i.jsx(
|
|
458
|
+
g.text,
|
|
459
|
+
{
|
|
460
|
+
dy: "1em",
|
|
461
|
+
style: {
|
|
462
|
+
fill: A[0],
|
|
463
|
+
textAnchor: "middle",
|
|
464
|
+
...c?.graphObjectValues || {}
|
|
465
|
+
},
|
|
466
|
+
className: B("text-xs font-bold", m?.graphObjectValues),
|
|
467
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
468
|
+
variants: {
|
|
469
|
+
initial: { opacity: 0, x: e(t.date), y: o(t.yMin) },
|
|
470
|
+
whileInView: {
|
|
471
|
+
opacity: 1,
|
|
472
|
+
x: e(t.date),
|
|
473
|
+
y: o(t.yMin),
|
|
474
|
+
transition: {
|
|
475
|
+
duration: y ? n.duration : 0.5,
|
|
476
|
+
delay: y ? 0 : n.duration
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
initial: "initial",
|
|
481
|
+
animate: l ? "whileInView" : "initial",
|
|
482
|
+
children: lt(t.yMin, "NA", N, f, L)
|
|
483
|
+
}
|
|
484
|
+
),
|
|
485
|
+
/* @__PURE__ */ i.jsx(
|
|
486
|
+
g.text,
|
|
487
|
+
{
|
|
488
|
+
dy: -8,
|
|
489
|
+
style: {
|
|
490
|
+
fill: A[1],
|
|
491
|
+
textAnchor: "middle",
|
|
492
|
+
...c?.graphObjectValues || {}
|
|
493
|
+
},
|
|
494
|
+
className: B("text-xs font-bold", m?.graphObjectValues),
|
|
495
|
+
exit: { opacity: 0, transition: { duration: n.duration } },
|
|
496
|
+
variants: {
|
|
497
|
+
initial: { opacity: 0, x: e(t.date), y: o(t.yMax) },
|
|
498
|
+
whileInView: {
|
|
499
|
+
opacity: 1,
|
|
500
|
+
x: e(t.date),
|
|
501
|
+
y: o(t.yMax),
|
|
502
|
+
transition: {
|
|
503
|
+
duration: y ? n.duration : 0.5,
|
|
504
|
+
delay: y ? 0 : n.duration
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
initial: "initial",
|
|
509
|
+
animate: l ? "whileInView" : "initial",
|
|
510
|
+
children: lt(t.yMax, "NA", N, f, L)
|
|
511
|
+
}
|
|
512
|
+
)
|
|
513
|
+
] }) : null
|
|
514
|
+
] }) }, p)) }),
|
|
515
|
+
J ? /* @__PURE__ */ i.jsx(i.Fragment, { children: J.map((t, p) => /* @__PURE__ */ i.jsx(
|
|
516
|
+
zt,
|
|
517
|
+
{
|
|
518
|
+
text: t.text,
|
|
519
|
+
color: t.color,
|
|
520
|
+
y: o(t.value),
|
|
521
|
+
x1: 0 - j,
|
|
522
|
+
x2: r + d.right,
|
|
523
|
+
classNames: t.classNames,
|
|
524
|
+
styles: t.styles,
|
|
525
|
+
animate: n,
|
|
526
|
+
isInView: l
|
|
527
|
+
},
|
|
528
|
+
p
|
|
529
|
+
)) }) : null,
|
|
530
|
+
/* @__PURE__ */ i.jsx("g", { children: pt.map((t, p) => {
|
|
531
|
+
const O = Et(
|
|
532
|
+
{
|
|
533
|
+
x: t.xCoordinate ? e(u(`${t.xCoordinate}`, s, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0),
|
|
534
|
+
y: t.yCoordinate ? o(t.yCoordinate) + (t.yOffset || 0) - 8 : 0 + (t.yOffset || 0) - 8
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
x: t.xCoordinate ? e(u(`${t.xCoordinate}`, s, /* @__PURE__ */ new Date())) : 0,
|
|
538
|
+
y: t.yCoordinate ? o(t.yCoordinate) : 0
|
|
539
|
+
},
|
|
540
|
+
v(t.connectorRadius) ? 3.5 : t.connectorRadius
|
|
541
|
+
), st = t.showConnector ? {
|
|
542
|
+
y1: O.y,
|
|
543
|
+
x1: O.x,
|
|
544
|
+
y2: t.yCoordinate ? o(t.yCoordinate) + (t.yOffset || 0) : 0 + (t.yOffset || 0),
|
|
545
|
+
x2: t.xCoordinate ? e(u(`${t.xCoordinate}`, s, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0),
|
|
546
|
+
cy: t.yCoordinate ? o(t.yCoordinate) : 0,
|
|
547
|
+
cx: t.xCoordinate ? e(u(`${t.xCoordinate}`, s, /* @__PURE__ */ new Date())) : 0,
|
|
548
|
+
circleRadius: v(t.connectorRadius) ? 3.5 : t.connectorRadius,
|
|
549
|
+
strokeWidth: t.showConnector === !0 ? 2 : Math.min(t.showConnector || 0, 1)
|
|
550
|
+
} : void 0, At = {
|
|
551
|
+
y: t.yCoordinate ? o(t.yCoordinate) + (t.yOffset || 0) - 8 : 0 + (t.yOffset || 0) - 8,
|
|
552
|
+
x: Z ? 0 : t.xCoordinate ? e(u(`${t.xCoordinate}`, s, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0),
|
|
553
|
+
width: Z ? t.xCoordinate ? e(u(`${t.xCoordinate}`, s, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0) : r - (t.xCoordinate ? e(u(`${t.xCoordinate}`, s, /* @__PURE__ */ new Date())) + (t.xOffset || 0) : 0 + (t.xOffset || 0)),
|
|
554
|
+
maxWidth: t.maxWidth,
|
|
555
|
+
fontWeight: t.fontWeight,
|
|
556
|
+
align: t.align
|
|
557
|
+
};
|
|
558
|
+
return /* @__PURE__ */ i.jsx(
|
|
559
|
+
Xt,
|
|
560
|
+
{
|
|
561
|
+
color: t.color,
|
|
562
|
+
connectorsSettings: st,
|
|
563
|
+
labelSettings: At,
|
|
564
|
+
text: t.text,
|
|
565
|
+
classNames: t.classNames,
|
|
566
|
+
styles: t.styles,
|
|
567
|
+
animate: n,
|
|
568
|
+
isInView: l
|
|
569
|
+
},
|
|
570
|
+
p
|
|
571
|
+
);
|
|
572
|
+
}) }),
|
|
573
|
+
/* @__PURE__ */ i.jsx("g", { children: H ? /* @__PURE__ */ i.jsx(
|
|
574
|
+
Ut,
|
|
575
|
+
{
|
|
576
|
+
x1: 0,
|
|
577
|
+
x2: r,
|
|
578
|
+
y1: $t(0),
|
|
579
|
+
y2: $t(r),
|
|
580
|
+
graphHeight: w,
|
|
581
|
+
graphWidth: r,
|
|
582
|
+
className: m?.regLine,
|
|
583
|
+
style: c?.regLine,
|
|
584
|
+
color: typeof H == "string" ? H : void 0,
|
|
585
|
+
animate: n,
|
|
586
|
+
isInView: l
|
|
587
|
+
}
|
|
588
|
+
) : null }),
|
|
589
|
+
tt.filter((t) => t.position === "after").map((t) => t.layer),
|
|
590
|
+
/* @__PURE__ */ i.jsx(
|
|
591
|
+
"rect",
|
|
592
|
+
{
|
|
593
|
+
ref: M,
|
|
594
|
+
style: {
|
|
595
|
+
fill: "none",
|
|
596
|
+
pointerEvents: "all"
|
|
597
|
+
},
|
|
598
|
+
width: r,
|
|
599
|
+
height: w
|
|
600
|
+
}
|
|
601
|
+
)
|
|
602
|
+
] })
|
|
603
|
+
}
|
|
604
|
+
),
|
|
605
|
+
I && q && at && X ? /* @__PURE__ */ i.jsx(
|
|
606
|
+
Yt,
|
|
607
|
+
{
|
|
608
|
+
data: I,
|
|
609
|
+
body: q,
|
|
610
|
+
xPos: at,
|
|
611
|
+
yPos: X,
|
|
612
|
+
backgroundStyle: c?.tooltip,
|
|
613
|
+
className: m?.tooltip
|
|
614
|
+
}
|
|
615
|
+
) : null
|
|
616
|
+
] });
|
|
617
|
+
}
|
|
618
|
+
function Xi(yt) {
|
|
619
|
+
const {
|
|
620
|
+
data: V,
|
|
621
|
+
graphTitle: C,
|
|
622
|
+
suffix: W = "",
|
|
623
|
+
sources: k,
|
|
624
|
+
prefix: L = "",
|
|
625
|
+
graphDescription: f,
|
|
626
|
+
height: s,
|
|
627
|
+
width: h,
|
|
628
|
+
footNote: z,
|
|
629
|
+
noOfXTicks: xt = 10,
|
|
630
|
+
dateFormat: ht = "yyyy",
|
|
631
|
+
showValues: j = !1,
|
|
632
|
+
backgroundColor: b = !1,
|
|
633
|
+
padding: U,
|
|
634
|
+
lineColor: q,
|
|
635
|
+
leftMargin: F = 30,
|
|
636
|
+
rightMargin: J = 30,
|
|
637
|
+
topMargin: K = 20,
|
|
638
|
+
bottomMargin: Q = 25,
|
|
639
|
+
tooltip: n,
|
|
640
|
+
refValues: Z = [],
|
|
641
|
+
highlightAreaSettings: ut = [],
|
|
642
|
+
relativeHeight: $,
|
|
643
|
+
onSeriesMouseOver: pt,
|
|
644
|
+
graphID: gt,
|
|
645
|
+
minValue: H,
|
|
646
|
+
maxValue: dt,
|
|
647
|
+
regressionLine: ft = !1,
|
|
648
|
+
showIntervalDots: Y = !1,
|
|
649
|
+
showIntervalValues: A = !1,
|
|
650
|
+
intervalLineStrokeWidth: wt = 0,
|
|
651
|
+
intervalLineColors: vt = [ct.light.grays["gray-500"], ct.light.grays["gray-500"]],
|
|
652
|
+
intervalAreaColor: _ = ct.primaryColors["blue-100"],
|
|
653
|
+
intervalAreaOpacity: jt = 0.4,
|
|
654
|
+
graphDownload: P = !1,
|
|
655
|
+
dataDownload: E = !1,
|
|
656
|
+
animate: D = !1,
|
|
657
|
+
language: c = "en",
|
|
658
|
+
minHeight: m = 0,
|
|
659
|
+
strokeWidth: N = 2,
|
|
660
|
+
showDots: tt = !0,
|
|
661
|
+
annotations: it = [],
|
|
662
|
+
customHighlightAreaSettings: l = [],
|
|
663
|
+
theme: y = "light",
|
|
664
|
+
ariaLabel: Mt,
|
|
665
|
+
yAxisTitle: S,
|
|
666
|
+
noOfYTicks: I = 5,
|
|
667
|
+
minDate: et,
|
|
668
|
+
maxDate: at,
|
|
669
|
+
colorLegendTitle: nt,
|
|
670
|
+
colorLegendColors: X,
|
|
671
|
+
colorLegendDomain: G,
|
|
672
|
+
curveType: d = "curve",
|
|
673
|
+
styles: M,
|
|
674
|
+
classNames: a,
|
|
675
|
+
precision: Ct = 2,
|
|
676
|
+
customLayers: bt = []
|
|
677
|
+
} = yt, [r, w] = R(0), [ot, rt] = R(0), x = mt(null), T = mt(null);
|
|
678
|
+
return Vt(() => {
|
|
679
|
+
const e = new ResizeObserver((o) => {
|
|
680
|
+
w(h || o[0].target.clientWidth || 620), rt(s || o[0].target.clientHeight || 480);
|
|
681
|
+
});
|
|
682
|
+
return x.current && (rt(x.current.clientHeight || 480), w(x.current.clientWidth || 620), h || e.observe(x.current)), () => e.disconnect();
|
|
683
|
+
}, [h, s]), /* @__PURE__ */ i.jsx(
|
|
684
|
+
"div",
|
|
685
|
+
{
|
|
686
|
+
className: `${y || "light"} flex ${h ? "w-fit grow-0" : "w-full grow"}`,
|
|
687
|
+
dir: c === "he" || c === "ar" ? "rtl" : void 0,
|
|
688
|
+
children: /* @__PURE__ */ i.jsx(
|
|
689
|
+
"div",
|
|
690
|
+
{
|
|
691
|
+
className: B(
|
|
692
|
+
`${b ? b === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${c || "en"}`,
|
|
693
|
+
a?.graphContainer
|
|
694
|
+
),
|
|
695
|
+
style: {
|
|
696
|
+
...M?.graphContainer || {},
|
|
697
|
+
...b && b !== !0 ? { backgroundColor: b } : {}
|
|
698
|
+
},
|
|
699
|
+
id: gt,
|
|
700
|
+
ref: T,
|
|
701
|
+
"aria-label": Mt || `${C ? `The graph shows ${C}. ` : ""}This is a line chart that highlights the difference between two datasets over time.${f ? ` ${f}` : ""}`,
|
|
702
|
+
children: /* @__PURE__ */ i.jsx(
|
|
703
|
+
"div",
|
|
704
|
+
{
|
|
705
|
+
className: "flex grow",
|
|
706
|
+
style: { padding: b ? U || "1rem" : U || 0 },
|
|
707
|
+
children: /* @__PURE__ */ i.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
|
|
708
|
+
C || f || P || E ? /* @__PURE__ */ i.jsx(
|
|
709
|
+
ci,
|
|
710
|
+
{
|
|
711
|
+
styles: {
|
|
712
|
+
title: M?.title,
|
|
713
|
+
description: M?.description
|
|
714
|
+
},
|
|
715
|
+
classNames: {
|
|
716
|
+
title: a?.title,
|
|
717
|
+
description: a?.description
|
|
718
|
+
},
|
|
719
|
+
graphTitle: C,
|
|
720
|
+
graphDescription: f,
|
|
721
|
+
width: h,
|
|
722
|
+
graphDownload: P ? T.current : void 0,
|
|
723
|
+
dataDownload: E ? V.map((e) => e.data).filter((e) => e !== void 0).length > 0 ? V.map((e) => e.data).filter((e) => e !== void 0) : V.filter((e) => e !== void 0) : null
|
|
724
|
+
}
|
|
725
|
+
) : null,
|
|
726
|
+
/* @__PURE__ */ i.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: V.length === 0 ? /* @__PURE__ */ i.jsx(yi, {}) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
727
|
+
X && G ? /* @__PURE__ */ i.jsx(
|
|
728
|
+
mi,
|
|
729
|
+
{
|
|
730
|
+
width: h,
|
|
731
|
+
colorLegendTitle: nt,
|
|
732
|
+
colors: X,
|
|
733
|
+
colorDomain: G,
|
|
734
|
+
showNAColor: !1
|
|
735
|
+
}
|
|
736
|
+
) : null,
|
|
737
|
+
/* @__PURE__ */ i.jsx(
|
|
738
|
+
"div",
|
|
739
|
+
{
|
|
740
|
+
className: "flex flex-col grow justify-center leading-0",
|
|
741
|
+
ref: x,
|
|
742
|
+
"aria-label": "Graph area",
|
|
743
|
+
children: (h || r) && (s || ot) ? /* @__PURE__ */ i.jsx(
|
|
744
|
+
xi,
|
|
745
|
+
{
|
|
746
|
+
data: V,
|
|
747
|
+
lineColor: q || ct.primaryColors["blue-600"],
|
|
748
|
+
width: h || r,
|
|
749
|
+
height: Math.max(
|
|
750
|
+
m,
|
|
751
|
+
s || ($ ? m ? (h || r) * $ > m ? (h || r) * $ : m : (h || r) * $ : ot)
|
|
752
|
+
),
|
|
753
|
+
suffix: W,
|
|
754
|
+
prefix: L,
|
|
755
|
+
dateFormat: ht,
|
|
756
|
+
showValues: j,
|
|
757
|
+
noOfXTicks: xt,
|
|
758
|
+
leftMargin: F,
|
|
759
|
+
rightMargin: J,
|
|
760
|
+
topMargin: K,
|
|
761
|
+
bottomMargin: Q,
|
|
762
|
+
tooltip: n,
|
|
763
|
+
highlightAreaSettings: ut,
|
|
764
|
+
onSeriesMouseOver: pt,
|
|
765
|
+
refValues: Z,
|
|
766
|
+
minValue: H,
|
|
767
|
+
maxValue: dt,
|
|
768
|
+
animate: D === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : D || { duration: 0, once: !0, amount: 0 },
|
|
769
|
+
rtl: c === "he" || c === "ar",
|
|
770
|
+
strokeWidth: N,
|
|
771
|
+
showDots: tt,
|
|
772
|
+
annotations: it,
|
|
773
|
+
customHighlightAreaSettings: l,
|
|
774
|
+
regressionLine: ft,
|
|
775
|
+
showIntervalDots: Y,
|
|
776
|
+
showIntervalValues: A,
|
|
777
|
+
intervalLineStrokeWidth: wt,
|
|
778
|
+
intervalLineColors: vt,
|
|
779
|
+
intervalAreaColor: _,
|
|
780
|
+
intervalAreaOpacity: jt,
|
|
781
|
+
yAxisTitle: S,
|
|
782
|
+
noOfYTicks: I,
|
|
783
|
+
minDate: et,
|
|
784
|
+
maxDate: at,
|
|
785
|
+
curveType: d,
|
|
786
|
+
styles: M,
|
|
787
|
+
classNames: a,
|
|
788
|
+
precision: Ct,
|
|
789
|
+
customLayers: bt
|
|
790
|
+
}
|
|
791
|
+
) : null
|
|
792
|
+
}
|
|
793
|
+
)
|
|
794
|
+
] }) }),
|
|
795
|
+
k || z ? /* @__PURE__ */ i.jsx(
|
|
796
|
+
li,
|
|
797
|
+
{
|
|
798
|
+
styles: { footnote: M?.footnote, source: M?.source },
|
|
799
|
+
classNames: {
|
|
800
|
+
footnote: a?.footnote,
|
|
801
|
+
source: a?.source
|
|
802
|
+
},
|
|
803
|
+
sources: k,
|
|
804
|
+
footNote: z,
|
|
805
|
+
width: h
|
|
806
|
+
}
|
|
807
|
+
) : null
|
|
808
|
+
] })
|
|
809
|
+
}
|
|
810
|
+
)
|
|
811
|
+
}
|
|
812
|
+
)
|
|
813
|
+
}
|
|
814
|
+
);
|
|
815
|
+
}
|
|
816
|
+
export {
|
|
817
|
+
Xi as LineChartWithConfidenceInterval
|
|
818
|
+
};
|
|
2
819
|
//# sourceMappingURL=LineChartWithConfidenceInterval.js.map
|