@mui/x-charts 7.15.0 → 7.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.js +26 -12
- package/BarChart/BarClipPath.js +1 -1
- package/BarChart/BarElement.js +4 -2
- package/BarChart/BarLabel/BarLabel.js +3 -1
- package/BarChart/BarLabel/BarLabelItem.js +4 -4
- package/BarChart/BarLabel/BarLabelPlot.js +1 -1
- package/BarChart/BarLabel/index.js +2 -2
- package/BarChart/BarPlot.js +10 -8
- package/BarChart/checkScaleErrors.js +2 -2
- package/BarChart/formatter.js +2 -2
- package/BarChart/index.js +4 -4
- package/BarChart/legend.js +4 -3
- package/BarChart/plugin.js +3 -3
- package/BarChart/useBarChartProps.js +3 -1
- package/CHANGELOG.md +185 -1
- package/ChartContainer/ChartContainer.js +11 -9
- package/ChartContainer/index.js +1 -1
- package/ChartContainer/useChartContainerProps.js +4 -2
- package/ChartContainer/useDefaultizeAxis.js +3 -1
- package/ChartsAxis/ChartsAxis.js +5 -3
- package/ChartsAxis/index.js +2 -2
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +6 -4
- package/ChartsAxisHighlight/index.js +1 -1
- package/ChartsClipPath/ChartsClipPath.js +3 -1
- package/ChartsClipPath/index.js +1 -1
- package/ChartsGrid/ChartsGrid.js +20 -66
- package/ChartsGrid/ChartsHorizontalGrid.d.ts +14 -0
- package/ChartsGrid/ChartsHorizontalGrid.js +36 -0
- package/ChartsGrid/ChartsVerticalGrid.d.ts +14 -0
- package/ChartsGrid/ChartsVerticalGrid.js +36 -0
- package/ChartsGrid/index.js +2 -2
- package/ChartsGrid/styledCommonents.d.ts +2 -0
- package/ChartsGrid/styledCommonents.js +22 -0
- package/ChartsLegend/ChartsLegend.d.ts +4 -13
- package/ChartsLegend/ChartsLegend.js +70 -26
- package/ChartsLegend/ChartsLegendItem.d.ts +26 -0
- package/ChartsLegend/ChartsLegendItem.js +65 -0
- package/ChartsLegend/ContinuousColorLegend.js +9 -7
- package/ChartsLegend/DefaultChartsLegend.d.ts +15 -2
- package/ChartsLegend/DefaultChartsLegend.js +31 -5
- package/ChartsLegend/LegendPerItem.d.ts +10 -6
- package/ChartsLegend/LegendPerItem.js +22 -35
- package/ChartsLegend/PiecewiseColorLegend.d.ts +9 -1
- package/ChartsLegend/PiecewiseColorLegend.js +31 -15
- package/ChartsLegend/chartsLegend.types.d.ts +39 -1
- package/ChartsLegend/chartsLegendClasses.d.ts +2 -0
- package/ChartsLegend/chartsLegendClasses.js +1 -1
- package/ChartsLegend/index.js +6 -6
- package/ChartsLegend/useAxis.js +4 -2
- package/ChartsLegend/utils.js +4 -4
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +7 -5
- package/ChartsOnAxisClickHandler/index.js +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +3 -1
- package/ChartsOverlay/ChartsNoDataOverlay.js +3 -1
- package/ChartsOverlay/ChartsOverlay.js +5 -3
- package/ChartsOverlay/index.js +3 -3
- package/ChartsReferenceLine/ChartsReferenceLine.js +4 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.js +7 -5
- package/ChartsReferenceLine/ChartsYReferenceLine.js +7 -5
- package/ChartsReferenceLine/common.js +1 -1
- package/ChartsReferenceLine/index.js +2 -2
- package/ChartsSurface/ChartsSurface.js +3 -1
- package/ChartsSurface/index.js +1 -1
- package/ChartsText/ChartsText.js +3 -1
- package/ChartsText/index.js +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +6 -6
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
- package/ChartsTooltip/ChartsTooltip.d.ts +2 -2
- package/ChartsTooltip/ChartsTooltip.js +15 -11
- package/ChartsTooltip/ChartsTooltipTable.js +10 -5
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +7 -5
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +5 -3
- package/ChartsTooltip/chartsTooltipClasses.d.ts +2 -0
- package/ChartsTooltip/chartsTooltipClasses.js +1 -1
- package/ChartsTooltip/index.js +7 -7
- package/ChartsTooltip/utils.js +1 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +9 -7
- package/ChartsVoronoiHandler/index.js +1 -1
- package/ChartsXAxis/ChartsXAxis.js +20 -13
- package/ChartsXAxis/index.js +1 -1
- package/ChartsYAxis/ChartsYAxis.js +17 -10
- package/ChartsYAxis/index.js +1 -1
- package/Gauge/Gauge.js +7 -5
- package/Gauge/GaugeContainer.js +6 -4
- package/Gauge/GaugeProvider.js +3 -3
- package/Gauge/GaugeReferenceArc.js +3 -1
- package/Gauge/GaugeValueArc.js +3 -1
- package/Gauge/GaugeValueText.js +4 -2
- package/Gauge/index.js +7 -7
- package/LineChart/AnimatedArea.js +33 -14
- package/LineChart/AnimatedLine.js +34 -15
- package/LineChart/AreaElement.js +5 -3
- package/LineChart/AreaPlot.js +85 -78
- package/LineChart/CircleMarkElement.d.ts +34 -0
- package/LineChart/CircleMarkElement.js +107 -0
- package/LineChart/LineChart.d.ts +4 -0
- package/LineChart/LineChart.js +33 -15
- package/LineChart/LineElement.js +5 -3
- package/LineChart/LineHighlightElement.js +2 -0
- package/LineChart/LineHighlightPlot.js +10 -8
- package/LineChart/LinePlot.js +67 -60
- package/LineChart/MarkElement.d.ts +1 -19
- package/LineChart/MarkElement.js +7 -23
- package/LineChart/MarkPlot.d.ts +6 -0
- package/LineChart/MarkPlot.js +22 -12
- package/LineChart/formatter.js +2 -2
- package/LineChart/index.d.ts +2 -0
- package/LineChart/index.js +12 -11
- package/LineChart/legend.js +4 -3
- package/LineChart/markElementClasses.d.ts +20 -0
- package/LineChart/markElementClasses.js +19 -0
- package/LineChart/plugin.js +3 -3
- package/LineChart/useLineChartProps.js +8 -4
- package/PieChart/PieArc.js +3 -1
- package/PieChart/PieArcLabel.js +2 -0
- package/PieChart/PieArcLabelPlot.js +6 -4
- package/PieChart/PieArcPlot.js +6 -4
- package/PieChart/PieChart.js +22 -8
- package/PieChart/PiePlot.js +8 -6
- package/PieChart/dataTransform/useTransformData.js +3 -1
- package/PieChart/formatter.js +1 -1
- package/PieChart/getPieCoordinates.js +1 -1
- package/PieChart/index.js +7 -7
- package/PieChart/legend.js +4 -2
- package/PieChart/plugin.js +2 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +5 -3
- package/ResponsiveChartContainer/index.js +1 -1
- package/ResponsiveChartContainer/useChartContainerDimensions.js +3 -1
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -1
- package/ScatterChart/Scatter.js +7 -5
- package/ScatterChart/ScatterChart.js +26 -12
- package/ScatterChart/ScatterPlot.js +7 -5
- package/ScatterChart/formatter.js +1 -1
- package/ScatterChart/index.js +3 -3
- package/ScatterChart/legend.js +4 -3
- package/ScatterChart/plugin.js +3 -3
- package/ScatterChart/useScatterChartProps.js +2 -0
- package/SparkLineChart/SparkLineChart.js +8 -6
- package/SparkLineChart/index.js +1 -1
- package/colorPalettes/index.js +1 -1
- package/context/CartesianProvider/CartesianProvider.js +8 -6
- package/context/CartesianProvider/computeValue.js +6 -6
- package/context/CartesianProvider/defaultizeAxis.js +1 -1
- package/context/CartesianProvider/index.js +5 -5
- package/context/CartesianProvider/useCartesianContext.js +3 -1
- package/context/DrawingProvider.js +3 -1
- package/context/HighlightedProvider/HighlightedProvider.js +6 -4
- package/context/HighlightedProvider/index.js +4 -4
- package/context/HighlightedProvider/useHighlighted.js +3 -1
- package/context/HighlightedProvider/useItemHighlighted.js +3 -1
- package/context/InteractionProvider.js +2 -0
- package/context/PluginProvider/PluginProvider.js +4 -2
- package/context/PluginProvider/index.js +10 -10
- package/context/PluginProvider/mergePlugins.js +4 -4
- package/context/PluginProvider/useColorProcessor.js +3 -1
- package/context/PluginProvider/useSeriesFormatter.js +3 -1
- package/context/PluginProvider/useXExtremumGetter.js +1 -1
- package/context/PluginProvider/useYExtremumGetter.js +1 -1
- package/context/SeriesProvider/SeriesProvider.js +6 -4
- package/context/SeriesProvider/index.js +4 -4
- package/context/SeriesProvider/processSeries.js +1 -1
- package/context/ZAxisContextProvider.js +3 -1
- package/context/index.js +2 -2
- package/hooks/index.js +7 -7
- package/hooks/useAxis.js +3 -1
- package/hooks/useAxisEvents.js +8 -6
- package/hooks/useChartDimensions.js +3 -1
- package/hooks/useChartId.js +3 -1
- package/hooks/useColorScale.js +4 -2
- package/hooks/useDrawingArea.js +3 -1
- package/hooks/useInteractionItemProps.js +4 -2
- package/hooks/useMounted.js +2 -0
- package/hooks/useReducedMotion.js +15 -12
- package/hooks/useScale.js +4 -2
- package/hooks/useSeries.js +3 -1
- package/hooks/useSvgRef.js +3 -1
- package/hooks/useTicks.js +4 -2
- package/index.js +27 -27
- package/internals/components/AxisSharedComponents.js +1 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +5 -5
- package/internals/components/ChartsAxesGradients/index.js +1 -1
- package/internals/getWordsByLines.js +1 -1
- package/internals/index.js +31 -31
- package/internals/isCartesian.js +1 -1
- package/internals/useStringInterpolator.d.ts +1 -0
- package/{modern/internals/useAnimatedPath.js → internals/useStringInterpolator.js} +2 -15
- package/models/index.d.ts +1 -0
- package/models/index.js +5 -3
- package/models/seriesType/index.js +4 -4
- package/modern/BarChart/BarChart.js +26 -12
- package/modern/BarChart/BarClipPath.js +1 -1
- package/modern/BarChart/BarElement.js +4 -2
- package/modern/BarChart/BarLabel/BarLabel.js +3 -1
- package/modern/BarChart/BarLabel/BarLabelItem.js +4 -4
- package/modern/BarChart/BarLabel/BarLabelPlot.js +1 -1
- package/modern/BarChart/BarLabel/index.js +2 -2
- package/modern/BarChart/BarPlot.js +10 -8
- package/modern/BarChart/checkScaleErrors.js +2 -2
- package/modern/BarChart/formatter.js +2 -2
- package/modern/BarChart/index.js +4 -4
- package/modern/BarChart/legend.js +4 -3
- package/modern/BarChart/plugin.js +3 -3
- package/modern/BarChart/useBarChartProps.js +3 -1
- package/modern/ChartContainer/ChartContainer.js +11 -9
- package/modern/ChartContainer/index.js +1 -1
- package/modern/ChartContainer/useChartContainerProps.js +4 -2
- package/modern/ChartContainer/useDefaultizeAxis.js +3 -1
- package/modern/ChartsAxis/ChartsAxis.js +5 -3
- package/modern/ChartsAxis/index.js +2 -2
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +6 -4
- package/modern/ChartsAxisHighlight/index.js +1 -1
- package/modern/ChartsClipPath/ChartsClipPath.js +3 -1
- package/modern/ChartsClipPath/index.js +1 -1
- package/modern/ChartsGrid/ChartsGrid.js +20 -66
- package/modern/ChartsGrid/ChartsHorizontalGrid.js +36 -0
- package/modern/ChartsGrid/ChartsVerticalGrid.js +36 -0
- package/modern/ChartsGrid/index.js +2 -2
- package/modern/ChartsGrid/styledCommonents.js +22 -0
- package/modern/ChartsLegend/ChartsLegend.js +70 -26
- package/modern/ChartsLegend/ChartsLegendItem.js +65 -0
- package/modern/ChartsLegend/ContinuousColorLegend.js +9 -7
- package/modern/ChartsLegend/DefaultChartsLegend.js +31 -5
- package/modern/ChartsLegend/LegendPerItem.js +22 -35
- package/modern/ChartsLegend/PiecewiseColorLegend.js +31 -15
- package/modern/ChartsLegend/chartsLegendClasses.js +1 -1
- package/modern/ChartsLegend/index.js +6 -6
- package/modern/ChartsLegend/useAxis.js +4 -2
- package/modern/ChartsLegend/utils.js +4 -4
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +7 -5
- package/modern/ChartsOnAxisClickHandler/index.js +1 -1
- package/modern/ChartsOverlay/ChartsLoadingOverlay.js +3 -1
- package/modern/ChartsOverlay/ChartsNoDataOverlay.js +3 -1
- package/modern/ChartsOverlay/ChartsOverlay.js +5 -3
- package/modern/ChartsOverlay/index.js +3 -3
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +4 -2
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +7 -5
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +7 -5
- package/modern/ChartsReferenceLine/common.js +1 -1
- package/modern/ChartsReferenceLine/index.js +2 -2
- package/modern/ChartsSurface/ChartsSurface.js +3 -1
- package/modern/ChartsSurface/index.js +1 -1
- package/modern/ChartsText/ChartsText.js +3 -1
- package/modern/ChartsText/index.js +1 -1
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +6 -6
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
- package/modern/ChartsTooltip/ChartsTooltip.js +15 -11
- package/modern/ChartsTooltip/ChartsTooltipTable.js +10 -5
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +7 -5
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +5 -3
- package/modern/ChartsTooltip/chartsTooltipClasses.js +1 -1
- package/modern/ChartsTooltip/index.js +7 -7
- package/modern/ChartsTooltip/utils.js +1 -1
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +9 -7
- package/modern/ChartsVoronoiHandler/index.js +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +20 -13
- package/modern/ChartsXAxis/index.js +1 -1
- package/modern/ChartsYAxis/ChartsYAxis.js +17 -10
- package/modern/ChartsYAxis/index.js +1 -1
- package/modern/Gauge/Gauge.js +7 -5
- package/modern/Gauge/GaugeContainer.js +6 -4
- package/modern/Gauge/GaugeProvider.js +3 -3
- package/modern/Gauge/GaugeReferenceArc.js +3 -1
- package/modern/Gauge/GaugeValueArc.js +3 -1
- package/modern/Gauge/GaugeValueText.js +4 -2
- package/modern/Gauge/index.js +7 -7
- package/modern/LineChart/AnimatedArea.js +33 -14
- package/modern/LineChart/AnimatedLine.js +34 -15
- package/modern/LineChart/AreaElement.js +5 -3
- package/modern/LineChart/AreaPlot.js +85 -78
- package/modern/LineChart/CircleMarkElement.js +107 -0
- package/modern/LineChart/LineChart.js +33 -15
- package/modern/LineChart/LineElement.js +5 -3
- package/modern/LineChart/LineHighlightElement.js +2 -0
- package/modern/LineChart/LineHighlightPlot.js +10 -8
- package/modern/LineChart/LinePlot.js +67 -60
- package/modern/LineChart/MarkElement.js +7 -23
- package/modern/LineChart/MarkPlot.js +22 -12
- package/modern/LineChart/formatter.js +2 -2
- package/modern/LineChart/index.js +12 -11
- package/modern/LineChart/legend.js +4 -3
- package/modern/LineChart/markElementClasses.js +19 -0
- package/modern/LineChart/plugin.js +3 -3
- package/modern/LineChart/useLineChartProps.js +8 -4
- package/modern/PieChart/PieArc.js +3 -1
- package/modern/PieChart/PieArcLabel.js +2 -0
- package/modern/PieChart/PieArcLabelPlot.js +6 -4
- package/modern/PieChart/PieArcPlot.js +6 -4
- package/modern/PieChart/PieChart.js +22 -8
- package/modern/PieChart/PiePlot.js +8 -6
- package/modern/PieChart/dataTransform/useTransformData.js +3 -1
- package/modern/PieChart/formatter.js +1 -1
- package/modern/PieChart/getPieCoordinates.js +1 -1
- package/modern/PieChart/index.js +7 -7
- package/modern/PieChart/legend.js +4 -2
- package/modern/PieChart/plugin.js +2 -2
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +5 -3
- package/modern/ResponsiveChartContainer/index.js +1 -1
- package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +3 -1
- package/modern/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -1
- package/modern/ScatterChart/Scatter.js +7 -5
- package/modern/ScatterChart/ScatterChart.js +26 -12
- package/modern/ScatterChart/ScatterPlot.js +7 -5
- package/modern/ScatterChart/formatter.js +1 -1
- package/modern/ScatterChart/index.js +3 -3
- package/modern/ScatterChart/legend.js +4 -3
- package/modern/ScatterChart/plugin.js +3 -3
- package/modern/ScatterChart/useScatterChartProps.js +2 -0
- package/modern/SparkLineChart/SparkLineChart.js +8 -6
- package/modern/SparkLineChart/index.js +1 -1
- package/modern/colorPalettes/index.js +1 -1
- package/modern/context/CartesianProvider/CartesianProvider.js +8 -6
- package/modern/context/CartesianProvider/computeValue.js +6 -6
- package/modern/context/CartesianProvider/defaultizeAxis.js +1 -1
- package/modern/context/CartesianProvider/index.js +5 -5
- package/modern/context/CartesianProvider/useCartesianContext.js +3 -1
- package/modern/context/DrawingProvider.js +3 -1
- package/modern/context/HighlightedProvider/HighlightedProvider.js +6 -4
- package/modern/context/HighlightedProvider/index.js +4 -4
- package/modern/context/HighlightedProvider/useHighlighted.js +3 -1
- package/modern/context/HighlightedProvider/useItemHighlighted.js +3 -1
- package/modern/context/InteractionProvider.js +2 -0
- package/modern/context/PluginProvider/PluginProvider.js +4 -2
- package/modern/context/PluginProvider/index.js +10 -10
- package/modern/context/PluginProvider/mergePlugins.js +4 -4
- package/modern/context/PluginProvider/useColorProcessor.js +3 -1
- package/modern/context/PluginProvider/useSeriesFormatter.js +3 -1
- package/modern/context/PluginProvider/useXExtremumGetter.js +1 -1
- package/modern/context/PluginProvider/useYExtremumGetter.js +1 -1
- package/modern/context/SeriesProvider/SeriesProvider.js +6 -4
- package/modern/context/SeriesProvider/index.js +4 -4
- package/modern/context/SeriesProvider/processSeries.js +1 -1
- package/modern/context/ZAxisContextProvider.js +3 -1
- package/modern/context/index.js +2 -2
- package/modern/hooks/index.js +7 -7
- package/modern/hooks/useAxis.js +3 -1
- package/modern/hooks/useAxisEvents.js +8 -6
- package/modern/hooks/useChartDimensions.js +3 -1
- package/modern/hooks/useChartId.js +3 -1
- package/modern/hooks/useColorScale.js +4 -2
- package/modern/hooks/useDrawingArea.js +3 -1
- package/modern/hooks/useInteractionItemProps.js +4 -2
- package/modern/hooks/useMounted.js +2 -0
- package/modern/hooks/useReducedMotion.js +15 -12
- package/modern/hooks/useScale.js +4 -2
- package/modern/hooks/useSeries.js +3 -1
- package/modern/hooks/useSvgRef.js +3 -1
- package/modern/hooks/useTicks.js +4 -2
- package/modern/index.js +27 -27
- package/modern/internals/components/AxisSharedComponents.js +1 -1
- package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +5 -5
- package/modern/internals/components/ChartsAxesGradients/index.js +1 -1
- package/modern/internals/getWordsByLines.js +1 -1
- package/modern/internals/index.js +31 -31
- package/modern/internals/isCartesian.js +1 -1
- package/{internals/useAnimatedPath.js → modern/internals/useStringInterpolator.js} +2 -15
- package/modern/models/index.js +5 -3
- package/modern/models/seriesType/index.js +4 -4
- package/modern/themeAugmentation/index.js +0 -3
- package/node/BarChart/BarChart.js +16 -4
- package/node/BarChart/BarClipPath.js +2 -3
- package/node/BarChart/BarElement.js +3 -3
- package/node/BarChart/BarLabel/BarLabel.js +3 -3
- package/node/BarChart/BarLabel/BarLabelItem.js +2 -3
- package/node/BarChart/BarLabel/BarLabelPlot.js +2 -3
- package/node/BarChart/BarLabel/barLabelClasses.js +1 -1
- package/node/BarChart/BarPlot.js +3 -3
- package/node/BarChart/formatter.js +1 -1
- package/node/BarChart/legend.js +3 -2
- package/node/BarChart/plugin.js +1 -1
- package/node/BarChart/useBarChartProps.js +2 -1
- package/node/ChartContainer/ChartContainer.js +3 -3
- package/node/ChartContainer/useChartContainerProps.js +3 -3
- package/node/ChartContainer/useDefaultizeAxis.js +3 -3
- package/node/ChartsAxis/ChartsAxis.js +3 -3
- package/node/ChartsAxisHighlight/ChartsAxisHighlight.js +3 -3
- package/node/ChartsClipPath/ChartsClipPath.js +3 -3
- package/node/ChartsGrid/ChartsGrid.js +18 -66
- package/node/ChartsGrid/ChartsHorizontalGrid.js +43 -0
- package/node/ChartsGrid/ChartsVerticalGrid.js +43 -0
- package/node/ChartsGrid/chartsGridClasses.js +1 -1
- package/node/ChartsGrid/styledCommonents.js +28 -0
- package/node/ChartsLegend/ChartsLegend.js +66 -24
- package/node/ChartsLegend/ChartsLegendItem.js +72 -0
- package/node/ChartsLegend/ContinuousColorLegend.js +3 -3
- package/node/ChartsLegend/DefaultChartsLegend.js +31 -7
- package/node/ChartsLegend/LegendPerItem.js +20 -35
- package/node/ChartsLegend/PiecewiseColorLegend.js +29 -15
- package/node/ChartsLegend/chartsLegendClasses.js +1 -1
- package/node/ChartsLegend/legendItemsPlacement.js +1 -1
- package/node/ChartsLegend/useAxis.js +2 -2
- package/node/ChartsLegend/utils.js +1 -1
- package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +4 -4
- package/node/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
- package/node/ChartsOverlay/ChartsNoDataOverlay.js +3 -3
- package/node/ChartsOverlay/ChartsOverlay.js +3 -3
- package/node/ChartsReferenceLine/ChartsReferenceLine.js +3 -3
- package/node/ChartsReferenceLine/ChartsXReferenceLine.js +4 -4
- package/node/ChartsReferenceLine/ChartsYReferenceLine.js +4 -4
- package/node/ChartsReferenceLine/chartsReferenceLineClasses.js +1 -1
- package/node/ChartsReferenceLine/common.js +1 -1
- package/node/ChartsSurface/ChartsSurface.js +3 -3
- package/node/ChartsText/ChartsText.js +3 -3
- package/node/ChartsTooltip/ChartsAxisTooltipContent.js +2 -3
- package/node/ChartsTooltip/ChartsItemTooltipContent.js +2 -3
- package/node/ChartsTooltip/ChartsTooltip.js +11 -9
- package/node/ChartsTooltip/ChartsTooltipTable.js +9 -4
- package/node/ChartsTooltip/DefaultChartsAxisTooltipContent.js +4 -4
- package/node/ChartsTooltip/DefaultChartsItemTooltipContent.js +4 -4
- package/node/ChartsTooltip/chartsTooltipClasses.js +1 -1
- package/node/ChartsTooltip/utils.js +2 -3
- package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
- package/node/ChartsXAxis/ChartsXAxis.js +9 -4
- package/node/ChartsYAxis/ChartsYAxis.js +9 -4
- package/node/Gauge/Gauge.js +3 -3
- package/node/Gauge/GaugeContainer.js +3 -3
- package/node/Gauge/GaugeProvider.js +1 -2
- package/node/Gauge/GaugeReferenceArc.js +3 -3
- package/node/Gauge/GaugeValueArc.js +3 -3
- package/node/Gauge/GaugeValueText.js +3 -3
- package/node/Gauge/gaugeClasses.js +1 -1
- package/node/LineChart/AnimatedArea.js +31 -14
- package/node/LineChart/AnimatedLine.js +31 -14
- package/node/LineChart/AreaElement.js +3 -3
- package/node/LineChart/AreaPlot.js +79 -74
- package/node/LineChart/CircleMarkElement.js +113 -0
- package/node/LineChart/LineChart.js +20 -4
- package/node/LineChart/LineElement.js +3 -3
- package/node/LineChart/LineHighlightElement.js +3 -3
- package/node/LineChart/LineHighlightPlot.js +3 -3
- package/node/LineChart/LinePlot.js +61 -56
- package/node/LineChart/MarkElement.js +5 -25
- package/node/LineChart/MarkPlot.js +14 -6
- package/node/LineChart/formatter.js +1 -1
- package/node/LineChart/index.js +29 -1
- package/node/LineChart/legend.js +3 -2
- package/node/LineChart/markElementClasses.js +28 -0
- package/node/LineChart/plugin.js +1 -1
- package/node/LineChart/useLineChartProps.js +7 -4
- package/node/PieChart/PieArc.js +3 -3
- package/node/PieChart/PieArcLabel.js +3 -3
- package/node/PieChart/PieArcLabelPlot.js +3 -3
- package/node/PieChart/PieArcPlot.js +3 -3
- package/node/PieChart/PieChart.js +15 -3
- package/node/PieChart/PiePlot.js +3 -3
- package/node/PieChart/dataTransform/useTransformData.js +3 -3
- package/node/PieChart/formatter.js +1 -1
- package/node/PieChart/legend.js +3 -1
- package/node/PieChart/plugin.js +1 -1
- package/node/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -3
- package/node/ResponsiveChartContainer/useChartContainerDimensions.js +4 -4
- package/node/ResponsiveChartContainer/useResponsiveChartContainerProps.js +2 -1
- package/node/ScatterChart/Scatter.js +3 -3
- package/node/ScatterChart/ScatterChart.js +16 -4
- package/node/ScatterChart/ScatterPlot.js +3 -3
- package/node/ScatterChart/legend.js +3 -2
- package/node/ScatterChart/plugin.js +1 -1
- package/node/ScatterChart/useScatterChartProps.js +2 -1
- package/node/SparkLineChart/SparkLineChart.js +3 -3
- package/node/context/CartesianProvider/CartesianContext.js +1 -2
- package/node/context/CartesianProvider/CartesianProvider.js +2 -2
- package/node/context/CartesianProvider/computeValue.js +1 -1
- package/node/context/CartesianProvider/defaultizeAxis.js +1 -1
- package/node/context/CartesianProvider/useCartesianContext.js +2 -2
- package/node/context/DrawingProvider.js +3 -3
- package/node/context/HighlightedProvider/HighlightedContext.js +1 -2
- package/node/context/HighlightedProvider/HighlightedProvider.js +3 -3
- package/node/context/HighlightedProvider/useHighlighted.js +2 -2
- package/node/context/HighlightedProvider/useItemHighlighted.js +1 -0
- package/node/context/InteractionProvider.js +3 -3
- package/node/context/PluginProvider/PluginContext.js +1 -2
- package/node/context/PluginProvider/PluginProvider.js +2 -2
- package/node/context/PluginProvider/useColorProcessor.js +2 -2
- package/node/context/PluginProvider/useSeriesFormatter.js +2 -2
- package/node/context/PluginProvider/useXExtremumGetter.js +1 -2
- package/node/context/PluginProvider/useYExtremumGetter.js +1 -2
- package/node/context/SeriesProvider/SeriesContext.js +1 -2
- package/node/context/SeriesProvider/SeriesProvider.js +2 -2
- package/node/context/SeriesProvider/processSeries.js +1 -1
- package/node/context/ZAxisContextProvider.js +3 -3
- package/node/hooks/useAxis.js +1 -0
- package/node/hooks/useAxisEvents.js +2 -2
- package/node/hooks/useChartDimensions.js +3 -3
- package/node/hooks/useChartId.js +2 -2
- package/node/hooks/useColorScale.js +2 -2
- package/node/hooks/useDrawingArea.js +2 -2
- package/node/hooks/useInteractionItemProps.js +2 -2
- package/node/hooks/useMounted.js +3 -3
- package/node/hooks/useReducedMotion.js +15 -12
- package/node/hooks/useScale.js +1 -0
- package/node/hooks/useSeries.js +2 -2
- package/node/hooks/useSvgRef.js +2 -2
- package/node/hooks/useTicks.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/components/AxisSharedComponents.js +1 -1
- package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +2 -3
- package/node/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +1 -2
- package/node/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +1 -2
- package/node/internals/defaultizeColor.js +1 -1
- package/node/internals/defaultizeValueFormatter.js +1 -1
- package/node/internals/domUtils.js +1 -1
- package/node/internals/getWordsByLines.js +1 -1
- package/node/internals/useStringInterpolator.js +28 -0
- package/node/tests/firePointerEvent.js +1 -1
- package/node/themeAugmentation/index.js +1 -38
- package/package.json +4 -3
- package/themeAugmentation/components.d.ts +2 -0
- package/themeAugmentation/index.d.ts +3 -3
- package/themeAugmentation/index.js +0 -3
- package/themeAugmentation/overrides.d.ts +6 -4
- package/internals/useAnimatedPath.d.ts +0 -1
- package/internals/warning.d.ts +0 -2
- package/internals/warning.js +0 -21
- package/modern/internals/warning.js +0 -21
- package/node/internals/useAnimatedPath.js +0 -42
- package/node/internals/warning.js +0 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./SparkLineChart.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./colorPalettes.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
import { useDrawingArea } from
|
|
3
|
-
import { useSeries } from
|
|
4
|
-
import { CartesianContext } from
|
|
5
|
-
import { computeValue } from
|
|
6
|
-
import { useXExtremumGetter } from
|
|
7
|
-
import { useYExtremumGetter } from
|
|
4
|
+
import { useDrawingArea } from "../../hooks/useDrawingArea.js";
|
|
5
|
+
import { useSeries } from "../../hooks/useSeries.js";
|
|
6
|
+
import { CartesianContext } from "./CartesianContext.js";
|
|
7
|
+
import { computeValue } from "./computeValue.js";
|
|
8
|
+
import { useXExtremumGetter } from "../PluginProvider/useXExtremumGetter.js";
|
|
9
|
+
import { useYExtremumGetter } from "../PluginProvider/index.js";
|
|
8
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
11
|
function CartesianProvider(props) {
|
|
10
12
|
const {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { scaleBand, scalePoint, scaleTime } from '@mui/x-charts-vendor/d3-scale';
|
|
3
|
-
import { isBandScaleConfig, isPointScaleConfig } from
|
|
4
|
-
import { getColorScale, getOrdinalColorScale } from
|
|
5
|
-
import { getTickNumber } from
|
|
6
|
-
import { getScale } from
|
|
7
|
-
import { zoomScaleRange } from
|
|
8
|
-
import { getAxisExtremum } from
|
|
3
|
+
import { isBandScaleConfig, isPointScaleConfig } from "../../models/axis.js";
|
|
4
|
+
import { getColorScale, getOrdinalColorScale } from "../../internals/colorScale.js";
|
|
5
|
+
import { getTickNumber } from "../../hooks/useTicks.js";
|
|
6
|
+
import { getScale } from "../../internals/getScale.js";
|
|
7
|
+
import { zoomScaleRange } from "./zoom.js";
|
|
8
|
+
import { getAxisExtremum } from "./getAxisExtremum.js";
|
|
9
9
|
const getRange = (drawingArea, axisDirection, isReverse) => {
|
|
10
10
|
const range = axisDirection === 'x' ? [drawingArea.left, drawingArea.left + drawingArea.width] : [drawingArea.top + drawingArea.height, drawingArea.top];
|
|
11
11
|
return isReverse ? range.reverse() : range;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from
|
|
2
|
+
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../../constants/index.js";
|
|
3
3
|
export const defaultizeAxis = (inAxis, axisName) => {
|
|
4
4
|
const DEFAULT_AXIS_KEY = axisName === 'x' ? DEFAULT_X_AXIS_KEY : DEFAULT_Y_AXIS_KEY;
|
|
5
5
|
return [...(inAxis?.map((axis, index) => _extends({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computeValue } from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
import { computeValue } from "./computeValue.js";
|
|
2
|
+
export * from "./CartesianProvider.js";
|
|
3
|
+
export * from "./CartesianContext.js";
|
|
4
|
+
export * from "./useCartesianContext.js";
|
|
5
|
+
export * from "./Cartesian.types.js";
|
|
6
6
|
const cartesianProviderUtils = {
|
|
7
7
|
computeValue
|
|
8
8
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import useId from '@mui/utils/useId';
|
|
4
|
-
import useChartDimensions from
|
|
6
|
+
import useChartDimensions from "../hooks/useChartDimensions.js";
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Defines the area in which it is possible to draw the charts.
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["highlighted", "faded"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import useControlled from '@mui/utils/useControlled';
|
|
7
|
-
import { HighlightedContext } from
|
|
8
|
-
import { createIsFaded } from
|
|
9
|
-
import { createIsHighlighted } from
|
|
10
|
-
import { useSeries } from
|
|
9
|
+
import { HighlightedContext } from "./HighlightedContext.js";
|
|
10
|
+
import { createIsFaded } from "./createIsFaded.js";
|
|
11
|
+
import { createIsHighlighted } from "./createIsHighlighted.js";
|
|
12
|
+
import { useSeries } from "../../hooks/useSeries.js";
|
|
11
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
const mergeDeprecatedOptions = options => {
|
|
13
15
|
const _ref = options ?? {},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./HighlightedProvider.js";
|
|
2
|
+
export * from "./HighlightedContext.js";
|
|
3
|
+
export * from "./useHighlighted.js";
|
|
4
|
+
export * from "./useItemHighlighted.js";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useHighlighted } from "./useHighlighted.js";
|
|
2
4
|
/**
|
|
3
5
|
* A hook to check the highlighted state of the item.
|
|
4
6
|
* This function already calculates that an item is not faded if it is highlighted.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
import { PluginContext } from
|
|
3
|
-
import { mergePlugins } from
|
|
4
|
+
import { PluginContext } from "./PluginContext.js";
|
|
5
|
+
import { mergePlugins } from "./mergePlugins.js";
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
7
|
function PluginProvider(props) {
|
|
6
8
|
const {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
1
|
+
export * from "./PluginProvider.js";
|
|
2
|
+
export * from "./Plugin.types.js";
|
|
3
|
+
export * from "./PluginContext.js";
|
|
4
|
+
export * from "./ColorProcessor.types.js";
|
|
5
|
+
export * from "./SeriesFormatter.types.js";
|
|
6
|
+
export * from "./ExtremumGetter.types.js";
|
|
7
|
+
export * from "./useColorProcessor.js";
|
|
8
|
+
export * from "./useSeriesFormatter.js";
|
|
9
|
+
export * from "./useXExtremumGetter.js";
|
|
10
|
+
export * from "./useYExtremumGetter.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { plugin as barPlugin } from
|
|
2
|
-
import { plugin as scatterPlugin } from
|
|
3
|
-
import { plugin as linePlugin } from
|
|
4
|
-
import { plugin as piePlugin } from
|
|
1
|
+
import { plugin as barPlugin } from "../../BarChart/plugin.js";
|
|
2
|
+
import { plugin as scatterPlugin } from "../../ScatterChart/plugin.js";
|
|
3
|
+
import { plugin as linePlugin } from "../../LineChart/plugin.js";
|
|
4
|
+
import { plugin as piePlugin } from "../../PieChart/plugin.js";
|
|
5
5
|
export const defaultPlugins = [barPlugin, scatterPlugin, linePlugin, piePlugin];
|
|
6
6
|
export function mergePlugins(plugins) {
|
|
7
7
|
const defaultizedPlugins = plugins ?? defaultPlugins;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { useTheme } from '@mui/material/styles';
|
|
3
|
-
import { blueberryTwilightPalette } from
|
|
4
|
-
import { SeriesContext } from
|
|
5
|
-
import { preprocessSeries } from
|
|
6
|
-
import { useSeriesFormatter } from
|
|
5
|
+
import { blueberryTwilightPalette } from "../../colorPalettes/index.js";
|
|
6
|
+
import { SeriesContext } from "./SeriesContext.js";
|
|
7
|
+
import { preprocessSeries } from "./processSeries.js";
|
|
8
|
+
import { useSeriesFormatter } from "../PluginProvider/index.js";
|
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
10
|
function SeriesProvider(props) {
|
|
9
11
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { preprocessSeries } from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
import { preprocessSeries } from "./processSeries.js";
|
|
2
|
+
export * from "./SeriesProvider.js";
|
|
3
|
+
export * from "./SeriesContext.js";
|
|
4
|
+
export * from "./Series.types.js";
|
|
5
5
|
const seriesProviderUtils = {
|
|
6
6
|
preprocessSeries
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { defaultizeColor } from
|
|
2
|
+
import { defaultizeColor } from "../../internals/defaultizeColor.js";
|
|
3
3
|
/**
|
|
4
4
|
* This methods is the interface between what the developer is providing and what components receives
|
|
5
5
|
* To simplify the components behaviors, it groups series by type, such that LinePlots props are not updated if some line data are modified
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { getColorScale, getOrdinalColorScale } from
|
|
6
|
+
import { getColorScale, getOrdinalColorScale } from "../internals/colorScale.js";
|
|
5
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
8
|
export const ZAxisContext = /*#__PURE__*/React.createContext({
|
|
7
9
|
zAxis: {},
|
package/modern/context/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { ZAxisContextProvider } from
|
|
1
|
+
export * from "./HighlightedProvider/index.js";
|
|
2
|
+
export { ZAxisContextProvider } from "./ZAxisContextProvider.js";
|
package/modern/hooks/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export { useSeries as unstable_useSeries, usePieSeries as unstable_usePieSeries, useLineSeries as unstable_useLineSeries, useBarSeries as unstable_useBarSeries, useScatterSeries as unstable_useScatterSeries } from
|
|
1
|
+
export * from "./useDrawingArea.js";
|
|
2
|
+
export * from "./useChartId.js";
|
|
3
|
+
export * from "./useScale.js";
|
|
4
|
+
export * from "./useAxis.js";
|
|
5
|
+
export * from "./useColorScale.js";
|
|
6
|
+
export * from "./useSvgRef.js";
|
|
7
|
+
export { useSeries as unstable_useSeries, usePieSeries as unstable_usePieSeries, useLineSeries as unstable_useLineSeries, useBarSeries as unstable_useBarSeries, useScatterSeries as unstable_useScatterSeries } from "./useSeries.js";
|
package/modern/hooks/useAxis.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
import { InteractionContext } from
|
|
3
|
-
import { useCartesianContext } from
|
|
4
|
-
import { isBandScale } from
|
|
5
|
-
import { getSVGPoint } from
|
|
6
|
-
import { useSvgRef } from
|
|
7
|
-
import { useDrawingArea } from
|
|
4
|
+
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
5
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
6
|
+
import { isBandScale } from "../internals/isBandScale.js";
|
|
7
|
+
import { getSVGPoint } from "../internals/getSVGPoint.js";
|
|
8
|
+
import { useSvgRef } from "./useSvgRef.js";
|
|
9
|
+
import { useDrawingArea } from "./useDrawingArea.js";
|
|
8
10
|
function getAsANumber(value) {
|
|
9
11
|
return value instanceof Date ? value.getTime() : value;
|
|
10
12
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
|
-
import { DEFAULT_MARGINS } from
|
|
5
|
+
import { DEFAULT_MARGINS } from "../constants/index.js";
|
|
4
6
|
const useChartDimensions = (width, height, margin) => {
|
|
5
7
|
const defaultizedMargin = _extends({}, DEFAULT_MARGINS, margin);
|
|
6
8
|
const drawingArea = React.useMemo(() => ({
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
import { useCartesianContext } from
|
|
3
|
-
import { ZAxisContext } from
|
|
4
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
5
|
+
import { ZAxisContext } from "../context/ZAxisContextProvider.js";
|
|
4
6
|
export function useXColorScale(identifier) {
|
|
5
7
|
const {
|
|
6
8
|
xAxis,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
import { InteractionContext } from
|
|
3
|
-
import { useHighlighted } from
|
|
4
|
+
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
5
|
+
import { useHighlighted } from "../context/index.js";
|
|
4
6
|
export const useInteractionItemProps = skip => {
|
|
5
7
|
const {
|
|
6
8
|
dispatch: dispatchInteraction
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import { useIsomorphicLayoutEffect, Globals } from '@react-spring/web';
|
|
4
|
+
const handleMediaChange = e => {
|
|
5
|
+
Globals.assign({
|
|
6
|
+
// Modification such the react-spring implementation such that this hook can remove animation but never activate animation.
|
|
7
|
+
skipAnimation: e.matches || undefined
|
|
8
|
+
});
|
|
9
|
+
};
|
|
2
10
|
|
|
3
11
|
/**
|
|
4
12
|
* Returns `boolean` or `null`, used to automatically
|
|
@@ -8,23 +16,18 @@ import { useIsomorphicLayoutEffect, Globals } from '@react-spring/web';
|
|
|
8
16
|
* The return value, post-effect, is the value of their preferred setting
|
|
9
17
|
*/
|
|
10
18
|
export const useReducedMotion = () => {
|
|
11
|
-
// Taken from: https://github.com/pmndrs/react-spring/blob/
|
|
19
|
+
// Taken from: https://github.com/pmndrs/react-spring/blob/fd65b605b85c3a24143c4ce9dd322fdfca9c66be/packages/shared/src/hooks/useReducedMotion.ts
|
|
12
20
|
|
|
13
21
|
useIsomorphicLayoutEffect(() => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
// Skip animation test/jsdom
|
|
23
|
+
const shouldSkipAnimation = !window?.matchMedia;
|
|
24
|
+
if (shouldSkipAnimation) {
|
|
25
|
+
handleMediaChange({
|
|
26
|
+
matches: true
|
|
18
27
|
});
|
|
19
|
-
return
|
|
28
|
+
return undefined;
|
|
20
29
|
}
|
|
21
30
|
const mql = window.matchMedia('(prefers-reduced-motion)');
|
|
22
|
-
const handleMediaChange = event => {
|
|
23
|
-
Globals.assign({
|
|
24
|
-
// Modification such the react-spring implementation such that this hook can remove animation but never activate animation.
|
|
25
|
-
skipAnimation: event.matches || undefined
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
31
|
handleMediaChange(mql);
|
|
29
32
|
|
|
30
33
|
// MatchMedia is not fully supported in all environments, so we need to check if it exists before calling addEventListener
|
package/modern/hooks/useScale.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { isBandScale } from "../internals/isBandScale.js";
|
|
4
|
+
import { useXAxis, useYAxis } from "./useAxis.js";
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* For a given scale return a function that map value to their position.
|
package/modern/hooks/useTicks.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
import { isBandScale } from
|
|
3
|
-
import { isInfinity } from
|
|
4
|
+
import { isBandScale } from "../internals/isBandScale.js";
|
|
5
|
+
import { isInfinity } from "../internals/isInfinity.js";
|
|
4
6
|
export function getTickNumber(params) {
|
|
5
7
|
const {
|
|
6
8
|
tickMaxStep,
|
package/modern/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts v7.
|
|
2
|
+
* @mui/x-charts v7.17.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
8
|
+
export * from "./constants/index.js";
|
|
9
|
+
export * from "./context/index.js";
|
|
10
|
+
export * from "./hooks/index.js";
|
|
11
|
+
export * from "./colorPalettes/index.js";
|
|
12
|
+
export * from "./models/index.js";
|
|
13
|
+
export * from "./ChartsClipPath/index.js";
|
|
14
|
+
export * from "./ChartsReferenceLine/index.js";
|
|
15
|
+
export * from "./ChartsAxis/index.js";
|
|
16
|
+
export * from "./ChartsXAxis/index.js";
|
|
17
|
+
export * from "./ChartsYAxis/index.js";
|
|
18
|
+
export * from "./ChartsGrid/index.js";
|
|
19
|
+
export * from "./ChartsText/index.js";
|
|
20
|
+
export * from "./ChartsTooltip/index.js";
|
|
21
|
+
export * from "./ChartsLegend/index.js";
|
|
22
|
+
export * from "./ChartsAxisHighlight/index.js";
|
|
23
|
+
export * from "./ChartsVoronoiHandler/index.js";
|
|
24
|
+
export * from "./ChartsOnAxisClickHandler/index.js";
|
|
25
|
+
export * from "./BarChart/index.js";
|
|
26
|
+
export * from "./LineChart/index.js";
|
|
27
|
+
export * from "./PieChart/index.js";
|
|
28
|
+
export * from "./ScatterChart/index.js";
|
|
29
|
+
export * from "./SparkLineChart/index.js";
|
|
30
|
+
export * from "./Gauge/index.js";
|
|
31
|
+
export * from "./ChartContainer/index.js";
|
|
32
|
+
export * from "./ChartsSurface/index.js";
|
|
33
|
+
export * from "./ResponsiveChartContainer/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
-
import { axisClasses } from
|
|
3
|
+
import { axisClasses } from "../../ChartsAxis/axisClasses.js";
|
|
4
4
|
export const AxisRoot = styled('g', {
|
|
5
5
|
name: 'MuiChartsAxis',
|
|
6
6
|
slot: 'Root',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useCartesianContext } from
|
|
3
|
-
import { DrawingContext } from
|
|
4
|
-
import { useDrawingArea } from
|
|
5
|
-
import ChartsPiecewiseGradient from
|
|
6
|
-
import ChartsContinuousGradient from
|
|
2
|
+
import { useCartesianContext } from "../../../context/CartesianProvider/index.js";
|
|
3
|
+
import { DrawingContext } from "../../../context/DrawingProvider.js";
|
|
4
|
+
import { useDrawingArea } from "../../../hooks/index.js";
|
|
5
|
+
import ChartsPiecewiseGradient from "./ChartsPiecewiseGradient.js";
|
|
6
|
+
import ChartsContinuousGradient from "./ChartsContinuousGradient.js";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
export function useChartGradient() {
|
|
9
9
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsAxesGradients.js";
|