@mui/x-charts 8.0.0-alpha.12 → 8.0.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.d.ts +1 -1
- package/BarChart/BarChart.js +14 -30
- package/BarChart/BarPlot.js +10 -7
- package/BarChart/checkScaleErrors.d.ts +4 -1
- package/BarChart/checkScaleErrors.js +7 -1
- package/BarChart/seriesConfig/extremums.d.ts +1 -1
- package/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/{internals/defaultizeColor.js → BarChart/seriesConfig/getSeriesWithDefaultValues.js} +6 -11
- package/BarChart/seriesConfig/index.js +3 -1
- package/BarChart/useBarChartProps.js +3 -18
- package/CHANGELOG.md +430 -0
- package/ChartContainer/ChartContainer.d.ts +2 -2
- package/ChartContainer/ChartContainer.js +122 -7
- package/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/ChartContainer/useChartContainerProps.js +6 -2
- package/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/ChartDataProvider/ChartDataProvider.js +4 -3
- package/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/ChartsAxis/ChartsAxis.js +25 -87
- package/ChartsAxis/axisClasses.d.ts +5 -1
- package/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/ChartsLabel/ChartsLabelMark.js +15 -2
- package/ChartsLabel/index.d.ts +1 -1
- package/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.js +1 -1
- package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/ChartsXAxis/ChartsXAxis.js +107 -64
- package/ChartsYAxis/ChartsYAxis.js +21 -20
- package/Gauge/Gauge.js +4 -3
- package/Gauge/GaugeContainer.js +7 -5
- package/LineChart/LineChart.d.ts +1 -1
- package/LineChart/LineChart.js +14 -30
- package/LineChart/LinePlot.js +2 -1
- package/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +15 -0
- package/LineChart/seriesConfig/index.js +3 -1
- package/LineChart/useLineChartProps.js +2 -17
- package/PieChart/PieArcLabelPlot.js +1 -1
- package/PieChart/PieArcPlot.js +1 -1
- package/PieChart/PieChart.d.ts +1 -1
- package/PieChart/PieChart.js +6 -4
- package/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/PieChart/seriesConfig/getSeriesWithDefaultValues.js +18 -0
- package/PieChart/seriesConfig/index.js +3 -1
- package/RadarChart/RadarChart.d.ts +24 -0
- package/RadarChart/RadarChart.js +150 -0
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +24 -0
- package/RadarChart/RadarDataProvider/RadarDataProvider.js +168 -0
- package/RadarChart/RadarDataProvider/index.d.ts +1 -0
- package/RadarChart/RadarDataProvider/index.js +16 -0
- package/RadarChart/RadarDataProvider/radar.types.d.ts +32 -0
- package/RadarChart/RadarGrid/RadarGrid.d.ts +13 -0
- package/RadarChart/RadarGrid/RadarGrid.js +51 -0
- package/RadarChart/RadarGrid/index.d.ts +1 -0
- package/RadarChart/RadarGrid/index.js +16 -0
- package/RadarChart/RadarGrid/useRadarGridData.d.ts +10 -0
- package/RadarChart/RadarGrid/useRadarGridData.js +35 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +7 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +46 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +7 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +45 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +7 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +48 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +12 -0
- package/RadarChart/RadarSeriesPlot/getAreaPath.d.ts +4 -0
- package/RadarChart/RadarSeriesPlot/getAreaPath.js +9 -0
- package/RadarChart/RadarSeriesPlot/index.d.ts +4 -0
- package/RadarChart/RadarSeriesPlot/index.js +38 -0
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +27 -0
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +67 -0
- package/RadarChart/index.d.ts +6 -0
- package/RadarChart/index.js +47 -0
- package/RadarChart/seriesConfig/extremums.d.ts +3 -0
- package/RadarChart/seriesConfig/extremums.js +26 -0
- package/RadarChart/seriesConfig/formatter.d.ts +3 -0
- package/RadarChart/seriesConfig/formatter.js +18 -0
- package/RadarChart/seriesConfig/getColor.d.ts +3 -0
- package/RadarChart/seriesConfig/getColor.js +10 -0
- package/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/RadarChart/seriesConfig/getSeriesWithDefaultValues.js +15 -0
- package/RadarChart/seriesConfig/index.d.ts +2 -0
- package/RadarChart/seriesConfig/index.js +22 -0
- package/RadarChart/seriesConfig/legend.d.ts +3 -0
- package/RadarChart/seriesConfig/legend.js +28 -0
- package/RadarChart/seriesConfig/tooltip.d.ts +3 -0
- package/RadarChart/seriesConfig/tooltip.js +31 -0
- package/RadarChart/useRadarChartProps.d.ts +23 -0
- package/RadarChart/useRadarChartProps.js +74 -0
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +14 -30
- package/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/ScatterChart/seriesConfig/getSeriesWithDefaultValues.js +15 -0
- package/ScatterChart/seriesConfig/index.js +3 -1
- package/ScatterChart/useScatterChartProps.js +2 -17
- package/SparkLineChart/SparkLineChart.d.ts +5 -9
- package/SparkLineChart/SparkLineChart.js +23 -21
- package/constants/index.d.ts +5 -1
- package/constants/index.js +12 -6
- package/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/esm/BarChart/BarChart.d.ts +1 -1
- package/esm/BarChart/BarChart.js +14 -30
- package/esm/BarChart/BarPlot.js +10 -7
- package/esm/BarChart/checkScaleErrors.d.ts +4 -1
- package/esm/BarChart/checkScaleErrors.js +7 -1
- package/esm/BarChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/BarChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/BarChart/seriesConfig/index.js +3 -1
- package/esm/BarChart/useBarChartProps.js +3 -18
- package/esm/ChartContainer/ChartContainer.d.ts +2 -2
- package/esm/ChartContainer/ChartContainer.js +122 -7
- package/esm/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/esm/ChartContainer/useChartContainerProps.js +6 -2
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/esm/ChartDataProvider/ChartDataProvider.js +4 -3
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/esm/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/esm/ChartsAxis/ChartsAxis.js +24 -86
- package/esm/ChartsAxis/axisClasses.d.ts +5 -1
- package/esm/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/esm/ChartsLabel/ChartsLabelMark.js +15 -2
- package/esm/ChartsLabel/index.d.ts +1 -1
- package/esm/ChartsLabel/index.js +0 -3
- package/esm/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.js +1 -1
- package/esm/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/esm/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/esm/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +107 -64
- package/esm/ChartsYAxis/ChartsYAxis.js +22 -21
- package/esm/Gauge/Gauge.js +4 -3
- package/esm/Gauge/GaugeContainer.js +7 -5
- package/esm/LineChart/LineChart.d.ts +1 -1
- package/esm/LineChart/LineChart.js +14 -30
- package/esm/LineChart/LinePlot.js +2 -1
- package/esm/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/LineChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/LineChart/seriesConfig/index.js +3 -1
- package/esm/LineChart/useLineChartProps.js +2 -17
- package/esm/PieChart/PieArcLabelPlot.js +1 -1
- package/esm/PieChart/PieArcPlot.js +1 -1
- package/esm/PieChart/PieChart.d.ts +1 -1
- package/esm/PieChart/PieChart.js +6 -4
- package/esm/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/PieChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
- package/esm/PieChart/seriesConfig/index.js +3 -1
- package/esm/RadarChart/RadarChart.d.ts +24 -0
- package/esm/RadarChart/RadarChart.js +144 -0
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +24 -0
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.js +162 -0
- package/esm/RadarChart/RadarDataProvider/index.d.ts +1 -0
- package/esm/RadarChart/RadarDataProvider/index.js +1 -0
- package/esm/RadarChart/RadarDataProvider/radar.types.d.ts +32 -0
- package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +13 -0
- package/esm/RadarChart/RadarGrid/RadarGrid.js +44 -0
- package/esm/RadarChart/RadarGrid/index.d.ts +1 -0
- package/esm/RadarChart/RadarGrid/index.js +1 -0
- package/esm/RadarChart/RadarGrid/useRadarGridData.d.ts +10 -0
- package/esm/RadarChart/RadarGrid/useRadarGridData.js +29 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +7 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +39 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +7 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +38 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +7 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +41 -0
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +12 -0
- package/esm/RadarChart/RadarSeriesPlot/getAreaPath.d.ts +4 -0
- package/esm/RadarChart/RadarSeriesPlot/getAreaPath.js +3 -0
- package/esm/RadarChart/RadarSeriesPlot/index.d.ts +4 -0
- package/esm/RadarChart/RadarSeriesPlot/index.js +3 -0
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +27 -0
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +60 -0
- package/esm/RadarChart/index.d.ts +6 -0
- package/esm/RadarChart/index.js +4 -0
- package/esm/RadarChart/seriesConfig/extremums.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/extremums.js +18 -0
- package/esm/RadarChart/seriesConfig/formatter.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/formatter.js +12 -0
- package/esm/RadarChart/seriesConfig/getColor.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/getColor.js +4 -0
- package/esm/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/RadarChart/seriesConfig/index.d.ts +2 -0
- package/esm/RadarChart/seriesConfig/index.js +15 -0
- package/esm/RadarChart/seriesConfig/legend.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/legend.js +22 -0
- package/esm/RadarChart/seriesConfig/tooltip.d.ts +3 -0
- package/esm/RadarChart/seriesConfig/tooltip.js +25 -0
- package/esm/RadarChart/useRadarChartProps.d.ts +23 -0
- package/esm/RadarChart/useRadarChartProps.js +67 -0
- package/esm/ScatterChart/ScatterChart.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.js +14 -30
- package/esm/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/ScatterChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/esm/ScatterChart/seriesConfig/index.js +3 -1
- package/esm/ScatterChart/useScatterChartProps.js +2 -17
- package/esm/SparkLineChart/SparkLineChart.d.ts +5 -9
- package/esm/SparkLineChart/SparkLineChart.js +23 -21
- package/esm/constants/index.d.ts +5 -1
- package/esm/constants/index.js +11 -5
- package/esm/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/esm/hooks/useAxis.d.ts +13 -3
- package/esm/hooks/useAxis.js +42 -1
- package/esm/hooks/useRadarSeries.d.ts +35 -0
- package/esm/hooks/useRadarSeries.js +42 -0
- package/esm/hooks/useScale.d.ts +3 -1
- package/esm/hooks/useScale.js +9 -1
- package/esm/hooks/useSvgRef.js +1 -1
- package/esm/hooks/useTicks.js +17 -11
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/internals/clampAngle.d.ts +2 -0
- package/esm/internals/clampAngle.js +4 -0
- package/esm/internals/components/AxisSharedComponents.js +2 -2
- package/esm/internals/configInit.d.ts +11 -4
- package/esm/internals/configInit.js +22 -4
- package/esm/internals/defaultizeMargin.d.ts +3 -0
- package/esm/internals/defaultizeMargin.js +15 -0
- package/esm/internals/domUtils.js +1 -0
- package/esm/internals/index.d.ts +5 -0
- package/esm/internals/index.js +5 -0
- package/esm/internals/invertTextAnchor.d.ts +2 -0
- package/esm/internals/invertTextAnchor.js +10 -0
- package/esm/internals/isPolar.d.ts +7 -0
- package/esm/internals/isPolar.js +7 -0
- package/esm/internals/plugins/allPlugins.d.ts +3 -2
- package/esm/internals/plugins/allPlugins.js +2 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +52 -31
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +19 -18
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.js +7 -13
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +10 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +37 -35
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +81 -13
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +6 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +20 -19
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -31
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.d.ts → useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/{modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js → esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js} +4 -6
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +9 -4
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +27 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +133 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +24 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.js +21 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +57 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +1453 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +26 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +55 -0
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/esm/internals/plugins/models/plugin.d.ts +1 -1
- package/esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/esm/internals/plugins/models/seriesConfig/index.d.ts +4 -2
- package/esm/internals/plugins/models/seriesConfig/index.js +4 -2
- package/esm/internals/plugins/models/seriesConfig/polarExtremumGetter.types.d.ts +16 -0
- package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -2
- package/esm/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/esm/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/esm/internals/plugins/utils/selectors.d.ts +1 -0
- package/esm/internals/stackSeries.d.ts +4 -6
- package/esm/internals/store/useCharts.js +0 -8
- package/esm/internals/store/useSelector.d.ts +1 -1
- package/esm/internals/store/useSelector.js +4 -1
- package/esm/internals/store/useStore.js +1 -1
- package/esm/models/axis.d.ts +73 -12
- package/esm/models/axis.js +4 -0
- package/esm/models/colorMapping.d.ts +1 -1
- package/esm/models/index.d.ts +0 -1
- package/esm/models/index.js +0 -1
- package/esm/models/seriesType/bar.d.ts +1 -1
- package/esm/models/seriesType/config.d.ts +20 -10
- package/esm/models/seriesType/index.d.ts +1 -0
- package/esm/models/seriesType/index.js +1 -0
- package/esm/models/seriesType/line.d.ts +1 -1
- package/esm/models/seriesType/pie.d.ts +1 -1
- package/esm/models/seriesType/radar.d.ts +24 -0
- package/esm/models/seriesType/radar.js +1 -0
- package/esm/models/seriesType/scatter.d.ts +1 -1
- package/esm/models/z-axis.d.ts +1 -1
- package/hooks/useAxis.d.ts +13 -3
- package/hooks/useAxis.js +50 -5
- package/hooks/useRadarSeries.d.ts +35 -0
- package/hooks/useRadarSeries.js +48 -0
- package/hooks/useScale.d.ts +3 -1
- package/hooks/useScale.js +10 -0
- package/hooks/useSvgRef.js +1 -1
- package/hooks/useTicks.js +17 -11
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/internals/clampAngle.d.ts +2 -0
- package/internals/clampAngle.js +10 -0
- package/internals/components/AxisSharedComponents.js +2 -2
- package/internals/configInit.d.ts +11 -4
- package/internals/configInit.js +23 -5
- package/internals/defaultizeMargin.d.ts +3 -0
- package/internals/defaultizeMargin.js +22 -0
- package/internals/domUtils.js +1 -0
- package/internals/index.d.ts +5 -0
- package/internals/index.js +60 -0
- package/internals/invertTextAnchor.d.ts +2 -0
- package/internals/invertTextAnchor.js +16 -0
- package/internals/isPolar.d.ts +7 -0
- package/internals/isPolar.js +14 -0
- package/internals/plugins/allPlugins.d.ts +3 -2
- package/internals/plugins/allPlugins.js +2 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +51 -30
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +20 -19
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/processSeries.js +7 -14
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +10 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +39 -37
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +82 -13
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +14 -7
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +12 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +20 -19
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -31
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.d.ts → useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.js → useChartCartesianAxisRendering.selectors.js} +10 -13
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +27 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +140 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +31 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.js +28 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.js +27 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +65 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +1453 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +33 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +55 -0
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/internals/plugins/models/plugin.d.ts +1 -1
- package/internals/plugins/models/seriesConfig/cartesianExtremumGetter.types.js +5 -0
- package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.js +5 -0
- package/internals/plugins/models/seriesConfig/index.d.ts +4 -2
- package/internals/plugins/models/seriesConfig/index.js +26 -4
- package/internals/plugins/models/seriesConfig/polarExtremumGetter.types.d.ts +16 -0
- package/internals/plugins/models/seriesConfig/polarExtremumGetter.types.js +5 -0
- package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -2
- package/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/internals/plugins/utils/selectors.d.ts +1 -0
- package/internals/stackSeries.d.ts +4 -6
- package/internals/store/useCharts.js +0 -8
- package/internals/store/useSelector.d.ts +1 -1
- package/internals/store/useSelector.js +5 -1
- package/internals/store/useStore.js +1 -1
- package/models/axis.d.ts +73 -12
- package/models/axis.js +4 -0
- package/models/colorMapping.d.ts +1 -1
- package/models/index.d.ts +0 -1
- package/models/index.js +0 -11
- package/models/seriesType/bar.d.ts +1 -1
- package/models/seriesType/config.d.ts +20 -10
- package/models/seriesType/index.d.ts +1 -0
- package/models/seriesType/index.js +12 -0
- package/models/seriesType/line.d.ts +1 -1
- package/models/seriesType/pie.d.ts +1 -1
- package/models/seriesType/radar.d.ts +24 -0
- package/models/seriesType/radar.js +5 -0
- package/models/seriesType/scatter.d.ts +1 -1
- package/models/z-axis.d.ts +1 -1
- package/modern/BarChart/BarChart.d.ts +1 -1
- package/modern/BarChart/BarChart.js +14 -30
- package/modern/BarChart/BarPlot.js +10 -7
- package/modern/BarChart/checkScaleErrors.d.ts +4 -1
- package/modern/BarChart/checkScaleErrors.js +7 -1
- package/modern/BarChart/seriesConfig/extremums.d.ts +1 -1
- package/modern/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/BarChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/BarChart/seriesConfig/index.js +3 -1
- package/modern/BarChart/useBarChartProps.js +3 -18
- package/modern/ChartContainer/ChartContainer.d.ts +2 -2
- package/modern/ChartContainer/ChartContainer.js +122 -7
- package/modern/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/modern/ChartContainer/useChartContainerProps.js +6 -2
- package/modern/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/modern/ChartDataProvider/ChartDataProvider.js +4 -3
- package/modern/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/modern/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/modern/ChartsAxis/ChartsAxis.js +24 -86
- package/modern/ChartsAxis/axisClasses.d.ts +5 -1
- package/modern/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/modern/ChartsLabel/ChartsLabelMark.js +15 -2
- package/modern/ChartsLabel/index.d.ts +1 -1
- package/modern/ChartsLabel/index.js +0 -3
- package/modern/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/modern/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/modern/ChartsLabel/labelMarkClasses.js +1 -1
- package/modern/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/modern/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/modern/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/modern/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/modern/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +107 -64
- package/modern/ChartsYAxis/ChartsYAxis.js +22 -21
- package/modern/Gauge/Gauge.js +4 -3
- package/modern/Gauge/GaugeContainer.js +7 -5
- package/modern/LineChart/LineChart.d.ts +1 -1
- package/modern/LineChart/LineChart.js +14 -30
- package/modern/LineChart/LinePlot.js +2 -1
- package/modern/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/modern/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/LineChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/LineChart/seriesConfig/index.js +3 -1
- package/modern/LineChart/useLineChartProps.js +2 -17
- package/modern/PieChart/PieArcLabelPlot.js +1 -1
- package/modern/PieChart/PieArcPlot.js +1 -1
- package/modern/PieChart/PieChart.d.ts +1 -1
- package/modern/PieChart/PieChart.js +6 -4
- package/modern/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/PieChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
- package/modern/PieChart/seriesConfig/index.js +3 -1
- package/modern/RadarChart/RadarChart.d.ts +24 -0
- package/modern/RadarChart/RadarChart.js +144 -0
- package/modern/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +24 -0
- package/modern/RadarChart/RadarDataProvider/RadarDataProvider.js +162 -0
- package/modern/RadarChart/RadarDataProvider/index.d.ts +1 -0
- package/modern/RadarChart/RadarDataProvider/index.js +1 -0
- package/modern/RadarChart/RadarDataProvider/radar.types.d.ts +32 -0
- package/modern/RadarChart/RadarDataProvider/radar.types.js +1 -0
- package/modern/RadarChart/RadarGrid/RadarGrid.d.ts +13 -0
- package/modern/RadarChart/RadarGrid/RadarGrid.js +44 -0
- package/modern/RadarChart/RadarGrid/index.d.ts +1 -0
- package/modern/RadarChart/RadarGrid/index.js +1 -0
- package/modern/RadarChart/RadarGrid/useRadarGridData.d.ts +10 -0
- package/modern/RadarChart/RadarGrid/useRadarGridData.js +29 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +7 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +39 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +7 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +38 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +7 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +41 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +12 -0
- package/modern/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.js +1 -0
- package/modern/RadarChart/RadarSeriesPlot/getAreaPath.d.ts +4 -0
- package/modern/RadarChart/RadarSeriesPlot/getAreaPath.js +3 -0
- package/modern/RadarChart/RadarSeriesPlot/index.d.ts +4 -0
- package/modern/RadarChart/RadarSeriesPlot/index.js +3 -0
- package/modern/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +27 -0
- package/modern/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +60 -0
- package/modern/RadarChart/index.d.ts +6 -0
- package/modern/RadarChart/index.js +4 -0
- package/modern/RadarChart/seriesConfig/extremums.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/extremums.js +18 -0
- package/modern/RadarChart/seriesConfig/formatter.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/formatter.js +12 -0
- package/modern/RadarChart/seriesConfig/getColor.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/getColor.js +4 -0
- package/modern/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/RadarChart/seriesConfig/index.d.ts +2 -0
- package/modern/RadarChart/seriesConfig/index.js +15 -0
- package/modern/RadarChart/seriesConfig/legend.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/legend.js +22 -0
- package/modern/RadarChart/seriesConfig/tooltip.d.ts +3 -0
- package/modern/RadarChart/seriesConfig/tooltip.js +25 -0
- package/modern/RadarChart/useRadarChartProps.d.ts +23 -0
- package/modern/RadarChart/useRadarChartProps.js +67 -0
- package/modern/ScatterChart/ScatterChart.d.ts +1 -1
- package/modern/ScatterChart/ScatterChart.js +14 -30
- package/modern/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/modern/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
- package/modern/ScatterChart/seriesConfig/getSeriesWithDefaultValues.js +8 -0
- package/modern/ScatterChart/seriesConfig/index.js +3 -1
- package/modern/ScatterChart/useScatterChartProps.js +2 -17
- package/modern/SparkLineChart/SparkLineChart.d.ts +5 -9
- package/modern/SparkLineChart/SparkLineChart.js +23 -21
- package/modern/constants/index.d.ts +5 -1
- package/modern/constants/index.js +11 -5
- package/modern/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/modern/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/modern/hooks/useAxis.d.ts +13 -3
- package/modern/hooks/useAxis.js +42 -1
- package/modern/hooks/useRadarSeries.d.ts +35 -0
- package/modern/hooks/useRadarSeries.js +42 -0
- package/modern/hooks/useScale.d.ts +3 -1
- package/modern/hooks/useScale.js +9 -1
- package/modern/hooks/useSvgRef.js +1 -1
- package/modern/hooks/useTicks.js +17 -11
- package/modern/index.d.ts +1 -0
- package/modern/index.js +2 -1
- package/modern/internals/clampAngle.d.ts +2 -0
- package/modern/internals/clampAngle.js +4 -0
- package/modern/internals/components/AxisSharedComponents.js +2 -2
- package/modern/internals/configInit.d.ts +11 -4
- package/modern/internals/configInit.js +22 -4
- package/modern/internals/defaultizeMargin.d.ts +3 -0
- package/modern/internals/defaultizeMargin.js +15 -0
- package/modern/internals/domUtils.js +1 -0
- package/modern/internals/index.d.ts +5 -0
- package/modern/internals/index.js +5 -0
- package/modern/internals/invertTextAnchor.d.ts +2 -0
- package/modern/internals/invertTextAnchor.js +10 -0
- package/modern/internals/isPolar.d.ts +7 -0
- package/modern/internals/isPolar.js +7 -0
- package/modern/internals/plugins/allPlugins.d.ts +3 -2
- package/modern/internals/plugins/allPlugins.js +2 -1
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +52 -31
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +19 -18
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/modern/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/modern/internals/plugins/corePlugins/useChartSeries/processSeries.js +7 -13
- package/modern/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/modern/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +10 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +37 -35
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +81 -13
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +2 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +6 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +20 -19
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -31
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.d.ts → useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/{esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js → modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js} +4 -6
- package/modern/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/modern/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +9 -4
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +27 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +133 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +5 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +24 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +5 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.js +21 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +3 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/index.js +2 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.d.ts +3 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +57 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +1453 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +26 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +55 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.js +1 -0
- package/modern/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/modern/internals/plugins/models/plugin.d.ts +1 -1
- package/modern/internals/plugins/models/seriesConfig/cartesianExtremumGetter.types.js +1 -0
- package/modern/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/modern/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.js +1 -0
- package/modern/internals/plugins/models/seriesConfig/index.d.ts +4 -2
- package/modern/internals/plugins/models/seriesConfig/index.js +4 -2
- package/modern/internals/plugins/models/seriesConfig/polarExtremumGetter.types.d.ts +16 -0
- package/modern/internals/plugins/models/seriesConfig/polarExtremumGetter.types.js +1 -0
- package/modern/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +8 -2
- package/modern/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/modern/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/modern/internals/plugins/utils/selectors.d.ts +1 -0
- package/modern/internals/stackSeries.d.ts +4 -6
- package/modern/internals/store/useCharts.js +0 -8
- package/modern/internals/store/useSelector.d.ts +1 -1
- package/modern/internals/store/useSelector.js +4 -1
- package/modern/internals/store/useStore.js +1 -1
- package/modern/models/axis.d.ts +73 -12
- package/modern/models/axis.js +4 -0
- package/modern/models/colorMapping.d.ts +1 -1
- package/modern/models/index.d.ts +0 -1
- package/modern/models/index.js +0 -1
- package/modern/models/seriesType/bar.d.ts +1 -1
- package/modern/models/seriesType/config.d.ts +20 -10
- package/modern/models/seriesType/index.d.ts +1 -0
- package/modern/models/seriesType/index.js +1 -0
- package/modern/models/seriesType/line.d.ts +1 -1
- package/modern/models/seriesType/pie.d.ts +1 -1
- package/modern/models/seriesType/radar.d.ts +24 -0
- package/modern/models/seriesType/radar.js +1 -0
- package/modern/models/seriesType/scatter.d.ts +1 -1
- package/modern/models/z-axis.d.ts +1 -1
- package/package.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/context/PolarProvider/Polar.types.d.ts +0 -42
- package/context/PolarProvider/PolarContext.d.ts +0 -4
- package/context/PolarProvider/PolarContext.js +0 -20
- package/context/PolarProvider/PolarProvider.d.ts +0 -0
- package/context/PolarProvider/PolarProvider.js +0 -62
- package/context/PolarProvider/getAxisExtremum.d.ts +0 -0
- package/context/PolarProvider/getAxisExtremum.js +0 -49
- package/context/PolarProvider/index.d.ts +0 -0
- package/context/PolarProvider/index.js +0 -1
- package/context/PolarProvider/usePolarContext.d.ts +0 -0
- package/context/PolarProvider/usePolarContext.js +0 -12
- package/esm/context/PolarProvider/Polar.types.d.ts +0 -42
- package/esm/context/PolarProvider/PolarContext.d.ts +0 -4
- package/esm/context/PolarProvider/PolarContext.js +0 -13
- package/esm/context/PolarProvider/PolarProvider.d.ts +0 -0
- package/esm/context/PolarProvider/PolarProvider.js +0 -61
- package/esm/context/PolarProvider/getAxisExtremum.d.ts +0 -0
- package/esm/context/PolarProvider/getAxisExtremum.js +0 -48
- package/esm/context/PolarProvider/index.d.ts +0 -0
- package/esm/context/PolarProvider/index.js +0 -0
- package/esm/context/PolarProvider/usePolarContext.d.ts +0 -0
- package/esm/context/PolarProvider/usePolarContext.js +0 -11
- package/esm/internals/calculateMargins.d.ts +0 -7
- package/esm/internals/calculateMargins.js +0 -25
- package/esm/internals/defaultizeColor.d.ts +0 -107
- package/esm/internals/defaultizeColor.js +0 -13
- package/esm/models/layout.d.ts +0 -18
- package/internals/calculateMargins.d.ts +0 -7
- package/internals/calculateMargins.js +0 -33
- package/internals/defaultizeColor.d.ts +0 -107
- package/models/layout.d.ts +0 -18
- package/modern/context/PolarProvider/Polar.types.d.ts +0 -42
- package/modern/context/PolarProvider/PolarContext.d.ts +0 -4
- package/modern/context/PolarProvider/PolarContext.js +0 -13
- package/modern/context/PolarProvider/PolarProvider.d.ts +0 -0
- package/modern/context/PolarProvider/PolarProvider.js +0 -61
- package/modern/context/PolarProvider/getAxisExtremum.d.ts +0 -0
- package/modern/context/PolarProvider/getAxisExtremum.js +0 -48
- package/modern/context/PolarProvider/index.d.ts +0 -0
- package/modern/context/PolarProvider/index.js +0 -0
- package/modern/context/PolarProvider/usePolarContext.d.ts +0 -0
- package/modern/context/PolarProvider/usePolarContext.js +0 -11
- package/modern/internals/calculateMargins.d.ts +0 -7
- package/modern/internals/calculateMargins.js +0 -25
- package/modern/internals/defaultizeColor.d.ts +0 -107
- package/modern/internals/defaultizeColor.js +0 -13
- package/modern/models/layout.d.ts +0 -18
- /package/{context/PolarProvider/Polar.types.js → RadarChart/RadarDataProvider/radar.types.js} +0 -0
- /package/{internals/plugins/models/seriesConfig/extremumGetter.types.js → RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.js} +0 -0
- /package/esm/{context/PolarProvider/Polar.types.js → RadarChart/RadarDataProvider/radar.types.js} +0 -0
- /package/esm/{internals/plugins/models/seriesConfig/extremumGetter.types.js → RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.js} +0 -0
- /package/esm/{models/layout.js → internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.js} +0 -0
- /package/esm/internals/plugins/models/seriesConfig/{extremumGetter.types.d.ts → cartesianExtremumGetter.types.d.ts} +0 -0
- /package/{modern/context/PolarProvider/Polar.types.js → esm/internals/plugins/models/seriesConfig/cartesianExtremumGetter.types.js} +0 -0
- /package/{modern/internals/plugins/models/seriesConfig/extremumGetter.types.js → esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.js} +0 -0
- /package/{modern/models/layout.js → esm/internals/plugins/models/seriesConfig/polarExtremumGetter.types.js} +0 -0
- /package/{models/layout.js → internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.js} +0 -0
- /package/internals/plugins/models/seriesConfig/{extremumGetter.types.d.ts → cartesianExtremumGetter.types.d.ts} +0 -0
- /package/modern/internals/plugins/models/seriesConfig/{extremumGetter.types.d.ts → cartesianExtremumGetter.types.d.ts} +0 -0
|
@@ -78,12 +78,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
78
78
|
x: PropTypes.oneOf(['band', 'line', 'none']),
|
|
79
79
|
y: PropTypes.oneOf(['band', 'line', 'none'])
|
|
80
80
|
}),
|
|
81
|
-
/**
|
|
82
|
-
* Indicate which axis to display the bottom of the charts.
|
|
83
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
84
|
-
* @default xAxisIds[0] The id of the first provided axis
|
|
85
|
-
*/
|
|
86
|
-
bottomAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
87
81
|
children: PropTypes.node,
|
|
88
82
|
className: PropTypes.string,
|
|
89
83
|
/**
|
|
@@ -135,12 +129,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
135
129
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
136
130
|
*/
|
|
137
131
|
id: PropTypes.string,
|
|
138
|
-
/**
|
|
139
|
-
* Indicate which axis to display the left of the charts.
|
|
140
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
141
|
-
* @default yAxisIds[0] The id of the first provided axis
|
|
142
|
-
*/
|
|
143
|
-
leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
144
132
|
/**
|
|
145
133
|
* If `true`, a loading overlay is displayed.
|
|
146
134
|
* @default false
|
|
@@ -149,14 +137,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
149
137
|
/**
|
|
150
138
|
* The margin between the SVG and the drawing area.
|
|
151
139
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
152
|
-
*
|
|
140
|
+
*
|
|
141
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
153
142
|
*/
|
|
154
|
-
margin: PropTypes.shape({
|
|
143
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
155
144
|
bottom: PropTypes.number,
|
|
156
145
|
left: PropTypes.number,
|
|
157
146
|
right: PropTypes.number,
|
|
158
147
|
top: PropTypes.number
|
|
159
|
-
}),
|
|
148
|
+
})]),
|
|
160
149
|
/**
|
|
161
150
|
* The function called for onClick events.
|
|
162
151
|
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
@@ -176,12 +165,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
176
165
|
* @param {ScatterItemIdentifier} scatterItemIdentifier The scatter item identifier.
|
|
177
166
|
*/
|
|
178
167
|
onItemClick: PropTypes.func,
|
|
179
|
-
/**
|
|
180
|
-
* Indicate which axis to display the right of the charts.
|
|
181
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
182
|
-
* @default null
|
|
183
|
-
*/
|
|
184
|
-
rightAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
185
168
|
/**
|
|
186
169
|
* The series to display in the scatter chart.
|
|
187
170
|
* An array of [[ScatterSeriesType]] objects.
|
|
@@ -205,12 +188,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
205
188
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
206
189
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
207
190
|
title: PropTypes.string,
|
|
208
|
-
/**
|
|
209
|
-
* Indicate which axis to display the top of the charts.
|
|
210
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
211
|
-
* @default null
|
|
212
|
-
*/
|
|
213
|
-
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
214
191
|
/**
|
|
215
192
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
216
193
|
* If `undefined`, the radius is assumed to be infinite.
|
|
@@ -226,6 +203,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
226
203
|
* An array of [[AxisConfig]] objects.
|
|
227
204
|
*/
|
|
228
205
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
206
|
+
axis: PropTypes.oneOf(['x']),
|
|
229
207
|
classes: PropTypes.object,
|
|
230
208
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
231
209
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -248,13 +226,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
248
226
|
disableTicks: PropTypes.bool,
|
|
249
227
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
250
228
|
fill: PropTypes.string,
|
|
229
|
+
height: PropTypes.number,
|
|
251
230
|
hideTooltip: PropTypes.bool,
|
|
252
231
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
253
232
|
label: PropTypes.string,
|
|
254
233
|
labelStyle: PropTypes.object,
|
|
255
234
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
256
235
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
257
|
-
|
|
236
|
+
offset: PropTypes.number,
|
|
237
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
258
238
|
reverse: PropTypes.bool,
|
|
259
239
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
260
240
|
slotProps: PropTypes.object,
|
|
@@ -263,6 +243,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
263
243
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
264
244
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
265
245
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
246
|
+
tickLabelMinGap: PropTypes.number,
|
|
266
247
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
267
248
|
tickLabelStyle: PropTypes.object,
|
|
268
249
|
tickMaxStep: PropTypes.number,
|
|
@@ -278,6 +259,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
278
259
|
* An array of [[AxisConfig]] objects.
|
|
279
260
|
*/
|
|
280
261
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
262
|
+
axis: PropTypes.oneOf(['y']),
|
|
281
263
|
classes: PropTypes.object,
|
|
282
264
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
283
265
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -306,7 +288,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
306
288
|
labelStyle: PropTypes.object,
|
|
307
289
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
308
290
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
309
|
-
|
|
291
|
+
offset: PropTypes.number,
|
|
292
|
+
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
310
293
|
reverse: PropTypes.bool,
|
|
311
294
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
312
295
|
slotProps: PropTypes.object,
|
|
@@ -322,7 +305,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
322
305
|
tickNumber: PropTypes.number,
|
|
323
306
|
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
324
307
|
tickSize: PropTypes.number,
|
|
325
|
-
valueFormatter: PropTypes.func
|
|
308
|
+
valueFormatter: PropTypes.func,
|
|
309
|
+
width: PropTypes.number
|
|
326
310
|
})),
|
|
327
311
|
/**
|
|
328
312
|
* The configuration of the z-axes.
|
|
@@ -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<'scatter'>;
|
|
3
3
|
export declare const getExtremumY: CartesianExtremumGetter<'scatter'>;
|
|
@@ -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
|
seriesProcessor,
|
|
8
9
|
colorProcessor: getColor,
|
|
9
10
|
legendGetter,
|
|
10
11
|
tooltipGetter,
|
|
11
12
|
xExtremumGetter: getExtremumX,
|
|
12
|
-
yExtremumGetter: getExtremumY
|
|
13
|
+
yExtremumGetter: getExtremumY,
|
|
14
|
+
getSeriesWithDefaultValues
|
|
13
15
|
};
|
|
@@ -2,8 +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 = ["xAxis", "yAxis", "zAxis", "series", "axisHighlight", "voronoiMaxRadius", "disableVoronoi", "hideLegend", "width", "height", "margin", "colors", "sx", "grid", "
|
|
6
|
-
import { calculateMargins } from "../internals/calculateMargins.js";
|
|
5
|
+
const _excluded = ["xAxis", "yAxis", "zAxis", "series", "axisHighlight", "voronoiMaxRadius", "disableVoronoi", "hideLegend", "width", "height", "margin", "colors", "sx", "grid", "onItemClick", "children", "slots", "slotProps", "loading", "highlightedItem", "onHighlightChange", "className"];
|
|
7
6
|
import { SCATTER_CHART_PLUGINS } from "./ScatterChart.plugins.js";
|
|
8
7
|
/**
|
|
9
8
|
* A helper function that extracts ScatterChartProps from the input props
|
|
@@ -21,17 +20,12 @@ export const useScatterChartProps = props => {
|
|
|
21
20
|
axisHighlight,
|
|
22
21
|
voronoiMaxRadius,
|
|
23
22
|
disableVoronoi,
|
|
24
|
-
hideLegend,
|
|
25
23
|
width,
|
|
26
24
|
height,
|
|
27
25
|
margin,
|
|
28
26
|
colors,
|
|
29
27
|
sx,
|
|
30
28
|
grid,
|
|
31
|
-
topAxis,
|
|
32
|
-
leftAxis,
|
|
33
|
-
rightAxis,
|
|
34
|
-
bottomAxis,
|
|
35
29
|
onItemClick,
|
|
36
30
|
children,
|
|
37
31
|
slots,
|
|
@@ -48,12 +42,7 @@ export const useScatterChartProps = props => {
|
|
|
48
42
|
}, s)),
|
|
49
43
|
width,
|
|
50
44
|
height,
|
|
51
|
-
margin
|
|
52
|
-
margin,
|
|
53
|
-
hideLegend,
|
|
54
|
-
slotProps,
|
|
55
|
-
series
|
|
56
|
-
}),
|
|
45
|
+
margin,
|
|
57
46
|
colors,
|
|
58
47
|
xAxis,
|
|
59
48
|
yAxis,
|
|
@@ -67,10 +56,6 @@ export const useScatterChartProps = props => {
|
|
|
67
56
|
plugins: SCATTER_CHART_PLUGINS
|
|
68
57
|
});
|
|
69
58
|
const chartsAxisProps = {
|
|
70
|
-
topAxis,
|
|
71
|
-
leftAxis,
|
|
72
|
-
rightAxis,
|
|
73
|
-
bottomAxis,
|
|
74
59
|
slots,
|
|
75
60
|
slotProps
|
|
76
61
|
};
|
|
@@ -14,7 +14,7 @@ import { BarPlotSlots, BarPlotSlotProps } from "../BarChart/BarPlot.js";
|
|
|
14
14
|
import { ChartMargin } from "../internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.js";
|
|
15
15
|
export interface SparkLineChartSlots extends AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, Omit<BarPlotSlots, 'barLabel'>, ChartsTooltipSlots {}
|
|
16
16
|
export interface SparkLineChartSlotProps extends AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, BarPlotSlotProps, ChartsTooltipSlotProps {}
|
|
17
|
-
export interface SparkLineChartProps extends Omit<ChartContainerProps, 'series' | 'xAxis' | 'yAxis' | 'zAxis' | 'margin' | 'plugins' | 'colors'> {
|
|
17
|
+
export interface SparkLineChartProps extends Omit<ChartContainerProps, 'series' | 'xAxis' | 'yAxis' | 'zAxis' | 'radiusAxis' | 'rotationAxis' | 'margin' | 'plugins' | 'colors'> {
|
|
18
18
|
/**
|
|
19
19
|
* The xAxis configuration.
|
|
20
20
|
* Notice it is a single [[AxisConfig]] object, not an array of configuration.
|
|
@@ -67,15 +67,11 @@ export interface SparkLineChartProps extends Omit<ChartContainerProps, 'series'
|
|
|
67
67
|
/**
|
|
68
68
|
* The margin between the SVG and the drawing area.
|
|
69
69
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* bottom: 5,
|
|
74
|
-
* left: 5,
|
|
75
|
-
* right: 5,
|
|
76
|
-
* }
|
|
70
|
+
*
|
|
71
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
72
|
+
* @default 5
|
|
77
73
|
*/
|
|
78
|
-
margin?: Partial<ChartMargin
|
|
74
|
+
margin?: Partial<ChartMargin> | number;
|
|
79
75
|
/**
|
|
80
76
|
* Overridable component slots.
|
|
81
77
|
* @default {}
|
|
@@ -12,12 +12,7 @@ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../constants/index.js";
|
|
|
12
12
|
import { ChartsTooltip } from "../ChartsTooltip/index.js";
|
|
13
13
|
import { ChartsAxisHighlight } from "../ChartsAxisHighlight/index.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const
|
|
16
|
-
top: 5,
|
|
17
|
-
bottom: 5,
|
|
18
|
-
left: 5,
|
|
19
|
-
right: 5
|
|
20
|
-
};
|
|
15
|
+
const SPARK_LINE_DEFAULT_MARGIN = 5;
|
|
21
16
|
|
|
22
17
|
/**
|
|
23
18
|
* Demos:
|
|
@@ -34,7 +29,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
34
29
|
yAxis,
|
|
35
30
|
width,
|
|
36
31
|
height,
|
|
37
|
-
margin =
|
|
32
|
+
margin = SPARK_LINE_DEFAULT_MARGIN,
|
|
38
33
|
color,
|
|
39
34
|
sx,
|
|
40
35
|
showTooltip,
|
|
@@ -86,10 +81,14 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
86
81
|
length: data.length
|
|
87
82
|
}, (_, index) => index),
|
|
88
83
|
hideTooltip: xAxis === undefined
|
|
89
|
-
}, xAxis
|
|
84
|
+
}, xAxis, {
|
|
85
|
+
position: 'none'
|
|
86
|
+
})],
|
|
90
87
|
yAxis: [_extends({
|
|
91
88
|
id: DEFAULT_Y_AXIS_KEY
|
|
92
|
-
}, yAxis
|
|
89
|
+
}, yAxis, {
|
|
90
|
+
position: 'none'
|
|
91
|
+
})],
|
|
93
92
|
colors: colors,
|
|
94
93
|
sx: sx,
|
|
95
94
|
disableAxisListener: (!showTooltip || slotProps?.tooltip?.trigger !== 'axis') && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
|
|
@@ -181,20 +180,16 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
181
180
|
/**
|
|
182
181
|
* The margin between the SVG and the drawing area.
|
|
183
182
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* bottom: 5,
|
|
188
|
-
* left: 5,
|
|
189
|
-
* right: 5,
|
|
190
|
-
* }
|
|
183
|
+
*
|
|
184
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
185
|
+
* @default 5
|
|
191
186
|
*/
|
|
192
|
-
margin: PropTypes.shape({
|
|
187
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
193
188
|
bottom: PropTypes.number,
|
|
194
189
|
left: PropTypes.number,
|
|
195
190
|
right: PropTypes.number,
|
|
196
191
|
top: PropTypes.number
|
|
197
|
-
}),
|
|
192
|
+
})]),
|
|
198
193
|
/**
|
|
199
194
|
* The function called for onClick events.
|
|
200
195
|
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
@@ -271,6 +266,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
271
266
|
* Notice it is a single [[AxisConfig]] object, not an array of configuration.
|
|
272
267
|
*/
|
|
273
268
|
xAxis: PropTypes.shape({
|
|
269
|
+
axis: PropTypes.oneOf(['x']),
|
|
274
270
|
classes: PropTypes.object,
|
|
275
271
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
276
272
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -293,13 +289,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
293
289
|
disableTicks: PropTypes.bool,
|
|
294
290
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
295
291
|
fill: PropTypes.string,
|
|
292
|
+
height: PropTypes.number,
|
|
296
293
|
hideTooltip: PropTypes.bool,
|
|
297
294
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
298
295
|
label: PropTypes.string,
|
|
299
296
|
labelStyle: PropTypes.object,
|
|
300
297
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
301
298
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
302
|
-
|
|
299
|
+
offset: PropTypes.number,
|
|
300
|
+
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
303
301
|
reverse: PropTypes.bool,
|
|
304
302
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
305
303
|
slotProps: PropTypes.object,
|
|
@@ -308,6 +306,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
308
306
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
309
307
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
310
308
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
309
|
+
tickLabelMinGap: PropTypes.number,
|
|
311
310
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
312
311
|
tickLabelStyle: PropTypes.object,
|
|
313
312
|
tickMaxStep: PropTypes.number,
|
|
@@ -322,6 +321,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
322
321
|
* Notice it is a single [[AxisConfig]] object, not an array of configuration.
|
|
323
322
|
*/
|
|
324
323
|
yAxis: PropTypes.shape({
|
|
324
|
+
axis: PropTypes.oneOf(['y']),
|
|
325
325
|
classes: PropTypes.object,
|
|
326
326
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
327
327
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -350,7 +350,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
350
350
|
labelStyle: PropTypes.object,
|
|
351
351
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
352
352
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
353
|
-
|
|
353
|
+
offset: PropTypes.number,
|
|
354
|
+
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
354
355
|
reverse: PropTypes.bool,
|
|
355
356
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
356
357
|
slotProps: PropTypes.object,
|
|
@@ -366,7 +367,8 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
366
367
|
tickNumber: PropTypes.number,
|
|
367
368
|
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
368
369
|
tickSize: PropTypes.number,
|
|
369
|
-
valueFormatter: PropTypes.func
|
|
370
|
+
valueFormatter: PropTypes.func,
|
|
371
|
+
width: PropTypes.number
|
|
370
372
|
})
|
|
371
373
|
} : void 0;
|
|
372
374
|
export { SparkLineChart };
|
package/esm/constants/index.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export declare const DEFAULT_X_AXIS_KEY = "DEFAULT_X_AXIS_KEY";
|
|
2
2
|
export declare const DEFAULT_Y_AXIS_KEY = "DEFAULT_Y_AXIS_KEY";
|
|
3
|
+
export declare const DEFAULT_ROTATION_AXIS_KEY = "DEFAULT_ROTATION_AXIS_KEY";
|
|
4
|
+
export declare const DEFAULT_RADIUS_AXIS_KEY = "DEFAULT_RADIUS_AXIS_KEY";
|
|
3
5
|
export declare const DEFAULT_MARGINS: {
|
|
4
6
|
top: number;
|
|
5
7
|
bottom: number;
|
|
6
8
|
left: number;
|
|
7
9
|
right: number;
|
|
8
10
|
};
|
|
9
|
-
export declare const
|
|
11
|
+
export declare const DEFAULT_AXIS_SIZE_WIDTH = 30;
|
|
12
|
+
export declare const DEFAULT_AXIS_SIZE_HEIGHT = 25;
|
|
13
|
+
export declare const AXIS_LABEL_DEFAULT_HEIGHT = 20;
|
package/esm/constants/index.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export const DEFAULT_X_AXIS_KEY = 'DEFAULT_X_AXIS_KEY';
|
|
2
2
|
export const DEFAULT_Y_AXIS_KEY = 'DEFAULT_Y_AXIS_KEY';
|
|
3
|
+
export const DEFAULT_ROTATION_AXIS_KEY = 'DEFAULT_ROTATION_AXIS_KEY';
|
|
4
|
+
export const DEFAULT_RADIUS_AXIS_KEY = 'DEFAULT_RADIUS_AXIS_KEY';
|
|
3
5
|
export const DEFAULT_MARGINS = {
|
|
4
|
-
top:
|
|
5
|
-
bottom:
|
|
6
|
-
left:
|
|
7
|
-
right:
|
|
6
|
+
top: 20,
|
|
7
|
+
bottom: 20,
|
|
8
|
+
left: 20,
|
|
9
|
+
right: 20
|
|
8
10
|
};
|
|
9
|
-
export const
|
|
11
|
+
export const DEFAULT_AXIS_SIZE_WIDTH = 30;
|
|
12
|
+
export const DEFAULT_AXIS_SIZE_HEIGHT = 25;
|
|
13
|
+
|
|
14
|
+
// How many pixels to add to the default axis size if that axis has a label
|
|
15
|
+
export const AXIS_LABEL_DEFAULT_HEIGHT = 20;
|
|
@@ -14,7 +14,7 @@ export function useSkipAnimation(skipAnimation) {
|
|
|
14
14
|
data
|
|
15
15
|
} = React.useContext(AnimationContext);
|
|
16
16
|
if (!isInitialized) {
|
|
17
|
-
throw new Error(['MUI X: Could not find the animation ref context.', 'It looks like you rendered your component outside of a
|
|
17
|
+
throw new Error(['MUI X: Could not find the animation ref context.', 'It looks like you rendered your component outside of a ChartContainer parent component.'].join('\n'));
|
|
18
18
|
}
|
|
19
19
|
return skipAnimation || data.skipAnimation;
|
|
20
20
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ChartAnyPluginSignature, ChartInstance, ChartPublicAPI, ConvertSignaturesIntoPlugins, MergeSignaturesProperty } from
|
|
3
|
-
import { ChartStore } from
|
|
4
|
-
import { ChartCorePluginSignatures } from
|
|
5
|
-
import { ChartSeriesConfig } from
|
|
6
|
-
import { UseChartBaseProps } from
|
|
7
|
-
import { ChartSeriesType } from
|
|
2
|
+
import type { ChartAnyPluginSignature, ChartInstance, ChartPublicAPI, ConvertSignaturesIntoPlugins, MergeSignaturesProperty } from '../../internals/plugins/models';
|
|
3
|
+
import type { ChartStore } from '../../internals/plugins/utils/ChartStore';
|
|
4
|
+
import type { ChartCorePluginSignatures } from '../../internals/plugins/corePlugins';
|
|
5
|
+
import type { ChartSeriesConfig } from '../../internals/plugins/models/seriesConfig';
|
|
6
|
+
import type { UseChartBaseProps } from '../../internals/store/useCharts.types';
|
|
7
|
+
import type { ChartSeriesType } from '../../models/seriesType/config';
|
|
8
8
|
export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[] = []> = {
|
|
9
9
|
/**
|
|
10
10
|
* And object with all the methods needed to interact with the chart.
|
package/esm/hooks/useAxis.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { AxisId } from "../models/axis.js";
|
|
|
10
10
|
* @returns `{ xAxis, xAxisIds }` - The x-axes and their IDs.
|
|
11
11
|
*/
|
|
12
12
|
export declare function useXAxes(): {
|
|
13
|
-
xAxis: import("../internals").DefaultizedAxisConfig<import("
|
|
13
|
+
xAxis: import("../internals").DefaultizedAxisConfig<import("..").ChartsXAxisProps>;
|
|
14
14
|
xAxisIds: string[];
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
@@ -32,10 +32,20 @@ export declare function useYAxes(): {
|
|
|
32
32
|
* @param {AxisId | undefined} axisId - If provided returns the x axis with axisId, else returns the values for the default x axis.
|
|
33
33
|
* @returns The X axis.
|
|
34
34
|
*/
|
|
35
|
-
export declare function useXAxis(axisId?: AxisId): import("../internals").AxisDefaultized<keyof import("../internals").AxisScaleConfig, any, import("
|
|
35
|
+
export declare function useXAxis(axisId?: AxisId): import("../internals").AxisDefaultized<keyof import("../internals").AxisScaleConfig, any, import("..").ChartsXAxisProps>;
|
|
36
36
|
/**
|
|
37
37
|
* Get the Y axis.
|
|
38
38
|
* @param {AxisId | undefined} axisId - If provided returns the y axis with axisId, else returns the values for the default y axis.
|
|
39
39
|
* @returns The Y axis.
|
|
40
40
|
*/
|
|
41
|
-
export declare function useYAxis(axisId?: AxisId): import("../internals").AxisDefaultized<keyof import("../internals").AxisScaleConfig, any, import("..").ChartsYAxisProps>;
|
|
41
|
+
export declare function useYAxis(axisId?: AxisId): import("../internals").AxisDefaultized<keyof import("../internals").AxisScaleConfig, any, import("..").ChartsYAxisProps>;
|
|
42
|
+
export declare function useRotationAxes(): {
|
|
43
|
+
rotationAxis: import("../internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue").DefaultizedAxisConfig<import("../internals").ChartsAxisProps>;
|
|
44
|
+
rotationAxisIds: string[];
|
|
45
|
+
};
|
|
46
|
+
export declare function useRadiusAxes(): {
|
|
47
|
+
radiusAxis: import("../internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue").DefaultizedAxisConfig<import("..").ChartsYAxisProps>;
|
|
48
|
+
radiusAxisIds: string[];
|
|
49
|
+
};
|
|
50
|
+
export declare function useRotationAxis(identifier?: number | string): import("../internals").PolarAxisDefaultized<keyof import("../internals").AxisScaleConfig, any, import("../internals").ChartsAxisProps>;
|
|
51
|
+
export declare function useRadiusAxis(identifier?: number | string): import("../internals").PolarAxisDefaultized<keyof import("../internals").AxisScaleConfig, any, import("..").ChartsYAxisProps>;
|
package/esm/hooks/useAxis.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { selectorChartXAxis, selectorChartYAxis } from "../internals/plugins/featurePlugins/useChartCartesianAxis/
|
|
3
|
+
import { selectorChartXAxis, selectorChartYAxis } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js";
|
|
4
|
+
import { selectorChartRadiusAxis, selectorChartRotationAxis } from "../internals/plugins/featurePlugins/useChartPolarAxis/index.js";
|
|
4
5
|
import { useSelector } from "../internals/store/useSelector.js";
|
|
5
6
|
import { useStore } from "../internals/store/useStore.js";
|
|
6
7
|
/**
|
|
@@ -75,4 +76,44 @@ export function useYAxis(axisId) {
|
|
|
75
76
|
} = useSelector(store, selectorChartYAxis);
|
|
76
77
|
const id = axisId ?? yAxisIds[0];
|
|
77
78
|
return yAxis[id];
|
|
79
|
+
}
|
|
80
|
+
export function useRotationAxes() {
|
|
81
|
+
const store = useStore();
|
|
82
|
+
const {
|
|
83
|
+
axis: rotationAxis,
|
|
84
|
+
axisIds: rotationAxisIds
|
|
85
|
+
} = useSelector(store, selectorChartRotationAxis);
|
|
86
|
+
return {
|
|
87
|
+
rotationAxis,
|
|
88
|
+
rotationAxisIds
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export function useRadiusAxes() {
|
|
92
|
+
const store = useStore();
|
|
93
|
+
const {
|
|
94
|
+
axis: radiusAxis,
|
|
95
|
+
axisIds: radiusAxisIds
|
|
96
|
+
} = useSelector(store, selectorChartRadiusAxis);
|
|
97
|
+
return {
|
|
98
|
+
radiusAxis,
|
|
99
|
+
radiusAxisIds
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export function useRotationAxis(identifier) {
|
|
103
|
+
const store = useStore();
|
|
104
|
+
const {
|
|
105
|
+
axis: rotationAxis,
|
|
106
|
+
axisIds: rotationAxisIds
|
|
107
|
+
} = useSelector(store, selectorChartRotationAxis);
|
|
108
|
+
const id = typeof identifier === 'string' ? identifier : rotationAxisIds[identifier ?? 0];
|
|
109
|
+
return rotationAxis[id];
|
|
110
|
+
}
|
|
111
|
+
export function useRadiusAxis(identifier) {
|
|
112
|
+
const store = useStore();
|
|
113
|
+
const {
|
|
114
|
+
axis: radiusAxis,
|
|
115
|
+
axisIds: radiusAxisIds
|
|
116
|
+
} = useSelector(store, selectorChartRadiusAxis);
|
|
117
|
+
const id = typeof identifier === 'string' ? identifier : radiusAxisIds[identifier ?? 0];
|
|
118
|
+
return radiusAxis[id];
|
|
78
119
|
}
|
|
@@ -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/useSvgRef.js
CHANGED
|
@@ -9,7 +9,7 @@ import { useChartContext } from "../context/ChartProvider/index.js";
|
|
|
9
9
|
export function useSvgRef() {
|
|
10
10
|
const context = useChartContext();
|
|
11
11
|
if (!context) {
|
|
12
|
-
throw new Error(['MUI X: Could not find the svg ref context.', 'It looks like you rendered your component outside of a
|
|
12
|
+
throw new Error(['MUI X: Could not find the svg ref context.', 'It looks like you rendered your component outside of a ChartContainer parent component.'].join('\n'));
|
|
13
13
|
}
|
|
14
14
|
return context.svgRef;
|
|
15
15
|
}
|