@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
package/esm/BarChart/BarChart.js
CHANGED
|
@@ -92,12 +92,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
92
92
|
* Defines the border radius of the bar element.
|
|
93
93
|
*/
|
|
94
94
|
borderRadius: PropTypes.number,
|
|
95
|
-
/**
|
|
96
|
-
* Indicate which axis to display the bottom of the charts.
|
|
97
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
98
|
-
* @default xAxisIds[0] The id of the first provided axis
|
|
99
|
-
*/
|
|
100
|
-
bottomAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
101
95
|
children: PropTypes.node,
|
|
102
96
|
className: PropTypes.string,
|
|
103
97
|
/**
|
|
@@ -149,12 +143,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
149
143
|
* @default 'vertical'
|
|
150
144
|
*/
|
|
151
145
|
layout: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
152
|
-
/**
|
|
153
|
-
* Indicate which axis to display the left of the charts.
|
|
154
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
155
|
-
* @default yAxisIds[0] The id of the first provided axis
|
|
156
|
-
*/
|
|
157
|
-
leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
158
146
|
/**
|
|
159
147
|
* If `true`, a loading overlay is displayed.
|
|
160
148
|
* @default false
|
|
@@ -163,14 +151,15 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
163
151
|
/**
|
|
164
152
|
* The margin between the SVG and the drawing area.
|
|
165
153
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
166
|
-
*
|
|
154
|
+
*
|
|
155
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
167
156
|
*/
|
|
168
|
-
margin: PropTypes.shape({
|
|
157
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
169
158
|
bottom: PropTypes.number,
|
|
170
159
|
left: PropTypes.number,
|
|
171
160
|
right: PropTypes.number,
|
|
172
161
|
top: PropTypes.number
|
|
173
|
-
}),
|
|
162
|
+
})]),
|
|
174
163
|
/**
|
|
175
164
|
* The function called for onClick events.
|
|
176
165
|
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
@@ -190,12 +179,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
190
179
|
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
191
180
|
*/
|
|
192
181
|
onItemClick: PropTypes.func,
|
|
193
|
-
/**
|
|
194
|
-
* Indicate which axis to display the right of the charts.
|
|
195
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
196
|
-
* @default null
|
|
197
|
-
*/
|
|
198
|
-
rightAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
199
182
|
/**
|
|
200
183
|
* The series to display in the bar chart.
|
|
201
184
|
* An array of [[BarSeriesType]] objects.
|
|
@@ -219,12 +202,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
219
202
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
220
203
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
221
204
|
title: PropTypes.string,
|
|
222
|
-
/**
|
|
223
|
-
* Indicate which axis to display the top of the charts.
|
|
224
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
225
|
-
* @default null
|
|
226
|
-
*/
|
|
227
|
-
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
228
205
|
/**
|
|
229
206
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
230
207
|
*/
|
|
@@ -235,6 +212,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
235
212
|
* An array of [[AxisConfig]] objects.
|
|
236
213
|
*/
|
|
237
214
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
215
|
+
axis: PropTypes.oneOf(['x']),
|
|
238
216
|
classes: PropTypes.object,
|
|
239
217
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
240
218
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -257,13 +235,15 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
257
235
|
disableTicks: PropTypes.bool,
|
|
258
236
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
259
237
|
fill: PropTypes.string,
|
|
238
|
+
height: PropTypes.number,
|
|
260
239
|
hideTooltip: PropTypes.bool,
|
|
261
240
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
262
241
|
label: PropTypes.string,
|
|
263
242
|
labelStyle: PropTypes.object,
|
|
264
243
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
265
244
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
266
|
-
|
|
245
|
+
offset: PropTypes.number,
|
|
246
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
267
247
|
reverse: PropTypes.bool,
|
|
268
248
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
269
249
|
slotProps: PropTypes.object,
|
|
@@ -272,6 +252,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
272
252
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
273
253
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
274
254
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
255
|
+
tickLabelMinGap: PropTypes.number,
|
|
275
256
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
276
257
|
tickLabelStyle: PropTypes.object,
|
|
277
258
|
tickMaxStep: PropTypes.number,
|
|
@@ -287,6 +268,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
287
268
|
* An array of [[AxisConfig]] objects.
|
|
288
269
|
*/
|
|
289
270
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
271
|
+
axis: PropTypes.oneOf(['y']),
|
|
290
272
|
classes: PropTypes.object,
|
|
291
273
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
292
274
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -315,7 +297,8 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
315
297
|
labelStyle: PropTypes.object,
|
|
316
298
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
317
299
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
318
|
-
|
|
300
|
+
offset: PropTypes.number,
|
|
301
|
+
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
319
302
|
reverse: PropTypes.bool,
|
|
320
303
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
321
304
|
slotProps: PropTypes.object,
|
|
@@ -331,7 +314,8 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
331
314
|
tickNumber: PropTypes.number,
|
|
332
315
|
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
333
316
|
tickSize: PropTypes.number,
|
|
334
|
-
valueFormatter: PropTypes.func
|
|
317
|
+
valueFormatter: PropTypes.func,
|
|
318
|
+
width: PropTypes.number
|
|
335
319
|
}))
|
|
336
320
|
} : void 0;
|
|
337
321
|
export { BarChart };
|
package/esm/BarChart/BarPlot.js
CHANGED
|
@@ -79,7 +79,7 @@ const useAggregatedData = () => {
|
|
|
79
79
|
const xAxisConfig = xAxis[xAxisId];
|
|
80
80
|
const yAxisConfig = yAxis[yAxisId];
|
|
81
81
|
const verticalLayout = series[seriesId].layout === 'vertical';
|
|
82
|
-
checkScaleErrors(verticalLayout, seriesId, xAxisId, xAxis, yAxisId, yAxis);
|
|
82
|
+
checkScaleErrors(verticalLayout, seriesId, series[seriesId], xAxisId, xAxis, yAxisId, yAxis);
|
|
83
83
|
const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
84
84
|
const xScale = xAxisConfig.scale;
|
|
85
85
|
const yScale = yAxisConfig.scale;
|
|
@@ -95,9 +95,12 @@ const useAggregatedData = () => {
|
|
|
95
95
|
});
|
|
96
96
|
const barOffset = groupIndex * (barWidth + offset);
|
|
97
97
|
const {
|
|
98
|
-
stackedData
|
|
98
|
+
stackedData,
|
|
99
|
+
data: currentSeriesData,
|
|
100
|
+
layout
|
|
99
101
|
} = series[seriesId];
|
|
100
|
-
return
|
|
102
|
+
return baseScaleConfig.data.map((baseValue, dataIndex) => {
|
|
103
|
+
const values = stackedData[dataIndex];
|
|
101
104
|
const valueCoordinates = values.map(v => verticalLayout ? yScale(v) : xScale(v));
|
|
102
105
|
const minValueCoord = Math.round(Math.min(...valueCoordinates));
|
|
103
106
|
const maxValueCoord = Math.round(Math.max(...valueCoordinates));
|
|
@@ -105,15 +108,15 @@ const useAggregatedData = () => {
|
|
|
105
108
|
const result = {
|
|
106
109
|
seriesId,
|
|
107
110
|
dataIndex,
|
|
108
|
-
layout
|
|
109
|
-
x: verticalLayout ? xScale(
|
|
110
|
-
y: verticalLayout ? minValueCoord : yScale(
|
|
111
|
+
layout,
|
|
112
|
+
x: verticalLayout ? xScale(baseValue) + barOffset : minValueCoord,
|
|
113
|
+
y: verticalLayout ? minValueCoord : yScale(baseValue) + barOffset,
|
|
111
114
|
xOrigin: xScale(0),
|
|
112
115
|
yOrigin: yScale(0),
|
|
113
116
|
height: verticalLayout ? maxValueCoord - minValueCoord : barWidth,
|
|
114
117
|
width: verticalLayout ? barWidth : maxValueCoord - minValueCoord,
|
|
115
118
|
color: colorGetter(dataIndex),
|
|
116
|
-
value:
|
|
119
|
+
value: currentSeriesData[dataIndex],
|
|
117
120
|
maskId: `${chartId}_${stackId || seriesId}_${groupIndex}_${dataIndex}`
|
|
118
121
|
};
|
|
119
122
|
if (result.x > xMax || result.x + result.width < xMin || result.y > yMax || result.y + result.height < yMin) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { AxisDefaultized, AxisId } from "../models/axis.js";
|
|
2
|
+
import { DefaultizedBarSeriesType } from "../models/seriesType/bar.js";
|
|
2
3
|
import { SeriesId } from "../models/seriesType/common.js";
|
|
3
|
-
export declare function checkScaleErrors(verticalLayout: boolean, seriesId: SeriesId,
|
|
4
|
+
export declare function checkScaleErrors(verticalLayout: boolean, seriesId: SeriesId, series: DefaultizedBarSeriesType & {
|
|
5
|
+
stackedData: [number, number][];
|
|
6
|
+
}, xAxisId: AxisId, xAxis: {
|
|
4
7
|
[axisId: AxisId]: AxisDefaultized;
|
|
5
8
|
}, yAxisId: AxisId, yAxis: {
|
|
6
9
|
[axisId: AxisId]: AxisDefaultized;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
1
2
|
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../constants/index.js";
|
|
2
3
|
import { isBandScaleConfig, isPointScaleConfig } from "../models/axis.js";
|
|
3
4
|
const getAxisMessage = (axisDirection, axisId) => {
|
|
@@ -6,7 +7,7 @@ const getAxisMessage = (axisDirection, axisId) => {
|
|
|
6
7
|
const axisDefaultKey = axisDirection === 'x' ? DEFAULT_X_AXIS_KEY : DEFAULT_Y_AXIS_KEY;
|
|
7
8
|
return axisId === axisDefaultKey ? `The first \`${axisIdName}\`` : `The ${axisName} with id "${axisId}"`;
|
|
8
9
|
};
|
|
9
|
-
export function checkScaleErrors(verticalLayout, seriesId, xAxisId, xAxis, yAxisId, yAxis) {
|
|
10
|
+
export function checkScaleErrors(verticalLayout, seriesId, series, xAxisId, xAxis, yAxisId, yAxis) {
|
|
10
11
|
const xAxisConfig = xAxis[xAxisId];
|
|
11
12
|
const yAxisConfig = yAxis[yAxisId];
|
|
12
13
|
const discreteAxisConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
@@ -24,4 +25,9 @@ export function checkScaleErrors(verticalLayout, seriesId, xAxisId, xAxis, yAxis
|
|
|
24
25
|
if (isBandScaleConfig(continuousAxisConfig) || isPointScaleConfig(continuousAxisConfig)) {
|
|
25
26
|
throw new Error(`MUI X: ${getAxisMessage(continuousAxisDirection, continuousAxisId)} should be a continuous type to display the bar series of id "${seriesId}".`);
|
|
26
27
|
}
|
|
28
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
29
|
+
if (discreteAxisConfig.data.length < series.stackedData.length) {
|
|
30
|
+
warnOnce([`MUI X: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} has less data (${discreteAxisConfig.data.length} values) than the bar series of id "${seriesId}" (${series.stackedData.length} values).`, 'The axis data should have at least the same length than the series using it.'], 'error');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
27
33
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CartesianExtremumGetter } from "../../internals/plugins/models/seriesConfig/
|
|
1
|
+
import { CartesianExtremumGetter } from "../../internals/plugins/models/seriesConfig/index.js";
|
|
2
2
|
export declare const getExtremumX: CartesianExtremumGetter<'bar'>;
|
|
3
3
|
export declare const getExtremumY: CartesianExtremumGetter<'bar'>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
3
|
+
return _extends({
|
|
4
|
+
id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,
|
|
5
|
+
color: colors[seriesIndex % colors.length]
|
|
6
|
+
}, seriesData);
|
|
7
|
+
};
|
|
8
|
+
export default getSeriesWithDefaultValues;
|
|
@@ -3,11 +3,13 @@ import seriesProcessor from "./seriesProcessor.js";
|
|
|
3
3
|
import legendGetter from "./legend.js";
|
|
4
4
|
import getColor from "./getColor.js";
|
|
5
5
|
import tooltipGetter from "./tooltip.js";
|
|
6
|
+
import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.js";
|
|
6
7
|
export const seriesConfig = {
|
|
7
8
|
seriesProcessor,
|
|
8
9
|
colorProcessor: getColor,
|
|
9
10
|
legendGetter,
|
|
10
11
|
tooltipGetter,
|
|
11
12
|
xExtremumGetter: getExtremumX,
|
|
12
|
-
yExtremumGetter: getExtremumY
|
|
13
|
+
yExtremumGetter: getExtremumY,
|
|
14
|
+
getSeriesWithDefaultValues
|
|
13
15
|
};
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "axisHighlight", "grid", "
|
|
5
|
+
const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "axisHighlight", "grid", "children", "slots", "slotProps", "skipAnimation", "loading", "layout", "onItemClick", "highlightedItem", "onHighlightChange", "borderRadius", "barLabel", "className", "hideLegend"];
|
|
6
6
|
import useId from '@mui/utils/useId';
|
|
7
7
|
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../constants/index.js";
|
|
8
|
-
import { calculateMargins } from "../internals/calculateMargins.js";
|
|
9
8
|
import { BAR_CHART_PLUGINS } from "./BarChart.plugins.js";
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -28,10 +27,6 @@ export const useBarChartProps = props => {
|
|
|
28
27
|
sx,
|
|
29
28
|
axisHighlight,
|
|
30
29
|
grid,
|
|
31
|
-
topAxis,
|
|
32
|
-
leftAxis,
|
|
33
|
-
rightAxis,
|
|
34
|
-
bottomAxis,
|
|
35
30
|
children,
|
|
36
31
|
slots,
|
|
37
32
|
slotProps,
|
|
@@ -43,8 +38,7 @@ export const useBarChartProps = props => {
|
|
|
43
38
|
onHighlightChange,
|
|
44
39
|
borderRadius,
|
|
45
40
|
barLabel,
|
|
46
|
-
className
|
|
47
|
-
hideLegend
|
|
41
|
+
className
|
|
48
42
|
} = props,
|
|
49
43
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
50
44
|
const id = useId();
|
|
@@ -64,12 +58,7 @@ export const useBarChartProps = props => {
|
|
|
64
58
|
})),
|
|
65
59
|
width,
|
|
66
60
|
height,
|
|
67
|
-
margin
|
|
68
|
-
margin,
|
|
69
|
-
hideLegend,
|
|
70
|
-
slotProps,
|
|
71
|
-
series
|
|
72
|
-
}),
|
|
61
|
+
margin,
|
|
73
62
|
colors,
|
|
74
63
|
dataset,
|
|
75
64
|
xAxis: xAxis ?? (hasHorizontalSeries ? undefined : [_extends({
|
|
@@ -108,10 +97,6 @@ export const useBarChartProps = props => {
|
|
|
108
97
|
loading
|
|
109
98
|
};
|
|
110
99
|
const chartsAxisProps = {
|
|
111
|
-
topAxis,
|
|
112
|
-
leftAxis,
|
|
113
|
-
rightAxis,
|
|
114
|
-
bottomAxis,
|
|
115
100
|
slots,
|
|
116
101
|
slotProps
|
|
117
102
|
};
|
|
@@ -3,7 +3,7 @@ import { ChartSeriesType } from "../models/seriesType/config.js";
|
|
|
3
3
|
import { ChartDataProviderProps } from "../ChartDataProvider/index.js";
|
|
4
4
|
import { ChartsSurfaceProps } from "../ChartsSurface/index.js";
|
|
5
5
|
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
6
|
-
import { ChartAnyPluginSignature } from "../internals/plugins/models/
|
|
6
|
+
import { ChartAnyPluginSignature } from "../internals/plugins/models/plugin.js";
|
|
7
7
|
export type ChartContainerProps<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>> = Omit<ChartDataProviderProps<SeriesType, TSignatures>, 'children'> & ChartsSurfaceProps;
|
|
8
8
|
/**
|
|
9
9
|
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
@@ -25,7 +25,7 @@ export type ChartContainerProps<SeriesType extends ChartSeriesType = ChartSeries
|
|
|
25
25
|
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
26
26
|
* >
|
|
27
27
|
* <BarPlot />
|
|
28
|
-
* <ChartsXAxis
|
|
28
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
29
29
|
* </ChartContainer>
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
@@ -27,7 +27,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
27
27
|
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
28
28
|
* >
|
|
29
29
|
* <BarPlot />
|
|
30
|
-
* <ChartsXAxis
|
|
30
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
31
31
|
* </ChartContainer>
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
@@ -96,14 +96,15 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
96
96
|
/**
|
|
97
97
|
* The margin between the SVG and the drawing area.
|
|
98
98
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
99
|
-
*
|
|
99
|
+
*
|
|
100
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
100
101
|
*/
|
|
101
|
-
margin: PropTypes.shape({
|
|
102
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
102
103
|
bottom: PropTypes.number,
|
|
103
104
|
left: PropTypes.number,
|
|
104
105
|
right: PropTypes.number,
|
|
105
106
|
top: PropTypes.number
|
|
106
|
-
}),
|
|
107
|
+
})]),
|
|
107
108
|
/**
|
|
108
109
|
* The function called for onClick events.
|
|
109
110
|
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
@@ -124,6 +125,113 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
124
125
|
* @param {ScatterItemIdentifier} scatterItemIdentifier Identify which item got clicked
|
|
125
126
|
*/
|
|
126
127
|
onItemClick: PropTypes.func,
|
|
128
|
+
/**
|
|
129
|
+
* The configuration of the radial-axes.
|
|
130
|
+
* If not provided, a default axis config is used.
|
|
131
|
+
* An array of [[AxisConfig]] objects.
|
|
132
|
+
*/
|
|
133
|
+
radiusAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
134
|
+
classes: PropTypes.object,
|
|
135
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
136
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
137
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
138
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
139
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
140
|
+
}), PropTypes.shape({
|
|
141
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
142
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
143
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
144
|
+
})]),
|
|
145
|
+
data: PropTypes.array,
|
|
146
|
+
dataKey: PropTypes.string,
|
|
147
|
+
disableLine: PropTypes.bool,
|
|
148
|
+
disableTicks: PropTypes.bool,
|
|
149
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
150
|
+
fill: PropTypes.string,
|
|
151
|
+
height: PropTypes.number,
|
|
152
|
+
hideTooltip: PropTypes.bool,
|
|
153
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
154
|
+
label: PropTypes.string,
|
|
155
|
+
labelStyle: PropTypes.object,
|
|
156
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
157
|
+
maxRadius: PropTypes.number,
|
|
158
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
159
|
+
minRadius: PropTypes.number,
|
|
160
|
+
offset: PropTypes.number,
|
|
161
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
162
|
+
reverse: PropTypes.bool,
|
|
163
|
+
scaleType: PropTypes.oneOf(['linear']),
|
|
164
|
+
slotProps: PropTypes.object,
|
|
165
|
+
slots: PropTypes.object,
|
|
166
|
+
stroke: PropTypes.string,
|
|
167
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
168
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
169
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
170
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
171
|
+
tickLabelStyle: PropTypes.object,
|
|
172
|
+
tickMaxStep: PropTypes.number,
|
|
173
|
+
tickMinStep: PropTypes.number,
|
|
174
|
+
tickNumber: PropTypes.number,
|
|
175
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
176
|
+
tickSize: PropTypes.number,
|
|
177
|
+
valueFormatter: PropTypes.func
|
|
178
|
+
})),
|
|
179
|
+
/**
|
|
180
|
+
* The configuration of the rotation-axes.
|
|
181
|
+
* If not provided, a default axis config is used.
|
|
182
|
+
* An array of [[AxisConfig]] objects.
|
|
183
|
+
*/
|
|
184
|
+
rotationAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
185
|
+
classes: PropTypes.object,
|
|
186
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
187
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
188
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
189
|
+
unknownColor: PropTypes.string,
|
|
190
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
191
|
+
}), PropTypes.shape({
|
|
192
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
193
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
194
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
195
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
196
|
+
}), PropTypes.shape({
|
|
197
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
198
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
199
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
200
|
+
})]),
|
|
201
|
+
data: PropTypes.array,
|
|
202
|
+
dataKey: PropTypes.string,
|
|
203
|
+
disableLine: PropTypes.bool,
|
|
204
|
+
disableTicks: PropTypes.bool,
|
|
205
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
206
|
+
endAngle: PropTypes.number,
|
|
207
|
+
fill: PropTypes.string,
|
|
208
|
+
height: PropTypes.number,
|
|
209
|
+
hideTooltip: PropTypes.bool,
|
|
210
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
211
|
+
label: PropTypes.string,
|
|
212
|
+
labelStyle: PropTypes.object,
|
|
213
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
214
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
215
|
+
offset: PropTypes.number,
|
|
216
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
217
|
+
reverse: PropTypes.bool,
|
|
218
|
+
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
219
|
+
slotProps: PropTypes.object,
|
|
220
|
+
slots: PropTypes.object,
|
|
221
|
+
startAngle: PropTypes.number,
|
|
222
|
+
stroke: PropTypes.string,
|
|
223
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
224
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
225
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
226
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
227
|
+
tickLabelStyle: PropTypes.object,
|
|
228
|
+
tickMaxStep: PropTypes.number,
|
|
229
|
+
tickMinStep: PropTypes.number,
|
|
230
|
+
tickNumber: PropTypes.number,
|
|
231
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
232
|
+
tickSize: PropTypes.number,
|
|
233
|
+
valueFormatter: PropTypes.func
|
|
234
|
+
})),
|
|
127
235
|
/**
|
|
128
236
|
* The array of series to display.
|
|
129
237
|
* Each type of series has its own specificity.
|
|
@@ -153,6 +261,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
153
261
|
* An array of [[AxisConfig]] objects.
|
|
154
262
|
*/
|
|
155
263
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
264
|
+
axis: PropTypes.oneOf(['x']),
|
|
156
265
|
classes: PropTypes.object,
|
|
157
266
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
158
267
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -175,13 +284,15 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
175
284
|
disableTicks: PropTypes.bool,
|
|
176
285
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
177
286
|
fill: PropTypes.string,
|
|
287
|
+
height: PropTypes.number,
|
|
178
288
|
hideTooltip: PropTypes.bool,
|
|
179
289
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
180
290
|
label: PropTypes.string,
|
|
181
291
|
labelStyle: PropTypes.object,
|
|
182
292
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
183
293
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
184
|
-
|
|
294
|
+
offset: PropTypes.number,
|
|
295
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
185
296
|
reverse: PropTypes.bool,
|
|
186
297
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
187
298
|
slotProps: PropTypes.object,
|
|
@@ -190,6 +301,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
190
301
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
191
302
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
192
303
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
304
|
+
tickLabelMinGap: PropTypes.number,
|
|
193
305
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
194
306
|
tickLabelStyle: PropTypes.object,
|
|
195
307
|
tickMaxStep: PropTypes.number,
|
|
@@ -205,6 +317,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
205
317
|
* An array of [[AxisConfig]] objects.
|
|
206
318
|
*/
|
|
207
319
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
320
|
+
axis: PropTypes.oneOf(['y']),
|
|
208
321
|
classes: PropTypes.object,
|
|
209
322
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
210
323
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -233,7 +346,8 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
233
346
|
labelStyle: PropTypes.object,
|
|
234
347
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
235
348
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
236
|
-
|
|
349
|
+
offset: PropTypes.number,
|
|
350
|
+
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
237
351
|
reverse: PropTypes.bool,
|
|
238
352
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
239
353
|
slotProps: PropTypes.object,
|
|
@@ -249,7 +363,8 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
249
363
|
tickNumber: PropTypes.number,
|
|
250
364
|
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
251
365
|
tickSize: PropTypes.number,
|
|
252
|
-
valueFormatter: PropTypes.func
|
|
366
|
+
valueFormatter: PropTypes.func,
|
|
367
|
+
width: PropTypes.number
|
|
253
368
|
})),
|
|
254
369
|
/**
|
|
255
370
|
* The configuration of the z-axes.
|
|
@@ -12,4 +12,4 @@ export type UseChartContainerPropsReturnValue<TSeries extends ChartSeriesType, T
|
|
|
12
12
|
};
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
};
|
|
15
|
-
export declare const useChartContainerProps: <TSeries extends ChartSeriesType =
|
|
15
|
+
export declare const useChartContainerProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProps<TSeries, TSignatures>, ref: React.Ref<SVGSVGElement>) => UseChartContainerPropsReturnValue<TSeries, TSignatures>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "disableVoronoi", "voronoiMaxRadius", "onItemClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "skipAnimation", "seriesConfig", "plugins"];
|
|
5
|
+
const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "disableVoronoi", "voronoiMaxRadius", "onItemClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "rotationAxis", "radiusAxis", "skipAnimation", "seriesConfig", "plugins"];
|
|
6
6
|
import { ALL_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
7
7
|
export const useChartContainerProps = (props, ref) => {
|
|
8
8
|
const _ref = props,
|
|
@@ -27,6 +27,8 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
27
27
|
xAxis,
|
|
28
28
|
yAxis,
|
|
29
29
|
zAxis,
|
|
30
|
+
rotationAxis,
|
|
31
|
+
radiusAxis,
|
|
30
32
|
skipAnimation,
|
|
31
33
|
seriesConfig,
|
|
32
34
|
plugins
|
|
@@ -43,6 +45,7 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
43
45
|
series,
|
|
44
46
|
colors,
|
|
45
47
|
dataset,
|
|
48
|
+
disableAxisListener,
|
|
46
49
|
highlightedItem,
|
|
47
50
|
onHighlightChange,
|
|
48
51
|
onAxisClick,
|
|
@@ -52,10 +55,11 @@ export const useChartContainerProps = (props, ref) => {
|
|
|
52
55
|
xAxis,
|
|
53
56
|
yAxis,
|
|
54
57
|
zAxis,
|
|
58
|
+
rotationAxis,
|
|
59
|
+
radiusAxis,
|
|
55
60
|
skipAnimation,
|
|
56
61
|
width,
|
|
57
62
|
height,
|
|
58
|
-
disableAxisListener,
|
|
59
63
|
seriesConfig,
|
|
60
64
|
plugins: plugins ?? ALL_PLUGINS
|
|
61
65
|
};
|
|
@@ -14,7 +14,7 @@ export type ChartDataProviderProps<TSeries extends ChartSeriesType = ChartSeries
|
|
|
14
14
|
*
|
|
15
15
|
* Demos:
|
|
16
16
|
*
|
|
17
|
-
* - [Composition](https://mui.com/x/
|
|
17
|
+
* - [Composition](https://mui.com/x/react-charts/composition/)
|
|
18
18
|
*
|
|
19
19
|
* API:
|
|
20
20
|
*
|
|
@@ -28,7 +28,7 @@ export type ChartDataProviderProps<TSeries extends ChartSeriesType = ChartSeries
|
|
|
28
28
|
* >
|
|
29
29
|
* <ChartsSurface>
|
|
30
30
|
* <BarPlot />
|
|
31
|
-
* <ChartsXAxis
|
|
31
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
32
32
|
* </ChartsSurface>
|
|
33
33
|
* {'Custom Legend Component'}
|
|
34
34
|
* </ChartDataProvider>
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
*
|
|
15
15
|
* Demos:
|
|
16
16
|
*
|
|
17
|
-
* - [Composition](https://mui.com/x/
|
|
17
|
+
* - [Composition](https://mui.com/x/react-charts/composition/)
|
|
18
18
|
*
|
|
19
19
|
* API:
|
|
20
20
|
*
|
|
@@ -28,7 +28,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
28
28
|
* >
|
|
29
29
|
* <ChartsSurface>
|
|
30
30
|
* <BarPlot />
|
|
31
|
-
* <ChartsXAxis
|
|
31
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
32
32
|
* </ChartsSurface>
|
|
33
33
|
* {'Custom Legend Component'}
|
|
34
34
|
* </ChartDataProvider>
|
|
@@ -74,7 +74,8 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
|
74
74
|
/**
|
|
75
75
|
* The margin between the SVG and the drawing area.
|
|
76
76
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
77
|
-
*
|
|
77
|
+
*
|
|
78
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
78
79
|
*/
|
|
79
80
|
margin: PropTypes.any,
|
|
80
81
|
/**
|
|
@@ -4,7 +4,7 @@ import { ChartProviderProps } from "../context/ChartProvider/index.js";
|
|
|
4
4
|
import { ChartAnyPluginSignature } from "../internals/plugins/models/index.js";
|
|
5
5
|
import { ChartSeriesType } from "../models/seriesType/config.js";
|
|
6
6
|
import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
7
|
-
export declare const useChartDataProviderProps: <TSeries extends ChartSeriesType =
|
|
7
|
+
export declare const useChartDataProviderProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartDataProviderProps<TSeries, TSignatures>) => {
|
|
8
8
|
children: import("react").ReactNode;
|
|
9
9
|
animationProviderProps: Omit<AnimationProviderProps, "children">;
|
|
10
10
|
chartProviderProps: Omit<ChartProviderProps<TSeries, TSignatures>, "children">;
|