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