@mui/x-charts 7.22.3 → 8.0.0-alpha.1
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/AnimatedBarElement.d.ts +15 -0
- package/BarChart/AnimatedBarElement.js +21 -0
- package/BarChart/BarChart.d.ts +11 -16
- package/BarChart/BarChart.js +9 -59
- package/BarChart/BarElement.d.ts +6 -1343
- package/BarChart/BarElement.js +10 -20
- package/BarChart/BarLabel/BarLabelItem.d.ts +1 -1
- package/BarChart/BarPlot.js +24 -6
- package/BarChart/extremums.js +3 -3
- package/BarChart/useBarChartProps.d.ts +2 -4
- package/BarChart/useBarChartProps.js +4 -11
- package/CHANGELOG.md +348 -12
- package/ChartContainer/ChartContainer.d.ts +4 -38
- package/ChartContainer/ChartContainer.js +15 -44
- package/ChartContainer/ResizableContainer.d.ts +22 -0
- package/ChartContainer/ResizableContainer.js +60 -0
- package/ChartContainer/useChartContainerProps.d.ts +8 -92
- package/ChartContainer/useChartContainerProps.js +29 -59
- package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -17
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +10 -96
- package/ChartsAxisHighlight/ChartsAxisHighlight.types.d.ts +5 -0
- package/ChartsAxisHighlight/ChartsAxisHighlightPath.d.ts +6 -0
- package/ChartsAxisHighlight/ChartsAxisHighlightPath.js +34 -0
- package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +10 -0
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +53 -0
- package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +10 -0
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +53 -0
- package/ChartsAxisHighlight/chartsAxisHighlightClasses.d.ts +7 -0
- package/ChartsAxisHighlight/chartsAxisHighlightClasses.js +6 -0
- package/ChartsAxisHighlight/index.d.ts +3 -0
- package/ChartsAxisHighlight/index.js +4 -1
- package/ChartsGrid/ChartsGrid.js +1 -1
- package/ChartsGrid/ChartsHorizontalGrid.d.ts +2 -2
- package/ChartsGrid/ChartsHorizontalGrid.js +3 -3
- package/ChartsGrid/ChartsVerticalGrid.d.ts +2 -2
- package/ChartsGrid/ChartsVerticalGrid.js +3 -3
- package/ChartsLegend/ChartsLegend.js +0 -3
- package/ChartsLegend/DefaultChartsLegend.d.ts +0 -5
- package/ChartsLegend/DefaultChartsLegend.js +1 -12
- package/ChartsLegend/LegendPerItem.d.ts +3 -3
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +11 -9
- package/ChartsOverlay/ChartsOverlay.d.ts +1 -1
- package/ChartsSurface/ChartsSurface.d.ts +0 -15
- package/ChartsSurface/ChartsSurface.js +35 -34
- package/ChartsTooltip/ChartTooltip.types.d.ts +15 -0
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +7 -39
- package/ChartsTooltip/ChartsAxisTooltipContent.js +83 -72
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +5 -28
- package/ChartsTooltip/ChartsItemTooltipContent.js +54 -44
- package/ChartsTooltip/ChartsTooltip.d.ts +3 -69
- package/ChartsTooltip/ChartsTooltip.js +162 -107
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +33 -0
- package/ChartsTooltip/ChartsTooltipContainer.js +298 -0
- package/ChartsTooltip/chartsTooltipClasses.d.ts +1 -0
- package/ChartsTooltip/chartsTooltipClasses.js +18 -2
- package/ChartsTooltip/index.d.ts +3 -3
- package/ChartsTooltip/index.js +2 -3
- package/ChartsTooltip/useAxisTooltip.d.ts +2 -2
- package/ChartsTooltip/useAxisTooltip.js +21 -21
- package/ChartsTooltip/useItemTooltip.d.ts +1 -1
- package/ChartsTooltip/useItemTooltip.js +8 -7
- package/ChartsTooltip/utils.d.ts +5 -16
- package/ChartsTooltip/utils.js +45 -50
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +50 -39
- package/Gauge/Gauge.d.ts +1 -1
- package/Gauge/Gauge.js +0 -6
- package/Gauge/GaugeContainer.d.ts +3 -3
- package/Gauge/GaugeContainer.js +60 -61
- package/LineChart/AnimatedArea.d.ts +0 -1333
- package/LineChart/AnimatedArea.js +9 -18
- package/LineChart/AnimatedLine.d.ts +0 -1333
- package/LineChart/AnimatedLine.js +9 -20
- package/LineChart/AreaElement.d.ts +1 -1
- package/LineChart/AreaPlot.js +14 -8
- package/LineChart/CircleMarkElement.js +6 -5
- package/LineChart/LineChart.d.ts +11 -17
- package/LineChart/LineChart.js +9 -60
- package/LineChart/LineElement.d.ts +1 -1
- package/LineChart/LineHighlightPlot.d.ts +1 -1
- package/LineChart/LineHighlightPlot.js +8 -11
- package/LineChart/LinePlot.js +14 -8
- package/LineChart/MarkElement.js +6 -5
- package/LineChart/MarkPlot.js +2 -6
- package/LineChart/extremums.js +10 -6
- package/LineChart/useLineChartProps.d.ts +2 -4
- package/LineChart/useLineChartProps.js +4 -11
- package/PieChart/PieArc.d.ts +0 -5
- package/PieChart/PieArc.js +1 -10
- package/PieChart/PieArcPlot.js +0 -5
- package/PieChart/PieChart.d.ts +10 -39
- package/PieChart/PieChart.js +20 -137
- package/PieChart/PiePlot.js +2 -2
- package/PieChart/getPieCoordinates.d.ts +2 -2
- package/README.md +4 -4
- package/ScatterChart/Scatter.js +6 -5
- package/ScatterChart/ScatterChart.d.ts +11 -17
- package/ScatterChart/ScatterChart.js +11 -60
- package/ScatterChart/ScatterPlot.js +3 -6
- package/ScatterChart/extremums.js +6 -6
- package/ScatterChart/useScatterChartProps.d.ts +2 -4
- package/ScatterChart/useScatterChartProps.js +3 -12
- package/SparkLineChart/SparkLineChart.d.ts +7 -8
- package/SparkLineChart/SparkLineChart.js +6 -33
- package/context/CartesianProvider/defaultizeAxis.d.ts +1 -1
- package/context/ChartDataProvider/ChartDataProvider.d.ts +31 -0
- package/{ResponsiveChartContainer/ResponsiveChartContainer.js → context/ChartDataProvider/ChartDataProvider.js} +45 -39
- package/context/ChartDataProvider/index.d.ts +1 -0
- package/context/ChartDataProvider/index.js +1 -0
- package/context/ChartDataProvider/useChartDataProviderProps.d.ts +94 -0
- package/context/ChartDataProvider/useChartDataProviderProps.js +66 -0
- package/{ChartContainer → context/ChartDataProvider}/useDefaultizeAxis.d.ts +12 -12
- package/{modern/ChartContainer → context/ChartDataProvider}/useDefaultizeAxis.js +1 -1
- package/context/{DrawingProvider.d.ts → DrawingAreaProvider/DrawingArea.types.d.ts} +3 -14
- package/context/DrawingAreaProvider/DrawingAreaContext.d.ts +8 -0
- package/context/DrawingAreaProvider/DrawingAreaContext.js +16 -0
- package/context/DrawingAreaProvider/DrawingAreaProvider.d.ts +3 -0
- package/{modern/context/DrawingProvider.js → context/DrawingAreaProvider/DrawingAreaProvider.js} +11 -41
- package/context/DrawingAreaProvider/index.d.ts +3 -0
- package/context/DrawingAreaProvider/index.js +3 -0
- package/context/HighlightedProvider/HighlightedContext.d.ts +0 -8
- package/context/HighlightedProvider/HighlightedProvider.js +1 -16
- package/context/InteractionProvider.d.ts +5 -48
- package/context/InteractionProvider.js +8 -64
- package/context/InteractionSelectors.d.ts +359 -0
- package/context/InteractionSelectors.js +12 -0
- package/context/PluginProvider/ExtremumGetter.types.d.ts +2 -2
- package/context/SizeProvider/Size.types.d.ts +30 -0
- package/context/SizeProvider/SizeContext.d.ts +4 -0
- package/context/SizeProvider/SizeContext.js +13 -0
- package/context/SizeProvider/SizeProvider.d.ts +11 -0
- package/context/SizeProvider/SizeProvider.js +26 -0
- package/context/SizeProvider/index.d.ts +4 -0
- package/context/SizeProvider/index.js +4 -0
- package/context/SizeProvider/useChartContainerDimensions.d.ts +9 -0
- package/{modern/ResponsiveChartContainer → context/SizeProvider}/useChartContainerDimensions.js +15 -7
- package/context/SizeProvider/useSize.d.ts +5 -0
- package/context/SizeProvider/useSize.js +13 -0
- package/context/SvgRefProvider/SvgRef.types.d.ts +8 -0
- package/context/SvgRefProvider/SvgRef.types.js +1 -0
- package/context/SvgRefProvider/SvgRefContext.d.ts +4 -0
- package/context/SvgRefProvider/SvgRefContext.js +17 -0
- package/context/SvgRefProvider/SvgRefProvider.d.ts +3 -0
- package/context/SvgRefProvider/SvgRefProvider.js +24 -0
- package/context/SvgRefProvider/index.d.ts +4 -0
- package/context/SvgRefProvider/index.js +4 -0
- package/context/SvgRefProvider/useSurfaceRef.d.ts +2 -0
- package/context/SvgRefProvider/useSurfaceRef.js +14 -0
- package/context/ZAxisContextProvider.d.ts +1 -1
- package/context/index.d.ts +2 -0
- package/context/index.js +2 -1
- package/hooks/useAxisEvents.js +32 -19
- package/hooks/useChartId.js +2 -2
- package/hooks/useDrawingArea.d.ts +2 -2
- package/hooks/useDrawingArea.js +2 -2
- package/hooks/useInteractionItemProps.js +19 -12
- package/hooks/useSvgRef.js +3 -3
- package/index.d.ts +1 -2
- package/index.js +2 -3
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +9 -4
- package/internals/computeAxisValue.d.ts +2 -2
- package/internals/defaultizeColor.d.ts +1 -8
- package/internals/getSymbol.js +19 -3
- package/internals/index.d.ts +7 -6
- package/internals/index.js +7 -6
- package/internals/plugins/models/index.d.ts +35 -0
- package/internals/plugins/models/index.js +1 -0
- package/internals/plugins/utils/ChartStore.d.ts +12 -0
- package/internals/plugins/utils/ChartStore.js +26 -0
- package/internals/plugins/utils/ChartsStore.d.ts +12 -0
- package/internals/plugins/utils/ChartsStore.js +26 -0
- package/internals/plugins/utils/selectors.d.ts +9 -0
- package/internals/plugins/utils/selectors.js +37 -0
- package/internals/useCharts.d.ts +6 -0
- package/internals/useCharts.js +29 -0
- package/internals/useSelector.d.ts +4 -0
- package/internals/useSelector.js +6 -0
- package/internals/useStore.d.ts +2 -0
- package/internals/useStore.js +17 -0
- package/internals/useStringInterpolator.js +1 -0
- package/models/seriesType/bar.d.ts +1 -1
- package/models/seriesType/common.d.ts +0 -10
- package/models/seriesType/config.d.ts +1 -1
- package/models/seriesType/line.d.ts +1 -1
- package/models/seriesType/pie.d.ts +1 -1
- package/models/seriesType/scatter.d.ts +1 -6
- package/modern/BarChart/AnimatedBarElement.js +21 -0
- package/modern/BarChart/BarChart.js +9 -59
- package/modern/BarChart/BarElement.js +10 -20
- package/modern/BarChart/BarPlot.js +24 -6
- package/modern/BarChart/extremums.js +3 -3
- package/modern/BarChart/useBarChartProps.js +4 -11
- package/modern/ChartContainer/ChartContainer.js +15 -44
- package/modern/ChartContainer/ResizableContainer.js +60 -0
- package/modern/ChartContainer/useChartContainerProps.js +29 -59
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +10 -96
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.types.js +1 -0
- package/modern/ChartsAxisHighlight/ChartsAxisHighlightPath.js +34 -0
- package/modern/ChartsAxisHighlight/ChartsXAxisHighlight.js +53 -0
- package/modern/ChartsAxisHighlight/ChartsYAxisHighlight.js +53 -0
- package/modern/ChartsAxisHighlight/chartsAxisHighlightClasses.js +6 -0
- package/modern/ChartsAxisHighlight/index.js +4 -1
- package/modern/ChartsGrid/ChartsGrid.js +1 -1
- package/modern/ChartsGrid/ChartsHorizontalGrid.js +3 -3
- package/modern/ChartsGrid/ChartsVerticalGrid.js +3 -3
- package/modern/ChartsLegend/ChartsLegend.js +0 -3
- package/modern/ChartsLegend/DefaultChartsLegend.js +1 -12
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +11 -9
- package/modern/ChartsSurface/ChartsSurface.js +35 -34
- package/modern/ChartsTooltip/ChartTooltip.types.js +1 -0
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +83 -72
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +54 -44
- package/modern/ChartsTooltip/ChartsTooltip.js +162 -107
- package/modern/ChartsTooltip/ChartsTooltipContainer.js +298 -0
- package/modern/ChartsTooltip/chartsTooltipClasses.js +18 -2
- package/modern/ChartsTooltip/index.js +2 -3
- package/modern/ChartsTooltip/useAxisTooltip.js +21 -21
- package/modern/ChartsTooltip/useItemTooltip.js +8 -7
- package/modern/ChartsTooltip/utils.js +45 -50
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +50 -39
- package/modern/Gauge/Gauge.js +0 -6
- package/modern/Gauge/GaugeContainer.js +60 -61
- package/modern/LineChart/AnimatedArea.js +9 -18
- package/modern/LineChart/AnimatedLine.js +9 -20
- package/modern/LineChart/AreaPlot.js +14 -8
- package/modern/LineChart/CircleMarkElement.js +6 -5
- package/modern/LineChart/LineChart.js +9 -60
- package/modern/LineChart/LineHighlightPlot.js +8 -11
- package/modern/LineChart/LinePlot.js +14 -8
- package/modern/LineChart/MarkElement.js +6 -5
- package/modern/LineChart/MarkPlot.js +2 -6
- package/modern/LineChart/extremums.js +10 -6
- package/modern/LineChart/useLineChartProps.js +4 -11
- package/modern/PieChart/PieArc.js +1 -10
- package/modern/PieChart/PieArcPlot.js +0 -5
- package/modern/PieChart/PieChart.js +20 -137
- package/modern/PieChart/PiePlot.js +2 -2
- package/modern/ScatterChart/Scatter.js +6 -5
- package/modern/ScatterChart/ScatterChart.js +11 -60
- package/modern/ScatterChart/ScatterPlot.js +3 -6
- package/modern/ScatterChart/extremums.js +6 -6
- package/modern/ScatterChart/useScatterChartProps.js +3 -12
- package/modern/SparkLineChart/SparkLineChart.js +6 -33
- package/modern/{ResponsiveChartContainer/ResponsiveChartContainer.js → context/ChartDataProvider/ChartDataProvider.js} +45 -39
- package/modern/context/ChartDataProvider/index.js +1 -0
- package/modern/context/ChartDataProvider/useChartDataProviderProps.js +66 -0
- package/{ChartContainer → modern/context/ChartDataProvider}/useDefaultizeAxis.js +1 -1
- package/modern/context/DrawingAreaProvider/DrawingArea.types.js +1 -0
- package/modern/context/DrawingAreaProvider/DrawingAreaContext.js +16 -0
- package/{context/DrawingProvider.js → modern/context/DrawingAreaProvider/DrawingAreaProvider.js} +11 -41
- package/modern/context/DrawingAreaProvider/index.js +3 -0
- package/modern/context/HighlightedProvider/HighlightedProvider.js +1 -16
- package/modern/context/InteractionProvider.js +8 -64
- package/modern/context/InteractionSelectors.js +12 -0
- package/modern/context/SizeProvider/Size.types.js +1 -0
- package/modern/context/SizeProvider/SizeContext.js +13 -0
- package/modern/context/SizeProvider/SizeProvider.js +26 -0
- package/modern/context/SizeProvider/index.js +4 -0
- package/{ResponsiveChartContainer → modern/context/SizeProvider}/useChartContainerDimensions.js +15 -7
- package/modern/context/SizeProvider/useSize.js +13 -0
- package/modern/context/SvgRefProvider/SvgRef.types.js +1 -0
- package/modern/context/SvgRefProvider/SvgRefContext.js +17 -0
- package/modern/context/SvgRefProvider/SvgRefProvider.js +24 -0
- package/modern/context/SvgRefProvider/index.js +4 -0
- package/modern/context/SvgRefProvider/useSurfaceRef.js +14 -0
- package/modern/context/index.js +2 -1
- package/modern/hooks/useAxisEvents.js +32 -19
- package/modern/hooks/useChartId.js +2 -2
- package/modern/hooks/useDrawingArea.js +2 -2
- package/modern/hooks/useInteractionItemProps.js +19 -12
- package/modern/hooks/useSvgRef.js +3 -3
- package/modern/index.js +2 -3
- package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +9 -4
- package/modern/internals/getSymbol.js +19 -3
- package/modern/internals/index.js +7 -6
- package/modern/internals/plugins/models/index.js +1 -0
- package/modern/internals/plugins/utils/ChartStore.js +26 -0
- package/modern/internals/plugins/utils/ChartsStore.js +26 -0
- package/modern/internals/plugins/utils/selectors.js +37 -0
- package/modern/internals/useCharts.js +29 -0
- package/modern/internals/useSelector.js +6 -0
- package/modern/internals/useStore.js +17 -0
- package/modern/internals/useStringInterpolator.js +1 -0
- package/node/BarChart/AnimatedBarElement.js +28 -0
- package/node/BarChart/BarChart.js +9 -59
- package/node/BarChart/BarElement.js +11 -21
- package/node/BarChart/BarPlot.js +22 -4
- package/node/BarChart/extremums.js +3 -3
- package/node/BarChart/useBarChartProps.js +4 -11
- package/node/ChartContainer/ChartContainer.js +14 -43
- package/node/ChartContainer/ResizableContainer.js +68 -0
- package/node/ChartContainer/useChartContainerProps.js +29 -60
- package/node/ChartsAxisHighlight/ChartsAxisHighlight.js +12 -100
- package/node/ChartsAxisHighlight/ChartsAxisHighlightPath.js +40 -0
- package/node/ChartsAxisHighlight/ChartsXAxisHighlight.js +57 -0
- package/node/ChartsAxisHighlight/ChartsYAxisHighlight.js +57 -0
- package/node/ChartsAxisHighlight/chartsAxisHighlightClasses.js +14 -0
- package/node/ChartsAxisHighlight/index.js +33 -0
- package/node/ChartsGrid/ChartsGrid.js +2 -2
- package/node/ChartsGrid/ChartsHorizontalGrid.js +4 -4
- package/node/ChartsGrid/ChartsVerticalGrid.js +4 -4
- package/node/ChartsLegend/ChartsLegend.js +0 -3
- package/node/ChartsLegend/DefaultChartsLegend.js +1 -12
- package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +11 -9
- package/node/ChartsSurface/ChartsSurface.js +35 -34
- package/node/ChartsTooltip/ChartsAxisTooltipContent.js +83 -73
- package/node/ChartsTooltip/ChartsItemTooltipContent.js +54 -45
- package/node/ChartsTooltip/ChartsTooltip.js +161 -106
- package/node/ChartsTooltip/ChartsTooltipContainer.js +304 -0
- package/node/ChartsTooltip/chartsTooltipClasses.js +22 -3
- package/node/ChartsTooltip/index.js +19 -28
- package/node/ChartsTooltip/useAxisTooltip.js +21 -21
- package/node/ChartsTooltip/useItemTooltip.js +8 -7
- package/node/ChartsTooltip/utils.js +46 -53
- package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +51 -40
- package/node/Gauge/Gauge.js +0 -6
- package/node/Gauge/GaugeContainer.js +60 -61
- package/node/LineChart/AnimatedArea.js +9 -19
- package/node/LineChart/AnimatedLine.js +9 -21
- package/node/LineChart/AreaPlot.js +13 -7
- package/node/LineChart/CircleMarkElement.js +6 -5
- package/node/LineChart/LineChart.js +9 -60
- package/node/LineChart/LineHighlightPlot.js +8 -11
- package/node/LineChart/LinePlot.js +13 -7
- package/node/LineChart/MarkElement.js +6 -5
- package/node/LineChart/MarkPlot.js +2 -6
- package/node/LineChart/extremums.js +10 -6
- package/node/LineChart/useLineChartProps.js +4 -11
- package/node/PieChart/PieArc.js +1 -10
- package/node/PieChart/PieArcPlot.js +0 -5
- package/node/PieChart/PieChart.js +20 -137
- package/node/PieChart/PiePlot.js +2 -2
- package/node/ScatterChart/Scatter.js +6 -5
- package/node/ScatterChart/ScatterChart.js +11 -60
- package/node/ScatterChart/ScatterPlot.js +3 -6
- package/node/ScatterChart/extremums.js +6 -6
- package/node/ScatterChart/useScatterChartProps.js +3 -12
- package/node/SparkLineChart/SparkLineChart.js +6 -33
- package/node/{ResponsiveChartContainer/ResponsiveChartContainer.js → context/ChartDataProvider/ChartDataProvider.js} +45 -39
- package/node/context/ChartDataProvider/index.js +16 -0
- package/node/context/ChartDataProvider/useChartDataProviderProps.js +72 -0
- package/node/{ChartContainer → context/ChartDataProvider}/useDefaultizeAxis.js +1 -1
- package/node/context/DrawingAreaProvider/DrawingArea.types.js +5 -0
- package/node/context/DrawingAreaProvider/DrawingAreaContext.js +22 -0
- package/node/context/{DrawingProvider.js → DrawingAreaProvider/DrawingAreaProvider.js} +12 -44
- package/node/context/DrawingAreaProvider/index.js +38 -0
- package/node/context/HighlightedProvider/HighlightedProvider.js +1 -16
- package/node/context/InteractionProvider.js +9 -66
- package/node/context/InteractionSelectors.js +18 -0
- package/node/context/SizeProvider/Size.types.js +5 -0
- package/node/context/SizeProvider/SizeContext.js +20 -0
- package/node/context/SizeProvider/SizeProvider.js +29 -0
- package/node/context/SizeProvider/index.js +49 -0
- package/node/{ResponsiveChartContainer → context/SizeProvider}/useChartContainerDimensions.js +15 -7
- package/node/context/SizeProvider/useSize.js +20 -0
- package/node/context/SvgRefProvider/SvgRef.types.js +5 -0
- package/node/context/SvgRefProvider/SvgRefContext.js +23 -0
- package/node/context/SvgRefProvider/SvgRefProvider.js +31 -0
- package/node/context/SvgRefProvider/index.js +49 -0
- package/node/context/SvgRefProvider/useSurfaceRef.js +20 -0
- package/node/context/index.js +10 -2
- package/node/hooks/useAxisEvents.js +33 -19
- package/node/hooks/useChartId.js +2 -2
- package/node/hooks/useDrawingArea.js +2 -2
- package/node/hooks/useInteractionItemProps.js +20 -13
- package/node/hooks/useSvgRef.js +3 -3
- package/node/index.js +5 -16
- package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +9 -4
- package/node/internals/getSymbol.js +19 -3
- package/node/internals/index.js +64 -44
- package/node/internals/plugins/models/index.js +5 -0
- package/node/internals/plugins/utils/ChartStore.js +33 -0
- package/node/internals/plugins/utils/ChartsStore.js +33 -0
- package/node/internals/plugins/utils/selectors.js +44 -0
- package/node/internals/useCharts.js +36 -0
- package/node/internals/useSelector.js +13 -0
- package/node/internals/useStore.js +24 -0
- package/node/internals/useStringInterpolator.js +2 -0
- package/package.json +8 -6
- package/themeAugmentation/props.d.ts +1 -2
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.d.ts +0 -7
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -123
- package/ChartsTooltip/DefaultChartsItemTooltipContent.d.ts +0 -8
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -92
- package/ResponsiveChartContainer/ResizableContainer.d.ts +0 -9
- package/ResponsiveChartContainer/ResizableContainer.js +0 -26
- package/ResponsiveChartContainer/ResponsiveChartContainer.d.ts +0 -24
- package/ResponsiveChartContainer/index.d.ts +0 -1
- package/ResponsiveChartContainer/index.js +0 -1
- package/ResponsiveChartContainer/package.json +0 -6
- package/ResponsiveChartContainer/useChartContainerDimensions.d.ts +0 -6
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.d.ts +0 -19
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.js +0 -70
- package/internals/SlotComponentPropsFromProps.d.ts +0 -1
- package/models/helpers.d.ts +0 -3
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -123
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -92
- package/modern/ResponsiveChartContainer/ResizableContainer.js +0 -26
- package/modern/ResponsiveChartContainer/index.js +0 -1
- package/modern/ResponsiveChartContainer/useResponsiveChartContainerProps.js +0 -70
- package/node/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -129
- package/node/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -98
- package/node/ResponsiveChartContainer/ResizableContainer.js +0 -32
- package/node/ResponsiveChartContainer/index.js +0 -16
- package/node/ResponsiveChartContainer/useResponsiveChartContainerProps.js +0 -77
- /package/{internals/SlotComponentPropsFromProps.js → ChartsAxisHighlight/ChartsAxisHighlight.types.js} +0 -0
- /package/ChartsGrid/{styledCommonents.d.ts → styledComponents.d.ts} +0 -0
- /package/ChartsGrid/{styledCommonents.js → styledComponents.js} +0 -0
- /package/{models/helpers.js → ChartsTooltip/ChartTooltip.types.js} +0 -0
- /package/{modern/internals/SlotComponentPropsFromProps.js → context/DrawingAreaProvider/DrawingArea.types.js} +0 -0
- /package/{modern/models/helpers.js → context/SizeProvider/Size.types.js} +0 -0
- /package/modern/ChartsGrid/{styledCommonents.js → styledComponents.js} +0 -0
- /package/node/{internals/SlotComponentPropsFromProps.js → ChartsAxisHighlight/ChartsAxisHighlight.types.js} +0 -0
- /package/node/ChartsGrid/{styledCommonents.js → styledComponents.js} +0 -0
- /package/node/{models/helpers.js → ChartsTooltip/ChartTooltip.types.js} +0 -0
package/PieChart/PieArc.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SpringValue } from '@react-spring/web';
|
|
3
3
|
import { PieItemId } from '../models';
|
|
4
|
-
import { HighlightScope } from '../context';
|
|
5
4
|
export interface PieArcClasses {
|
|
6
5
|
/** Styles applied to the root element. */
|
|
7
6
|
root: string;
|
|
@@ -24,10 +23,6 @@ export declare const pieArcClasses: PieArcClasses;
|
|
|
24
23
|
export type PieArcProps = Omit<React.SVGProps<SVGPathElement>, 'ref' | 'id'> & PieArcOwnerState & {
|
|
25
24
|
cornerRadius: SpringValue<number>;
|
|
26
25
|
endAngle: SpringValue<number>;
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated Use the `isFaded` or `isHighlighted` props instead.
|
|
29
|
-
*/
|
|
30
|
-
highlightScope?: Partial<HighlightScope>;
|
|
31
26
|
innerRadius: SpringValue<number>;
|
|
32
27
|
onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>) => void;
|
|
33
28
|
outerRadius: SpringValue<number>;
|
package/PieChart/PieArc.js
CHANGED
|
@@ -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 = ["classes", "color", "cornerRadius", "dataIndex", "endAngle", "id", "innerRadius", "isFaded", "isHighlighted", "onClick", "outerRadius", "paddingAngle", "startAngle"
|
|
5
|
+
const _excluded = ["classes", "color", "cornerRadius", "dataIndex", "endAngle", "id", "innerRadius", "isFaded", "isHighlighted", "onClick", "outerRadius", "paddingAngle", "startAngle"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
|
|
@@ -93,15 +93,6 @@ process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
|
|
|
93
93
|
// ----------------------------------------------------------------------
|
|
94
94
|
classes: PropTypes.object,
|
|
95
95
|
dataIndex: PropTypes.number.isRequired,
|
|
96
|
-
/**
|
|
97
|
-
* @deprecated Use the `isFaded` or `isHighlighted` props instead.
|
|
98
|
-
*/
|
|
99
|
-
highlightScope: PropTypes.shape({
|
|
100
|
-
fade: PropTypes.oneOf(['global', 'none', 'series']),
|
|
101
|
-
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
102
|
-
highlight: PropTypes.oneOf(['item', 'none', 'series']),
|
|
103
|
-
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
104
|
-
}),
|
|
105
96
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
106
97
|
isFaded: PropTypes.bool.isRequired,
|
|
107
98
|
isHighlighted: PropTypes.bool.isRequired
|
package/PieChart/PieArcPlot.js
CHANGED
|
@@ -10,7 +10,6 @@ import { useTransition } from '@react-spring/web';
|
|
|
10
10
|
import { PieArc } from "./PieArc.js";
|
|
11
11
|
import { defaultTransitionConfig } from "./dataTransform/transition.js";
|
|
12
12
|
import { useTransformData } from "./dataTransform/useTransformData.js";
|
|
13
|
-
import { useHighlighted } from "../context/index.js";
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
14
|
function PieArcPlot(props) {
|
|
16
15
|
const {
|
|
@@ -43,9 +42,6 @@ function PieArcPlot(props) {
|
|
|
43
42
|
const transition = useTransition(transformedData, _extends({}, defaultTransitionConfig, {
|
|
44
43
|
immediate: skipAnimation
|
|
45
44
|
}));
|
|
46
|
-
const {
|
|
47
|
-
highlightScope
|
|
48
|
-
} = useHighlighted();
|
|
49
45
|
if (data.length === 0) {
|
|
50
46
|
return null;
|
|
51
47
|
}
|
|
@@ -72,7 +68,6 @@ function PieArcPlot(props) {
|
|
|
72
68
|
id: id,
|
|
73
69
|
color: item.color,
|
|
74
70
|
dataIndex: index,
|
|
75
|
-
highlightScope: highlightScope,
|
|
76
71
|
isFaded: item.isFaded,
|
|
77
72
|
isHighlighted: item.isHighlighted,
|
|
78
73
|
onClick: onItemClick && (event => {
|
package/PieChart/PieChart.d.ts
CHANGED
|
@@ -1,55 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
|
+
import { ChartContainerProps } from '../ChartContainer';
|
|
4
4
|
import { PieSeriesType } from '../models/seriesType';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { ChartsLegendProps, ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend';
|
|
8
|
-
import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
5
|
+
import { ChartsTooltipSlots, ChartsTooltipSlotProps } from '../ChartsTooltip/ChartTooltip.types';
|
|
6
|
+
import { ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend';
|
|
9
7
|
import { PiePlotProps, PiePlotSlotProps, PiePlotSlots } from './PiePlot';
|
|
10
8
|
import { PieValueType } from '../models/seriesType/pie';
|
|
11
|
-
import { ChartsAxisSlots, ChartsAxisSlotProps, ChartsXAxisProps, ChartsYAxisProps } from '../models/axis';
|
|
12
9
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '../ChartsOverlay';
|
|
13
|
-
export interface PieChartSlots extends
|
|
10
|
+
export interface PieChartSlots extends PiePlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots {
|
|
14
11
|
}
|
|
15
|
-
export interface PieChartSlotProps extends
|
|
12
|
+
export interface PieChartSlotProps extends PiePlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps {
|
|
16
13
|
}
|
|
17
|
-
export interface PieChartProps extends Omit<
|
|
18
|
-
/**
|
|
19
|
-
* Indicate which axis to display the bottom of the charts.
|
|
20
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
21
|
-
* @default null
|
|
22
|
-
*/
|
|
23
|
-
bottomAxis?: null | string | ChartsXAxisProps;
|
|
24
|
-
/**
|
|
25
|
-
* Indicate which axis to display the left of the charts.
|
|
26
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
27
|
-
* @default null
|
|
28
|
-
*/
|
|
29
|
-
leftAxis?: null | string | ChartsYAxisProps;
|
|
14
|
+
export interface PieChartProps extends Omit<ChartContainerProps, 'series' | 'leftAxis' | 'bottomAxis' | 'plugins' | 'zAxis'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Pick<PiePlotProps, 'skipAnimation'> {
|
|
30
15
|
/**
|
|
31
16
|
* The series to display in the pie chart.
|
|
32
17
|
* An array of [[PieSeriesType]] objects.
|
|
33
18
|
*/
|
|
34
19
|
series: MakeOptional<PieSeriesType<MakeOptional<PieValueType, 'id'>>, 'type'>[];
|
|
35
20
|
/**
|
|
36
|
-
*
|
|
37
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
38
|
-
* @default { trigger: 'item' }
|
|
39
|
-
*/
|
|
40
|
-
tooltip?: ChartsTooltipProps<'pie'>;
|
|
41
|
-
/**
|
|
42
|
-
* The configuration of axes highlight.
|
|
43
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
44
|
-
* @default { x: 'none', y: 'none' }
|
|
45
|
-
*/
|
|
46
|
-
axisHighlight?: ChartsAxisHighlightProps;
|
|
47
|
-
/**
|
|
48
|
-
* The props of the legend.
|
|
49
|
-
* @default { direction: 'column', position: { vertical: 'middle', horizontal: 'right' } }
|
|
50
|
-
* @deprecated Consider using `slotProps.legend` instead.
|
|
21
|
+
* If `true`, the legend is not rendered.
|
|
51
22
|
*/
|
|
52
|
-
|
|
23
|
+
hideLegend?: boolean;
|
|
53
24
|
/**
|
|
54
25
|
* Callback fired when a pie arc is clicked.
|
|
55
26
|
*/
|
|
@@ -75,5 +46,5 @@ export interface PieChartProps extends Omit<ResponsiveChartContainerProps, 'seri
|
|
|
75
46
|
*
|
|
76
47
|
* - [PieChart API](https://mui.com/x/api/charts/pie-chart/)
|
|
77
48
|
*/
|
|
78
|
-
declare const PieChart: React.ForwardRefExoticComponent<PieChartProps & React.RefAttributes<
|
|
49
|
+
declare const PieChart: React.ForwardRefExoticComponent<PieChartProps & React.RefAttributes<SVGSVGElement>>;
|
|
79
50
|
export { PieChart };
|
package/PieChart/PieChart.js
CHANGED
|
@@ -2,17 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "sx", "
|
|
5
|
+
const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "sx", "skipAnimation", "hideLegend", "children", "slots", "slotProps", "onItemClick", "loading", "highlightedItem", "onHighlightChange", "className"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
9
9
|
import { useThemeProps } from '@mui/material/styles';
|
|
10
|
-
import {
|
|
11
|
-
import { ChartsAxis } from "../ChartsAxis/ChartsAxis.js";
|
|
12
|
-
import { DEFAULT_X_AXIS_KEY } from "../constants/index.js";
|
|
10
|
+
import { ChartContainer } from "../ChartContainer/index.js";
|
|
13
11
|
import { ChartsTooltip } from "../ChartsTooltip/index.js";
|
|
14
12
|
import { ChartsLegend } from "../ChartsLegend/index.js";
|
|
15
|
-
import { ChartsAxisHighlight } from "../ChartsAxisHighlight/index.js";
|
|
16
13
|
import { PiePlot } from "./PiePlot.js";
|
|
17
14
|
import { ChartsOverlay } from "../ChartsOverlay/index.js";
|
|
18
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -45,27 +42,14 @@ const PieChart = /*#__PURE__*/React.forwardRef(function PieChart(inProps, ref) {
|
|
|
45
42
|
name: 'MuiPieChart'
|
|
46
43
|
});
|
|
47
44
|
const {
|
|
48
|
-
xAxis,
|
|
49
|
-
yAxis,
|
|
50
45
|
series,
|
|
51
46
|
width,
|
|
52
47
|
height,
|
|
53
48
|
margin: marginProps,
|
|
54
49
|
colors,
|
|
55
50
|
sx,
|
|
56
|
-
tooltip = {
|
|
57
|
-
trigger: 'item'
|
|
58
|
-
},
|
|
59
|
-
axisHighlight = {
|
|
60
|
-
x: 'none',
|
|
61
|
-
y: 'none'
|
|
62
|
-
},
|
|
63
51
|
skipAnimation,
|
|
64
|
-
|
|
65
|
-
topAxis = null,
|
|
66
|
-
leftAxis = null,
|
|
67
|
-
rightAxis = null,
|
|
68
|
-
bottomAxis = null,
|
|
52
|
+
hideLegend,
|
|
69
53
|
children,
|
|
70
54
|
slots,
|
|
71
55
|
slotProps,
|
|
@@ -78,14 +62,8 @@ const PieChart = /*#__PURE__*/React.forwardRef(function PieChart(inProps, ref) {
|
|
|
78
62
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
79
63
|
const isRtl = useRtl();
|
|
80
64
|
const margin = _extends({}, isRtl ? defaultRTLMargin : defaultMargin, marginProps);
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
position: {
|
|
84
|
-
vertical: 'middle',
|
|
85
|
-
horizontal: isRtl ? 'left' : 'right'
|
|
86
|
-
}
|
|
87
|
-
}, legendProps);
|
|
88
|
-
return /*#__PURE__*/_jsxs(ResponsiveChartContainer, _extends({}, other, {
|
|
65
|
+
const Tooltip = slots?.tooltip ?? ChartsTooltip;
|
|
66
|
+
return /*#__PURE__*/_jsxs(ChartContainer, _extends({}, other, {
|
|
89
67
|
ref: ref,
|
|
90
68
|
series: series.map(s => _extends({
|
|
91
69
|
type: 'pie'
|
|
@@ -93,27 +71,14 @@ const PieChart = /*#__PURE__*/React.forwardRef(function PieChart(inProps, ref) {
|
|
|
93
71
|
width: width,
|
|
94
72
|
height: height,
|
|
95
73
|
margin: margin,
|
|
96
|
-
xAxis: xAxis ?? [{
|
|
97
|
-
id: DEFAULT_X_AXIS_KEY,
|
|
98
|
-
scaleType: 'point',
|
|
99
|
-
data: [...new Array(Math.max(...series.map(s => s.data.length)))].map((_, index) => index)
|
|
100
|
-
}],
|
|
101
|
-
yAxis: yAxis,
|
|
102
74
|
colors: colors,
|
|
103
75
|
sx: sx,
|
|
104
|
-
disableAxisListener:
|
|
76
|
+
disableAxisListener: true,
|
|
105
77
|
highlightedItem: highlightedItem,
|
|
106
78
|
onHighlightChange: onHighlightChange,
|
|
107
79
|
className: className,
|
|
108
80
|
skipAnimation: skipAnimation,
|
|
109
|
-
children: [/*#__PURE__*/_jsx(
|
|
110
|
-
topAxis: topAxis,
|
|
111
|
-
leftAxis: leftAxis,
|
|
112
|
-
rightAxis: rightAxis,
|
|
113
|
-
bottomAxis: bottomAxis,
|
|
114
|
-
slots: slots,
|
|
115
|
-
slotProps: slotProps
|
|
116
|
-
}), /*#__PURE__*/_jsx(PiePlot, {
|
|
81
|
+
children: [/*#__PURE__*/_jsx(PiePlot, {
|
|
117
82
|
slots: slots,
|
|
118
83
|
slotProps: slotProps,
|
|
119
84
|
onItemClick: onItemClick
|
|
@@ -121,13 +86,17 @@ const PieChart = /*#__PURE__*/React.forwardRef(function PieChart(inProps, ref) {
|
|
|
121
86
|
loading: loading,
|
|
122
87
|
slots: slots,
|
|
123
88
|
slotProps: slotProps
|
|
124
|
-
}), /*#__PURE__*/_jsx(ChartsLegend,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
89
|
+
}), !hideLegend && /*#__PURE__*/_jsx(ChartsLegend, {
|
|
90
|
+
direction: "column",
|
|
91
|
+
position: {
|
|
92
|
+
vertical: 'middle',
|
|
93
|
+
horizontal: isRtl ? 'left' : 'right'
|
|
94
|
+
},
|
|
128
95
|
slots: slots,
|
|
129
96
|
slotProps: slotProps
|
|
130
|
-
})
|
|
97
|
+
}), !loading && /*#__PURE__*/_jsx(Tooltip, _extends({
|
|
98
|
+
trigger: "item"
|
|
99
|
+
}, slotProps?.tooltip)), children]
|
|
131
100
|
}));
|
|
132
101
|
});
|
|
133
102
|
process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
@@ -135,21 +104,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
135
104
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
136
105
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
137
106
|
// ----------------------------------------------------------------------
|
|
138
|
-
/**
|
|
139
|
-
* The configuration of axes highlight.
|
|
140
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
141
|
-
* @default { x: 'none', y: 'none' }
|
|
142
|
-
*/
|
|
143
|
-
axisHighlight: PropTypes.shape({
|
|
144
|
-
x: PropTypes.oneOf(['band', 'line', 'none']),
|
|
145
|
-
y: PropTypes.oneOf(['band', 'line', 'none'])
|
|
146
|
-
}),
|
|
147
|
-
/**
|
|
148
|
-
* Indicate which axis to display the bottom of the charts.
|
|
149
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
150
|
-
* @default null
|
|
151
|
-
*/
|
|
152
|
-
bottomAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
153
107
|
children: PropTypes.node,
|
|
154
108
|
className: PropTypes.string,
|
|
155
109
|
/**
|
|
@@ -172,6 +126,10 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
172
126
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
173
127
|
*/
|
|
174
128
|
height: PropTypes.number,
|
|
129
|
+
/**
|
|
130
|
+
* If `true`, the legend is not rendered.
|
|
131
|
+
*/
|
|
132
|
+
hideLegend: PropTypes.bool,
|
|
175
133
|
/**
|
|
176
134
|
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
177
135
|
*/
|
|
@@ -179,40 +137,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
179
137
|
dataIndex: PropTypes.number,
|
|
180
138
|
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
181
139
|
}),
|
|
182
|
-
/**
|
|
183
|
-
* Indicate which axis to display the left of the charts.
|
|
184
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
185
|
-
* @default null
|
|
186
|
-
*/
|
|
187
|
-
leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
188
|
-
/**
|
|
189
|
-
* The props of the legend.
|
|
190
|
-
* @default { direction: 'column', position: { vertical: 'middle', horizontal: 'right' } }
|
|
191
|
-
* @deprecated Consider using `slotProps.legend` instead.
|
|
192
|
-
*/
|
|
193
|
-
legend: PropTypes.shape({
|
|
194
|
-
classes: PropTypes.object,
|
|
195
|
-
direction: PropTypes.oneOf(['column', 'row']),
|
|
196
|
-
hidden: PropTypes.bool,
|
|
197
|
-
itemGap: PropTypes.number,
|
|
198
|
-
itemMarkHeight: PropTypes.number,
|
|
199
|
-
itemMarkWidth: PropTypes.number,
|
|
200
|
-
labelStyle: PropTypes.object,
|
|
201
|
-
markGap: PropTypes.number,
|
|
202
|
-
onItemClick: PropTypes.func,
|
|
203
|
-
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
204
|
-
bottom: PropTypes.number,
|
|
205
|
-
left: PropTypes.number,
|
|
206
|
-
right: PropTypes.number,
|
|
207
|
-
top: PropTypes.number
|
|
208
|
-
})]),
|
|
209
|
-
position: PropTypes.shape({
|
|
210
|
-
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
211
|
-
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
212
|
-
}),
|
|
213
|
-
slotProps: PropTypes.object,
|
|
214
|
-
slots: PropTypes.object
|
|
215
|
-
}),
|
|
216
140
|
/**
|
|
217
141
|
* If `true`, a loading overlay is displayed.
|
|
218
142
|
* @default false
|
|
@@ -240,22 +164,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
240
164
|
* Callback fired when a pie arc is clicked.
|
|
241
165
|
*/
|
|
242
166
|
onItemClick: PropTypes.func,
|
|
243
|
-
/**
|
|
244
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
245
|
-
* before it renders for the first time.
|
|
246
|
-
*
|
|
247
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
248
|
-
* the first render, like when used inside a grid.
|
|
249
|
-
*
|
|
250
|
-
* @default false
|
|
251
|
-
*/
|
|
252
|
-
resolveSizeBeforeRender: PropTypes.bool,
|
|
253
|
-
/**
|
|
254
|
-
* Indicate which axis to display the right of the charts.
|
|
255
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
256
|
-
* @default null
|
|
257
|
-
*/
|
|
258
|
-
rightAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
259
167
|
/**
|
|
260
168
|
* The series to display in the pie chart.
|
|
261
169
|
* An array of [[PieSeriesType]] objects.
|
|
@@ -278,31 +186,6 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
278
186
|
slots: PropTypes.object,
|
|
279
187
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
280
188
|
title: PropTypes.string,
|
|
281
|
-
/**
|
|
282
|
-
* The configuration of the tooltip.
|
|
283
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
284
|
-
* @default { trigger: 'item' }
|
|
285
|
-
*/
|
|
286
|
-
tooltip: PropTypes.shape({
|
|
287
|
-
axisContent: PropTypes.elementType,
|
|
288
|
-
classes: PropTypes.object,
|
|
289
|
-
itemContent: PropTypes.elementType,
|
|
290
|
-
slotProps: PropTypes.object,
|
|
291
|
-
slots: PropTypes.object,
|
|
292
|
-
trigger: PropTypes.oneOf(['axis', 'item', 'none'])
|
|
293
|
-
}),
|
|
294
|
-
/**
|
|
295
|
-
* Indicate which axis to display the top of the charts.
|
|
296
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
297
|
-
* @default null
|
|
298
|
-
*/
|
|
299
|
-
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
300
|
-
viewBox: PropTypes.shape({
|
|
301
|
-
height: PropTypes.number,
|
|
302
|
-
width: PropTypes.number,
|
|
303
|
-
x: PropTypes.number,
|
|
304
|
-
y: PropTypes.number
|
|
305
|
-
}),
|
|
306
189
|
/**
|
|
307
190
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
308
191
|
*/
|
package/PieChart/PiePlot.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import {
|
|
5
|
+
import { DrawingAreaContext } from "../context/DrawingAreaProvider/index.js";
|
|
6
6
|
import { PieArcPlot } from "./PieArcPlot.js";
|
|
7
7
|
import { PieArcLabelPlot } from "./PieArcLabelPlot.js";
|
|
8
8
|
import { getPercentageValue } from "../internals/getPercentageValue.js";
|
|
@@ -33,7 +33,7 @@ function PiePlot(props) {
|
|
|
33
33
|
top,
|
|
34
34
|
width,
|
|
35
35
|
height
|
|
36
|
-
} = React.useContext(
|
|
36
|
+
} = React.useContext(DrawingAreaContext);
|
|
37
37
|
const skipAnimation = useSkipAnimation(inSkipAnimation);
|
|
38
38
|
if (seriesData === undefined) {
|
|
39
39
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DrawingAreaState } from '../context/DrawingAreaProvider';
|
|
2
2
|
import { DefaultizedPieSeriesType } from '../models/seriesType/pie';
|
|
3
|
-
export declare function getPieCoordinates(series: Pick<DefaultizedPieSeriesType, 'cx' | 'cy'>, drawing: Pick<
|
|
3
|
+
export declare function getPieCoordinates(series: Pick<DefaultizedPieSeriesType, 'cx' | 'cy'>, drawing: Pick<DrawingAreaState, 'width' | 'height'>): {
|
|
4
4
|
cx: number;
|
|
5
5
|
cy: number;
|
|
6
6
|
availableRadius: number;
|
package/README.md
CHANGED
|
@@ -11,13 +11,13 @@ Install the package in your project directory with:
|
|
|
11
11
|
npm install @mui/x-charts
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
This component has the following peer dependencies that you
|
|
14
|
+
This component has the following peer dependencies that you need to install as well.
|
|
15
15
|
|
|
16
16
|
```json
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@mui/material": "^5.15.14",
|
|
19
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
20
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
18
|
+
"@mui/material": "^5.15.14 || ^6.0.0",
|
|
19
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
20
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
21
21
|
},
|
|
22
22
|
```
|
|
23
23
|
|
package/ScatterChart/Scatter.js
CHANGED
|
@@ -5,9 +5,11 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { getValueToPositionMapper } from "../hooks/useScale.js";
|
|
7
7
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
|
|
8
|
-
import {
|
|
8
|
+
import { useStore } from "../internals/useStore.js";
|
|
9
|
+
import { useSelector } from "../internals/useSelector.js";
|
|
9
10
|
import { useHighlighted } from "../context/index.js";
|
|
10
11
|
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
12
|
+
import { selectorChartsInteractionIsVoronoiEnabled } from "../context/InteractionSelectors.js";
|
|
11
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
/**
|
|
13
15
|
* Demos:
|
|
@@ -30,10 +32,9 @@ function Scatter(props) {
|
|
|
30
32
|
onItemClick
|
|
31
33
|
} = props;
|
|
32
34
|
const drawingArea = useDrawingArea();
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const skipInteractionHandlers = useVoronoiInteraction || series.disableHover;
|
|
35
|
+
const store = useStore();
|
|
36
|
+
const isVoronoiEnabled = useSelector(store, selectorChartsInteractionIsVoronoiEnabled);
|
|
37
|
+
const skipInteractionHandlers = isVoronoiEnabled || series.disableHover;
|
|
37
38
|
const getInteractionItemProps = useInteractionItemProps(skipInteractionHandlers);
|
|
38
39
|
const {
|
|
39
40
|
isFaded,
|
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { MakeOptional } from '@mui/x-internals/types';
|
|
2
3
|
import { ScatterPlotProps, ScatterPlotSlotProps, ScatterPlotSlots } from './ScatterPlot';
|
|
3
|
-
import {
|
|
4
|
+
import { ChartContainerProps } from '../ChartContainer';
|
|
4
5
|
import { ChartsAxisProps } from '../ChartsAxis';
|
|
5
6
|
import { ScatterSeriesType } from '../models/seriesType/scatter';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { ChartsLegendProps, ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend';
|
|
7
|
+
import { ChartsTooltipSlots, ChartsTooltipSlotProps } from '../ChartsTooltip/ChartTooltip.types';
|
|
8
|
+
import { ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend';
|
|
9
9
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '../ChartsOverlay';
|
|
10
10
|
import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
11
11
|
import { ChartsAxisSlots, ChartsAxisSlotProps } from '../models/axis';
|
|
12
12
|
import { ChartsVoronoiHandlerProps } from '../ChartsVoronoiHandler/ChartsVoronoiHandler';
|
|
13
13
|
import { ChartsGridProps } from '../ChartsGrid';
|
|
14
14
|
import { ZAxisContextProviderProps } from '../context/ZAxisContextProvider';
|
|
15
|
-
export interface ScatterChartSlots extends ChartsAxisSlots, ScatterPlotSlots, ChartsLegendSlots, ChartsTooltipSlots
|
|
15
|
+
export interface ScatterChartSlots extends ChartsAxisSlots, ScatterPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots {
|
|
16
16
|
}
|
|
17
|
-
export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps
|
|
17
|
+
export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps {
|
|
18
18
|
}
|
|
19
|
-
export interface ScatterChartProps extends Omit<
|
|
19
|
+
export interface ScatterChartProps extends Omit<ChartContainerProps, 'series' | 'plugins'>, Omit<ZAxisContextProviderProps, 'children' | 'dataset'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Omit<ChartsVoronoiHandlerProps, 'onItemClick'> {
|
|
20
20
|
/**
|
|
21
21
|
* The series to display in the scatter chart.
|
|
22
22
|
* An array of [[ScatterSeriesType]] objects.
|
|
23
23
|
*/
|
|
24
24
|
series: MakeOptional<ScatterSeriesType, 'type'>[];
|
|
25
|
-
/**
|
|
26
|
-
* The configuration of the tooltip.
|
|
27
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
28
|
-
* @default { trigger: 'item' }
|
|
29
|
-
*/
|
|
30
|
-
tooltip?: ChartsTooltipProps<'scatter'>;
|
|
31
25
|
/**
|
|
32
26
|
* The configuration of axes highlight.
|
|
33
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
27
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
34
28
|
* @default { x: 'none', y: 'none' }
|
|
35
29
|
*/
|
|
36
30
|
axisHighlight?: ChartsAxisHighlightProps;
|
|
@@ -44,9 +38,9 @@ export interface ScatterChartProps extends Omit<ResponsiveChartContainerProps, '
|
|
|
44
38
|
*/
|
|
45
39
|
disableVoronoi?: boolean;
|
|
46
40
|
/**
|
|
47
|
-
*
|
|
41
|
+
* If `true`, the legend is not rendered.
|
|
48
42
|
*/
|
|
49
|
-
|
|
43
|
+
hideLegend?: boolean;
|
|
50
44
|
/**
|
|
51
45
|
* Overridable component slots.
|
|
52
46
|
* @default {}
|
|
@@ -74,5 +68,5 @@ export interface ScatterChartProps extends Omit<ResponsiveChartContainerProps, '
|
|
|
74
68
|
*
|
|
75
69
|
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
76
70
|
*/
|
|
77
|
-
declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & React.RefAttributes<
|
|
71
|
+
declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & React.RefAttributes<SVGSVGElement>>;
|
|
78
72
|
export { ScatterChart };
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useThemeProps } from '@mui/material/styles';
|
|
7
7
|
import { ScatterPlot } from "./ScatterPlot.js";
|
|
8
|
-
import {
|
|
8
|
+
import { ChartContainer } from "../ChartContainer/index.js";
|
|
9
9
|
import { ChartsAxis } from "../ChartsAxis/index.js";
|
|
10
10
|
import { ChartsTooltip } from "../ChartsTooltip/index.js";
|
|
11
11
|
import { ChartsLegend } from "../ChartsLegend/index.js";
|
|
@@ -41,17 +41,19 @@ const ScatterChart = /*#__PURE__*/React.forwardRef(function ScatterChart(inProps
|
|
|
41
41
|
overlayProps,
|
|
42
42
|
legendProps,
|
|
43
43
|
axisHighlightProps,
|
|
44
|
-
tooltipProps,
|
|
45
44
|
children
|
|
46
45
|
} = useScatterChartProps(props);
|
|
47
|
-
|
|
46
|
+
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
47
|
+
return /*#__PURE__*/_jsx(ChartContainer, _extends({
|
|
48
48
|
ref: ref
|
|
49
49
|
}, chartContainerProps, {
|
|
50
50
|
children: /*#__PURE__*/_jsxs(ZAxisContextProvider, _extends({}, zAxisProps, {
|
|
51
51
|
children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
|
|
52
52
|
"data-drawing-container": true,
|
|
53
53
|
children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
|
|
54
|
-
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(
|
|
54
|
+
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({
|
|
55
|
+
trigger: "item"
|
|
56
|
+
}, props.slotProps?.tooltip)), children]
|
|
55
57
|
}))
|
|
56
58
|
}));
|
|
57
59
|
});
|
|
@@ -62,7 +64,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
62
64
|
// ----------------------------------------------------------------------
|
|
63
65
|
/**
|
|
64
66
|
* The configuration of axes highlight.
|
|
65
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
67
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
66
68
|
* @default { x: 'none', y: 'none' }
|
|
67
69
|
*/
|
|
68
70
|
axisHighlight: PropTypes.shape({
|
|
@@ -109,6 +111,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
109
111
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
110
112
|
*/
|
|
111
113
|
height: PropTypes.number,
|
|
114
|
+
/**
|
|
115
|
+
* If `true`, the legend is not rendered.
|
|
116
|
+
*/
|
|
117
|
+
hideLegend: PropTypes.bool,
|
|
112
118
|
/**
|
|
113
119
|
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
114
120
|
*/
|
|
@@ -122,32 +128,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
122
128
|
* @default yAxisIds[0] The id of the first provided axis
|
|
123
129
|
*/
|
|
124
130
|
leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
125
|
-
/**
|
|
126
|
-
* @deprecated Consider using `slotProps.legend` instead.
|
|
127
|
-
*/
|
|
128
|
-
legend: PropTypes.shape({
|
|
129
|
-
classes: PropTypes.object,
|
|
130
|
-
direction: PropTypes.oneOf(['column', 'row']),
|
|
131
|
-
hidden: PropTypes.bool,
|
|
132
|
-
itemGap: PropTypes.number,
|
|
133
|
-
itemMarkHeight: PropTypes.number,
|
|
134
|
-
itemMarkWidth: PropTypes.number,
|
|
135
|
-
labelStyle: PropTypes.object,
|
|
136
|
-
markGap: PropTypes.number,
|
|
137
|
-
onItemClick: PropTypes.func,
|
|
138
|
-
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
139
|
-
bottom: PropTypes.number,
|
|
140
|
-
left: PropTypes.number,
|
|
141
|
-
right: PropTypes.number,
|
|
142
|
-
top: PropTypes.number
|
|
143
|
-
})]),
|
|
144
|
-
position: PropTypes.shape({
|
|
145
|
-
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
146
|
-
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
147
|
-
}),
|
|
148
|
-
slotProps: PropTypes.object,
|
|
149
|
-
slots: PropTypes.object
|
|
150
|
-
}),
|
|
151
131
|
/**
|
|
152
132
|
* If `true`, a loading overlay is displayed.
|
|
153
133
|
* @default false
|
|
@@ -177,16 +157,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
177
157
|
* @param {ScatterItemIdentifier} scatterItemIdentifier The scatter item identifier.
|
|
178
158
|
*/
|
|
179
159
|
onItemClick: PropTypes.func,
|
|
180
|
-
/**
|
|
181
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
182
|
-
* before it renders for the first time.
|
|
183
|
-
*
|
|
184
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
185
|
-
* the first render, like when used inside a grid.
|
|
186
|
-
*
|
|
187
|
-
* @default false
|
|
188
|
-
*/
|
|
189
|
-
resolveSizeBeforeRender: PropTypes.bool,
|
|
190
160
|
/**
|
|
191
161
|
* Indicate which axis to display the right of the charts.
|
|
192
162
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -215,31 +185,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
215
185
|
slots: PropTypes.object,
|
|
216
186
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
217
187
|
title: PropTypes.string,
|
|
218
|
-
/**
|
|
219
|
-
* The configuration of the tooltip.
|
|
220
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
221
|
-
* @default { trigger: 'item' }
|
|
222
|
-
*/
|
|
223
|
-
tooltip: PropTypes.shape({
|
|
224
|
-
axisContent: PropTypes.elementType,
|
|
225
|
-
classes: PropTypes.object,
|
|
226
|
-
itemContent: PropTypes.elementType,
|
|
227
|
-
slotProps: PropTypes.object,
|
|
228
|
-
slots: PropTypes.object,
|
|
229
|
-
trigger: PropTypes.oneOf(['axis', 'item', 'none'])
|
|
230
|
-
}),
|
|
231
188
|
/**
|
|
232
189
|
* Indicate which axis to display the top of the charts.
|
|
233
190
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
234
191
|
* @default null
|
|
235
192
|
*/
|
|
236
193
|
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
237
|
-
viewBox: PropTypes.shape({
|
|
238
|
-
height: PropTypes.number,
|
|
239
|
-
width: PropTypes.number,
|
|
240
|
-
x: PropTypes.number,
|
|
241
|
-
y: PropTypes.number
|
|
242
|
-
}),
|
|
243
194
|
/**
|
|
244
195
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
245
196
|
* If `undefined`, the radius is assumed to be infinite.
|