@mui/x-charts 8.0.0-alpha.12 → 8.0.0-alpha.14
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/BarChart/BarChart.d.ts +1 -1
- package/BarChart/BarChart.js +14 -30
- package/BarChart/BarPlot.js +10 -7
- package/BarChart/checkScaleErrors.d.ts +4 -1
- package/BarChart/checkScaleErrors.js +7 -1
- package/BarChart/seriesConfig/extremums.d.ts +1 -1
- package/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/{internals/defaultizeColor.js → BarChart/seriesConfig/getSeriesWithDefaultValues.js} +6 -11
- package/BarChart/seriesConfig/index.js +3 -1
- package/BarChart/useBarChartProps.js +3 -18
- package/CHANGELOG.md +430 -0
- package/ChartContainer/ChartContainer.d.ts +2 -2
- package/ChartContainer/ChartContainer.js +122 -7
- package/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/ChartContainer/useChartContainerProps.js +6 -2
- package/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/ChartDataProvider/ChartDataProvider.js +4 -3
- package/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/ChartsAxis/ChartsAxis.js +25 -87
- package/ChartsAxis/axisClasses.d.ts +5 -1
- package/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/ChartsLabel/ChartsLabelMark.js +15 -2
- package/ChartsLabel/index.d.ts +1 -1
- package/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.js +1 -1
- package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/ChartsXAxis/ChartsXAxis.js +107 -64
- package/ChartsYAxis/ChartsYAxis.js +21 -20
- package/Gauge/Gauge.js +4 -3
- package/Gauge/GaugeContainer.js +7 -5
- package/LineChart/LineChart.d.ts +1 -1
- package/LineChart/LineChart.js +14 -30
- package/LineChart/LinePlot.js +2 -1
- package/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +15 -0
- package/LineChart/seriesConfig/index.js +3 -1
- package/LineChart/useLineChartProps.js +2 -17
- package/PieChart/PieArcLabelPlot.js +1 -1
- package/PieChart/PieArcPlot.js +1 -1
- package/PieChart/PieChart.d.ts +1 -1
- package/PieChart/PieChart.js +6 -4
- package/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/PieChart/seriesConfig/getSeriesWithDefaultValues.js +18 -0
- package/PieChart/seriesConfig/index.js +3 -1
- package/RadarChart/RadarChart.d.ts +24 -0
- package/RadarChart/RadarChart.js +150 -0
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +24 -0
- package/RadarChart/RadarDataProvider/RadarDataProvider.js +168 -0
- package/RadarChart/RadarDataProvider/index.d.ts +1 -0
- package/RadarChart/RadarDataProvider/index.js +16 -0
- package/RadarChart/RadarDataProvider/radar.types.d.ts +32 -0
- package/RadarChart/RadarGrid/RadarGrid.d.ts +13 -0
- package/RadarChart/RadarGrid/RadarGrid.js +51 -0
- package/RadarChart/RadarGrid/index.d.ts +1 -0
- package/RadarChart/RadarGrid/index.js +16 -0
- package/RadarChart/RadarGrid/useRadarGridData.d.ts +10 -0
- package/RadarChart/RadarGrid/useRadarGridData.js +35 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +7 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +46 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +7 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +45 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +7 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +48 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +12 -0
- package/RadarChart/RadarSeriesPlot/getAreaPath.d.ts +4 -0
- package/RadarChart/RadarSeriesPlot/getAreaPath.js +9 -0
- package/RadarChart/RadarSeriesPlot/index.d.ts +4 -0
- package/RadarChart/RadarSeriesPlot/index.js +38 -0
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +27 -0
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +67 -0
- package/RadarChart/index.d.ts +6 -0
- package/RadarChart/index.js +47 -0
- package/RadarChart/seriesConfig/extremums.d.ts +3 -0
- package/RadarChart/seriesConfig/extremums.js +26 -0
- package/RadarChart/seriesConfig/formatter.d.ts +3 -0
- package/RadarChart/seriesConfig/formatter.js +18 -0
- package/RadarChart/seriesConfig/getColor.d.ts +3 -0
- package/RadarChart/seriesConfig/getColor.js +10 -0
- package/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/RadarChart/seriesConfig/getSeriesWithDefaultValues.js +15 -0
- package/RadarChart/seriesConfig/index.d.ts +2 -0
- package/RadarChart/seriesConfig/index.js +22 -0
- package/RadarChart/seriesConfig/legend.d.ts +3 -0
- package/RadarChart/seriesConfig/legend.js +28 -0
- package/RadarChart/seriesConfig/tooltip.d.ts +3 -0
- package/RadarChart/seriesConfig/tooltip.js +31 -0
- package/RadarChart/useRadarChartProps.d.ts +23 -0
- package/RadarChart/useRadarChartProps.js +74 -0
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +14 -30
- package/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/ScatterChart/seriesConfig/getSeriesWithDefaultValues.js +15 -0
- package/ScatterChart/seriesConfig/index.js +3 -1
- package/ScatterChart/useScatterChartProps.js +2 -17
- package/SparkLineChart/SparkLineChart.d.ts +5 -9
- package/SparkLineChart/SparkLineChart.js +23 -21
- package/constants/index.d.ts +5 -1
- package/constants/index.js +12 -6
- package/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/esm/BarChart/BarChart.d.ts +1 -1
- package/esm/BarChart/BarChart.js +14 -30
- package/esm/BarChart/BarPlot.js +10 -7
- package/esm/BarChart/checkScaleErrors.d.ts +4 -1
- package/esm/BarChart/checkScaleErrors.js +7 -1
- package/esm/BarChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/BarChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/BarChart/seriesConfig/index.js +3 -1
- package/esm/BarChart/useBarChartProps.js +3 -18
- package/esm/ChartContainer/ChartContainer.d.ts +2 -2
- package/esm/ChartContainer/ChartContainer.js +122 -7
- package/esm/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/esm/ChartContainer/useChartContainerProps.js +6 -2
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/esm/ChartDataProvider/ChartDataProvider.js +4 -3
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/esm/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/esm/ChartsAxis/ChartsAxis.js +24 -86
- package/esm/ChartsAxis/axisClasses.d.ts +5 -1
- package/esm/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/esm/ChartsLabel/ChartsLabelMark.js +15 -2
- package/esm/ChartsLabel/index.d.ts +1 -1
- package/esm/ChartsLabel/index.js +0 -3
- package/esm/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.js +1 -1
- package/esm/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/esm/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/esm/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +107 -64
- package/esm/ChartsYAxis/ChartsYAxis.js +22 -21
- package/esm/Gauge/Gauge.js +4 -3
- package/esm/Gauge/GaugeContainer.js +7 -5
- package/esm/LineChart/LineChart.d.ts +1 -1
- package/esm/LineChart/LineChart.js +14 -30
- package/esm/LineChart/LinePlot.js +2 -1
- package/esm/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/LineChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/LineChart/seriesConfig/index.js +3 -1
- package/esm/LineChart/useLineChartProps.js +2 -17
- package/esm/PieChart/PieArcLabelPlot.js +1 -1
- package/esm/PieChart/PieArcPlot.js +1 -1
- package/esm/PieChart/PieChart.d.ts +1 -1
- package/esm/PieChart/PieChart.js +6 -4
- package/esm/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/PieChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
- package/esm/PieChart/seriesConfig/index.js +3 -1
- package/esm/RadarChart/RadarChart.d.ts +24 -0
- package/esm/RadarChart/RadarChart.js +144 -0
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +24 -0
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.js +162 -0
- package/esm/RadarChart/RadarDataProvider/index.d.ts +1 -0
- package/esm/RadarChart/RadarDataProvider/index.js +1 -0
- package/esm/RadarChart/RadarDataProvider/radar.types.d.ts +32 -0
- package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +13 -0
- package/esm/RadarChart/RadarGrid/RadarGrid.js +44 -0
- package/esm/RadarChart/RadarGrid/index.d.ts +1 -0
- package/esm/RadarChart/RadarGrid/index.js +1 -0
- package/esm/RadarChart/RadarGrid/useRadarGridData.d.ts +10 -0
- package/esm/RadarChart/RadarGrid/useRadarGridData.js +29 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +7 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +39 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +7 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +38 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +7 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +41 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +12 -0
- package/esm/RadarChart/RadarSeriesPlot/getAreaPath.d.ts +4 -0
- package/esm/RadarChart/RadarSeriesPlot/getAreaPath.js +3 -0
- package/esm/RadarChart/RadarSeriesPlot/index.d.ts +4 -0
- package/esm/RadarChart/RadarSeriesPlot/index.js +3 -0
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +27 -0
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +60 -0
- package/esm/RadarChart/index.d.ts +6 -0
- package/esm/RadarChart/index.js +4 -0
- package/esm/RadarChart/seriesConfig/extremums.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/extremums.js +18 -0
- package/esm/RadarChart/seriesConfig/formatter.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/formatter.js +12 -0
- package/esm/RadarChart/seriesConfig/getColor.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/getColor.js +4 -0
- package/esm/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/RadarChart/seriesConfig/index.d.ts +2 -0
- package/esm/RadarChart/seriesConfig/index.js +15 -0
- package/esm/RadarChart/seriesConfig/legend.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/legend.js +22 -0
- package/esm/RadarChart/seriesConfig/tooltip.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/tooltip.js +25 -0
- package/esm/RadarChart/useRadarChartProps.d.ts +23 -0
- package/esm/RadarChart/useRadarChartProps.js +67 -0
- package/esm/ScatterChart/ScatterChart.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.js +14 -30
- package/esm/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/ScatterChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/ScatterChart/seriesConfig/index.js +3 -1
- package/esm/ScatterChart/useScatterChartProps.js +2 -17
- package/esm/SparkLineChart/SparkLineChart.d.ts +5 -9
- package/esm/SparkLineChart/SparkLineChart.js +23 -21
- package/esm/constants/index.d.ts +5 -1
- package/esm/constants/index.js +11 -5
- package/esm/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/esm/hooks/useAxis.d.ts +13 -3
- package/esm/hooks/useAxis.js +42 -1
- package/esm/hooks/useRadarSeries.d.ts +35 -0
- package/esm/hooks/useRadarSeries.js +42 -0
- package/esm/hooks/useScale.d.ts +3 -1
- package/esm/hooks/useScale.js +9 -1
- package/esm/hooks/useSvgRef.js +1 -1
- package/esm/hooks/useTicks.js +17 -11
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/internals/clampAngle.d.ts +2 -0
- package/esm/internals/clampAngle.js +4 -0
- package/esm/internals/components/AxisSharedComponents.js +2 -2
- package/esm/internals/configInit.d.ts +11 -4
- package/esm/internals/configInit.js +22 -4
- package/esm/internals/defaultizeMargin.d.ts +3 -0
- package/esm/internals/defaultizeMargin.js +15 -0
- package/esm/internals/domUtils.js +1 -0
- package/esm/internals/index.d.ts +5 -0
- package/esm/internals/index.js +5 -0
- package/esm/internals/invertTextAnchor.d.ts +2 -0
- package/esm/internals/invertTextAnchor.js +10 -0
- package/esm/internals/isPolar.d.ts +7 -0
- package/esm/internals/isPolar.js +7 -0
- package/esm/internals/plugins/allPlugins.d.ts +3 -2
- package/esm/internals/plugins/allPlugins.js +2 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +52 -31
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +19 -18
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.js +7 -13
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +10 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +37 -35
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +81 -13
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +6 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +20 -19
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -31
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.d.ts → useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/{modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js → esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js} +4 -6
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +9 -4
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +27 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +133 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +24 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.js +21 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +57 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +1453 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +26 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +55 -0
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/esm/internals/plugins/models/plugin.d.ts +1 -1
- package/esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/esm/internals/plugins/models/seriesConfig/index.d.ts +4 -2
- package/esm/internals/plugins/models/seriesConfig/index.js +4 -2
- package/esm/internals/plugins/models/seriesConfig/polarExtremumGetter.types.d.ts +16 -0
- package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -2
- package/esm/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/esm/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/esm/internals/plugins/utils/selectors.d.ts +1 -0
- package/esm/internals/stackSeries.d.ts +4 -6
- package/esm/internals/store/useCharts.js +0 -8
- package/esm/internals/store/useSelector.d.ts +1 -1
- package/esm/internals/store/useSelector.js +4 -1
- package/esm/internals/store/useStore.js +1 -1
- package/esm/models/axis.d.ts +73 -12
- package/esm/models/axis.js +4 -0
- package/esm/models/colorMapping.d.ts +1 -1
- package/esm/models/index.d.ts +0 -1
- package/esm/models/index.js +0 -1
- package/esm/models/seriesType/bar.d.ts +1 -1
- package/esm/models/seriesType/config.d.ts +20 -10
- package/esm/models/seriesType/index.d.ts +1 -0
- package/esm/models/seriesType/index.js +1 -0
- package/esm/models/seriesType/line.d.ts +1 -1
- package/esm/models/seriesType/pie.d.ts +1 -1
- package/esm/models/seriesType/radar.d.ts +24 -0
- package/esm/models/seriesType/radar.js +1 -0
- package/esm/models/seriesType/scatter.d.ts +1 -1
- package/esm/models/z-axis.d.ts +1 -1
- package/hooks/useAxis.d.ts +13 -3
- package/hooks/useAxis.js +50 -5
- package/hooks/useRadarSeries.d.ts +35 -0
- package/hooks/useRadarSeries.js +48 -0
- package/hooks/useScale.d.ts +3 -1
- package/hooks/useScale.js +10 -0
- package/hooks/useSvgRef.js +1 -1
- package/hooks/useTicks.js +17 -11
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/internals/clampAngle.d.ts +2 -0
- package/internals/clampAngle.js +10 -0
- package/internals/components/AxisSharedComponents.js +2 -2
- package/internals/configInit.d.ts +11 -4
- package/internals/configInit.js +23 -5
- package/internals/defaultizeMargin.d.ts +3 -0
- package/internals/defaultizeMargin.js +22 -0
- package/internals/domUtils.js +1 -0
- package/internals/index.d.ts +5 -0
- package/internals/index.js +60 -0
- package/internals/invertTextAnchor.d.ts +2 -0
- package/internals/invertTextAnchor.js +16 -0
- package/internals/isPolar.d.ts +7 -0
- package/internals/isPolar.js +14 -0
- package/internals/plugins/allPlugins.d.ts +3 -2
- package/internals/plugins/allPlugins.js +2 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +51 -30
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +20 -19
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/processSeries.js +7 -14
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +10 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +39 -37
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +82 -13
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +14 -7
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +12 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +20 -19
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -31
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.d.ts → useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.js → useChartCartesianAxisRendering.selectors.js} +10 -13
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +27 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +140 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +31 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.js +28 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.js +27 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +65 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +1453 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +33 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +55 -0
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/internals/plugins/models/plugin.d.ts +1 -1
- package/internals/plugins/models/seriesConfig/cartesianExtremumGetter.types.js +5 -0
- package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.js +5 -0
- package/internals/plugins/models/seriesConfig/index.d.ts +4 -2
- package/internals/plugins/models/seriesConfig/index.js +26 -4
- package/internals/plugins/models/seriesConfig/polarExtremumGetter.types.d.ts +16 -0
- package/internals/plugins/models/seriesConfig/polarExtremumGetter.types.js +5 -0
- package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -2
- package/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/internals/plugins/utils/selectors.d.ts +1 -0
- package/internals/stackSeries.d.ts +4 -6
- package/internals/store/useCharts.js +0 -8
- package/internals/store/useSelector.d.ts +1 -1
- package/internals/store/useSelector.js +5 -1
- package/internals/store/useStore.js +1 -1
- package/models/axis.d.ts +73 -12
- package/models/axis.js +4 -0
- package/models/colorMapping.d.ts +1 -1
- package/models/index.d.ts +0 -1
- package/models/index.js +0 -11
- package/models/seriesType/bar.d.ts +1 -1
- package/models/seriesType/config.d.ts +20 -10
- package/models/seriesType/index.d.ts +1 -0
- package/models/seriesType/index.js +12 -0
- package/models/seriesType/line.d.ts +1 -1
- package/models/seriesType/pie.d.ts +1 -1
- package/models/seriesType/radar.d.ts +24 -0
- package/models/seriesType/radar.js +5 -0
- package/models/seriesType/scatter.d.ts +1 -1
- package/models/z-axis.d.ts +1 -1
- package/modern/BarChart/BarChart.d.ts +1 -1
- package/modern/BarChart/BarChart.js +14 -30
- package/modern/BarChart/BarPlot.js +10 -7
- package/modern/BarChart/checkScaleErrors.d.ts +4 -1
- package/modern/BarChart/checkScaleErrors.js +7 -1
- package/modern/BarChart/seriesConfig/extremums.d.ts +1 -1
- package/modern/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/BarChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/BarChart/seriesConfig/index.js +3 -1
- package/modern/BarChart/useBarChartProps.js +3 -18
- package/modern/ChartContainer/ChartContainer.d.ts +2 -2
- package/modern/ChartContainer/ChartContainer.js +122 -7
- package/modern/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/modern/ChartContainer/useChartContainerProps.js +6 -2
- package/modern/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/modern/ChartDataProvider/ChartDataProvider.js +4 -3
- package/modern/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/modern/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/modern/ChartsAxis/ChartsAxis.js +24 -86
- package/modern/ChartsAxis/axisClasses.d.ts +5 -1
- package/modern/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/modern/ChartsLabel/ChartsLabelMark.js +15 -2
- package/modern/ChartsLabel/index.d.ts +1 -1
- package/modern/ChartsLabel/index.js +0 -3
- package/modern/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/modern/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/modern/ChartsLabel/labelMarkClasses.js +1 -1
- package/modern/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/modern/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/modern/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/modern/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/modern/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +107 -64
- package/modern/ChartsYAxis/ChartsYAxis.js +22 -21
- package/modern/Gauge/Gauge.js +4 -3
- package/modern/Gauge/GaugeContainer.js +7 -5
- package/modern/LineChart/LineChart.d.ts +1 -1
- package/modern/LineChart/LineChart.js +14 -30
- package/modern/LineChart/LinePlot.js +2 -1
- package/modern/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/modern/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/LineChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/LineChart/seriesConfig/index.js +3 -1
- package/modern/LineChart/useLineChartProps.js +2 -17
- package/modern/PieChart/PieArcLabelPlot.js +1 -1
- package/modern/PieChart/PieArcPlot.js +1 -1
- package/modern/PieChart/PieChart.d.ts +1 -1
- package/modern/PieChart/PieChart.js +6 -4
- package/modern/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/PieChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
- package/modern/PieChart/seriesConfig/index.js +3 -1
- package/modern/RadarChart/RadarChart.d.ts +24 -0
- package/modern/RadarChart/RadarChart.js +144 -0
- package/modern/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +24 -0
- package/modern/RadarChart/RadarDataProvider/RadarDataProvider.js +162 -0
- package/modern/RadarChart/RadarDataProvider/index.d.ts +1 -0
- package/modern/RadarChart/RadarDataProvider/index.js +1 -0
- package/modern/RadarChart/RadarDataProvider/radar.types.d.ts +32 -0
- package/modern/RadarChart/RadarDataProvider/radar.types.js +1 -0
- package/modern/RadarChart/RadarGrid/RadarGrid.d.ts +13 -0
- package/modern/RadarChart/RadarGrid/RadarGrid.js +44 -0
- package/modern/RadarChart/RadarGrid/index.d.ts +1 -0
- package/modern/RadarChart/RadarGrid/index.js +1 -0
- package/modern/RadarChart/RadarGrid/useRadarGridData.d.ts +10 -0
- package/modern/RadarChart/RadarGrid/useRadarGridData.js +29 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +7 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +39 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +7 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +38 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +7 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +41 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +12 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.js +1 -0
- package/modern/RadarChart/RadarSeriesPlot/getAreaPath.d.ts +4 -0
- package/modern/RadarChart/RadarSeriesPlot/getAreaPath.js +3 -0
- package/modern/RadarChart/RadarSeriesPlot/index.d.ts +4 -0
- package/modern/RadarChart/RadarSeriesPlot/index.js +3 -0
- package/modern/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +27 -0
- package/modern/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +60 -0
- package/modern/RadarChart/index.d.ts +6 -0
- package/modern/RadarChart/index.js +4 -0
- package/modern/RadarChart/seriesConfig/extremums.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/extremums.js +18 -0
- package/modern/RadarChart/seriesConfig/formatter.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/formatter.js +12 -0
- package/modern/RadarChart/seriesConfig/getColor.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/getColor.js +4 -0
- package/modern/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/RadarChart/seriesConfig/index.d.ts +2 -0
- package/modern/RadarChart/seriesConfig/index.js +15 -0
- package/modern/RadarChart/seriesConfig/legend.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/legend.js +22 -0
- package/modern/RadarChart/seriesConfig/tooltip.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/tooltip.js +25 -0
- package/modern/RadarChart/useRadarChartProps.d.ts +23 -0
- package/modern/RadarChart/useRadarChartProps.js +67 -0
- package/modern/ScatterChart/ScatterChart.d.ts +1 -1
- package/modern/ScatterChart/ScatterChart.js +14 -30
- package/modern/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/modern/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/ScatterChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/ScatterChart/seriesConfig/index.js +3 -1
- package/modern/ScatterChart/useScatterChartProps.js +2 -17
- package/modern/SparkLineChart/SparkLineChart.d.ts +5 -9
- package/modern/SparkLineChart/SparkLineChart.js +23 -21
- package/modern/constants/index.d.ts +5 -1
- package/modern/constants/index.js +11 -5
- package/modern/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/modern/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/modern/hooks/useAxis.d.ts +13 -3
- package/modern/hooks/useAxis.js +42 -1
- package/modern/hooks/useRadarSeries.d.ts +35 -0
- package/modern/hooks/useRadarSeries.js +42 -0
- package/modern/hooks/useScale.d.ts +3 -1
- package/modern/hooks/useScale.js +9 -1
- package/modern/hooks/useSvgRef.js +1 -1
- package/modern/hooks/useTicks.js +17 -11
- package/modern/index.d.ts +1 -0
- package/modern/index.js +2 -1
- package/modern/internals/clampAngle.d.ts +2 -0
- package/modern/internals/clampAngle.js +4 -0
- package/modern/internals/components/AxisSharedComponents.js +2 -2
- package/modern/internals/configInit.d.ts +11 -4
- package/modern/internals/configInit.js +22 -4
- package/modern/internals/defaultizeMargin.d.ts +3 -0
- package/modern/internals/defaultizeMargin.js +15 -0
- package/modern/internals/domUtils.js +1 -0
- package/modern/internals/index.d.ts +5 -0
- package/modern/internals/index.js +5 -0
- package/modern/internals/invertTextAnchor.d.ts +2 -0
- package/modern/internals/invertTextAnchor.js +10 -0
- package/modern/internals/isPolar.d.ts +7 -0
- package/modern/internals/isPolar.js +7 -0
- package/modern/internals/plugins/allPlugins.d.ts +3 -2
- package/modern/internals/plugins/allPlugins.js +2 -1
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +52 -31
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +19 -18
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/modern/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/modern/internals/plugins/corePlugins/useChartSeries/processSeries.js +7 -13
- package/modern/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/modern/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +10 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +37 -35
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +81 -13
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +2 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +6 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +20 -19
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -31
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.d.ts → useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/{esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js → modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js} +4 -6
- package/modern/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/modern/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +9 -4
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +27 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +133 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +5 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +24 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +5 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.js +21 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +3 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/index.js +2 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.d.ts +3 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +57 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +1453 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +26 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +55 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.js +1 -0
- package/modern/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/modern/internals/plugins/models/plugin.d.ts +1 -1
- package/modern/internals/plugins/models/seriesConfig/cartesianExtremumGetter.types.js +1 -0
- package/modern/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/modern/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.js +1 -0
- package/modern/internals/plugins/models/seriesConfig/index.d.ts +4 -2
- package/modern/internals/plugins/models/seriesConfig/index.js +4 -2
- package/modern/internals/plugins/models/seriesConfig/polarExtremumGetter.types.d.ts +16 -0
- package/modern/internals/plugins/models/seriesConfig/polarExtremumGetter.types.js +1 -0
- package/modern/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -2
- package/modern/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/modern/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/modern/internals/plugins/utils/selectors.d.ts +1 -0
- package/modern/internals/stackSeries.d.ts +4 -6
- package/modern/internals/store/useCharts.js +0 -8
- package/modern/internals/store/useSelector.d.ts +1 -1
- package/modern/internals/store/useSelector.js +4 -1
- package/modern/internals/store/useStore.js +1 -1
- package/modern/models/axis.d.ts +73 -12
- package/modern/models/axis.js +4 -0
- package/modern/models/colorMapping.d.ts +1 -1
- package/modern/models/index.d.ts +0 -1
- package/modern/models/index.js +0 -1
- package/modern/models/seriesType/bar.d.ts +1 -1
- package/modern/models/seriesType/config.d.ts +20 -10
- package/modern/models/seriesType/index.d.ts +1 -0
- package/modern/models/seriesType/index.js +1 -0
- package/modern/models/seriesType/line.d.ts +1 -1
- package/modern/models/seriesType/pie.d.ts +1 -1
- package/modern/models/seriesType/radar.d.ts +24 -0
- package/modern/models/seriesType/radar.js +1 -0
- package/modern/models/seriesType/scatter.d.ts +1 -1
- package/modern/models/z-axis.d.ts +1 -1
- package/package.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/context/PolarProvider/Polar.types.d.ts +0 -42
- package/context/PolarProvider/PolarContext.d.ts +0 -4
- package/context/PolarProvider/PolarContext.js +0 -20
- package/context/PolarProvider/PolarProvider.d.ts +0 -0
- package/context/PolarProvider/PolarProvider.js +0 -62
- package/context/PolarProvider/getAxisExtremum.d.ts +0 -0
- package/context/PolarProvider/getAxisExtremum.js +0 -49
- package/context/PolarProvider/index.d.ts +0 -0
- package/context/PolarProvider/index.js +0 -1
- package/context/PolarProvider/usePolarContext.d.ts +0 -0
- package/context/PolarProvider/usePolarContext.js +0 -12
- package/esm/context/PolarProvider/Polar.types.d.ts +0 -42
- package/esm/context/PolarProvider/PolarContext.d.ts +0 -4
- package/esm/context/PolarProvider/PolarContext.js +0 -13
- package/esm/context/PolarProvider/PolarProvider.d.ts +0 -0
- package/esm/context/PolarProvider/PolarProvider.js +0 -61
- package/esm/context/PolarProvider/getAxisExtremum.d.ts +0 -0
- package/esm/context/PolarProvider/getAxisExtremum.js +0 -48
- package/esm/context/PolarProvider/index.d.ts +0 -0
- package/esm/context/PolarProvider/index.js +0 -0
- package/esm/context/PolarProvider/usePolarContext.d.ts +0 -0
- package/esm/context/PolarProvider/usePolarContext.js +0 -11
- package/esm/internals/calculateMargins.d.ts +0 -7
- package/esm/internals/calculateMargins.js +0 -25
- package/esm/internals/defaultizeColor.d.ts +0 -107
- package/esm/internals/defaultizeColor.js +0 -13
- package/esm/models/layout.d.ts +0 -18
- package/internals/calculateMargins.d.ts +0 -7
- package/internals/calculateMargins.js +0 -33
- package/internals/defaultizeColor.d.ts +0 -107
- package/models/layout.d.ts +0 -18
- package/modern/context/PolarProvider/Polar.types.d.ts +0 -42
- package/modern/context/PolarProvider/PolarContext.d.ts +0 -4
- package/modern/context/PolarProvider/PolarContext.js +0 -13
- package/modern/context/PolarProvider/PolarProvider.d.ts +0 -0
- package/modern/context/PolarProvider/PolarProvider.js +0 -61
- package/modern/context/PolarProvider/getAxisExtremum.d.ts +0 -0
- package/modern/context/PolarProvider/getAxisExtremum.js +0 -48
- package/modern/context/PolarProvider/index.d.ts +0 -0
- package/modern/context/PolarProvider/index.js +0 -0
- package/modern/context/PolarProvider/usePolarContext.d.ts +0 -0
- package/modern/context/PolarProvider/usePolarContext.js +0 -11
- package/modern/internals/calculateMargins.d.ts +0 -7
- package/modern/internals/calculateMargins.js +0 -25
- package/modern/internals/defaultizeColor.d.ts +0 -107
- package/modern/internals/defaultizeColor.js +0 -13
- package/modern/models/layout.d.ts +0 -18
- /package/{context/PolarProvider/Polar.types.js → RadarChart/RadarDataProvider/radar.types.js} +0 -0
- /package/{internals/plugins/models/seriesConfig/extremumGetter.types.js → RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.js} +0 -0
- /package/esm/{context/PolarProvider/Polar.types.js → RadarChart/RadarDataProvider/radar.types.js} +0 -0
- /package/esm/{internals/plugins/models/seriesConfig/extremumGetter.types.js → RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.js} +0 -0
- /package/esm/{models/layout.js → internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.js} +0 -0
- /package/esm/internals/plugins/models/seriesConfig/{extremumGetter.types.d.ts → cartesianExtremumGetter.types.d.ts} +0 -0
- /package/{modern/context/PolarProvider/Polar.types.js → esm/internals/plugins/models/seriesConfig/cartesianExtremumGetter.types.js} +0 -0
- /package/{modern/internals/plugins/models/seriesConfig/extremumGetter.types.js → esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.js} +0 -0
- /package/{modern/models/layout.js → esm/internals/plugins/models/seriesConfig/polarExtremumGetter.types.js} +0 -0
- /package/{models/layout.js → internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.js} +0 -0
- /package/internals/plugins/models/seriesConfig/{extremumGetter.types.d.ts → cartesianExtremumGetter.types.d.ts} +0 -0
- /package/modern/internals/plugins/models/seriesConfig/{extremumGetter.types.d.ts → cartesianExtremumGetter.types.d.ts} +0 -0
|
@@ -7,13 +7,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.ChartsXAxis = ChartsXAxis;
|
|
10
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
15
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
16
|
var _styles = require("@mui/material/styles");
|
|
17
|
+
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
18
|
+
var _clampAngle = require("../internals/clampAngle");
|
|
19
|
+
var _domUtils = require("../internals/domUtils");
|
|
17
20
|
var _useTicks = require("../hooks/useTicks");
|
|
18
21
|
var _axisClasses = require("../ChartsAxis/axisClasses");
|
|
19
22
|
var _AxisSharedComponents = require("../internals/components/AxisSharedComponents");
|
|
@@ -26,6 +29,7 @@ var _isInfinity = require("../internals/isInfinity");
|
|
|
26
29
|
var _isBandScale = require("../internals/isBandScale");
|
|
27
30
|
var _useChartContext = require("../context/ChartProvider/useChartContext");
|
|
28
31
|
var _useAxis = require("../hooks/useAxis");
|
|
32
|
+
var _invertTextAnchor = require("../internals/invertTextAnchor");
|
|
29
33
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
34
|
const _excluded = ["scale", "tickNumber", "reverse"];
|
|
31
35
|
const useUtilityClasses = ownerState => {
|
|
@@ -43,61 +47,88 @@ const useUtilityClasses = ownerState => {
|
|
|
43
47
|
};
|
|
44
48
|
return (0, _composeClasses.default)(slots, _axisClasses.getAxisUtilityClass, classes);
|
|
45
49
|
};
|
|
46
|
-
|
|
50
|
+
|
|
51
|
+
/* Returns a set of indices of the tick labels that should be visible. */
|
|
52
|
+
function getVisibleLabels(xTicks, {
|
|
47
53
|
tickLabelStyle: style,
|
|
48
54
|
tickLabelInterval,
|
|
55
|
+
tickLabelMinGap,
|
|
49
56
|
reverse,
|
|
50
|
-
isMounted
|
|
57
|
+
isMounted,
|
|
58
|
+
isPointInside
|
|
51
59
|
}) {
|
|
52
|
-
const
|
|
60
|
+
const getTickLabelSize = tick => {
|
|
53
61
|
if (!isMounted || tick.formattedValue === undefined) {
|
|
54
|
-
return
|
|
62
|
+
return {
|
|
55
63
|
width: 0,
|
|
56
64
|
height: 0
|
|
57
|
-
}
|
|
65
|
+
};
|
|
58
66
|
}
|
|
59
67
|
const tickSizes = (0, _getWordsByLines.getWordsByLines)({
|
|
60
68
|
style,
|
|
61
69
|
needsComputation: true,
|
|
62
70
|
text: tick.formattedValue
|
|
63
71
|
});
|
|
64
|
-
return
|
|
72
|
+
return {
|
|
65
73
|
width: Math.max(...tickSizes.map(size => size.width)),
|
|
66
74
|
height: Math.max(tickSizes.length * tickSizes[0].height)
|
|
67
|
-
}
|
|
68
|
-
}
|
|
75
|
+
};
|
|
76
|
+
};
|
|
69
77
|
if (typeof tickLabelInterval === 'function') {
|
|
70
|
-
return
|
|
71
|
-
skipLabel: !tickLabelInterval(item.value, index)
|
|
72
|
-
}));
|
|
78
|
+
return new Set(xTicks.filter((item, index) => tickLabelInterval(item.value, index)));
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
// Filter label to avoid overlap
|
|
76
|
-
let currentTextLimit = 0;
|
|
77
82
|
let previousTextLimit = 0;
|
|
78
83
|
const direction = reverse ? -1 : 1;
|
|
79
|
-
return
|
|
84
|
+
return new Set(xTicks.filter((item, labelIndex) => {
|
|
80
85
|
const {
|
|
81
|
-
width,
|
|
82
86
|
offset,
|
|
83
|
-
labelOffset
|
|
84
|
-
height
|
|
87
|
+
labelOffset
|
|
85
88
|
} = item;
|
|
86
|
-
const distance = (0, _geometry.getMinXTranslation)(width, height, style?.angle);
|
|
87
89
|
const textPosition = offset + labelOffset;
|
|
88
|
-
|
|
90
|
+
if (labelIndex > 0 && direction * textPosition < direction * (previousTextLimit + tickLabelMinGap)) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
if (!isPointInside(textPosition)) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
89
96
|
|
|
90
|
-
|
|
91
|
-
|
|
97
|
+
/* Measuring text width is expensive, so we need to delay it as much as possible to improve performance. */
|
|
98
|
+
const {
|
|
99
|
+
width,
|
|
100
|
+
height
|
|
101
|
+
} = getTickLabelSize(item);
|
|
102
|
+
const distance = (0, _geometry.getMinXTranslation)(width, height, style?.angle);
|
|
103
|
+
const currentTextLimit = textPosition - direction * distance / 2;
|
|
104
|
+
if (labelIndex > 0 && direction * currentTextLimit < direction * (previousTextLimit + tickLabelMinGap)) {
|
|
92
105
|
// Except for the first label, we skip all label that overlap with the last accepted.
|
|
93
106
|
// Notice that the early return prevents `previousTextLimit` from being updated.
|
|
94
|
-
return
|
|
95
|
-
skipLabel: true
|
|
96
|
-
});
|
|
107
|
+
return false;
|
|
97
108
|
}
|
|
98
|
-
previousTextLimit = textPosition + direction *
|
|
99
|
-
return
|
|
100
|
-
});
|
|
109
|
+
previousTextLimit = textPosition + direction * distance / 2;
|
|
110
|
+
return true;
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
function getDefaultTextAnchor(angle) {
|
|
114
|
+
const adjustedAngle = (0, _clampAngle.clampAngle)(angle);
|
|
115
|
+
if (adjustedAngle === 0 || adjustedAngle === 180) {
|
|
116
|
+
return 'middle';
|
|
117
|
+
}
|
|
118
|
+
if (adjustedAngle < 180) {
|
|
119
|
+
return 'start';
|
|
120
|
+
}
|
|
121
|
+
return 'end';
|
|
122
|
+
}
|
|
123
|
+
function getDefaultBaseline(angle, position) {
|
|
124
|
+
const adjustedAngle = (0, _clampAngle.clampAngle)(angle);
|
|
125
|
+
if (adjustedAngle === 0) {
|
|
126
|
+
return position === 'bottom' ? 'hanging' : 'auto';
|
|
127
|
+
}
|
|
128
|
+
if (adjustedAngle === 180) {
|
|
129
|
+
return position === 'bottom' ? 'auto' : 'hanging';
|
|
130
|
+
}
|
|
131
|
+
return 'central';
|
|
101
132
|
}
|
|
102
133
|
const XAxisRoot = (0, _styles.styled)(_AxisSharedComponents.AxisRoot, {
|
|
103
134
|
name: 'MuiChartsXAxis',
|
|
@@ -105,10 +136,10 @@ const XAxisRoot = (0, _styles.styled)(_AxisSharedComponents.AxisRoot, {
|
|
|
105
136
|
overridesResolver: (props, styles) => styles.root
|
|
106
137
|
})({});
|
|
107
138
|
const defaultProps = {
|
|
108
|
-
position: 'bottom',
|
|
109
139
|
disableLine: false,
|
|
110
140
|
disableTicks: false,
|
|
111
|
-
tickSize: 6
|
|
141
|
+
tickSize: 6,
|
|
142
|
+
tickLabelMinGap: 4
|
|
112
143
|
};
|
|
113
144
|
|
|
114
145
|
/**
|
|
@@ -153,12 +184,14 @@ function ChartsXAxis(inProps) {
|
|
|
153
184
|
tickLabelInterval,
|
|
154
185
|
tickPlacement,
|
|
155
186
|
tickLabelPlacement,
|
|
156
|
-
|
|
187
|
+
tickLabelMinGap,
|
|
188
|
+
sx,
|
|
189
|
+
offset,
|
|
190
|
+
height: axisHeight
|
|
157
191
|
} = defaultizedProps;
|
|
158
192
|
const theme = (0, _styles.useTheme)();
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
}));
|
|
193
|
+
const isRtl = (0, _RtlProvider.useRtl)();
|
|
194
|
+
const classes = useUtilityClasses(defaultizedProps);
|
|
162
195
|
const {
|
|
163
196
|
left,
|
|
164
197
|
top,
|
|
@@ -174,14 +207,16 @@ function ChartsXAxis(inProps) {
|
|
|
174
207
|
const Tick = slots?.axisTick ?? 'line';
|
|
175
208
|
const TickLabel = slots?.axisTickLabel ?? _ChartsText.ChartsText;
|
|
176
209
|
const Label = slots?.axisLabel ?? _ChartsText.ChartsText;
|
|
210
|
+
const defaultTextAnchor = getDefaultTextAnchor(tickLabelStyle?.angle ?? 0);
|
|
211
|
+
const shouldInvertTextAnchor = isRtl && position !== 'top' || !isRtl && position === 'top';
|
|
177
212
|
const axisTickLabelProps = (0, _useSlotProps.default)({
|
|
178
213
|
elementType: TickLabel,
|
|
179
214
|
externalSlotProps: slotProps?.axisTickLabel,
|
|
180
215
|
additionalProps: {
|
|
181
|
-
style: (0, _extends2.default)({
|
|
216
|
+
style: (0, _extends2.default)({}, theme.typography.caption, {
|
|
182
217
|
fontSize: 12,
|
|
183
|
-
textAnchor:
|
|
184
|
-
dominantBaseline:
|
|
218
|
+
textAnchor: shouldInvertTextAnchor ? (0, _invertTextAnchor.invertTextAnchor)(defaultTextAnchor) : defaultTextAnchor,
|
|
219
|
+
dominantBaseline: getDefaultBaseline(tickLabelStyle?.angle ?? 0, position)
|
|
185
220
|
}, tickLabelStyle)
|
|
186
221
|
},
|
|
187
222
|
className: classes.tickLabel,
|
|
@@ -195,21 +230,25 @@ function ChartsXAxis(inProps) {
|
|
|
195
230
|
tickPlacement,
|
|
196
231
|
tickLabelPlacement
|
|
197
232
|
});
|
|
198
|
-
const
|
|
233
|
+
const visibleLabels = getVisibleLabels(xTicks, {
|
|
199
234
|
tickLabelStyle: axisTickLabelProps.style,
|
|
200
235
|
tickLabelInterval,
|
|
236
|
+
tickLabelMinGap,
|
|
201
237
|
reverse,
|
|
202
|
-
isMounted
|
|
238
|
+
isMounted,
|
|
239
|
+
isPointInside: x => instance.isPointInside({
|
|
240
|
+
x,
|
|
241
|
+
y: -1
|
|
242
|
+
}, {
|
|
243
|
+
direction: 'x'
|
|
244
|
+
})
|
|
203
245
|
});
|
|
204
|
-
const labelRefPoint = {
|
|
205
|
-
x: left + width / 2,
|
|
206
|
-
y: positionSign * (tickSize + 22)
|
|
207
|
-
};
|
|
208
246
|
const axisLabelProps = (0, _useSlotProps.default)({
|
|
209
247
|
elementType: Label,
|
|
210
248
|
externalSlotProps: slotProps?.axisLabel,
|
|
211
249
|
additionalProps: {
|
|
212
|
-
style: (0, _extends2.default)({
|
|
250
|
+
style: (0, _extends2.default)({}, theme.typography.body1, {
|
|
251
|
+
lineHeight: 1,
|
|
213
252
|
fontSize: 14,
|
|
214
253
|
textAnchor: 'middle',
|
|
215
254
|
dominantBaseline: position === 'bottom' ? 'hanging' : 'auto'
|
|
@@ -222,44 +261,45 @@ function ChartsXAxis(inProps) {
|
|
|
222
261
|
// Skip axis rendering if no data is available
|
|
223
262
|
// - The domain is an empty array for band/point scales.
|
|
224
263
|
// - The domains contains Infinity for continuous scales.
|
|
225
|
-
|
|
264
|
+
// - The position is set to 'none'.
|
|
265
|
+
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(_isInfinity.isInfinity) || position === 'none') {
|
|
226
266
|
return null;
|
|
227
267
|
}
|
|
268
|
+
const labelHeight = label ? (0, _domUtils.getStringSize)(label, axisLabelProps.style).height : 0;
|
|
269
|
+
const labelRefPoint = {
|
|
270
|
+
x: left + width / 2,
|
|
271
|
+
y: positionSign * (axisHeight - labelHeight)
|
|
272
|
+
};
|
|
228
273
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(XAxisRoot, {
|
|
229
|
-
transform: `translate(0, ${position === 'bottom' ? top + height : top})`,
|
|
274
|
+
transform: `translate(0, ${position === 'bottom' ? top + height + offset : top - offset})`,
|
|
230
275
|
className: classes.root,
|
|
231
276
|
sx: sx,
|
|
232
277
|
children: [!disableLine && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, (0, _extends2.default)({
|
|
233
278
|
x1: left,
|
|
234
279
|
x2: left + width,
|
|
235
280
|
className: classes.line
|
|
236
|
-
}, slotProps?.axisLine)),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
281
|
+
}, slotProps?.axisLine)), xTicks.map((item, index) => {
|
|
282
|
+
const {
|
|
283
|
+
formattedValue,
|
|
284
|
+
offset: tickOffset,
|
|
285
|
+
labelOffset
|
|
286
|
+
} = item;
|
|
242
287
|
const xTickLabel = labelOffset ?? 0;
|
|
243
288
|
const yTickLabel = positionSign * (tickSize + 3);
|
|
244
289
|
const showTick = instance.isPointInside({
|
|
245
|
-
x:
|
|
246
|
-
y: -1
|
|
247
|
-
}, {
|
|
248
|
-
direction: 'x'
|
|
249
|
-
});
|
|
250
|
-
const showTickLabel = instance.isPointInside({
|
|
251
|
-
x: offset + xTickLabel,
|
|
290
|
+
x: tickOffset,
|
|
252
291
|
y: -1
|
|
253
292
|
}, {
|
|
254
293
|
direction: 'x'
|
|
255
294
|
});
|
|
295
|
+
const showTickLabel = visibleLabels.has(item);
|
|
256
296
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
257
|
-
transform: `translate(${
|
|
297
|
+
transform: `translate(${tickOffset}, 0)`,
|
|
258
298
|
className: classes.tickContainer,
|
|
259
299
|
children: [!disableTicks && showTick && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tick, (0, _extends2.default)({
|
|
260
300
|
y2: positionSign * tickSize,
|
|
261
301
|
className: classes.tick
|
|
262
|
-
}, slotProps?.axisTick)), formattedValue !== undefined &&
|
|
302
|
+
}, slotProps?.axisTick)), formattedValue !== undefined && showTickLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(TickLabel, (0, _extends2.default)({
|
|
263
303
|
x: xTickLabel,
|
|
264
304
|
y: yTickLabel
|
|
265
305
|
}, axisTickLabelProps, {
|
|
@@ -279,6 +319,7 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
279
319
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
280
320
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
281
321
|
// ----------------------------------------------------------------------
|
|
322
|
+
axis: _propTypes.default.oneOf(['x']),
|
|
282
323
|
/**
|
|
283
324
|
* The id of the axis to render.
|
|
284
325
|
* If undefined, it will be the first defined axis.
|
|
@@ -311,10 +352,6 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
311
352
|
* The style applied to the axis label.
|
|
312
353
|
*/
|
|
313
354
|
labelStyle: _propTypes.default.object,
|
|
314
|
-
/**
|
|
315
|
-
* Position of the axis.
|
|
316
|
-
*/
|
|
317
|
-
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
318
355
|
/**
|
|
319
356
|
* The props used for each component slot.
|
|
320
357
|
* @default {}
|
|
@@ -348,6 +385,12 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
348
385
|
* @default 'auto'
|
|
349
386
|
*/
|
|
350
387
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
388
|
+
/**
|
|
389
|
+
* The minimum gap in pixels between two tick labels.
|
|
390
|
+
* If two tick labels are closer than this minimum gap, one of them will be hidden.
|
|
391
|
+
* @default 4
|
|
392
|
+
*/
|
|
393
|
+
tickLabelMinGap: _propTypes.default.number,
|
|
351
394
|
/**
|
|
352
395
|
* The placement of ticks label. Can be the middle of the band, or the tick position.
|
|
353
396
|
* Only used if scale is 'band'.
|
|
@@ -15,6 +15,7 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
|
15
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
16
|
var _styles = require("@mui/material/styles");
|
|
17
17
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
18
|
+
var _domUtils = require("../internals/domUtils");
|
|
18
19
|
var _useTicks = require("../hooks/useTicks");
|
|
19
20
|
var _useDrawingArea = require("../hooks/useDrawingArea");
|
|
20
21
|
var _AxisSharedComponents = require("../internals/components/AxisSharedComponents");
|
|
@@ -47,7 +48,6 @@ const YAxisRoot = (0, _styles.styled)(_AxisSharedComponents.AxisRoot, {
|
|
|
47
48
|
overridesResolver: (props, styles) => styles.root
|
|
48
49
|
})({});
|
|
49
50
|
const defaultProps = {
|
|
50
|
-
position: 'left',
|
|
51
51
|
disableLine: false,
|
|
52
52
|
disableTicks: false,
|
|
53
53
|
tickSize: 6
|
|
@@ -93,13 +93,13 @@ function ChartsYAxis(inProps) {
|
|
|
93
93
|
tickLabelPlacement,
|
|
94
94
|
tickInterval,
|
|
95
95
|
tickLabelInterval,
|
|
96
|
-
sx
|
|
96
|
+
sx,
|
|
97
|
+
offset,
|
|
98
|
+
width: axisWidth
|
|
97
99
|
} = defaultizedProps;
|
|
98
100
|
const theme = (0, _styles.useTheme)();
|
|
99
101
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
100
|
-
const classes = useUtilityClasses(
|
|
101
|
-
theme
|
|
102
|
-
}));
|
|
102
|
+
const classes = useUtilityClasses(defaultizedProps);
|
|
103
103
|
const {
|
|
104
104
|
instance
|
|
105
105
|
} = (0, _ChartProvider.useChartContext)();
|
|
@@ -120,10 +120,6 @@ function ChartsYAxis(inProps) {
|
|
|
120
120
|
});
|
|
121
121
|
const positionSign = position === 'right' ? 1 : -1;
|
|
122
122
|
const tickFontSize = typeof tickLabelStyle?.fontSize === 'number' ? tickLabelStyle.fontSize : 12;
|
|
123
|
-
const labelRefPoint = {
|
|
124
|
-
x: positionSign * (tickFontSize + tickSize + 10),
|
|
125
|
-
y: top + height / 2
|
|
126
|
-
};
|
|
127
123
|
const Line = slots?.axisLine ?? 'line';
|
|
128
124
|
const Tick = slots?.axisTick ?? 'line';
|
|
129
125
|
const TickLabel = slots?.axisTickLabel ?? _ChartsText.ChartsText;
|
|
@@ -133,7 +129,7 @@ function ChartsYAxis(inProps) {
|
|
|
133
129
|
elementType: TickLabel,
|
|
134
130
|
externalSlotProps: slotProps?.axisTickLabel,
|
|
135
131
|
additionalProps: {
|
|
136
|
-
style: (0, _extends2.default)({
|
|
132
|
+
style: (0, _extends2.default)({}, theme.typography.caption, {
|
|
137
133
|
fontSize: tickFontSize,
|
|
138
134
|
textAnchor: revertAnchor ? 'start' : 'end',
|
|
139
135
|
dominantBaseline: 'central'
|
|
@@ -146,7 +142,8 @@ function ChartsYAxis(inProps) {
|
|
|
146
142
|
elementType: Label,
|
|
147
143
|
externalSlotProps: slotProps?.axisLabel,
|
|
148
144
|
additionalProps: {
|
|
149
|
-
style: (0, _extends2.default)({
|
|
145
|
+
style: (0, _extends2.default)({}, theme.typography.body1, {
|
|
146
|
+
lineHeight: 1,
|
|
150
147
|
fontSize: 14,
|
|
151
148
|
angle: positionSign * 90,
|
|
152
149
|
textAnchor: 'middle',
|
|
@@ -165,14 +162,21 @@ function ChartsYAxis(inProps) {
|
|
|
165
162
|
});
|
|
166
163
|
const domain = yScale.domain();
|
|
167
164
|
const ordinalAxis = (0, _isBandScale.isBandScale)(yScale);
|
|
165
|
+
|
|
168
166
|
// Skip axis rendering if no data is available
|
|
169
167
|
// - The domain is an empty array for band/point scales.
|
|
170
168
|
// - The domains contains Infinity for continuous scales.
|
|
171
|
-
|
|
169
|
+
// - The position is 'none'.
|
|
170
|
+
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(_isInfinity.isInfinity) || position === 'none') {
|
|
172
171
|
return null;
|
|
173
172
|
}
|
|
173
|
+
const labelHeight = label ? (0, _domUtils.getStringSize)(label, axisLabelProps.style).height : 0;
|
|
174
|
+
const labelRefPoint = {
|
|
175
|
+
x: positionSign * (axisWidth - labelHeight),
|
|
176
|
+
y: top + height / 2
|
|
177
|
+
};
|
|
174
178
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(YAxisRoot, {
|
|
175
|
-
transform: `translate(${position === 'right' ? left + width : left}, 0)`,
|
|
179
|
+
transform: `translate(${position === 'right' ? left + width + offset : left - offset}, 0)`,
|
|
176
180
|
className: classes.root,
|
|
177
181
|
sx: sx,
|
|
178
182
|
children: [!disableLine && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, (0, _extends2.default)({
|
|
@@ -181,7 +185,7 @@ function ChartsYAxis(inProps) {
|
|
|
181
185
|
className: classes.line
|
|
182
186
|
}, lineSlotProps)), yTicks.map(({
|
|
183
187
|
formattedValue,
|
|
184
|
-
offset,
|
|
188
|
+
offset: tickOffset,
|
|
185
189
|
labelOffset,
|
|
186
190
|
value
|
|
187
191
|
}, index) => {
|
|
@@ -190,7 +194,7 @@ function ChartsYAxis(inProps) {
|
|
|
190
194
|
const skipLabel = typeof tickLabelInterval === 'function' && !tickLabelInterval?.(value, index);
|
|
191
195
|
const showLabel = instance.isPointInside({
|
|
192
196
|
x: -1,
|
|
193
|
-
y:
|
|
197
|
+
y: tickOffset
|
|
194
198
|
}, {
|
|
195
199
|
direction: 'y'
|
|
196
200
|
});
|
|
@@ -198,7 +202,7 @@ function ChartsYAxis(inProps) {
|
|
|
198
202
|
return null;
|
|
199
203
|
}
|
|
200
204
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
201
|
-
transform: `translate(0, ${
|
|
205
|
+
transform: `translate(0, ${tickOffset})`,
|
|
202
206
|
className: classes.tickContainer,
|
|
203
207
|
children: [!disableTicks && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tick, (0, _extends2.default)({
|
|
204
208
|
x2: positionSign * tickSize,
|
|
@@ -222,6 +226,7 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
222
226
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
223
227
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
224
228
|
// ----------------------------------------------------------------------
|
|
229
|
+
axis: _propTypes.default.oneOf(['y']),
|
|
225
230
|
/**
|
|
226
231
|
* The id of the axis to render.
|
|
227
232
|
* If undefined, it will be the first defined axis.
|
|
@@ -254,10 +259,6 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
254
259
|
* The style applied to the axis label.
|
|
255
260
|
*/
|
|
256
261
|
labelStyle: _propTypes.default.object,
|
|
257
|
-
/**
|
|
258
|
-
* Position of the axis.
|
|
259
|
-
*/
|
|
260
|
-
position: _propTypes.default.oneOf(['left', 'right']),
|
|
261
262
|
/**
|
|
262
263
|
* The props used for each component slot.
|
|
263
264
|
* @default {}
|
package/Gauge/Gauge.js
CHANGED
|
@@ -104,14 +104,15 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
104
104
|
/**
|
|
105
105
|
* The margin between the SVG and the drawing area.
|
|
106
106
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
107
|
-
*
|
|
107
|
+
*
|
|
108
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
108
109
|
*/
|
|
109
|
-
margin: _propTypes.default.shape({
|
|
110
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
110
111
|
bottom: _propTypes.default.number,
|
|
111
112
|
left: _propTypes.default.number,
|
|
112
113
|
right: _propTypes.default.number,
|
|
113
114
|
top: _propTypes.default.number
|
|
114
|
-
}),
|
|
115
|
+
})]),
|
|
115
116
|
/**
|
|
116
117
|
* The radius between circle center and the end of the arc.
|
|
117
118
|
* Can be a number (in px) or a string with a percentage such as '50%'.
|
package/Gauge/GaugeContainer.js
CHANGED
|
@@ -15,6 +15,7 @@ var _styles = require("@mui/material/styles");
|
|
|
15
15
|
var _ChartsSurface = require("../ChartsSurface");
|
|
16
16
|
var _GaugeProvider = require("./GaugeProvider");
|
|
17
17
|
var _ChartProvider = require("../context/ChartProvider");
|
|
18
|
+
var _defaultizeMargin = require("../internals/defaultizeMargin");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
const _excluded = ["width", "height", "margin", "title", "desc", "value", "valueMin", "valueMax", "startAngle", "endAngle", "outerRadius", "innerRadius", "cornerRadius", "cx", "cy", "children"];
|
|
20
21
|
const GStyled = (0, _styles.styled)('g')(({
|
|
@@ -48,12 +49,12 @@ const GaugeContainer = exports.GaugeContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
48
49
|
pluginParams: {
|
|
49
50
|
width: inWidth,
|
|
50
51
|
height: inHeight,
|
|
51
|
-
margin: (0,
|
|
52
|
+
margin: (0, _defaultizeMargin.defaultizeMargin)(margin, {
|
|
52
53
|
left: 10,
|
|
53
54
|
right: 10,
|
|
54
55
|
top: 10,
|
|
55
56
|
bottom: 10
|
|
56
|
-
}
|
|
57
|
+
})
|
|
57
58
|
},
|
|
58
59
|
plugins: [],
|
|
59
60
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GaugeProvider.GaugeProvider, {
|
|
@@ -134,14 +135,15 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
134
135
|
/**
|
|
135
136
|
* The margin between the SVG and the drawing area.
|
|
136
137
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
137
|
-
*
|
|
138
|
+
*
|
|
139
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
138
140
|
*/
|
|
139
|
-
margin: _propTypes.default.shape({
|
|
141
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
140
142
|
bottom: _propTypes.default.number,
|
|
141
143
|
left: _propTypes.default.number,
|
|
142
144
|
right: _propTypes.default.number,
|
|
143
145
|
top: _propTypes.default.number
|
|
144
|
-
}),
|
|
146
|
+
})]),
|
|
145
147
|
/**
|
|
146
148
|
* The radius between circle center and the end of the arc.
|
|
147
149
|
* Can be a number (in px) or a string with a percentage such as '50%'.
|
package/LineChart/LineChart.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface LineChartProps extends Omit<ChartContainerProps<'line', LineCha
|
|
|
21
21
|
* The series to display in the line chart.
|
|
22
22
|
* An array of [[LineSeriesType]] objects.
|
|
23
23
|
*/
|
|
24
|
-
series: MakeOptional<LineSeriesType, 'type'>[]
|
|
24
|
+
series: Readonly<MakeOptional<LineSeriesType, 'type'>[]>;
|
|
25
25
|
/**
|
|
26
26
|
* Option to display a cartesian grid in the background.
|
|
27
27
|
*/
|
package/LineChart/LineChart.js
CHANGED
|
@@ -94,12 +94,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
94
94
|
x: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
95
95
|
y: _propTypes.default.oneOf(['band', 'line', 'none'])
|
|
96
96
|
}),
|
|
97
|
-
/**
|
|
98
|
-
* Indicate which axis to display the bottom of the charts.
|
|
99
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
100
|
-
* @default xAxisIds[0] The id of the first provided axis
|
|
101
|
-
*/
|
|
102
|
-
bottomAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
103
97
|
children: _propTypes.default.node,
|
|
104
98
|
className: _propTypes.default.string,
|
|
105
99
|
/**
|
|
@@ -150,12 +144,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
150
144
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
151
145
|
*/
|
|
152
146
|
id: _propTypes.default.string,
|
|
153
|
-
/**
|
|
154
|
-
* Indicate which axis to display the left of the charts.
|
|
155
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
156
|
-
* @default yAxisIds[0] The id of the first provided axis
|
|
157
|
-
*/
|
|
158
|
-
leftAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
159
147
|
/**
|
|
160
148
|
* If `true`, a loading overlay is displayed.
|
|
161
149
|
* @default false
|
|
@@ -164,14 +152,15 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
164
152
|
/**
|
|
165
153
|
* The margin between the SVG and the drawing area.
|
|
166
154
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
167
|
-
*
|
|
155
|
+
*
|
|
156
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
168
157
|
*/
|
|
169
|
-
margin: _propTypes.default.shape({
|
|
158
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
170
159
|
bottom: _propTypes.default.number,
|
|
171
160
|
left: _propTypes.default.number,
|
|
172
161
|
right: _propTypes.default.number,
|
|
173
162
|
top: _propTypes.default.number
|
|
174
|
-
}),
|
|
163
|
+
})]),
|
|
175
164
|
/**
|
|
176
165
|
* Callback fired when an area element is clicked.
|
|
177
166
|
*/
|
|
@@ -197,12 +186,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
197
186
|
* Callback fired when a mark element is clicked.
|
|
198
187
|
*/
|
|
199
188
|
onMarkClick: _propTypes.default.func,
|
|
200
|
-
/**
|
|
201
|
-
* Indicate which axis to display the right of the charts.
|
|
202
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
203
|
-
* @default null
|
|
204
|
-
*/
|
|
205
|
-
rightAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
206
189
|
/**
|
|
207
190
|
* The series to display in the line chart.
|
|
208
191
|
* An array of [[LineSeriesType]] objects.
|
|
@@ -226,12 +209,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
226
209
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
227
210
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
228
211
|
title: _propTypes.default.string,
|
|
229
|
-
/**
|
|
230
|
-
* Indicate which axis to display the top of the charts.
|
|
231
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
232
|
-
* @default null
|
|
233
|
-
*/
|
|
234
|
-
topAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
235
212
|
/**
|
|
236
213
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
237
214
|
*/
|
|
@@ -242,6 +219,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
242
219
|
* An array of [[AxisConfig]] objects.
|
|
243
220
|
*/
|
|
244
221
|
xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
222
|
+
axis: _propTypes.default.oneOf(['x']),
|
|
245
223
|
classes: _propTypes.default.object,
|
|
246
224
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
247
225
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
@@ -264,13 +242,15 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
264
242
|
disableTicks: _propTypes.default.bool,
|
|
265
243
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
266
244
|
fill: _propTypes.default.string,
|
|
245
|
+
height: _propTypes.default.number,
|
|
267
246
|
hideTooltip: _propTypes.default.bool,
|
|
268
247
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
269
248
|
label: _propTypes.default.string,
|
|
270
249
|
labelStyle: _propTypes.default.object,
|
|
271
250
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
272
251
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
273
|
-
|
|
252
|
+
offset: _propTypes.default.number,
|
|
253
|
+
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
274
254
|
reverse: _propTypes.default.bool,
|
|
275
255
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
276
256
|
slotProps: _propTypes.default.object,
|
|
@@ -279,6 +259,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
279
259
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
280
260
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
281
261
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
262
|
+
tickLabelMinGap: _propTypes.default.number,
|
|
282
263
|
tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
|
|
283
264
|
tickLabelStyle: _propTypes.default.object,
|
|
284
265
|
tickMaxStep: _propTypes.default.number,
|
|
@@ -294,6 +275,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
294
275
|
* An array of [[AxisConfig]] objects.
|
|
295
276
|
*/
|
|
296
277
|
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
278
|
+
axis: _propTypes.default.oneOf(['y']),
|
|
297
279
|
classes: _propTypes.default.object,
|
|
298
280
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
299
281
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
@@ -322,7 +304,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
322
304
|
labelStyle: _propTypes.default.object,
|
|
323
305
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
324
306
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
325
|
-
|
|
307
|
+
offset: _propTypes.default.number,
|
|
308
|
+
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
326
309
|
reverse: _propTypes.default.bool,
|
|
327
310
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
328
311
|
slotProps: _propTypes.default.object,
|
|
@@ -338,6 +321,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
338
321
|
tickNumber: _propTypes.default.number,
|
|
339
322
|
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
340
323
|
tickSize: _propTypes.default.number,
|
|
341
|
-
valueFormatter: _propTypes.default.func
|
|
324
|
+
valueFormatter: _propTypes.default.func,
|
|
325
|
+
width: _propTypes.default.number
|
|
342
326
|
}))
|
|
343
327
|
} : void 0;
|
package/LineChart/LinePlot.js
CHANGED
|
@@ -12,6 +12,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
|
+
var _warning = require("@mui/x-internals/warning");
|
|
15
16
|
var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
16
17
|
var _LineElement = require("./LineElement");
|
|
17
18
|
var _useScale = require("../hooks/useScale");
|
|
@@ -79,7 +80,7 @@ const useAggregatedData = () => {
|
|
|
79
80
|
throw new Error(`MUI X: ${xAxisId === _constants.DEFAULT_X_AXIS_KEY ? 'The first `xAxis`' : `The x-axis with id "${xAxisId}"`} should have data property to be able to display a line plot.`);
|
|
80
81
|
}
|
|
81
82
|
if (xData.length < stackedData.length) {
|
|
82
|
-
|
|
83
|
+
(0, _warning.warnOnce)(`MUI X: The data length of the x axis (${xData.length} items) is lower than the length of series (${stackedData.length} items).`, 'error');
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
const shouldExpand = curve?.includes('step') && !strictStepCurve && (0, _isBandScale.isBandScale)(xScale);
|