@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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MakeOptional } from '
|
|
2
|
-
import { AxisConfig, ScaleName } from '
|
|
3
|
-
import { ChartsAxisProps } from '
|
|
4
|
-
import { DatasetType } from '
|
|
1
|
+
import { MakeOptional } from '@mui/x-internals/types';
|
|
2
|
+
import { AxisConfig, ScaleName } from '../../models';
|
|
3
|
+
import { ChartsAxisProps } from '../../models/axis';
|
|
4
|
+
import { DatasetType } from '../../models/seriesType/config';
|
|
5
5
|
export declare const useDefaultizeAxis: (inXAxis: MakeOptional<AxisConfig<ScaleName, any, ChartsAxisProps>, "id">[] | undefined, inYAxis: MakeOptional<AxisConfig<ScaleName, any, ChartsAxisProps>, "id">[] | undefined, dataset: DatasetType | undefined) => {
|
|
6
6
|
reverse?: boolean | undefined;
|
|
7
7
|
fill?: string | undefined;
|
|
@@ -10,32 +10,32 @@ export declare const useDefaultizeAxis: (inXAxis: MakeOptional<AxisConfig<ScaleN
|
|
|
10
10
|
label?: string | undefined;
|
|
11
11
|
max?: (number | Date) | undefined;
|
|
12
12
|
min?: (number | Date) | undefined;
|
|
13
|
-
valueFormatter?: ((value: any, context: import("
|
|
13
|
+
valueFormatter?: ((value: any, context: import("../../internals").AxisValueFormatterContext) => string) | undefined;
|
|
14
14
|
dataKey?: string | undefined;
|
|
15
15
|
sx?: import("@mui/system").SxProps | undefined;
|
|
16
|
-
classes?: Partial<import("
|
|
16
|
+
classes?: Partial<import("../..").ChartsAxisClasses> | undefined;
|
|
17
17
|
tickMaxStep?: number | undefined;
|
|
18
18
|
tickMinStep?: number | undefined;
|
|
19
19
|
tickNumber?: number | undefined;
|
|
20
20
|
disableLine?: boolean | undefined;
|
|
21
21
|
disableTicks?: boolean | undefined;
|
|
22
22
|
tickFontSize?: number | undefined;
|
|
23
|
-
tickLabelStyle?: import("
|
|
24
|
-
labelStyle?: import("
|
|
23
|
+
tickLabelStyle?: import("../..").ChartsTextProps["style"];
|
|
24
|
+
labelStyle?: import("../..").ChartsTextProps["style"];
|
|
25
25
|
tickLabelInterval?: ("auto" | ((value: any, index: number) => boolean)) | undefined;
|
|
26
26
|
labelFontSize?: number | undefined;
|
|
27
27
|
tickSize?: number | undefined;
|
|
28
|
-
slots?: Partial<import("
|
|
29
|
-
slotProps?: Partial<import("
|
|
28
|
+
slots?: Partial<import("../../internals").ChartsAxisSlots> | undefined;
|
|
29
|
+
slotProps?: Partial<import("../../internals").ChartsAxisSlotProps> | undefined;
|
|
30
30
|
tickInterval?: ("auto" | ((value: any, index: number) => boolean) | any[]) | undefined;
|
|
31
31
|
tickPlacement?: ("start" | "end" | "middle" | "extremities") | undefined;
|
|
32
32
|
tickLabelPlacement?: ("middle" | "tick") | undefined;
|
|
33
33
|
scaleType?: "linear" | "time" | "log" | "band" | "point" | "pow" | "sqrt" | "utc" | undefined;
|
|
34
|
-
colorMap?: import("
|
|
34
|
+
colorMap?: import("../../models/colorMapping").ContinuousColorConfig<number | Date> | import("../../models/colorMapping").PiecewiseColorConfig<number | Date> | import("../../models/colorMapping").OrdinalColorConfig<string | number | Date> | undefined;
|
|
35
35
|
hideTooltip?: boolean | undefined;
|
|
36
36
|
domainLimit?: ("nice" | "strict" | ((min: number, max: number) => {
|
|
37
37
|
min: number;
|
|
38
38
|
max: number;
|
|
39
39
|
})) | undefined;
|
|
40
|
-
id: import("
|
|
40
|
+
id: import("../../internals").AxisId;
|
|
41
41
|
}[][];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "
|
|
5
|
+
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../../constants/index.js";
|
|
6
6
|
const defaultizeAxis = (inAxis, dataset, axisName) => {
|
|
7
7
|
const DEFAULT_AXIS_KEY = axisName === 'x' ? DEFAULT_X_AXIS_KEY : DEFAULT_Y_AXIS_KEY;
|
|
8
8
|
return [...(inAxis?.map((axis, index) => _extends({
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { LayoutConfig } from '
|
|
3
|
-
|
|
4
|
-
export interface DrawingProviderProps extends LayoutConfig {
|
|
2
|
+
import { LayoutConfig } from '../../models';
|
|
3
|
+
export interface DrawingAreaProviderProps extends Pick<LayoutConfig, 'margin'> {
|
|
5
4
|
children: React.ReactNode;
|
|
6
|
-
svgRef: React.RefObject<SVGSVGElement>;
|
|
7
5
|
}
|
|
8
6
|
/**
|
|
9
7
|
* Defines the area in which it is possible to draw the charts.
|
|
10
8
|
*/
|
|
11
|
-
export type
|
|
9
|
+
export type DrawingAreaState = {
|
|
12
10
|
/**
|
|
13
11
|
* The gap between the left border of the SVG and the drawing area.
|
|
14
12
|
*/
|
|
@@ -51,12 +49,3 @@ export type DrawingArea = {
|
|
|
51
49
|
direction?: 'x' | 'y';
|
|
52
50
|
}) => boolean;
|
|
53
51
|
};
|
|
54
|
-
export declare const DrawingContext: React.Context<DrawingArea & {
|
|
55
|
-
/**
|
|
56
|
-
* A random id used to distinguish each chart on the same page.
|
|
57
|
-
*/
|
|
58
|
-
chartId: string;
|
|
59
|
-
}>;
|
|
60
|
-
export type SvgContextState = React.RefObject<SVGSVGElement>;
|
|
61
|
-
export declare const SvgContext: React.Context<Initializable<SvgContextState>>;
|
|
62
|
-
export declare function DrawingProvider(props: DrawingProviderProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DrawingAreaState } from './DrawingArea.types';
|
|
3
|
+
export declare const DrawingAreaContext: React.Context<DrawingAreaState & {
|
|
4
|
+
/**
|
|
5
|
+
* A random id used to distinguish each chart on the same page.
|
|
6
|
+
*/
|
|
7
|
+
chartId: string;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export const DrawingAreaContext = /*#__PURE__*/React.createContext({
|
|
5
|
+
top: 0,
|
|
6
|
+
left: 0,
|
|
7
|
+
bottom: 0,
|
|
8
|
+
right: 0,
|
|
9
|
+
height: 300,
|
|
10
|
+
width: 400,
|
|
11
|
+
chartId: '',
|
|
12
|
+
isPointInside: () => false
|
|
13
|
+
});
|
|
14
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
15
|
+
DrawingAreaContext.displayName = 'DrawingContext';
|
|
16
|
+
}
|
package/{modern/context/DrawingProvider.js → context/DrawingAreaProvider/DrawingAreaProvider.js}
RENAMED
|
@@ -3,42 +3,19 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import useId from '@mui/utils/useId';
|
|
6
|
-
import useChartDimensions from "
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* Defines the area in which it is possible to draw the charts.
|
|
10
|
-
*/
|
|
6
|
+
import useChartDimensions from "../../hooks/useChartDimensions.js";
|
|
7
|
+
import { DrawingAreaContext } from "./DrawingAreaContext.js";
|
|
8
|
+
import { useSize } from "../SizeProvider/index.js";
|
|
11
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
export
|
|
13
|
-
top: 0,
|
|
14
|
-
left: 0,
|
|
15
|
-
bottom: 0,
|
|
16
|
-
right: 0,
|
|
17
|
-
height: 300,
|
|
18
|
-
width: 400,
|
|
19
|
-
chartId: '',
|
|
20
|
-
isPointInside: () => false
|
|
21
|
-
});
|
|
22
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
23
|
-
DrawingContext.displayName = 'DrawingContext';
|
|
24
|
-
}
|
|
25
|
-
export const SvgContext = /*#__PURE__*/React.createContext({
|
|
26
|
-
isInitialized: false,
|
|
27
|
-
data: {
|
|
28
|
-
current: null
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
32
|
-
SvgContext.displayName = 'SvgContext';
|
|
33
|
-
}
|
|
34
|
-
export function DrawingProvider(props) {
|
|
10
|
+
export function DrawingAreaProvider(props) {
|
|
35
11
|
const {
|
|
36
|
-
width,
|
|
37
|
-
height,
|
|
38
12
|
margin,
|
|
39
|
-
svgRef,
|
|
40
13
|
children
|
|
41
14
|
} = props;
|
|
15
|
+
const {
|
|
16
|
+
width,
|
|
17
|
+
height
|
|
18
|
+
} = useSize();
|
|
42
19
|
const drawingArea = useChartDimensions(width, height, margin);
|
|
43
20
|
const chartId = useId();
|
|
44
21
|
const isPointInside = React.useCallback(({
|
|
@@ -64,15 +41,8 @@ export function DrawingProvider(props) {
|
|
|
64
41
|
}, drawingArea, {
|
|
65
42
|
isPointInside
|
|
66
43
|
}), [chartId, drawingArea, isPointInside]);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}), [svgRef]);
|
|
71
|
-
return /*#__PURE__*/_jsx(SvgContext.Provider, {
|
|
72
|
-
value: refValue,
|
|
73
|
-
children: /*#__PURE__*/_jsx(DrawingContext.Provider, {
|
|
74
|
-
value: value,
|
|
75
|
-
children: children
|
|
76
|
-
})
|
|
44
|
+
return /*#__PURE__*/_jsx(DrawingAreaContext.Provider, {
|
|
45
|
+
value: value,
|
|
46
|
+
children: children
|
|
77
47
|
});
|
|
78
48
|
}
|
|
@@ -30,10 +30,6 @@ export type HighlightItemData = {
|
|
|
30
30
|
export type HighlightOptions = 'none' | 'item' | 'series';
|
|
31
31
|
export type FadeOptions = 'none' | 'series' | 'global';
|
|
32
32
|
export type HighlightScope = {
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated Use `highlight` instead.
|
|
35
|
-
*/
|
|
36
|
-
highlighted?: HighlightOptions;
|
|
37
33
|
/**
|
|
38
34
|
* The scope of highlighted elements.
|
|
39
35
|
* - 'none': no highlight.
|
|
@@ -42,10 +38,6 @@ export type HighlightScope = {
|
|
|
42
38
|
* @default 'none'
|
|
43
39
|
*/
|
|
44
40
|
highlight?: HighlightOptions;
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated Use `fade` instead.
|
|
47
|
-
*/
|
|
48
|
-
faded?: FadeOptions;
|
|
49
41
|
/**
|
|
50
42
|
* The scope of faded elements.
|
|
51
43
|
* - 'none': no fading.
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["highlighted", "faded"];
|
|
6
3
|
import * as React from 'react';
|
|
7
4
|
import PropTypes from 'prop-types';
|
|
8
5
|
import useControlled from '@mui/utils/useControlled';
|
|
@@ -11,18 +8,6 @@ import { createIsFaded } from "./createIsFaded.js";
|
|
|
11
8
|
import { createIsHighlighted } from "./createIsHighlighted.js";
|
|
12
9
|
import { useSeries } from "../../hooks/useSeries.js";
|
|
13
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
const mergeDeprecatedOptions = options => {
|
|
15
|
-
const _ref = options ?? {},
|
|
16
|
-
{
|
|
17
|
-
highlighted,
|
|
18
|
-
faded
|
|
19
|
-
} = _ref,
|
|
20
|
-
other = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
21
|
-
return _extends({
|
|
22
|
-
highlight: highlighted,
|
|
23
|
-
fade: faded
|
|
24
|
-
}, other);
|
|
25
|
-
};
|
|
26
11
|
function HighlightedProvider({
|
|
27
12
|
children,
|
|
28
13
|
highlightedItem: highlightedItemProps,
|
|
@@ -41,7 +26,7 @@ function HighlightedProvider({
|
|
|
41
26
|
const seriesData = series[seriesType];
|
|
42
27
|
Object.keys(seriesData?.series ?? {}).forEach(seriesId => {
|
|
43
28
|
const seriesItem = seriesData?.series[seriesId];
|
|
44
|
-
map.set(seriesId,
|
|
29
|
+
map.set(seriesId, seriesItem?.highlightScope);
|
|
45
30
|
});
|
|
46
31
|
});
|
|
47
32
|
return map;
|
|
@@ -1,50 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type AxisInteractionData = {
|
|
8
|
-
x: null | {
|
|
9
|
-
value: number | Date | string;
|
|
10
|
-
index: number;
|
|
11
|
-
};
|
|
12
|
-
y: null | {
|
|
13
|
-
value: number | Date | string;
|
|
14
|
-
index: number;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
type InteractionActions<T extends ChartSeriesType = ChartSeriesType> = {
|
|
18
|
-
type: 'enterItem';
|
|
19
|
-
data: ItemInteractionData<T>;
|
|
20
|
-
} | {
|
|
21
|
-
type: 'leaveItem';
|
|
22
|
-
data: Partial<ItemInteractionData<T>>;
|
|
23
|
-
} | {
|
|
24
|
-
type: 'exitChart';
|
|
25
|
-
} | {
|
|
26
|
-
type: 'updateVoronoiUsage';
|
|
27
|
-
useVoronoiInteraction: boolean;
|
|
28
|
-
} | {
|
|
29
|
-
type: 'updateAxis';
|
|
30
|
-
data: AxisInteractionData;
|
|
31
|
-
};
|
|
32
|
-
type InteractionState = {
|
|
33
|
-
/**
|
|
34
|
-
* The item currently interacting.
|
|
35
|
-
*/
|
|
36
|
-
item: null | ItemInteractionData<ChartSeriesType>;
|
|
37
|
-
/**
|
|
38
|
-
* The x- and y-axes currently interacting.
|
|
39
|
-
*/
|
|
40
|
-
axis: AxisInteractionData;
|
|
41
|
-
/**
|
|
42
|
-
* Set to `true` when `VoronoiHandler` is active.
|
|
43
|
-
* Used to prevent collision with mouseEnter events.
|
|
44
|
-
*/
|
|
45
|
-
useVoronoiInteraction: boolean;
|
|
46
|
-
dispatch: React.Dispatch<InteractionActions>;
|
|
47
|
-
};
|
|
48
|
-
export declare const InteractionContext: React.Context<InteractionState>;
|
|
49
|
-
declare function InteractionProvider(props: InteractionProviderProps): React.JSX.Element;
|
|
2
|
+
import { ChartStore } from '../internals/plugins/utils/ChartStore';
|
|
3
|
+
export declare const ChartsContext: React.Context<{
|
|
4
|
+
store: ChartStore;
|
|
5
|
+
} | null>;
|
|
6
|
+
declare function InteractionProvider(props: React.PropsWithChildren): React.JSX.Element;
|
|
50
7
|
export { InteractionProvider };
|
|
@@ -1,77 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
3
|
import * as React from 'react';
|
|
4
|
+
import { useCharts } from "../internals/useCharts.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export const
|
|
7
|
-
item: null,
|
|
8
|
-
axis: {
|
|
9
|
-
x: null,
|
|
10
|
-
y: null
|
|
11
|
-
},
|
|
12
|
-
useVoronoiInteraction: false,
|
|
13
|
-
dispatch: () => null
|
|
14
|
-
});
|
|
6
|
+
export const ChartsContext = /*#__PURE__*/React.createContext(null);
|
|
15
7
|
if (process.env.NODE_ENV !== 'production') {
|
|
16
|
-
|
|
8
|
+
ChartsContext.displayName = 'ChartsContext';
|
|
17
9
|
}
|
|
18
|
-
const dataReducer = (prevState, action) => {
|
|
19
|
-
switch (action.type) {
|
|
20
|
-
case 'enterItem':
|
|
21
|
-
return _extends({}, prevState, {
|
|
22
|
-
item: action.data
|
|
23
|
-
});
|
|
24
|
-
case 'exitChart':
|
|
25
|
-
if (prevState.item === null && prevState.axis.x === null && prevState.axis.y === null) {
|
|
26
|
-
return prevState;
|
|
27
|
-
}
|
|
28
|
-
return _extends({}, prevState, {
|
|
29
|
-
axis: {
|
|
30
|
-
x: null,
|
|
31
|
-
y: null
|
|
32
|
-
},
|
|
33
|
-
item: null
|
|
34
|
-
});
|
|
35
|
-
case 'updateVoronoiUsage':
|
|
36
|
-
return _extends({}, prevState, {
|
|
37
|
-
useVoronoiInteraction: action.useVoronoiInteraction
|
|
38
|
-
});
|
|
39
|
-
case 'leaveItem':
|
|
40
|
-
if (prevState.item === null || Object.keys(action.data).some(key => action.data[key] !== prevState.item[key])) {
|
|
41
|
-
// The item is already something else
|
|
42
|
-
return prevState;
|
|
43
|
-
}
|
|
44
|
-
return _extends({}, prevState, {
|
|
45
|
-
item: null
|
|
46
|
-
});
|
|
47
|
-
case 'updateAxis':
|
|
48
|
-
if (action.data.x === prevState.axis.x && action.data.y === prevState.axis.y) {
|
|
49
|
-
return prevState;
|
|
50
|
-
}
|
|
51
|
-
return _extends({}, prevState, {
|
|
52
|
-
axis: action.data
|
|
53
|
-
});
|
|
54
|
-
default:
|
|
55
|
-
return prevState;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
10
|
function InteractionProvider(props) {
|
|
59
11
|
const {
|
|
60
12
|
children
|
|
61
13
|
} = props;
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
useVoronoiInteraction: false
|
|
69
|
-
});
|
|
70
|
-
const value = React.useMemo(() => _extends({}, data, {
|
|
71
|
-
dispatch
|
|
72
|
-
}), [data]);
|
|
73
|
-
return /*#__PURE__*/_jsx(InteractionContext.Provider, {
|
|
74
|
-
value: value,
|
|
14
|
+
const {
|
|
15
|
+
contextValue
|
|
16
|
+
} = useCharts();
|
|
17
|
+
return /*#__PURE__*/_jsx(ChartsContext.Provider, {
|
|
18
|
+
value: contextValue,
|
|
75
19
|
children: children
|
|
76
20
|
});
|
|
77
21
|
}
|