@mui/x-charts 8.0.0-alpha.0 → 8.0.0-alpha.2
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 +4 -9
- package/BarChart/BarChart.js +3 -35
- package/BarChart/BarElement.d.ts +5 -1342
- package/BarChart/BarElement.js +10 -20
- package/BarChart/BarLabel/BarLabel.d.ts +298 -298
- package/BarChart/BarPlot.js +12 -2
- package/BarChart/useBarChartProps.d.ts +0 -2
- package/BarChart/useBarChartProps.js +2 -8
- package/CHANGELOG.md +651 -6
- package/ChartContainer/ChartContainer.d.ts +26 -19
- package/ChartContainer/ChartContainer.js +31 -25
- package/ChartContainer/useChartContainerProps.d.ts +5 -7
- package/ChartContainer/useChartContainerProps.js +12 -27
- package/ChartsAxis/axisClasses.js +2 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -17
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +10 -96
- package/ChartsAxisHighlight/ChartsAxisHighlight.types.d.ts +5 -0
- package/ChartsAxisHighlight/ChartsAxisHighlight.types.js +1 -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/LegendPerItem.d.ts +2 -2
- package/ChartsLegend/chartsLegendClasses.js +2 -1
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +9 -7
- package/ChartsSurface/ChartsSurface.d.ts +14 -15
- package/ChartsSurface/ChartsSurface.js +68 -35
- package/ChartsTooltip/ChartTooltip.types.d.ts +15 -0
- package/ChartsTooltip/ChartTooltip.types.js +1 -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 +143 -145
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +33 -0
- package/ChartsTooltip/ChartsTooltipContainer.js +280 -0
- package/ChartsTooltip/ChartsTooltipTable.js +1 -1
- 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 +19 -19
- package/ChartsTooltip/useItemTooltip.d.ts +2 -3
- package/ChartsTooltip/useItemTooltip.js +5 -4
- package/ChartsTooltip/utils.d.ts +0 -3
- package/ChartsTooltip/utils.js +0 -8
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +49 -36
- package/ChartsXAxis/ChartsXAxis.js +3 -17
- package/ChartsYAxis/ChartsYAxis.js +2 -17
- package/Gauge/Gauge.d.ts +1 -1
- package/Gauge/Gauge.js +0 -6
- package/Gauge/GaugeContainer.d.ts +3 -3
- package/Gauge/GaugeContainer.js +42 -76
- 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/AreaPlot.js +12 -2
- package/LineChart/CircleMarkElement.js +6 -5
- package/LineChart/LineChart.d.ts +4 -10
- package/LineChart/LineChart.js +3 -36
- package/LineChart/LineHighlightPlot.js +6 -5
- package/LineChart/LinePlot.js +12 -2
- package/LineChart/MarkElement.js +6 -5
- package/LineChart/useLineChartProps.d.ts +0 -2
- package/LineChart/useLineChartProps.js +2 -8
- package/PieChart/PieChart.d.ts +3 -9
- package/PieChart/PieChart.js +5 -41
- package/PieChart/PiePlot.js +2 -2
- package/PieChart/getPieCoordinates.d.ts +2 -2
- package/README.md +2 -2
- package/ScatterChart/Scatter.js +6 -5
- package/ScatterChart/ScatterChart.d.ts +4 -10
- package/ScatterChart/ScatterChart.js +5 -36
- package/ScatterChart/useScatterChartProps.d.ts +0 -2
- package/ScatterChart/useScatterChartProps.js +1 -9
- package/SparkLineChart/SparkLineChart.d.ts +3 -4
- package/SparkLineChart/SparkLineChart.js +4 -35
- package/context/CartesianProvider/defaultizeAxis.d.ts +9 -11
- package/context/ChartDataProvider/ChartDataProvider.d.ts +36 -19
- package/context/ChartDataProvider/ChartDataProvider.js +55 -48
- package/context/ChartDataProvider/useChartDataProviderProps.d.ts +25 -32
- package/context/ChartDataProvider/useChartDataProviderProps.js +22 -42
- package/context/ChartDataProvider/useDefaultizeAxis.d.ts +9 -11
- package/context/ChartProvider/ChartContext.d.ts +6 -0
- package/context/ChartProvider/ChartContext.js +8 -0
- package/context/ChartProvider/ChartProvider.d.ts +4 -0
- package/context/ChartProvider/ChartProvider.js +19 -0
- package/context/ChartProvider/ChartProvider.types.d.ts +24 -0
- package/context/ChartProvider/ChartProvider.types.js +1 -0
- package/context/ChartProvider/index.d.ts +3 -0
- package/context/ChartProvider/index.js +3 -0
- package/context/ChartProvider/useChartContext.d.ts +3 -0
- package/context/ChartProvider/useChartContext.js +11 -0
- package/context/{DrawingProvider.d.ts → DrawingAreaProvider/DrawingArea.types.d.ts} +3 -14
- package/context/DrawingAreaProvider/DrawingArea.types.js +1 -0
- package/context/DrawingAreaProvider/DrawingAreaContext.d.ts +3 -0
- package/context/DrawingAreaProvider/DrawingAreaContext.js +15 -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/InteractionSelectors.d.ts +382 -0
- package/context/InteractionSelectors.js +12 -0
- package/context/SizeProvider/Size.types.d.ts +30 -0
- package/context/SizeProvider/Size.types.js +1 -0
- package/context/SizeProvider/SizeContext.d.ts +4 -0
- package/context/SizeProvider/SizeContext.js +15 -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/ChartContainer → context/SizeProvider}/useChartContainerDimensions.js +16 -6
- package/context/SizeProvider/useSize.d.ts +5 -0
- package/context/SizeProvider/useSize.js +13 -0
- package/context/index.d.ts +2 -0
- package/context/index.js +2 -1
- package/hooks/useAxisEvents.js +32 -19
- package/hooks/useChartId.js +5 -6
- package/hooks/useDrawingArea.d.ts +2 -2
- package/hooks/useDrawingArea.js +2 -2
- package/hooks/useInteractionItemProps.js +22 -13
- package/hooks/useSvgRef.d.ts +1 -1
- package/hooks/useSvgRef.js +4 -8
- package/index.js +1 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +9 -7
- package/internals/computeAxisValue.d.ts +2 -2
- package/internals/defaultizeColor.d.ts +1 -1
- package/internals/index.d.ts +3 -4
- package/internals/index.js +3 -4
- package/internals/plugins/allPlugins.d.ts +1 -0
- package/internals/plugins/allPlugins.js +3 -0
- package/internals/plugins/corePlugins/corePlugins.d.ts +10 -0
- package/internals/plugins/corePlugins/corePlugins.js +7 -0
- package/internals/plugins/corePlugins/index.d.ts +2 -0
- package/internals/plugins/corePlugins/index.js +1 -0
- package/internals/plugins/corePlugins/useChartId/index.d.ts +2 -0
- package/internals/plugins/corePlugins/useChartId/index.js +1 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.js +32 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +36 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +9 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.types.d.ts +20 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.types.js +1 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.utils.d.ts +1 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.utils.js +5 -0
- package/internals/plugins/featurePlugins/useChartInteraction/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartInteraction/index.js +2 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +73 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +376 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +57 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +1 -0
- package/internals/plugins/models/chart.d.ts +14 -0
- package/internals/plugins/models/chart.js +1 -0
- package/internals/plugins/models/helpers.d.ts +7 -0
- package/internals/plugins/models/helpers.js +1 -0
- package/internals/plugins/models/index.d.ts +3 -0
- package/internals/plugins/models/index.js +3 -0
- package/internals/plugins/models/plugin.d.ts +75 -0
- package/internals/plugins/models/plugin.js +1 -0
- package/internals/plugins/utils/ChartStore.d.ts +13 -0
- package/internals/plugins/utils/ChartStore.js +24 -0
- package/internals/plugins/utils/selectors.d.ts +9 -0
- package/internals/plugins/utils/selectors.js +37 -0
- package/internals/store/useCharts.d.ts +14 -0
- package/internals/store/useCharts.js +72 -0
- package/internals/store/useCharts.types.d.ts +5 -0
- package/internals/store/useCharts.types.js +1 -0
- package/internals/store/useSelector.d.ts +4 -0
- package/internals/store/useSelector.js +6 -0
- package/internals/store/useStore.d.ts +3 -0
- package/internals/store/useStore.js +17 -0
- package/models/axis.d.ts +1 -13
- package/modern/BarChart/AnimatedBarElement.js +21 -0
- package/modern/BarChart/BarChart.js +3 -35
- package/modern/BarChart/BarElement.js +10 -20
- package/modern/BarChart/BarPlot.js +12 -2
- package/modern/BarChart/useBarChartProps.js +2 -8
- package/modern/ChartContainer/ChartContainer.js +31 -25
- package/modern/ChartContainer/useChartContainerProps.js +12 -27
- package/modern/ChartsAxis/axisClasses.js +2 -1
- 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/chartsLegendClasses.js +2 -1
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +9 -7
- package/modern/ChartsSurface/ChartsSurface.js +68 -35
- 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 +143 -145
- package/modern/ChartsTooltip/ChartsTooltipContainer.js +280 -0
- package/modern/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/modern/ChartsTooltip/chartsTooltipClasses.js +18 -2
- package/modern/ChartsTooltip/index.js +2 -3
- package/modern/ChartsTooltip/useAxisTooltip.js +19 -19
- package/modern/ChartsTooltip/useItemTooltip.js +5 -4
- package/modern/ChartsTooltip/utils.js +0 -8
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +49 -36
- package/modern/ChartsXAxis/ChartsXAxis.js +3 -17
- package/modern/ChartsYAxis/ChartsYAxis.js +2 -17
- package/modern/Gauge/Gauge.js +0 -6
- package/modern/Gauge/GaugeContainer.js +42 -76
- package/modern/LineChart/AnimatedArea.js +9 -18
- package/modern/LineChart/AnimatedLine.js +9 -20
- package/modern/LineChart/AreaPlot.js +12 -2
- package/modern/LineChart/CircleMarkElement.js +6 -5
- package/modern/LineChart/LineChart.js +3 -36
- package/modern/LineChart/LineHighlightPlot.js +6 -5
- package/modern/LineChart/LinePlot.js +12 -2
- package/modern/LineChart/MarkElement.js +6 -5
- package/modern/LineChart/useLineChartProps.js +2 -8
- package/modern/PieChart/PieChart.js +5 -41
- package/modern/PieChart/PiePlot.js +2 -2
- package/modern/ScatterChart/Scatter.js +6 -5
- package/modern/ScatterChart/ScatterChart.js +5 -36
- package/modern/ScatterChart/useScatterChartProps.js +1 -9
- package/modern/SparkLineChart/SparkLineChart.js +4 -35
- package/modern/context/ChartDataProvider/ChartDataProvider.js +55 -48
- package/modern/context/ChartDataProvider/useChartDataProviderProps.js +22 -42
- package/modern/context/ChartProvider/ChartContext.js +8 -0
- package/modern/context/ChartProvider/ChartProvider.js +19 -0
- package/modern/context/ChartProvider/ChartProvider.types.js +1 -0
- package/modern/context/ChartProvider/index.js +3 -0
- package/modern/context/ChartProvider/useChartContext.js +11 -0
- package/modern/context/DrawingAreaProvider/DrawingArea.types.js +1 -0
- package/modern/context/DrawingAreaProvider/DrawingAreaContext.js +15 -0
- package/{context/DrawingProvider.js → modern/context/DrawingAreaProvider/DrawingAreaProvider.js} +11 -41
- package/modern/context/DrawingAreaProvider/index.js +3 -0
- package/modern/context/InteractionSelectors.js +12 -0
- package/modern/context/SizeProvider/Size.types.js +1 -0
- package/modern/context/SizeProvider/SizeContext.js +15 -0
- package/modern/context/SizeProvider/SizeProvider.js +26 -0
- package/modern/context/SizeProvider/index.js +4 -0
- package/{ChartContainer → modern/context/SizeProvider}/useChartContainerDimensions.js +16 -6
- package/modern/context/SizeProvider/useSize.js +13 -0
- package/modern/context/index.js +2 -1
- package/modern/hooks/useAxisEvents.js +32 -19
- package/modern/hooks/useChartId.js +5 -6
- package/modern/hooks/useDrawingArea.js +2 -2
- package/modern/hooks/useInteractionItemProps.js +22 -13
- package/modern/hooks/useSvgRef.js +4 -8
- package/modern/index.js +1 -1
- package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +9 -7
- package/modern/internals/index.js +3 -4
- package/modern/internals/plugins/allPlugins.js +3 -0
- package/modern/internals/plugins/corePlugins/corePlugins.js +7 -0
- package/modern/internals/plugins/corePlugins/index.js +1 -0
- package/modern/internals/plugins/corePlugins/useChartId/index.js +1 -0
- package/modern/internals/plugins/corePlugins/useChartId/useChartId.js +32 -0
- package/modern/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +9 -0
- package/modern/internals/plugins/corePlugins/useChartId/useChartId.types.js +1 -0
- package/modern/internals/plugins/corePlugins/useChartId/useChartId.utils.js +5 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/index.js +2 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +73 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +1 -0
- package/modern/internals/plugins/models/chart.js +1 -0
- package/modern/internals/plugins/models/helpers.js +1 -0
- package/modern/internals/plugins/models/index.js +3 -0
- package/modern/internals/plugins/models/plugin.js +1 -0
- package/modern/internals/plugins/utils/ChartStore.js +24 -0
- package/modern/internals/plugins/utils/selectors.js +37 -0
- package/modern/internals/store/useCharts.js +72 -0
- package/modern/internals/store/useCharts.types.js +1 -0
- package/modern/internals/store/useSelector.js +6 -0
- package/modern/internals/store/useStore.js +17 -0
- package/node/BarChart/AnimatedBarElement.js +28 -0
- package/node/BarChart/BarChart.js +3 -35
- package/node/BarChart/BarElement.js +11 -21
- package/node/BarChart/BarPlot.js +11 -1
- package/node/BarChart/useBarChartProps.js +2 -8
- package/node/ChartContainer/ChartContainer.js +31 -25
- package/node/ChartContainer/useChartContainerProps.js +12 -27
- package/node/ChartsAxis/axisClasses.js +5 -3
- package/node/ChartsAxisHighlight/ChartsAxisHighlight.js +12 -100
- package/node/ChartsAxisHighlight/ChartsAxisHighlight.types.js +5 -0
- 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/chartsLegendClasses.js +5 -3
- package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +9 -7
- package/node/ChartsSurface/ChartsSurface.js +68 -35
- package/node/ChartsTooltip/ChartTooltip.types.js +5 -0
- package/node/ChartsTooltip/ChartsAxisTooltipContent.js +83 -73
- package/node/ChartsTooltip/ChartsItemTooltipContent.js +54 -45
- package/node/ChartsTooltip/ChartsTooltip.js +142 -144
- package/node/ChartsTooltip/ChartsTooltipContainer.js +286 -0
- package/node/ChartsTooltip/ChartsTooltipTable.js +2 -2
- package/node/ChartsTooltip/chartsTooltipClasses.js +22 -3
- package/node/ChartsTooltip/index.js +19 -28
- package/node/ChartsTooltip/useAxisTooltip.js +19 -19
- package/node/ChartsTooltip/useItemTooltip.js +5 -4
- package/node/ChartsTooltip/utils.js +0 -9
- package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +50 -37
- package/node/ChartsXAxis/ChartsXAxis.js +3 -17
- package/node/ChartsYAxis/ChartsYAxis.js +2 -17
- package/node/Gauge/Gauge.js +0 -6
- package/node/Gauge/GaugeContainer.js +42 -76
- package/node/LineChart/AnimatedArea.js +9 -19
- package/node/LineChart/AnimatedLine.js +9 -21
- package/node/LineChart/AreaPlot.js +11 -1
- package/node/LineChart/CircleMarkElement.js +6 -5
- package/node/LineChart/LineChart.js +3 -36
- package/node/LineChart/LineHighlightPlot.js +6 -5
- package/node/LineChart/LinePlot.js +11 -1
- package/node/LineChart/MarkElement.js +6 -5
- package/node/LineChart/useLineChartProps.js +2 -8
- package/node/PieChart/PieChart.js +5 -41
- package/node/PieChart/PiePlot.js +2 -2
- package/node/ScatterChart/Scatter.js +6 -5
- package/node/ScatterChart/ScatterChart.js +5 -36
- package/node/ScatterChart/useScatterChartProps.js +1 -9
- package/node/SparkLineChart/SparkLineChart.js +4 -35
- package/node/context/ChartDataProvider/ChartDataProvider.js +55 -48
- package/node/context/ChartDataProvider/useChartDataProviderProps.js +22 -44
- package/node/context/ChartProvider/ChartContext.js +15 -0
- package/node/context/ChartProvider/ChartProvider.js +24 -0
- package/node/context/ChartProvider/ChartProvider.types.js +5 -0
- package/node/context/ChartProvider/index.js +38 -0
- package/node/context/ChartProvider/useChartContext.js +18 -0
- package/node/context/DrawingAreaProvider/DrawingArea.types.js +5 -0
- package/node/context/DrawingAreaProvider/DrawingAreaContext.js +21 -0
- package/node/context/{DrawingProvider.js → DrawingAreaProvider/DrawingAreaProvider.js} +12 -44
- package/node/context/DrawingAreaProvider/index.js +38 -0
- package/node/context/InteractionSelectors.js +18 -0
- package/node/context/SizeProvider/Size.types.js +5 -0
- package/node/context/SizeProvider/SizeContext.js +22 -0
- package/node/context/SizeProvider/SizeProvider.js +29 -0
- package/node/context/SizeProvider/index.js +49 -0
- package/node/{ChartContainer → context/SizeProvider}/useChartContainerDimensions.js +16 -6
- package/node/context/SizeProvider/useSize.js +20 -0
- package/node/context/index.js +10 -2
- package/node/hooks/useAxisEvents.js +33 -19
- package/node/hooks/useChartId.js +5 -7
- package/node/hooks/useDrawingArea.js +2 -2
- package/node/hooks/useInteractionItemProps.js +23 -14
- package/node/hooks/useSvgRef.js +4 -9
- package/node/index.js +1 -1
- package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +8 -6
- package/node/internals/index.js +28 -40
- package/node/internals/plugins/allPlugins.js +10 -0
- package/node/internals/plugins/corePlugins/corePlugins.js +12 -0
- package/node/internals/plugins/corePlugins/index.js +12 -0
- package/node/internals/plugins/corePlugins/useChartId/index.js +12 -0
- package/node/internals/plugins/corePlugins/useChartId/useChartId.js +41 -0
- package/node/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +15 -0
- package/node/internals/plugins/corePlugins/useChartId/useChartId.types.js +5 -0
- package/node/internals/plugins/corePlugins/useChartId/useChartId.utils.js +12 -0
- package/node/internals/plugins/featurePlugins/useChartInteraction/index.js +27 -0
- package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +81 -0
- package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +16 -0
- package/node/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.js +5 -0
- package/node/internals/plugins/models/chart.js +5 -0
- package/node/internals/plugins/models/helpers.js +5 -0
- package/node/internals/plugins/models/index.js +38 -0
- package/node/internals/plugins/models/plugin.js +5 -0
- package/node/internals/plugins/utils/ChartStore.js +31 -0
- package/node/internals/plugins/utils/selectors.js +44 -0
- package/node/internals/store/useCharts.js +80 -0
- package/node/internals/store/useCharts.types.js +5 -0
- package/node/internals/store/useSelector.js +13 -0
- package/node/internals/store/useStore.js +23 -0
- package/package.json +7 -5
- package/themeAugmentation/props.d.ts +1 -2
- package/ChartContainer/ResizableContainer.d.ts +0 -9
- package/ChartContainer/ResizableContainer.js +0 -26
- package/ChartContainer/useChartContainerDimensions.d.ts +0 -6
- 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/context/InteractionProvider.d.ts +0 -50
- package/context/InteractionProvider.js +0 -78
- package/modern/ChartContainer/ResizableContainer.js +0 -26
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -123
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -92
- package/modern/context/InteractionProvider.js +0 -78
- package/node/ChartContainer/ResizableContainer.js +0 -32
- package/node/ChartsTooltip/DefaultChartsAxisTooltipContent.js +0 -129
- package/node/ChartsTooltip/DefaultChartsItemTooltipContent.js +0 -98
- package/node/context/InteractionProvider.js +0 -85
- /package/ChartsGrid/{styledCommonents.d.ts → styledComponents.d.ts} +0 -0
- /package/ChartsGrid/{styledCommonents.js → styledComponents.js} +0 -0
- /package/modern/ChartsGrid/{styledCommonents.js → styledComponents.js} +0 -0
- /package/node/ChartsGrid/{styledCommonents.js → styledComponents.js} +0 -0
|
@@ -4,7 +4,7 @@ import { ScatterPlotProps, ScatterPlotSlotProps, ScatterPlotSlots } from './Scat
|
|
|
4
4
|
import { ChartContainerProps } from '../ChartContainer';
|
|
5
5
|
import { ChartsAxisProps } from '../ChartsAxis';
|
|
6
6
|
import { ScatterSeriesType } from '../models/seriesType/scatter';
|
|
7
|
-
import {
|
|
7
|
+
import { ChartsTooltipSlots, ChartsTooltipSlotProps } from '../ChartsTooltip/ChartTooltip.types';
|
|
8
8
|
import { ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend';
|
|
9
9
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '../ChartsOverlay';
|
|
10
10
|
import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
@@ -12,9 +12,9 @@ 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
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
|
/**
|
|
@@ -22,15 +22,9 @@ export interface ScatterChartProps extends Omit<ChartContainerProps, 'series' |
|
|
|
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;
|
|
@@ -41,9 +41,9 @@ 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);
|
|
46
|
+
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
47
47
|
return /*#__PURE__*/_jsx(ChartContainer, _extends({
|
|
48
48
|
ref: ref
|
|
49
49
|
}, chartContainerProps, {
|
|
@@ -51,7 +51,9 @@ const ScatterChart = /*#__PURE__*/React.forwardRef(function ScatterChart(inProps
|
|
|
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)), !props.hideLegend && /*#__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({
|
|
@@ -155,16 +157,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
155
157
|
* @param {ScatterItemIdentifier} scatterItemIdentifier The scatter item identifier.
|
|
156
158
|
*/
|
|
157
159
|
onItemClick: PropTypes.func,
|
|
158
|
-
/**
|
|
159
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
160
|
-
* before it renders for the first time.
|
|
161
|
-
*
|
|
162
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
163
|
-
* the first render, like when used inside a grid.
|
|
164
|
-
*
|
|
165
|
-
* @default false
|
|
166
|
-
*/
|
|
167
|
-
resolveSizeBeforeRender: PropTypes.bool,
|
|
168
160
|
/**
|
|
169
161
|
* Indicate which axis to display the right of the charts.
|
|
170
162
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -193,31 +185,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
193
185
|
slots: PropTypes.object,
|
|
194
186
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
195
187
|
title: PropTypes.string,
|
|
196
|
-
/**
|
|
197
|
-
* The configuration of the tooltip.
|
|
198
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
199
|
-
* @default { trigger: 'item' }
|
|
200
|
-
*/
|
|
201
|
-
tooltip: PropTypes.shape({
|
|
202
|
-
axisContent: PropTypes.elementType,
|
|
203
|
-
classes: PropTypes.object,
|
|
204
|
-
itemContent: PropTypes.elementType,
|
|
205
|
-
slotProps: PropTypes.object,
|
|
206
|
-
slots: PropTypes.object,
|
|
207
|
-
trigger: PropTypes.oneOf(['axis', 'item', 'none'])
|
|
208
|
-
}),
|
|
209
188
|
/**
|
|
210
189
|
* Indicate which axis to display the top of the charts.
|
|
211
190
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
212
191
|
* @default null
|
|
213
192
|
*/
|
|
214
193
|
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
215
|
-
viewBox: PropTypes.shape({
|
|
216
|
-
height: PropTypes.number,
|
|
217
|
-
width: PropTypes.number,
|
|
218
|
-
x: PropTypes.number,
|
|
219
|
-
y: PropTypes.number
|
|
220
|
-
}),
|
|
221
194
|
/**
|
|
222
195
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
223
196
|
* If `undefined`, the radius is assumed to be infinite.
|
|
@@ -258,7 +231,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
258
231
|
hideTooltip: PropTypes.bool,
|
|
259
232
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
260
233
|
label: PropTypes.string,
|
|
261
|
-
labelFontSize: PropTypes.number,
|
|
262
234
|
labelStyle: PropTypes.object,
|
|
263
235
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
264
236
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -269,7 +241,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
269
241
|
slots: PropTypes.object,
|
|
270
242
|
stroke: PropTypes.string,
|
|
271
243
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
272
|
-
tickFontSize: PropTypes.number,
|
|
273
244
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
274
245
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
275
246
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -312,7 +283,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
312
283
|
hideTooltip: PropTypes.bool,
|
|
313
284
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
314
285
|
label: PropTypes.string,
|
|
315
|
-
labelFontSize: PropTypes.number,
|
|
316
286
|
labelStyle: PropTypes.object,
|
|
317
287
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
318
288
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -323,7 +293,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
323
293
|
slots: PropTypes.object,
|
|
324
294
|
stroke: PropTypes.string,
|
|
325
295
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
326
|
-
tickFontSize: PropTypes.number,
|
|
327
296
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
328
297
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
329
298
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -3,7 +3,6 @@ import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
|
3
3
|
import { ChartsGridProps } from '../ChartsGrid';
|
|
4
4
|
import { ChartsLegendProps } from '../ChartsLegend';
|
|
5
5
|
import { ChartsOverlayProps } from '../ChartsOverlay';
|
|
6
|
-
import { ChartsTooltipProps } from '../ChartsTooltip';
|
|
7
6
|
import type { ChartsVoronoiHandlerProps } from '../ChartsVoronoiHandler';
|
|
8
7
|
import { ChartContainerProps } from '../ChartContainer';
|
|
9
8
|
import { ZAxisContextProviderProps } from '../context';
|
|
@@ -26,6 +25,5 @@ export declare const useScatterChartProps: (props: ScatterChartProps) => {
|
|
|
26
25
|
overlayProps: ChartsOverlayProps;
|
|
27
26
|
legendProps: ChartsLegendProps;
|
|
28
27
|
axisHighlightProps: ChartsAxisHighlightProps;
|
|
29
|
-
tooltipProps: ChartsTooltipProps<"scatter">;
|
|
30
28
|
children: import("react").ReactNode;
|
|
31
29
|
};
|
|
@@ -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 = ["xAxis", "yAxis", "zAxis", "series", "
|
|
5
|
+
const _excluded = ["xAxis", "yAxis", "zAxis", "series", "axisHighlight", "voronoiMaxRadius", "disableVoronoi", "hideLegend", "width", "height", "margin", "colors", "sx", "grid", "topAxis", "leftAxis", "rightAxis", "bottomAxis", "onItemClick", "children", "slots", "slotProps", "loading", "highlightedItem", "onHighlightChange", "className"];
|
|
6
6
|
/**
|
|
7
7
|
* A helper function that extracts ScatterChartProps from the input props
|
|
8
8
|
* and returns an object with props for the children components of ScatterChart.
|
|
@@ -16,7 +16,6 @@ export const useScatterChartProps = props => {
|
|
|
16
16
|
yAxis,
|
|
17
17
|
zAxis,
|
|
18
18
|
series,
|
|
19
|
-
tooltip,
|
|
20
19
|
axisHighlight,
|
|
21
20
|
voronoiMaxRadius,
|
|
22
21
|
disableVoronoi,
|
|
@@ -92,12 +91,6 @@ export const useScatterChartProps = props => {
|
|
|
92
91
|
y: 'none',
|
|
93
92
|
x: 'none'
|
|
94
93
|
}, axisHighlight);
|
|
95
|
-
const tooltipProps = _extends({
|
|
96
|
-
trigger: 'item'
|
|
97
|
-
}, tooltip, {
|
|
98
|
-
slots,
|
|
99
|
-
slotProps
|
|
100
|
-
});
|
|
101
94
|
return {
|
|
102
95
|
chartContainerProps,
|
|
103
96
|
zAxisProps,
|
|
@@ -108,7 +101,6 @@ export const useScatterChartProps = props => {
|
|
|
108
101
|
overlayProps,
|
|
109
102
|
legendProps,
|
|
110
103
|
axisHighlightProps,
|
|
111
|
-
tooltipProps,
|
|
112
104
|
children
|
|
113
105
|
};
|
|
114
106
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
3
|
import { ChartContainerProps } from '../ChartContainer';
|
|
4
|
-
import {
|
|
4
|
+
import { ChartsTooltipSlots, ChartsTooltipSlotProps } from '../ChartsTooltip/ChartTooltip.types';
|
|
5
5
|
import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
6
6
|
import { AxisConfig, ChartsXAxisProps, ChartsYAxisProps, ScaleName } from '../models/axis';
|
|
7
7
|
import { LineSeriesType } from '../models/seriesType';
|
|
@@ -11,9 +11,9 @@ import { LinePlotSlots, LinePlotSlotProps } from '../LineChart/LinePlot';
|
|
|
11
11
|
import { MarkPlotSlots, MarkPlotSlotProps } from '../LineChart/MarkPlot';
|
|
12
12
|
import { LineHighlightPlotSlots, LineHighlightPlotSlotProps } from '../LineChart/LineHighlightPlot';
|
|
13
13
|
import { BarPlotSlots, BarPlotSlotProps } from '../BarChart/BarPlot';
|
|
14
|
-
export interface SparkLineChartSlots extends AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, Omit<BarPlotSlots, 'barLabel'>, ChartsTooltipSlots
|
|
14
|
+
export interface SparkLineChartSlots extends AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, Omit<BarPlotSlots, 'barLabel'>, ChartsTooltipSlots {
|
|
15
15
|
}
|
|
16
|
-
export interface SparkLineChartSlotProps extends AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, BarPlotSlotProps, ChartsTooltipSlotProps
|
|
16
|
+
export interface SparkLineChartSlotProps extends AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, BarPlotSlotProps, ChartsTooltipSlotProps {
|
|
17
17
|
}
|
|
18
18
|
export interface SparkLineChartProps extends Omit<ChartContainerProps, 'series' | 'xAxis' | 'yAxis' | 'zAxis' | 'margin' | 'plugins'> {
|
|
19
19
|
/**
|
|
@@ -26,7 +26,6 @@ export interface SparkLineChartProps extends Omit<ChartContainerProps, 'series'
|
|
|
26
26
|
* Notice it is a single [[AxisConfig]] object, not an array of configuration.
|
|
27
27
|
*/
|
|
28
28
|
yAxis?: MakeOptional<AxisConfig<ScaleName, any, ChartsYAxisProps>, 'id'>;
|
|
29
|
-
tooltip?: ChartsTooltipProps<'line' | 'bar'>;
|
|
30
29
|
axisHighlight?: ChartsAxisHighlightProps;
|
|
31
30
|
/**
|
|
32
31
|
* Type of plot used.
|
|
@@ -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 = ["xAxis", "yAxis", "width", "height", "margin", "colors", "sx", "showTooltip", "
|
|
5
|
+
const _excluded = ["xAxis", "yAxis", "width", "height", "margin", "colors", "sx", "showTooltip", "showHighlight", "axisHighlight", "children", "slots", "slotProps", "data", "plotType", "valueFormatter", "area", "curve", "className"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { BarPlot } from "../BarChart/index.js";
|
|
@@ -38,7 +38,6 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
38
38
|
colors,
|
|
39
39
|
sx,
|
|
40
40
|
showTooltip,
|
|
41
|
-
tooltip,
|
|
42
41
|
showHighlight,
|
|
43
42
|
axisHighlight: inAxisHighlight,
|
|
44
43
|
children,
|
|
@@ -58,6 +57,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
58
57
|
x: 'none'
|
|
59
58
|
};
|
|
60
59
|
const axisHighlight = _extends({}, defaultXHighlight, inAxisHighlight);
|
|
60
|
+
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
61
61
|
return /*#__PURE__*/_jsxs(ChartContainer, _extends({}, other, {
|
|
62
62
|
ref: ref,
|
|
63
63
|
series: [_extends({
|
|
@@ -86,7 +86,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
86
86
|
}, yAxis)],
|
|
87
87
|
colors: colors,
|
|
88
88
|
sx: sx,
|
|
89
|
-
disableAxisListener: (!showTooltip || tooltip?.trigger !== 'axis') && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
|
|
89
|
+
disableAxisListener: (!showTooltip || slotProps?.tooltip?.trigger !== 'axis') && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
|
|
90
90
|
children: [plotType === 'bar' && /*#__PURE__*/_jsx(BarPlot, {
|
|
91
91
|
skipAnimation: true,
|
|
92
92
|
slots: slots,
|
|
@@ -107,10 +107,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
107
107
|
slots: slots,
|
|
108
108
|
slotProps: slotProps
|
|
109
109
|
})]
|
|
110
|
-
}), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlight)), showTooltip && /*#__PURE__*/_jsx(
|
|
111
|
-
slotProps: slotProps,
|
|
112
|
-
slots: slots
|
|
113
|
-
})), children]
|
|
110
|
+
}), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlight)), showTooltip && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), children]
|
|
114
111
|
}));
|
|
115
112
|
});
|
|
116
113
|
process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
@@ -193,16 +190,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
193
190
|
* @default 'line'
|
|
194
191
|
*/
|
|
195
192
|
plotType: PropTypes.oneOf(['bar', 'line']),
|
|
196
|
-
/**
|
|
197
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
198
|
-
* before it renders for the first time.
|
|
199
|
-
*
|
|
200
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
201
|
-
* the first render, like when used inside a grid.
|
|
202
|
-
*
|
|
203
|
-
* @default false
|
|
204
|
-
*/
|
|
205
|
-
resolveSizeBeforeRender: PropTypes.bool,
|
|
206
193
|
/**
|
|
207
194
|
* Set to `true` to highlight the value.
|
|
208
195
|
* With line, it shows a point.
|
|
@@ -232,14 +219,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
232
219
|
slots: PropTypes.object,
|
|
233
220
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
234
221
|
title: PropTypes.string,
|
|
235
|
-
tooltip: PropTypes.shape({
|
|
236
|
-
axisContent: PropTypes.elementType,
|
|
237
|
-
classes: PropTypes.object,
|
|
238
|
-
itemContent: PropTypes.elementType,
|
|
239
|
-
slotProps: PropTypes.object,
|
|
240
|
-
slots: PropTypes.object,
|
|
241
|
-
trigger: PropTypes.oneOf(['axis', 'item', 'none'])
|
|
242
|
-
}),
|
|
243
222
|
/**
|
|
244
223
|
* Formatter used by the tooltip.
|
|
245
224
|
* @param {number} value The value to format.
|
|
@@ -247,12 +226,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
247
226
|
* @default (value: number | null) => (value === null ? '' : value.toString())
|
|
248
227
|
*/
|
|
249
228
|
valueFormatter: PropTypes.func,
|
|
250
|
-
viewBox: PropTypes.shape({
|
|
251
|
-
height: PropTypes.number,
|
|
252
|
-
width: PropTypes.number,
|
|
253
|
-
x: PropTypes.number,
|
|
254
|
-
y: PropTypes.number
|
|
255
|
-
}),
|
|
256
229
|
/**
|
|
257
230
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
258
231
|
*/
|
|
@@ -287,7 +260,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
287
260
|
hideTooltip: PropTypes.bool,
|
|
288
261
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
289
262
|
label: PropTypes.string,
|
|
290
|
-
labelFontSize: PropTypes.number,
|
|
291
263
|
labelStyle: PropTypes.object,
|
|
292
264
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
293
265
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -298,7 +270,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
298
270
|
slots: PropTypes.object,
|
|
299
271
|
stroke: PropTypes.string,
|
|
300
272
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
301
|
-
tickFontSize: PropTypes.number,
|
|
302
273
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
303
274
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
304
275
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -340,7 +311,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
340
311
|
hideTooltip: PropTypes.bool,
|
|
341
312
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
342
313
|
label: PropTypes.string,
|
|
343
|
-
labelFontSize: PropTypes.number,
|
|
344
314
|
labelStyle: PropTypes.object,
|
|
345
315
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
346
316
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -351,7 +321,6 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
351
321
|
slots: PropTypes.object,
|
|
352
322
|
stroke: PropTypes.string,
|
|
353
323
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
354
|
-
tickFontSize: PropTypes.number,
|
|
355
324
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
356
325
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
357
326
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -12,29 +12,27 @@ export declare const defaultizeAxis: (inAxis: MakeOptional<AxisConfig<ScaleName,
|
|
|
12
12
|
valueFormatter?: ((value: any, context: import("../../internals").AxisValueFormatterContext) => string) | undefined;
|
|
13
13
|
dataKey?: string | undefined;
|
|
14
14
|
sx?: import("@mui/system").SxProps | undefined;
|
|
15
|
-
classes?: Partial<import("../..").ChartsAxisClasses> | undefined;
|
|
16
15
|
tickMaxStep?: number | undefined;
|
|
17
16
|
tickMinStep?: number | undefined;
|
|
18
17
|
tickNumber?: number | undefined;
|
|
19
18
|
disableLine?: boolean | undefined;
|
|
20
19
|
disableTicks?: boolean | undefined;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
tickLabelInterval?: ("auto" | ((value: any, index: number) => boolean)) | undefined;
|
|
25
|
-
labelFontSize?: number | undefined;
|
|
20
|
+
tickLabelStyle?: import("../..").ChartsTextStyle | undefined;
|
|
21
|
+
labelStyle?: import("../..").ChartsTextStyle | undefined;
|
|
22
|
+
tickLabelInterval?: "auto" | ((value: any, index: number) => boolean) | undefined;
|
|
26
23
|
tickSize?: number | undefined;
|
|
24
|
+
classes?: Partial<import("../..").ChartsAxisClasses> | undefined;
|
|
27
25
|
slots?: Partial<import("../../internals").ChartsAxisSlots> | undefined;
|
|
28
26
|
slotProps?: Partial<import("../../internals").ChartsAxisSlotProps> | undefined;
|
|
29
|
-
tickInterval?:
|
|
30
|
-
tickPlacement?:
|
|
31
|
-
tickLabelPlacement?:
|
|
27
|
+
tickInterval?: "auto" | ((value: any, index: number) => boolean) | any[] | undefined;
|
|
28
|
+
tickPlacement?: "start" | "end" | "middle" | "extremities" | undefined;
|
|
29
|
+
tickLabelPlacement?: "middle" | "tick" | undefined;
|
|
32
30
|
scaleType?: "linear" | "time" | "log" | "band" | "point" | "pow" | "sqrt" | "utc" | undefined;
|
|
33
31
|
colorMap?: import("../../models/colorMapping").ContinuousColorConfig<number | Date> | import("../../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
34
32
|
hideTooltip?: boolean | undefined;
|
|
35
|
-
domainLimit?:
|
|
33
|
+
domainLimit?: "nice" | "strict" | ((min: number, max: number) => {
|
|
36
34
|
min: number;
|
|
37
35
|
max: number;
|
|
38
|
-
})
|
|
36
|
+
}) | undefined;
|
|
39
37
|
id: import("../../internals").AxisId;
|
|
40
38
|
}[];
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
|
-
import {
|
|
3
|
+
import { DrawingAreaProviderProps } from '../DrawingAreaProvider';
|
|
4
4
|
import { SeriesProviderProps } from '../SeriesProvider';
|
|
5
|
-
import { ChartsSurfaceProps } from '../../ChartsSurface';
|
|
6
5
|
import { CartesianProviderProps } from '../CartesianProvider';
|
|
7
|
-
import { HighlightedProviderProps, ZAxisContextProviderProps } from '..';
|
|
8
6
|
import { PluginProviderProps } from '../PluginProvider';
|
|
9
7
|
import { AxisConfig, ChartsXAxisProps, ChartsYAxisProps, ScaleName } from '../../models/axis';
|
|
10
8
|
import { AnimationProviderProps } from '../AnimationProvider';
|
|
11
|
-
|
|
9
|
+
import { ZAxisContextProviderProps } from '../ZAxisContextProvider';
|
|
10
|
+
import { HighlightedProviderProps } from '../HighlightedProvider';
|
|
11
|
+
import { SizeProviderProps } from '../SizeProvider';
|
|
12
|
+
export type ChartDataProviderProps = Omit<SizeProviderProps & Omit<SeriesProviderProps, 'seriesFormatters'> & Pick<DrawingAreaProviderProps, 'margin'> & Pick<CartesianProviderProps, 'dataset'> & ZAxisContextProviderProps & HighlightedProviderProps & PluginProviderProps & AnimationProviderProps, 'children'> & {
|
|
12
13
|
/**
|
|
13
14
|
* The configuration of the x-axes.
|
|
14
15
|
* If not provided, a default axis config is used.
|
|
@@ -23,19 +24,35 @@ export type ChartDataProviderProps = Omit<ChartsSurfaceProps & Omit<SeriesProvid
|
|
|
23
24
|
yAxis?: MakeOptional<AxisConfig<ScaleName, any, ChartsYAxisProps>, 'id'>[];
|
|
24
25
|
children?: React.ReactNode;
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Orchestrates the data providers for the chart components and hooks.
|
|
29
|
+
*
|
|
30
|
+
* Use this component if you have custom HTML components that need to access the chart data.
|
|
31
|
+
*
|
|
32
|
+
* Demos:
|
|
33
|
+
*
|
|
34
|
+
* - [Composition](http://localhost:3001/x/react-charts/composition/)
|
|
35
|
+
*
|
|
36
|
+
* API:
|
|
37
|
+
*
|
|
38
|
+
* - [ChartDataProvider API](https://mui.com/x/api/charts/chart-data-provider/)
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```jsx
|
|
42
|
+
* <ChartDataProvider
|
|
43
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
44
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
45
|
+
* >
|
|
46
|
+
* <ChartsSurface>
|
|
47
|
+
* <BarPlot />
|
|
48
|
+
* <ChartsXAxis position="bottom" axisId="x-axis" />
|
|
49
|
+
* </ChartsSurface>
|
|
50
|
+
* {'Custom Legend Component'}
|
|
51
|
+
* </ChartDataProvider>
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
declare function ChartDataProvider(props: ChartDataProviderProps): React.JSX.Element;
|
|
55
|
+
declare namespace ChartDataProvider {
|
|
56
|
+
var propTypes: any;
|
|
57
|
+
}
|
|
41
58
|
export { ChartDataProvider };
|
|
@@ -3,56 +3,82 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
6
|
+
import { DrawingAreaProvider } from "../DrawingAreaProvider/index.js";
|
|
7
7
|
import { SeriesProvider } from "../SeriesProvider/index.js";
|
|
8
|
-
import { InteractionProvider } from "../InteractionProvider.js";
|
|
9
|
-
import { ChartsSurface } from "../../ChartsSurface/index.js";
|
|
10
8
|
import { CartesianProvider } from "../CartesianProvider/index.js";
|
|
11
|
-
import { ChartsAxesGradients } from "../../internals/components/ChartsAxesGradients/index.js";
|
|
12
|
-
import { HighlightedProvider, ZAxisContextProvider } from "../index.js";
|
|
13
9
|
import { PluginProvider } from "../PluginProvider/index.js";
|
|
14
10
|
import { useChartDataProviderProps } from "./useChartDataProviderProps.js";
|
|
15
11
|
import { AnimationProvider } from "../AnimationProvider/index.js";
|
|
16
|
-
import {
|
|
17
|
-
|
|
12
|
+
import { ZAxisContextProvider } from "../ZAxisContextProvider.js";
|
|
13
|
+
import { HighlightedProvider } from "../HighlightedProvider/index.js";
|
|
14
|
+
import { SizeProvider } from "../SizeProvider/index.js";
|
|
15
|
+
import { ChartProvider } from "../ChartProvider/index.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
/**
|
|
18
|
+
* Orchestrates the data providers for the chart components and hooks.
|
|
19
|
+
*
|
|
20
|
+
* Use this component if you have custom HTML components that need to access the chart data.
|
|
21
|
+
*
|
|
22
|
+
* Demos:
|
|
23
|
+
*
|
|
24
|
+
* - [Composition](http://localhost:3001/x/react-charts/composition/)
|
|
25
|
+
*
|
|
26
|
+
* API:
|
|
27
|
+
*
|
|
28
|
+
* - [ChartDataProvider API](https://mui.com/x/api/charts/chart-data-provider/)
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```jsx
|
|
32
|
+
* <ChartDataProvider
|
|
33
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
34
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
35
|
+
* >
|
|
36
|
+
* <ChartsSurface>
|
|
37
|
+
* <BarPlot />
|
|
38
|
+
* <ChartsXAxis position="bottom" axisId="x-axis" />
|
|
39
|
+
* </ChartsSurface>
|
|
40
|
+
* {'Custom Legend Component'}
|
|
41
|
+
* </ChartDataProvider>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
function ChartDataProvider(props) {
|
|
18
45
|
const {
|
|
19
46
|
children,
|
|
20
|
-
|
|
47
|
+
drawingAreaProviderProps,
|
|
21
48
|
seriesProviderProps,
|
|
22
49
|
cartesianProviderProps,
|
|
23
50
|
zAxisContextProps,
|
|
24
51
|
highlightedProviderProps,
|
|
25
|
-
chartsSurfaceProps,
|
|
26
52
|
pluginProviderProps,
|
|
27
|
-
animationProviderProps
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
53
|
+
animationProviderProps,
|
|
54
|
+
sizeProviderProps
|
|
55
|
+
} = useChartDataProviderProps(props);
|
|
56
|
+
return /*#__PURE__*/_jsx(ChartProvider, {
|
|
57
|
+
children: /*#__PURE__*/_jsx(SizeProvider, _extends({}, sizeProviderProps, {
|
|
58
|
+
children: /*#__PURE__*/_jsx(DrawingAreaProvider, _extends({}, drawingAreaProviderProps, {
|
|
59
|
+
children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
|
|
60
|
+
children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
|
|
61
|
+
children: /*#__PURE__*/_jsx(CartesianProvider, _extends({}, cartesianProviderProps, {
|
|
62
|
+
children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
|
|
63
|
+
children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
|
|
64
|
+
children: /*#__PURE__*/_jsx(AnimationProvider, _extends({}, animationProviderProps, {
|
|
65
|
+
children: children
|
|
39
66
|
}))
|
|
40
67
|
}))
|
|
41
68
|
}))
|
|
42
|
-
})
|
|
69
|
+
}))
|
|
43
70
|
}))
|
|
44
71
|
}))
|
|
45
72
|
}))
|
|
46
73
|
}))
|
|
47
|
-
})
|
|
48
|
-
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
49
76
|
process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
50
77
|
// ----------------------------- Warning --------------------------------
|
|
51
78
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
52
79
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
53
80
|
// ----------------------------------------------------------------------
|
|
54
81
|
children: PropTypes.node,
|
|
55
|
-
className: PropTypes.string,
|
|
56
82
|
/**
|
|
57
83
|
* Color palette used to colorize multiple series.
|
|
58
84
|
* @default blueberryTwilightPalette
|
|
@@ -62,17 +88,10 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
|
62
88
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
63
89
|
*/
|
|
64
90
|
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
65
|
-
desc: PropTypes.string,
|
|
66
91
|
/**
|
|
67
|
-
*
|
|
68
|
-
* It might break interactive features, but will improve performance.
|
|
69
|
-
* @default false
|
|
92
|
+
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
70
93
|
*/
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* The height of the chart in px.
|
|
74
|
-
*/
|
|
75
|
-
height: PropTypes.number.isRequired,
|
|
94
|
+
height: PropTypes.number,
|
|
76
95
|
/**
|
|
77
96
|
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
78
97
|
*/
|
|
@@ -114,18 +133,10 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
|
114
133
|
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
115
134
|
*/
|
|
116
135
|
skipAnimation: PropTypes.bool,
|
|
117
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
118
|
-
title: PropTypes.string,
|
|
119
|
-
viewBox: PropTypes.shape({
|
|
120
|
-
height: PropTypes.number,
|
|
121
|
-
width: PropTypes.number,
|
|
122
|
-
x: PropTypes.number,
|
|
123
|
-
y: PropTypes.number
|
|
124
|
-
}),
|
|
125
136
|
/**
|
|
126
|
-
* The width of the chart in px.
|
|
137
|
+
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
127
138
|
*/
|
|
128
|
-
width: PropTypes.number
|
|
139
|
+
width: PropTypes.number,
|
|
129
140
|
/**
|
|
130
141
|
* The configuration of the x-axes.
|
|
131
142
|
* If not provided, a default axis config is used.
|
|
@@ -157,7 +168,6 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
|
157
168
|
hideTooltip: PropTypes.bool,
|
|
158
169
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
159
170
|
label: PropTypes.string,
|
|
160
|
-
labelFontSize: PropTypes.number,
|
|
161
171
|
labelStyle: PropTypes.object,
|
|
162
172
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
163
173
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -168,7 +178,6 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
|
168
178
|
slots: PropTypes.object,
|
|
169
179
|
stroke: PropTypes.string,
|
|
170
180
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
171
|
-
tickFontSize: PropTypes.number,
|
|
172
181
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
173
182
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
174
183
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -211,7 +220,6 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
|
211
220
|
hideTooltip: PropTypes.bool,
|
|
212
221
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
213
222
|
label: PropTypes.string,
|
|
214
|
-
labelFontSize: PropTypes.number,
|
|
215
223
|
labelStyle: PropTypes.object,
|
|
216
224
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
217
225
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -222,7 +230,6 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
|
|
|
222
230
|
slots: PropTypes.object,
|
|
223
231
|
stroke: PropTypes.string,
|
|
224
232
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
225
|
-
tickFontSize: PropTypes.number,
|
|
226
233
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
227
234
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
228
235
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|