@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
|
@@ -125,6 +125,113 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
125
125
|
* @param {ScatterItemIdentifier} scatterItemIdentifier Identify which item got clicked
|
|
126
126
|
*/
|
|
127
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
|
+
})),
|
|
128
235
|
/**
|
|
129
236
|
* The array of series to display.
|
|
130
237
|
* Each type of series has its own specificity.
|
|
@@ -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
|
};
|
|
@@ -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">;
|
|
@@ -8,6 +8,9 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { useThemeProps, useTheme, styled } from '@mui/material/styles';
|
|
11
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
12
|
+
import { clampAngle } from "../internals/clampAngle.js";
|
|
13
|
+
import { getStringSize } from "../internals/domUtils.js";
|
|
11
14
|
import { useTicks } from "../hooks/useTicks.js";
|
|
12
15
|
import { getAxisUtilityClass } from "../ChartsAxis/axisClasses.js";
|
|
13
16
|
import { AxisRoot } from "../internals/components/AxisSharedComponents.js";
|
|
@@ -20,6 +23,7 @@ import { isInfinity } from "../internals/isInfinity.js";
|
|
|
20
23
|
import { isBandScale } from "../internals/isBandScale.js";
|
|
21
24
|
import { useChartContext } from "../context/ChartProvider/useChartContext.js";
|
|
22
25
|
import { useXAxes } from "../hooks/useAxis.js";
|
|
26
|
+
import { invertTextAnchor } from "../internals/invertTextAnchor.js";
|
|
23
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
28
|
const useUtilityClasses = ownerState => {
|
|
25
29
|
const {
|
|
@@ -99,6 +103,26 @@ function getVisibleLabels(xTicks, {
|
|
|
99
103
|
return true;
|
|
100
104
|
}));
|
|
101
105
|
}
|
|
106
|
+
function getDefaultTextAnchor(angle) {
|
|
107
|
+
const adjustedAngle = clampAngle(angle);
|
|
108
|
+
if (adjustedAngle === 0 || adjustedAngle === 180) {
|
|
109
|
+
return 'middle';
|
|
110
|
+
}
|
|
111
|
+
if (adjustedAngle < 180) {
|
|
112
|
+
return 'start';
|
|
113
|
+
}
|
|
114
|
+
return 'end';
|
|
115
|
+
}
|
|
116
|
+
function getDefaultBaseline(angle, position) {
|
|
117
|
+
const adjustedAngle = clampAngle(angle);
|
|
118
|
+
if (adjustedAngle === 0) {
|
|
119
|
+
return position === 'bottom' ? 'hanging' : 'auto';
|
|
120
|
+
}
|
|
121
|
+
if (adjustedAngle === 180) {
|
|
122
|
+
return position === 'bottom' ? 'auto' : 'hanging';
|
|
123
|
+
}
|
|
124
|
+
return 'central';
|
|
125
|
+
}
|
|
102
126
|
const XAxisRoot = styled(AxisRoot, {
|
|
103
127
|
name: 'MuiChartsXAxis',
|
|
104
128
|
slot: 'Root',
|
|
@@ -155,9 +179,11 @@ function ChartsXAxis(inProps) {
|
|
|
155
179
|
tickLabelPlacement,
|
|
156
180
|
tickLabelMinGap,
|
|
157
181
|
sx,
|
|
158
|
-
offset
|
|
182
|
+
offset,
|
|
183
|
+
height: axisHeight
|
|
159
184
|
} = defaultizedProps;
|
|
160
185
|
const theme = useTheme();
|
|
186
|
+
const isRtl = useRtl();
|
|
161
187
|
const classes = useUtilityClasses(defaultizedProps);
|
|
162
188
|
const {
|
|
163
189
|
left,
|
|
@@ -174,14 +200,16 @@ function ChartsXAxis(inProps) {
|
|
|
174
200
|
const Tick = slots?.axisTick ?? 'line';
|
|
175
201
|
const TickLabel = slots?.axisTickLabel ?? ChartsText;
|
|
176
202
|
const Label = slots?.axisLabel ?? ChartsText;
|
|
203
|
+
const defaultTextAnchor = getDefaultTextAnchor(tickLabelStyle?.angle ?? 0);
|
|
204
|
+
const shouldInvertTextAnchor = isRtl && position !== 'top' || !isRtl && position === 'top';
|
|
177
205
|
const axisTickLabelProps = useSlotProps({
|
|
178
206
|
elementType: TickLabel,
|
|
179
207
|
externalSlotProps: slotProps?.axisTickLabel,
|
|
180
208
|
additionalProps: {
|
|
181
209
|
style: _extends({}, theme.typography.caption, {
|
|
182
210
|
fontSize: 12,
|
|
183
|
-
textAnchor:
|
|
184
|
-
dominantBaseline:
|
|
211
|
+
textAnchor: shouldInvertTextAnchor ? invertTextAnchor(defaultTextAnchor) : defaultTextAnchor,
|
|
212
|
+
dominantBaseline: getDefaultBaseline(tickLabelStyle?.angle ?? 0, position)
|
|
185
213
|
}, tickLabelStyle)
|
|
186
214
|
},
|
|
187
215
|
className: classes.tickLabel,
|
|
@@ -208,15 +236,12 @@ function ChartsXAxis(inProps) {
|
|
|
208
236
|
direction: 'x'
|
|
209
237
|
})
|
|
210
238
|
});
|
|
211
|
-
const labelRefPoint = {
|
|
212
|
-
x: left + width / 2,
|
|
213
|
-
y: positionSign * (tickSize + 22)
|
|
214
|
-
};
|
|
215
239
|
const axisLabelProps = useSlotProps({
|
|
216
240
|
elementType: Label,
|
|
217
241
|
externalSlotProps: slotProps?.axisLabel,
|
|
218
242
|
additionalProps: {
|
|
219
|
-
style: _extends({
|
|
243
|
+
style: _extends({}, theme.typography.body1, {
|
|
244
|
+
lineHeight: 1,
|
|
220
245
|
fontSize: 14,
|
|
221
246
|
textAnchor: 'middle',
|
|
222
247
|
dominantBaseline: position === 'bottom' ? 'hanging' : 'auto'
|
|
@@ -233,6 +258,11 @@ function ChartsXAxis(inProps) {
|
|
|
233
258
|
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(isInfinity) || position === 'none') {
|
|
234
259
|
return null;
|
|
235
260
|
}
|
|
261
|
+
const labelHeight = label ? getStringSize(label, axisLabelProps.style).height : 0;
|
|
262
|
+
const labelRefPoint = {
|
|
263
|
+
x: left + width / 2,
|
|
264
|
+
y: positionSign * (axisHeight - labelHeight)
|
|
265
|
+
};
|
|
236
266
|
return /*#__PURE__*/_jsxs(XAxisRoot, {
|
|
237
267
|
transform: `translate(0, ${position === 'bottom' ? top + height + offset : top - offset})`,
|
|
238
268
|
className: classes.root,
|
|
@@ -7,8 +7,9 @@ import * as React from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import { useThemeProps, styled } from '@mui/material/styles';
|
|
10
|
+
import { useThemeProps, styled, useTheme } from '@mui/material/styles';
|
|
11
11
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
12
|
+
import { getStringSize } from "../internals/domUtils.js";
|
|
12
13
|
import { useTicks } from "../hooks/useTicks.js";
|
|
13
14
|
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
14
15
|
import { AxisRoot } from "../internals/components/AxisSharedComponents.js";
|
|
@@ -86,8 +87,10 @@ function ChartsYAxis(inProps) {
|
|
|
86
87
|
tickInterval,
|
|
87
88
|
tickLabelInterval,
|
|
88
89
|
sx,
|
|
89
|
-
offset
|
|
90
|
+
offset,
|
|
91
|
+
width: axisWidth
|
|
90
92
|
} = defaultizedProps;
|
|
93
|
+
const theme = useTheme();
|
|
91
94
|
const isRtl = useRtl();
|
|
92
95
|
const classes = useUtilityClasses(defaultizedProps);
|
|
93
96
|
const {
|
|
@@ -110,10 +113,6 @@ function ChartsYAxis(inProps) {
|
|
|
110
113
|
});
|
|
111
114
|
const positionSign = position === 'right' ? 1 : -1;
|
|
112
115
|
const tickFontSize = typeof tickLabelStyle?.fontSize === 'number' ? tickLabelStyle.fontSize : 12;
|
|
113
|
-
const labelRefPoint = {
|
|
114
|
-
x: positionSign * (tickFontSize + tickSize + 10),
|
|
115
|
-
y: top + height / 2
|
|
116
|
-
};
|
|
117
116
|
const Line = slots?.axisLine ?? 'line';
|
|
118
117
|
const Tick = slots?.axisTick ?? 'line';
|
|
119
118
|
const TickLabel = slots?.axisTickLabel ?? ChartsText;
|
|
@@ -123,7 +122,7 @@ function ChartsYAxis(inProps) {
|
|
|
123
122
|
elementType: TickLabel,
|
|
124
123
|
externalSlotProps: slotProps?.axisTickLabel,
|
|
125
124
|
additionalProps: {
|
|
126
|
-
style: _extends({
|
|
125
|
+
style: _extends({}, theme.typography.caption, {
|
|
127
126
|
fontSize: tickFontSize,
|
|
128
127
|
textAnchor: revertAnchor ? 'start' : 'end',
|
|
129
128
|
dominantBaseline: 'central'
|
|
@@ -136,7 +135,8 @@ function ChartsYAxis(inProps) {
|
|
|
136
135
|
elementType: Label,
|
|
137
136
|
externalSlotProps: slotProps?.axisLabel,
|
|
138
137
|
additionalProps: {
|
|
139
|
-
style: _extends({
|
|
138
|
+
style: _extends({}, theme.typography.body1, {
|
|
139
|
+
lineHeight: 1,
|
|
140
140
|
fontSize: 14,
|
|
141
141
|
angle: positionSign * 90,
|
|
142
142
|
textAnchor: 'middle',
|
|
@@ -163,6 +163,11 @@ function ChartsYAxis(inProps) {
|
|
|
163
163
|
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(isInfinity) || position === 'none') {
|
|
164
164
|
return null;
|
|
165
165
|
}
|
|
166
|
+
const labelHeight = label ? getStringSize(label, axisLabelProps.style).height : 0;
|
|
167
|
+
const labelRefPoint = {
|
|
168
|
+
x: positionSign * (axisWidth - labelHeight),
|
|
169
|
+
y: top + height / 2
|
|
170
|
+
};
|
|
166
171
|
return /*#__PURE__*/_jsxs(YAxisRoot, {
|
|
167
172
|
transform: `translate(${position === 'right' ? left + width + offset : left - offset}, 0)`,
|
|
168
173
|
className: classes.root,
|
|
@@ -6,6 +6,7 @@ const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
9
10
|
import { line as d3Line } from '@mui/x-charts-vendor/d3-shape';
|
|
10
11
|
import { LineElement, lineElementClasses } from "./LineElement.js";
|
|
11
12
|
import { getValueToPositionMapper } from "../hooks/useScale.js";
|
|
@@ -72,7 +73,7 @@ const useAggregatedData = () => {
|
|
|
72
73
|
throw new Error(`MUI X: ${xAxisId === DEFAULT_X_AXIS_KEY ? 'The first `xAxis`' : `The x-axis with id "${xAxisId}"`} should have data property to be able to display a line plot.`);
|
|
73
74
|
}
|
|
74
75
|
if (xData.length < stackedData.length) {
|
|
75
|
-
|
|
76
|
+
warnOnce(`MUI X: The data length of the x axis (${xData.length} items) is lower than the length of series (${stackedData.length} items).`, 'error');
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
const shouldExpand = curve?.includes('step') && !strictStepCurve && isBandScale(xScale);
|
|
@@ -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<'line'>;
|
|
3
3
|
export declare const getExtremumY: CartesianExtremumGetter<'line'>;
|
|
@@ -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 getColor from "./getColor.js";
|
|
4
4
|
import legendGetter from "./legend.js";
|
|
5
5
|
import tooltipGetter from "./tooltip.js";
|
|
6
|
+
import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.js";
|
|
6
7
|
export const seriesConfig = {
|
|
7
8
|
colorProcessor: getColor,
|
|
8
9
|
seriesProcessor,
|
|
9
10
|
legendGetter,
|
|
10
11
|
tooltipGetter,
|
|
11
12
|
xExtremumGetter: getExtremumX,
|
|
12
|
-
yExtremumGetter: getExtremumY
|
|
13
|
+
yExtremumGetter: getExtremumY,
|
|
14
|
+
getSeriesWithDefaultValues
|
|
13
15
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}, seriesData, {
|
|
6
|
+
data: seriesData.data.map((d, index) => _extends({
|
|
7
|
+
color: colors[index % colors.length]
|
|
8
|
+
}, d))
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
export default getSeriesWithDefaultValues;
|
|
@@ -2,9 +2,11 @@ import seriesProcessor from "./seriesProcessor.js";
|
|
|
2
2
|
import getColor from "./getColor.js";
|
|
3
3
|
import legendGetter from "./legend.js";
|
|
4
4
|
import tooltipGetter from "./tooltip.js";
|
|
5
|
+
import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.js";
|
|
5
6
|
export const seriesConfig = {
|
|
6
7
|
colorProcessor: getColor,
|
|
7
8
|
seriesProcessor,
|
|
8
9
|
legendGetter,
|
|
9
|
-
tooltipGetter
|
|
10
|
+
tooltipGetter,
|
|
11
|
+
getSeriesWithDefaultValues
|
|
10
12
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartsOverlayProps } from "../ChartsOverlay/ChartsOverlay.js";
|
|
3
|
+
import { RadarGridProps } from "./RadarGrid/RadarGrid.js";
|
|
4
|
+
import { RadarDataProviderProps } from "./RadarDataProvider/RadarDataProvider.js";
|
|
5
|
+
export interface RadarChartSlots {}
|
|
6
|
+
export interface RadarChartSlotProps {}
|
|
7
|
+
export interface RadarChartProps extends RadarDataProviderProps, RadarGridProps, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
8
|
+
/**
|
|
9
|
+
* If `true`, the legend is not rendered.
|
|
10
|
+
*/
|
|
11
|
+
hideLegend?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Overridable component slots.
|
|
14
|
+
* @default {}
|
|
15
|
+
*/
|
|
16
|
+
slots?: RadarChartSlots;
|
|
17
|
+
/**
|
|
18
|
+
* The props used for each component slot.
|
|
19
|
+
* @default {}
|
|
20
|
+
*/
|
|
21
|
+
slotProps?: RadarChartSlotProps;
|
|
22
|
+
}
|
|
23
|
+
declare const RadarChart: React.ForwardRefExoticComponent<RadarChartProps & React.RefAttributes<SVGSVGElement>>;
|
|
24
|
+
export { RadarChart };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
7
|
+
import { ChartsLegend } from "../ChartsLegend/index.js";
|
|
8
|
+
import { ChartsOverlay } from "../ChartsOverlay/ChartsOverlay.js";
|
|
9
|
+
import { useRadarChartProps } from "./useRadarChartProps.js";
|
|
10
|
+
import { ChartsSurface } from "../ChartsSurface/index.js";
|
|
11
|
+
import { ChartsWrapper } from "../internals/components/ChartsWrapper/index.js";
|
|
12
|
+
import { RadarGrid } from "./RadarGrid/RadarGrid.js";
|
|
13
|
+
import { RadarDataProvider } from "./RadarDataProvider/RadarDataProvider.js";
|
|
14
|
+
import { RadarSeriesPlot } from "./RadarSeriesPlot/index.js";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const RadarChart = /*#__PURE__*/React.forwardRef(function RadarChart(inProps, ref) {
|
|
17
|
+
const props = useThemeProps({
|
|
18
|
+
props: inProps,
|
|
19
|
+
name: 'MuiRadarChart'
|
|
20
|
+
});
|
|
21
|
+
const {
|
|
22
|
+
chartsWrapperProps,
|
|
23
|
+
chartsSurfaceProps,
|
|
24
|
+
radarDataProviderProps,
|
|
25
|
+
radarGrid,
|
|
26
|
+
overlayProps,
|
|
27
|
+
legendProps,
|
|
28
|
+
children
|
|
29
|
+
} = useRadarChartProps(props);
|
|
30
|
+
return /*#__PURE__*/_jsx(RadarDataProvider, _extends({}, radarDataProviderProps, {
|
|
31
|
+
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
32
|
+
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
33
|
+
ref: ref,
|
|
34
|
+
children: [/*#__PURE__*/_jsx(RadarGrid, _extends({}, radarGrid)), /*#__PURE__*/_jsx(RadarSeriesPlot, {}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), children]
|
|
35
|
+
}))]
|
|
36
|
+
}))
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
process.env.NODE_ENV !== "production" ? RadarChart.propTypes = {
|
|
40
|
+
// ----------------------------- Warning --------------------------------
|
|
41
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
42
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
43
|
+
// ----------------------------------------------------------------------
|
|
44
|
+
apiRef: PropTypes.shape({
|
|
45
|
+
current: PropTypes.object
|
|
46
|
+
}),
|
|
47
|
+
children: PropTypes.node,
|
|
48
|
+
className: PropTypes.string,
|
|
49
|
+
/**
|
|
50
|
+
* Color palette used to colorize multiple series.
|
|
51
|
+
* @default rainbowSurgePalette
|
|
52
|
+
*/
|
|
53
|
+
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
54
|
+
desc: PropTypes.string,
|
|
55
|
+
/**
|
|
56
|
+
* The number of divisions in the radar grid.
|
|
57
|
+
* @default 5
|
|
58
|
+
*/
|
|
59
|
+
divisions: PropTypes.number,
|
|
60
|
+
/**
|
|
61
|
+
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
62
|
+
*/
|
|
63
|
+
height: PropTypes.number,
|
|
64
|
+
/**
|
|
65
|
+
* If `true`, the legend is not rendered.
|
|
66
|
+
*/
|
|
67
|
+
hideLegend: PropTypes.bool,
|
|
68
|
+
/**
|
|
69
|
+
* The highlighted item.
|
|
70
|
+
* Used when the highlight is controlled.
|
|
71
|
+
*/
|
|
72
|
+
highlightedItem: PropTypes.shape({
|
|
73
|
+
dataIndex: PropTypes.number,
|
|
74
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
75
|
+
}),
|
|
76
|
+
/**
|
|
77
|
+
* This prop is used to help implement the accessibility logic.
|
|
78
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
79
|
+
*/
|
|
80
|
+
id: PropTypes.string,
|
|
81
|
+
/**
|
|
82
|
+
* If `true`, a loading overlay is displayed.
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
loading: PropTypes.bool,
|
|
86
|
+
/**
|
|
87
|
+
* The margin between the SVG and the drawing area.
|
|
88
|
+
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
89
|
+
*
|
|
90
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
91
|
+
*/
|
|
92
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
93
|
+
bottom: PropTypes.number,
|
|
94
|
+
left: PropTypes.number,
|
|
95
|
+
right: PropTypes.number,
|
|
96
|
+
top: PropTypes.number
|
|
97
|
+
})]),
|
|
98
|
+
/**
|
|
99
|
+
* The callback fired when the highlighted item changes.
|
|
100
|
+
*
|
|
101
|
+
* @param {HighlightItemData | null} highlightedItem The newly highlighted item.
|
|
102
|
+
*/
|
|
103
|
+
onHighlightChange: PropTypes.func,
|
|
104
|
+
/**
|
|
105
|
+
* The configuration of the radar scales.
|
|
106
|
+
*/
|
|
107
|
+
radar: PropTypes.shape({
|
|
108
|
+
max: PropTypes.number,
|
|
109
|
+
metrics: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.shape({
|
|
110
|
+
max: PropTypes.number,
|
|
111
|
+
min: PropTypes.number,
|
|
112
|
+
name: PropTypes.string.isRequired
|
|
113
|
+
}))]).isRequired,
|
|
114
|
+
startAngle: PropTypes.number
|
|
115
|
+
}).isRequired,
|
|
116
|
+
/**
|
|
117
|
+
* The series to display in the bar chart.
|
|
118
|
+
* An array of [[RadarSeriesType]] objects.
|
|
119
|
+
*/
|
|
120
|
+
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
121
|
+
/**
|
|
122
|
+
* If `true`, animations are skipped.
|
|
123
|
+
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
124
|
+
*/
|
|
125
|
+
skipAnimation: PropTypes.bool,
|
|
126
|
+
/**
|
|
127
|
+
* The props used for each component slot.
|
|
128
|
+
* @default {}
|
|
129
|
+
*/
|
|
130
|
+
slotProps: PropTypes.object,
|
|
131
|
+
/**
|
|
132
|
+
* Overridable component slots.
|
|
133
|
+
* @default {}
|
|
134
|
+
*/
|
|
135
|
+
slots: PropTypes.object,
|
|
136
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
137
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
138
|
+
title: PropTypes.string,
|
|
139
|
+
/**
|
|
140
|
+
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
141
|
+
*/
|
|
142
|
+
width: PropTypes.number
|
|
143
|
+
} : void 0;
|
|
144
|
+
export { RadarChart };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
|
+
import { ChartContainerProps } from "../../ChartContainer/index.js";
|
|
4
|
+
import { RadarSeriesType } from "../../models/seriesType/radar.js";
|
|
5
|
+
import { UseChartPolarAxisSignature } from "../../internals/plugins/featurePlugins/useChartPolarAxis/index.js";
|
|
6
|
+
import { UseChartHighlightSignature } from "../../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
7
|
+
import { RadarConfig } from "./radar.types.js";
|
|
8
|
+
type RadarPluginSignatures = [UseChartPolarAxisSignature, UseChartHighlightSignature];
|
|
9
|
+
export interface RadarDataProviderProps extends Omit<ChartContainerProps<'radar', RadarPluginSignatures>, 'series' | 'plugins' | 'rotationAxis' | 'radiusAxis' | 'dataset'> {
|
|
10
|
+
/**
|
|
11
|
+
* The series to display in the bar chart.
|
|
12
|
+
* An array of [[RadarSeriesType]] objects.
|
|
13
|
+
*/
|
|
14
|
+
series: MakeOptional<RadarSeriesType, 'type'>[];
|
|
15
|
+
/**
|
|
16
|
+
* The configuration of the radar scales.
|
|
17
|
+
*/
|
|
18
|
+
radar: RadarConfig;
|
|
19
|
+
}
|
|
20
|
+
declare function RadarDataProvider(props: RadarDataProviderProps): React.JSX.Element;
|
|
21
|
+
declare namespace RadarDataProvider {
|
|
22
|
+
var propTypes: any;
|
|
23
|
+
}
|
|
24
|
+
export { RadarDataProvider };
|