@mui/x-charts 8.0.0-alpha.13 → 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/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/CHANGELOG.md +131 -0
- package/ChartContainer/ChartContainer.d.ts +1 -1
- package/ChartContainer/ChartContainer.js +107 -0
- package/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/ChartContainer/useChartContainerProps.js +6 -2
- package/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/ChartsXAxis/ChartsXAxis.js +38 -8
- package/ChartsYAxis/ChartsYAxis.js +12 -7
- 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/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/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/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/constants/index.d.ts +3 -6
- package/constants/index.js +6 -7
- 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/ChartContainer/ChartContainer.d.ts +1 -1
- package/esm/ChartContainer/ChartContainer.js +107 -0
- package/esm/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/esm/ChartContainer/useChartContainerProps.js +6 -2
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +38 -8
- package/esm/ChartsYAxis/ChartsYAxis.js +13 -8
- 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/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/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/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/esm/constants/index.d.ts +3 -6
- package/esm/constants/index.js +5 -6
- package/esm/hooks/useAxis.d.ts +11 -1
- package/esm/hooks/useAxis.js +41 -0
- 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/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/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/useChartSeries/processSeries.js +7 -13
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +5 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +59 -19
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +5 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +0 -18
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +10 -10
- 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/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.js +1 -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/polarExtremumGetter.types.js +1 -0
- package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -2
- package/esm/internals/stackSeries.d.ts +4 -6
- package/esm/models/axis.d.ts +27 -12
- package/esm/models/axis.js +4 -0
- package/esm/models/seriesType/config.d.ts +19 -9
- package/esm/models/seriesType/index.d.ts +1 -0
- package/esm/models/seriesType/index.js +1 -0
- package/esm/models/seriesType/radar.d.ts +24 -0
- package/esm/models/seriesType/radar.js +1 -0
- package/hooks/useAxis.d.ts +11 -1
- package/hooks/useAxis.js +45 -0
- 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/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/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/useChartSeries/processSeries.js +7 -14
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +5 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +60 -19
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +10 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +0 -18
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +10 -10
- 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/useChartPolarAxis/useChartPolarAxis.types.js +5 -0
- 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/stackSeries.d.ts +4 -6
- package/models/axis.d.ts +27 -12
- package/models/axis.js +4 -0
- package/models/seriesType/config.d.ts +19 -9
- package/models/seriesType/index.d.ts +1 -0
- package/models/seriesType/index.js +12 -0
- package/models/seriesType/radar.d.ts +24 -0
- package/models/seriesType/radar.js +5 -0
- 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/ChartContainer/ChartContainer.d.ts +1 -1
- package/modern/ChartContainer/ChartContainer.js +107 -0
- package/modern/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/modern/ChartContainer/useChartContainerProps.js +6 -2
- package/modern/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +38 -8
- package/modern/ChartsYAxis/ChartsYAxis.js +13 -8
- 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/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/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/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/modern/constants/index.d.ts +3 -6
- package/modern/constants/index.js +5 -6
- package/modern/hooks/useAxis.d.ts +11 -1
- package/modern/hooks/useAxis.js +41 -0
- 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/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/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/useChartSeries/processSeries.js +7 -13
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +5 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +2 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +59 -19
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -1
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +5 -5
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +0 -18
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +10 -10
- 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/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/stackSeries.d.ts +4 -6
- package/modern/models/axis.d.ts +27 -12
- package/modern/models/axis.js +4 -0
- package/modern/models/seriesType/config.d.ts +19 -9
- package/modern/models/seriesType/index.d.ts +1 -0
- package/modern/models/seriesType/index.js +1 -0
- package/modern/models/seriesType/radar.d.ts +24 -0
- package/modern/models/seriesType/radar.js +1 -0
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/context/PolarProvider/Polar.types.d.ts +0 -43
- 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 -43
- 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/defaultizeColor.d.ts +0 -107
- package/esm/internals/defaultizeColor.js +0 -13
- package/internals/defaultizeColor.d.ts +0 -107
- package/modern/context/PolarProvider/Polar.types.d.ts +0 -43
- 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/defaultizeColor.d.ts +0 -107
- package/modern/internals/defaultizeColor.js +0 -13
- /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/{modern/context/PolarProvider/Polar.types.js → esm/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/internals/plugins/models/seriesConfig/extremumGetter.types.js → esm/internals/plugins/models/seriesConfig/cartesianExtremumGetter.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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ProcessedSeries } from "../internals/plugins/corePlugins/useChartSeries/useChartSeries.types.js";
|
|
2
|
+
import { SeriesId } from "../models/seriesType/common.js";
|
|
3
|
+
import { ChartSeriesDefaultized } from "../models/seriesType/config.js";
|
|
4
|
+
export type UseRadarSeriesReturnValue = ChartSeriesDefaultized<'radar'>;
|
|
5
|
+
export type UseRadarSeriesContextReturnValue = ProcessedSeries['radar'];
|
|
6
|
+
/**
|
|
7
|
+
* Get access to the internal state of radar series.
|
|
8
|
+
*
|
|
9
|
+
* @param {SeriesId} seriesId The id of the series to get.
|
|
10
|
+
* @returns {UseRadarSeriesReturnValue} the radar series
|
|
11
|
+
*/
|
|
12
|
+
export declare function useRadarSeries(seriesId: SeriesId): UseRadarSeriesReturnValue | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Get access to the internal state of radar series.
|
|
15
|
+
*
|
|
16
|
+
* When called without arguments, it returns all radar series.
|
|
17
|
+
*
|
|
18
|
+
* @returns {UseRadarSeriesReturnValue[]} the radar series
|
|
19
|
+
*/
|
|
20
|
+
export declare function useRadarSeries(): UseRadarSeriesReturnValue[];
|
|
21
|
+
/**
|
|
22
|
+
* Get access to the internal state of radar series.
|
|
23
|
+
*
|
|
24
|
+
* @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
|
|
25
|
+
* @returns {UseRadarSeriesReturnValue[]} the radar series
|
|
26
|
+
*/
|
|
27
|
+
export declare function useRadarSeries(seriesIds?: SeriesId[]): UseRadarSeriesReturnValue[];
|
|
28
|
+
/**
|
|
29
|
+
* Get access to the internal state of radar series.
|
|
30
|
+
* The returned object contains:
|
|
31
|
+
* - series: a mapping from ids to series attributes.
|
|
32
|
+
* - seriesOrder: the array of series ids.
|
|
33
|
+
* @returns the radar series
|
|
34
|
+
*/
|
|
35
|
+
export declare function useRadarSeriesContext(): UseRadarSeriesContextReturnValue;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { createSeriesSelectorsOfType, createAllSeriesSelectorOfType } from "../internals/createSeriesSelectorOfType.js";
|
|
4
|
+
const useSelectorSeries = createSeriesSelectorsOfType('radar');
|
|
5
|
+
const useSelectorSeriesContext = createAllSeriesSelectorOfType('radar');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get access to the internal state of radar series.
|
|
9
|
+
*
|
|
10
|
+
* @param {SeriesId} seriesId The id of the series to get.
|
|
11
|
+
* @returns {UseRadarSeriesReturnValue} the radar series
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get access to the internal state of radar series.
|
|
16
|
+
*
|
|
17
|
+
* When called without arguments, it returns all radar series.
|
|
18
|
+
*
|
|
19
|
+
* @returns {UseRadarSeriesReturnValue[]} the radar series
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Get access to the internal state of radar series.
|
|
24
|
+
*
|
|
25
|
+
* @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
|
|
26
|
+
* @returns {UseRadarSeriesReturnValue[]} the radar series
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export function useRadarSeries(seriesIds) {
|
|
30
|
+
return useSelectorSeries(seriesIds);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get access to the internal state of radar series.
|
|
35
|
+
* The returned object contains:
|
|
36
|
+
* - series: a mapping from ids to series attributes.
|
|
37
|
+
* - seriesOrder: the array of series ids.
|
|
38
|
+
* @returns the radar series
|
|
39
|
+
*/
|
|
40
|
+
export function useRadarSeriesContext() {
|
|
41
|
+
return useSelectorSeriesContext();
|
|
42
|
+
}
|
package/esm/hooks/useScale.d.ts
CHANGED
|
@@ -19,4 +19,6 @@ export declare function useXScale<S extends ScaleName>(axisId?: AxisId): AxisSca
|
|
|
19
19
|
* @param {AxisId | undefined} axisId - If provided returns the scale for the y axis with axisId, else returns the values for the default y axis.
|
|
20
20
|
* @returns {AxisScaleConfig[S]['scale']} The scale for the specified Y axis.
|
|
21
21
|
*/
|
|
22
|
-
export declare function useYScale<S extends ScaleName>(axisId?: AxisId): AxisScaleConfig[S]['scale'];
|
|
22
|
+
export declare function useYScale<S extends ScaleName>(axisId?: AxisId): AxisScaleConfig[S]['scale'];
|
|
23
|
+
export declare function useRotationScale<S extends ScaleName>(identifier?: number | string): AxisScaleConfig[S]['scale'];
|
|
24
|
+
export declare function useRadiusScale<S extends ScaleName>(identifier?: number | string): AxisScaleConfig[S]['scale'];
|
package/esm/hooks/useScale.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { isBandScale } from "../internals/isBandScale.js";
|
|
4
|
-
import { useXAxis, useYAxis } from "./useAxis.js";
|
|
4
|
+
import { useRadiusAxis, useRotationAxis, useXAxis, useYAxis } from "./useAxis.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* For a given scale return a function that map value to their position.
|
|
@@ -36,4 +36,12 @@ export function useXScale(axisId) {
|
|
|
36
36
|
export function useYScale(axisId) {
|
|
37
37
|
const axis = useYAxis(axisId);
|
|
38
38
|
return axis.scale;
|
|
39
|
+
}
|
|
40
|
+
export function useRotationScale(identifier) {
|
|
41
|
+
const axis = useRotationAxis(identifier);
|
|
42
|
+
return axis.scale;
|
|
43
|
+
}
|
|
44
|
+
export function useRadiusScale(identifier) {
|
|
45
|
+
const axis = useRadiusAxis(identifier);
|
|
46
|
+
return axis.scale;
|
|
39
47
|
}
|
package/esm/hooks/useTicks.js
CHANGED
|
@@ -29,12 +29,13 @@ export function useTicks(options) {
|
|
|
29
29
|
valueFormatter,
|
|
30
30
|
tickInterval,
|
|
31
31
|
tickPlacement = 'extremities',
|
|
32
|
-
tickLabelPlacement
|
|
32
|
+
tickLabelPlacement: tickLabelPlacementProp
|
|
33
33
|
} = options;
|
|
34
34
|
return React.useMemo(() => {
|
|
35
35
|
// band scale
|
|
36
36
|
if (isBandScale(scale)) {
|
|
37
37
|
const domain = scale.domain();
|
|
38
|
+
const tickLabelPlacement = tickLabelPlacementProp ?? 'middle';
|
|
38
39
|
if (scale.bandwidth() > 0) {
|
|
39
40
|
// scale type = 'band'
|
|
40
41
|
const filteredDomain = typeof tickInterval === 'function' && domain.filter(tickInterval) || typeof tickInterval === 'object' && tickInterval || domain;
|
|
@@ -71,15 +72,20 @@ export function useTicks(options) {
|
|
|
71
72
|
if (domain.some(isInfinity)) {
|
|
72
73
|
return [];
|
|
73
74
|
}
|
|
75
|
+
const tickLabelPlacement = tickLabelPlacementProp;
|
|
74
76
|
const ticks = typeof tickInterval === 'object' ? tickInterval : scale.ticks(tickNumber);
|
|
75
|
-
return ticks.map(value =>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
return ticks.map((value, i) => {
|
|
78
|
+
return {
|
|
79
|
+
value,
|
|
80
|
+
formattedValue: valueFormatter?.(value, {
|
|
81
|
+
location: 'tick',
|
|
82
|
+
scale
|
|
83
|
+
}) ?? scale.tickFormat(tickNumber)(value),
|
|
84
|
+
offset: scale(value),
|
|
85
|
+
// Allowing the label to be placed in the middle of a continuous scale is weird.
|
|
86
|
+
// But it is useful in some cases, like funnel categories with a linear scale.
|
|
87
|
+
labelOffset: tickLabelPlacement === 'middle' ? scale(ticks[i - 1] ?? 0) - (scale(value) + scale(ticks[i - 1] ?? 0)) / 2 : 0
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
}, [scale, tickInterval, tickNumber, valueFormatter, tickPlacement, tickLabelPlacementProp]);
|
|
85
91
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from "./PieChart/index.js";
|
|
|
20
20
|
export * from "./ScatterChart/index.js";
|
|
21
21
|
export * from "./SparkLineChart/index.js";
|
|
22
22
|
export * from "./Gauge/index.js";
|
|
23
|
+
export * from "./RadarChart/index.js";
|
|
23
24
|
export * from "./ChartsSurface/index.js";
|
|
24
25
|
export * from "./ChartContainer/index.js";
|
|
25
26
|
export * from "./ChartDataProvider/index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts v8.0.0-alpha.
|
|
2
|
+
* @mui/x-charts v8.0.0-alpha.14
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -27,6 +27,7 @@ export * from "./PieChart/index.js";
|
|
|
27
27
|
export * from "./ScatterChart/index.js";
|
|
28
28
|
export * from "./SparkLineChart/index.js";
|
|
29
29
|
export * from "./Gauge/index.js";
|
|
30
|
+
export * from "./RadarChart/index.js";
|
|
30
31
|
export * from "./ChartsSurface/index.js";
|
|
31
32
|
export * from "./ChartContainer/index.js";
|
|
32
33
|
export * from "./ChartDataProvider/index.js";
|
|
@@ -11,9 +11,9 @@ export const AxisRoot = styled('g', {
|
|
|
11
11
|
[`& .${axisClasses.tickLabel}`]: _extends({}, theme.typography.caption, {
|
|
12
12
|
fill: (theme.vars || theme).palette.text.primary
|
|
13
13
|
}),
|
|
14
|
-
[`& .${axisClasses.label}`]:
|
|
14
|
+
[`& .${axisClasses.label}`]: {
|
|
15
15
|
fill: (theme.vars || theme).palette.text.primary
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
17
|
[`& .${axisClasses.line}`]: {
|
|
18
18
|
stroke: (theme.vars || theme).palette.text.primary,
|
|
19
19
|
shapeRendering: 'crispEdges',
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CartesianChartSeriesType, PolarChartSeriesType } from "../models/seriesType/config.js";
|
|
2
2
|
declare class CartesianSeriesTypes {
|
|
3
|
-
types: Set<
|
|
3
|
+
types: Set<CartesianChartSeriesType>;
|
|
4
4
|
constructor();
|
|
5
|
-
addType(value:
|
|
6
|
-
getTypes(): Set<
|
|
5
|
+
addType(value: CartesianChartSeriesType): void;
|
|
6
|
+
getTypes(): Set<"line" | "scatter" | "bar">;
|
|
7
|
+
}
|
|
8
|
+
declare class PolarSeriesTypes {
|
|
9
|
+
types: Set<PolarChartSeriesType>;
|
|
10
|
+
constructor();
|
|
11
|
+
addType(value: PolarChartSeriesType): void;
|
|
12
|
+
getTypes(): Set<"radar">;
|
|
7
13
|
}
|
|
8
14
|
export declare const cartesianSeriesTypes: CartesianSeriesTypes;
|
|
15
|
+
export declare const polarSeriesTypes: PolarSeriesTypes;
|
|
9
16
|
export {};
|
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
let
|
|
1
|
+
let cartesianInstance;
|
|
2
|
+
let polarInstance;
|
|
2
3
|
class CartesianSeriesTypes {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.types = new Set();
|
|
5
|
-
if (
|
|
6
|
+
if (cartesianInstance) {
|
|
6
7
|
throw new Error('You can only create one instance!');
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
cartesianInstance = this.types;
|
|
10
|
+
}
|
|
11
|
+
addType(value) {
|
|
12
|
+
this.types.add(value);
|
|
13
|
+
}
|
|
14
|
+
getTypes() {
|
|
15
|
+
return this.types;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
class PolarSeriesTypes {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.types = new Set();
|
|
21
|
+
if (polarInstance) {
|
|
22
|
+
throw new Error('You can only create one instance!');
|
|
23
|
+
}
|
|
24
|
+
polarInstance = this.types;
|
|
9
25
|
}
|
|
10
26
|
addType(value) {
|
|
11
27
|
this.types.add(value);
|
|
@@ -17,4 +33,6 @@ class CartesianSeriesTypes {
|
|
|
17
33
|
export const cartesianSeriesTypes = new CartesianSeriesTypes();
|
|
18
34
|
cartesianSeriesTypes.addType('bar');
|
|
19
35
|
cartesianSeriesTypes.addType('line');
|
|
20
|
-
cartesianSeriesTypes.addType('scatter');
|
|
36
|
+
cartesianSeriesTypes.addType('scatter');
|
|
37
|
+
export const polarSeriesTypes = new PolarSeriesTypes();
|
|
38
|
+
polarSeriesTypes.addType('radar');
|
package/esm/internals/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from "./plugins/corePlugins/useChartSeries/index.js";
|
|
|
15
15
|
export * from "./plugins/corePlugins/useChartDimensions/index.js";
|
|
16
16
|
export * from "./plugins/featurePlugins/useChartZAxis/index.js";
|
|
17
17
|
export * from "./plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
18
|
+
export * from "./plugins/featurePlugins/useChartPolarAxis/index.js";
|
|
18
19
|
export * from "./plugins/featurePlugins/useChartInteraction/index.js";
|
|
19
20
|
export * from "./plugins/featurePlugins/useChartHighlight/index.js";
|
|
20
21
|
export * from "./plugins/featurePlugins/useChartVoronoi/index.js";
|
|
@@ -32,7 +33,11 @@ export * from "./getSVGPoint.js";
|
|
|
32
33
|
export * from "./isDefined.js";
|
|
33
34
|
export { unstable_cleanupDOM } from "./domUtils.js";
|
|
34
35
|
export * from "./getScale.js";
|
|
36
|
+
export * from "./stackSeries.js";
|
|
35
37
|
export * from "./getCurve.js";
|
|
38
|
+
export * from "./consumeSlots.js";
|
|
39
|
+
export * from "./consumeThemeProps.js";
|
|
40
|
+
export * from "./defaultizeMargin.js";
|
|
36
41
|
export * from "../context/AnimationProvider/index.js";
|
|
37
42
|
export type * from '../context/context.types';
|
|
38
43
|
export { getAxisExtremum } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.js";
|
package/esm/internals/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export * from "./plugins/corePlugins/useChartSeries/index.js";
|
|
|
20
20
|
export * from "./plugins/corePlugins/useChartDimensions/index.js";
|
|
21
21
|
export * from "./plugins/featurePlugins/useChartZAxis/index.js";
|
|
22
22
|
export * from "./plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
23
|
+
export * from "./plugins/featurePlugins/useChartPolarAxis/index.js";
|
|
23
24
|
export * from "./plugins/featurePlugins/useChartInteraction/index.js";
|
|
24
25
|
export * from "./plugins/featurePlugins/useChartHighlight/index.js";
|
|
25
26
|
export * from "./plugins/featurePlugins/useChartVoronoi/index.js";
|
|
@@ -42,7 +43,11 @@ export * from "./getSVGPoint.js";
|
|
|
42
43
|
export * from "./isDefined.js";
|
|
43
44
|
export { unstable_cleanupDOM } from "./domUtils.js";
|
|
44
45
|
export * from "./getScale.js";
|
|
46
|
+
export * from "./stackSeries.js";
|
|
45
47
|
export * from "./getCurve.js";
|
|
48
|
+
export * from "./consumeSlots.js";
|
|
49
|
+
export * from "./consumeThemeProps.js";
|
|
50
|
+
export * from "./defaultizeMargin.js";
|
|
46
51
|
|
|
47
52
|
// contexts
|
|
48
53
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChartSeriesType, PolarChartSeriesType, ChartSeriesDefaultized } from "../models/seriesType/config.js";
|
|
2
|
+
export declare function isPolarSeriesType(seriesType: string): seriesType is PolarChartSeriesType;
|
|
3
|
+
export declare function isPolarSeries(series: ChartSeriesDefaultized<ChartSeriesType> & {
|
|
4
|
+
getColor: (dataIndex: number) => string;
|
|
5
|
+
}): series is ChartSeriesDefaultized<PolarChartSeriesType> & {
|
|
6
|
+
getColor: (dataIndex: number) => string;
|
|
7
|
+
};
|
|
@@ -2,9 +2,10 @@ import { ChartSeriesType } from "../../models/seriesType/config.js";
|
|
|
2
2
|
import { UseChartCartesianAxisSignature } from "./featurePlugins/useChartCartesianAxis/index.js";
|
|
3
3
|
import { UseChartHighlightSignature } from "./featurePlugins/useChartHighlight/index.js";
|
|
4
4
|
import { UseChartInteractionSignature } from "./featurePlugins/useChartInteraction/index.js";
|
|
5
|
+
import { UseChartPolarAxisSignature } from "./featurePlugins/useChartPolarAxis/index.js";
|
|
5
6
|
import { UseChartVoronoiSignature } from "./featurePlugins/useChartVoronoi/index.js";
|
|
6
7
|
import { UseChartZAxisSignature } from "./featurePlugins/useChartZAxis/index.js";
|
|
7
8
|
import { ConvertSignaturesIntoPlugins } from "./models/helpers.js";
|
|
8
|
-
export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature];
|
|
9
|
+
export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature];
|
|
9
10
|
export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
|
|
10
|
-
export declare const ALL_PLUGINS: (import("./models").ChartPlugin<UseChartInteractionSignature> | import("./models").ChartPlugin<UseChartZAxisSignature> | import("./models").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("./models").ChartPlugin<UseChartHighlightSignature> | import("./models").ChartPlugin<UseChartVoronoiSignature>)[];
|
|
11
|
+
export declare const ALL_PLUGINS: (import("./models").ChartPlugin<UseChartInteractionSignature> | import("./models").ChartPlugin<UseChartZAxisSignature> | import("./models").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("./models").ChartPlugin<UseChartHighlightSignature> | import("./models").ChartPlugin<UseChartPolarAxisSignature<any>> | import("./models").ChartPlugin<UseChartVoronoiSignature>)[];
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useChartCartesianAxis } from "./featurePlugins/useChartCartesianAxis/index.js";
|
|
4
4
|
import { useChartHighlight } from "./featurePlugins/useChartHighlight/index.js";
|
|
5
5
|
import { useChartInteraction } from "./featurePlugins/useChartInteraction/index.js";
|
|
6
|
+
import { useChartPolarAxis } from "./featurePlugins/useChartPolarAxis/index.js";
|
|
6
7
|
import { useChartVoronoi } from "./featurePlugins/useChartVoronoi/index.js";
|
|
7
8
|
import { useChartZAxis } from "./featurePlugins/useChartZAxis/index.js";
|
|
8
|
-
export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi];
|
|
9
|
+
export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartPolarAxis, useChartInteraction, useChartHighlight, useChartVoronoi];
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { defaultizeColor } from "../../../defaultizeColor.js";
|
|
3
1
|
/**
|
|
4
2
|
* This methods is the interface between what the developer is providing and what components receives
|
|
5
3
|
* To simplify the components behaviors, it groups series by type, such that LinePlots props are not updated if some line data are modified
|
|
@@ -20,23 +18,19 @@ export const preprocessSeries = ({
|
|
|
20
18
|
// That's probably because the series.type is not propagated from the generic but hardcoded in the config.
|
|
21
19
|
|
|
22
20
|
series.forEach((seriesData, seriesIndex) => {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (seriesGroups[type] === undefined) {
|
|
28
|
-
seriesGroups[type] = {
|
|
21
|
+
const seriesWithDefaultValues = seriesConfig[seriesData.type].getSeriesWithDefaultValues(seriesData, seriesIndex, colors);
|
|
22
|
+
const id = seriesWithDefaultValues.id;
|
|
23
|
+
if (seriesGroups[seriesData.type] === undefined) {
|
|
24
|
+
seriesGroups[seriesData.type] = {
|
|
29
25
|
series: {},
|
|
30
26
|
seriesOrder: []
|
|
31
27
|
};
|
|
32
28
|
}
|
|
33
|
-
if (seriesGroups[type]?.series[id] !== undefined) {
|
|
29
|
+
if (seriesGroups[seriesData.type]?.series[id] !== undefined) {
|
|
34
30
|
throw new Error(`MUI X: series' id "${id}" is not unique.`);
|
|
35
31
|
}
|
|
36
|
-
seriesGroups[type].series[id] =
|
|
37
|
-
|
|
38
|
-
}, defaultizeColor(seriesData, seriesIndex, colors));
|
|
39
|
-
seriesGroups[type].seriesOrder.push(id);
|
|
32
|
+
seriesGroups[seriesData.type].series[id] = seriesWithDefaultValues;
|
|
33
|
+
seriesGroups[seriesData.type].seriesOrder.push(id);
|
|
40
34
|
});
|
|
41
35
|
const processedSeries = {};
|
|
42
36
|
// Apply formatter on a type group
|
|
@@ -55,6 +55,7 @@ export function computeAxisValue({
|
|
|
55
55
|
const zoomedRange = zoomScaleRange(scaleRange, zoomRange);
|
|
56
56
|
completeAxis[axis.id] = _extends({
|
|
57
57
|
offset: 0,
|
|
58
|
+
height: 0,
|
|
58
59
|
categoryGapRatio,
|
|
59
60
|
barGapRatio
|
|
60
61
|
}, axis, {
|
|
@@ -74,7 +75,8 @@ export function computeAxisValue({
|
|
|
74
75
|
const scaleRange = axisDirection === 'y' ? [...range].reverse() : range;
|
|
75
76
|
const zoomedRange = zoomScaleRange(scaleRange, zoomRange);
|
|
76
77
|
completeAxis[axis.id] = _extends({
|
|
77
|
-
offset: 0
|
|
78
|
+
offset: 0,
|
|
79
|
+
height: 0
|
|
78
80
|
}, axis, {
|
|
79
81
|
data,
|
|
80
82
|
scale: scalePoint(axis.data, zoomedRange),
|
|
@@ -114,7 +116,8 @@ export function computeAxisValue({
|
|
|
114
116
|
const [minDomain, maxDomain] = finalScale.domain();
|
|
115
117
|
const domain = [axis.min ?? minDomain, axis.max ?? maxDomain];
|
|
116
118
|
completeAxis[axis.id] = _extends({
|
|
117
|
-
offset: 0
|
|
119
|
+
offset: 0,
|
|
120
|
+
height: 0
|
|
118
121
|
}, axis, {
|
|
119
122
|
data,
|
|
120
123
|
scaleType: scaleType,
|
|
@@ -2,5 +2,5 @@ import { MakeOptional } from '@mui/x-internals/types';
|
|
|
2
2
|
import { AxisConfig, ScaleName } from "../../../../models/index.js";
|
|
3
3
|
import { ChartsXAxisProps, ChartsYAxisProps } from "../../../../models/axis.js";
|
|
4
4
|
import { DatasetType } from "../../../../models/seriesType/config.js";
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
5
|
+
export declare function defaultizeXAxis(inAxis: readonly MakeOptional<AxisConfig<ScaleName, any, ChartsXAxisProps>, 'id'>[] | undefined, dataset: Readonly<DatasetType> | undefined): Array<AxisConfig<ScaleName, any, ChartsXAxisProps>>;
|
|
6
|
+
export declare function defaultizeYAxis(inAxis: readonly MakeOptional<AxisConfig<ScaleName, any, ChartsYAxisProps>, 'id'>[] | undefined, dataset: Readonly<DatasetType> | undefined): Array<AxisConfig<ScaleName, any, ChartsYAxisProps>>;
|
|
@@ -1,38 +1,78 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY, DEFAULT_AXIS_SIZE_HEIGHT, DEFAULT_AXIS_SIZE_WIDTH } from "../../../../constants/index.js";
|
|
3
|
-
export function
|
|
4
|
-
const DEFAULT_AXIS_KEY = axisName === 'x' ? DEFAULT_X_AXIS_KEY : DEFAULT_Y_AXIS_KEY;
|
|
2
|
+
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY, DEFAULT_AXIS_SIZE_HEIGHT, DEFAULT_AXIS_SIZE_WIDTH, AXIS_LABEL_DEFAULT_HEIGHT } from "../../../../constants/index.js";
|
|
3
|
+
export function defaultizeXAxis(inAxis, dataset) {
|
|
5
4
|
const offsets = {
|
|
6
5
|
top: 0,
|
|
7
|
-
right: 0,
|
|
8
6
|
bottom: 0,
|
|
7
|
+
none: 0
|
|
8
|
+
};
|
|
9
|
+
const inputAxes = inAxis && inAxis.length > 0 ? inAxis : [{
|
|
10
|
+
id: DEFAULT_X_AXIS_KEY,
|
|
11
|
+
scaleType: 'linear'
|
|
12
|
+
}];
|
|
13
|
+
const parsedAxes = inputAxes.map((axisConfig, index) => {
|
|
14
|
+
const dataKey = axisConfig.dataKey;
|
|
15
|
+
|
|
16
|
+
// The first x-axis is defaultized to the bottom
|
|
17
|
+
const defaultPosition = index === 0 ? 'bottom' : 'none';
|
|
18
|
+
const position = axisConfig.position ?? defaultPosition;
|
|
19
|
+
const defaultHeight = DEFAULT_AXIS_SIZE_HEIGHT + (axisConfig.label ? AXIS_LABEL_DEFAULT_HEIGHT : 0);
|
|
20
|
+
const sharedConfig = _extends({
|
|
21
|
+
id: `defaultized-x-axis-${index}`,
|
|
22
|
+
offset: offsets[position]
|
|
23
|
+
}, axisConfig, {
|
|
24
|
+
position,
|
|
25
|
+
height: axisConfig.height ?? defaultHeight
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Increment the offset for the next axis
|
|
29
|
+
if (position !== 'none') {
|
|
30
|
+
offsets[position] += sharedConfig.height;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// If `dataKey` is NOT provided
|
|
34
|
+
if (dataKey === undefined || axisConfig.data !== undefined) {
|
|
35
|
+
return sharedConfig;
|
|
36
|
+
}
|
|
37
|
+
if (dataset === undefined) {
|
|
38
|
+
throw new Error(`MUI X: x-axis uses \`dataKey\` but no \`dataset\` is provided.`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// If `dataKey` is provided
|
|
42
|
+
return _extends({}, sharedConfig, {
|
|
43
|
+
data: dataset.map(d => d[dataKey])
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
return parsedAxes;
|
|
47
|
+
}
|
|
48
|
+
export function defaultizeYAxis(inAxis, dataset) {
|
|
49
|
+
const offsets = {
|
|
50
|
+
right: 0,
|
|
9
51
|
left: 0,
|
|
10
52
|
none: 0
|
|
11
53
|
};
|
|
12
54
|
const inputAxes = inAxis && inAxis.length > 0 ? inAxis : [{
|
|
13
|
-
id:
|
|
55
|
+
id: DEFAULT_Y_AXIS_KEY,
|
|
14
56
|
scaleType: 'linear'
|
|
15
57
|
}];
|
|
16
58
|
const parsedAxes = inputAxes.map((axisConfig, index) => {
|
|
17
59
|
const dataKey = axisConfig.dataKey;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
60
|
+
|
|
61
|
+
// The first y-axis is defaultized to the left
|
|
62
|
+
const defaultPosition = index === 0 ? 'left' : 'none';
|
|
63
|
+
const position = axisConfig.position ?? defaultPosition;
|
|
64
|
+
const defaultWidth = DEFAULT_AXIS_SIZE_WIDTH + (axisConfig.label ? AXIS_LABEL_DEFAULT_HEIGHT : 0);
|
|
23
65
|
const sharedConfig = _extends({
|
|
24
|
-
id: `defaultized
|
|
25
|
-
}, index === 0 ? {
|
|
26
|
-
position: defaultPosition
|
|
27
|
-
} : {}, {
|
|
28
|
-
height,
|
|
29
|
-
width,
|
|
66
|
+
id: `defaultized-y-axis-${index}`,
|
|
30
67
|
offset: offsets[position]
|
|
31
|
-
}, axisConfig
|
|
68
|
+
}, axisConfig, {
|
|
69
|
+
position,
|
|
70
|
+
width: axisConfig.width ?? defaultWidth
|
|
71
|
+
});
|
|
32
72
|
|
|
33
73
|
// Increment the offset for the next axis
|
|
34
74
|
if (position !== 'none') {
|
|
35
|
-
offsets[position] +=
|
|
75
|
+
offsets[position] += sharedConfig.width;
|
|
36
76
|
}
|
|
37
77
|
|
|
38
78
|
// If `dataKey` is NOT provided
|
|
@@ -40,7 +80,7 @@ export function defaultizeAxis(inAxis, dataset, axisName) {
|
|
|
40
80
|
return sharedConfig;
|
|
41
81
|
}
|
|
42
82
|
if (dataset === undefined) {
|
|
43
|
-
throw new Error(`MUI X:
|
|
83
|
+
throw new Error(`MUI X: y-axis uses \`dataKey\` but no \`dataset\` is provided.`);
|
|
44
84
|
}
|
|
45
85
|
|
|
46
86
|
// If `dataKey` is provided
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { useChartCartesianAxis } from "./useChartCartesianAxis.js";
|
|
2
2
|
export type * from './useChartCartesianAxis.types';
|
|
3
3
|
export * from "./useChartCartesianAxisRendering.selectors.js";
|
|
4
|
-
export {
|
|
4
|
+
export { defaultizeXAxis, defaultizeYAxis } from "./defaultizeAxis.js";
|
|
5
5
|
export * from "./computeAxisValue.js";
|
|
6
6
|
export * from "./createZoomLookup.js";
|
|
7
7
|
export * from "./zoom.types.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useChartCartesianAxis } from "./useChartCartesianAxis.js";
|
|
2
2
|
export * from "./useChartCartesianAxisRendering.selectors.js";
|
|
3
|
-
export {
|
|
3
|
+
export { defaultizeXAxis, defaultizeYAxis } from "./defaultizeAxis.js";
|
|
4
4
|
export * from "./computeAxisValue.js";
|
|
5
5
|
export * from "./createZoomLookup.js";
|
|
6
6
|
export * from "./zoom.types.js";
|
|
@@ -7,7 +7,7 @@ import { rainbowSurgePalette } from "../../../../colorPalettes/index.js";
|
|
|
7
7
|
import { useSelector } from "../../../store/useSelector.js";
|
|
8
8
|
import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/useChartDimensions.selectors.js";
|
|
9
9
|
import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/useChartSeries.selectors.js";
|
|
10
|
-
import {
|
|
10
|
+
import { defaultizeXAxis, defaultizeYAxis } from "./defaultizeAxis.js";
|
|
11
11
|
import { selectorChartXAxis, selectorChartYAxis } from "./useChartCartesianAxisRendering.selectors.js";
|
|
12
12
|
import { getAxisValue } from "./getAxisValue.js";
|
|
13
13
|
import { getSVGPoint } from "../../../getSVGPoint.js";
|
|
@@ -54,8 +54,8 @@ export const useChartCartesianAxis = ({
|
|
|
54
54
|
}
|
|
55
55
|
store.update(prev => _extends({}, prev, {
|
|
56
56
|
cartesianAxis: _extends({}, prev.cartesianAxis, {
|
|
57
|
-
x:
|
|
58
|
-
y:
|
|
57
|
+
x: defaultizeXAxis(xAxis, dataset),
|
|
58
|
+
y: defaultizeYAxis(yAxis, dataset)
|
|
59
59
|
})
|
|
60
60
|
}));
|
|
61
61
|
}, [seriesConfig, drawingArea, xAxis, yAxis, dataset, store]);
|
|
@@ -194,8 +194,8 @@ useChartCartesianAxis.getDefaultizedParams = ({
|
|
|
194
194
|
return _extends({}, params, {
|
|
195
195
|
colors: params.colors ?? rainbowSurgePalette,
|
|
196
196
|
theme: params.theme ?? 'light',
|
|
197
|
-
defaultizedXAxis:
|
|
198
|
-
defaultizedYAxis:
|
|
197
|
+
defaultizedXAxis: defaultizeXAxis(params.xAxis, params.dataset),
|
|
198
|
+
defaultizedYAxis: defaultizeYAxis(params.yAxis, params.dataset)
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
201
|
useChartCartesianAxis.getInitialState = params => ({
|
package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts
CHANGED
|
@@ -9,24 +9,6 @@ import type { ChartsAxisProps } from '../../../../ChartsAxis';
|
|
|
9
9
|
export type DefaultizedAxisConfig<AxisProps extends ChartsAxisProps> = {
|
|
10
10
|
[axisId: AxisId]: AxisDefaultized<ScaleName, any, AxisProps>;
|
|
11
11
|
};
|
|
12
|
-
export type CartesianContextState = {
|
|
13
|
-
/**
|
|
14
|
-
* Mapping from x-axis key to scaling configuration.
|
|
15
|
-
*/
|
|
16
|
-
xAxis: DefaultizedAxisConfig<ChartsXAxisProps>;
|
|
17
|
-
/**
|
|
18
|
-
* Mapping from y-axis key to scaling configuration.
|
|
19
|
-
*/
|
|
20
|
-
yAxis: DefaultizedAxisConfig<ChartsYAxisProps>;
|
|
21
|
-
/**
|
|
22
|
-
* The x-axes IDs sorted by order they got provided.
|
|
23
|
-
*/
|
|
24
|
-
xAxisIds: AxisId[];
|
|
25
|
-
/**
|
|
26
|
-
* The y-axes IDs sorted by order they got provided.
|
|
27
|
-
*/
|
|
28
|
-
yAxisIds: AxisId[];
|
|
29
|
-
};
|
|
30
12
|
export interface UseChartCartesianAxisParameters {
|
|
31
13
|
/**
|
|
32
14
|
* The configuration of the x-axes.
|