@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,9 +1,11 @@
|
|
|
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
6
|
import clsx from 'clsx';
|
|
5
|
-
import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltipPaper, ChartsTooltipRow } from
|
|
6
|
-
import { getLabel } from
|
|
7
|
+
import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltipPaper, ChartsTooltipRow } from "./ChartsTooltipTable.js";
|
|
8
|
+
import { getLabel } from "../internals/getLabel.js";
|
|
7
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
10
|
function DefaultChartsItemTooltipContent(props) {
|
|
9
11
|
const {
|
|
@@ -34,7 +36,7 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
34
36
|
});
|
|
35
37
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
36
38
|
sx: sx,
|
|
37
|
-
className: classes.
|
|
39
|
+
className: classes.paper,
|
|
38
40
|
children: /*#__PURE__*/_jsx(ChartsTooltipTable, {
|
|
39
41
|
className: classes.table,
|
|
40
42
|
children: /*#__PURE__*/_jsx("tbody", {
|
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClass as generateUtilityClass, unstable_generat
|
|
|
2
2
|
export function getChartsTooltipUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiChartsTooltip', slot);
|
|
4
4
|
}
|
|
5
|
-
export const chartsTooltipClasses = generateUtilityClasses('MuiChartsTooltip', ['root', 'table', 'row', 'cell', 'mark', 'markCell', 'labelCell', 'valueCell']);
|
|
5
|
+
export const chartsTooltipClasses = generateUtilityClasses('MuiChartsTooltip', ['root', 'paper', 'table', 'row', 'cell', 'mark', 'markCell', 'labelCell', 'valueCell']);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
1
|
+
export * from "./ChartsTooltip.js";
|
|
2
|
+
export * from "./chartsTooltipClasses.js";
|
|
3
|
+
export * from "./ChartsAxisTooltipContent.js";
|
|
4
|
+
export * from "./ChartsItemTooltipContent.js";
|
|
5
|
+
export * from "./DefaultChartsAxisTooltipContent.js";
|
|
6
|
+
export * from "./DefaultChartsItemTooltipContent.js";
|
|
7
|
+
export * from "./ChartsTooltipTable.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useSvgRef } from
|
|
3
|
+
import { useSvgRef } from "../hooks/index.js";
|
|
4
4
|
export function generateVirtualElement(mousePosition) {
|
|
5
5
|
if (mousePosition === null) {
|
|
6
6
|
return {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import { Delaunay } from '@mui/x-charts-vendor/d3-delaunay';
|
|
4
6
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
5
|
-
import { InteractionContext } from
|
|
6
|
-
import { useCartesianContext } from
|
|
7
|
-
import { getValueToPositionMapper } from
|
|
8
|
-
import { getSVGPoint } from
|
|
9
|
-
import { useDrawingArea, useSvgRef } from
|
|
10
|
-
import { useHighlighted } from
|
|
11
|
-
import { useScatterSeries } from
|
|
7
|
+
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
8
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
9
|
+
import { getValueToPositionMapper } from "../hooks/useScale.js";
|
|
10
|
+
import { getSVGPoint } from "../internals/getSVGPoint.js";
|
|
11
|
+
import { useDrawingArea, useSvgRef } from "../hooks/index.js";
|
|
12
|
+
import { useHighlighted } from "../context/index.js";
|
|
13
|
+
import { useScatterSeries } from "../hooks/useSeries.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
function ChartsVoronoiHandler(props) {
|
|
14
16
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsVoronoiHandler.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["scale", "tickNumber", "reverse"];
|
|
@@ -5,18 +7,18 @@ import * as React from 'react';
|
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
7
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
|
-
import { useThemeProps, useTheme } from '@mui/material/styles';
|
|
9
|
-
import { useCartesianContext } from
|
|
10
|
-
import { useTicks } from
|
|
11
|
-
import { getAxisUtilityClass } from
|
|
12
|
-
import { AxisRoot } from
|
|
13
|
-
import { ChartsText } from
|
|
14
|
-
import { getMinXTranslation } from
|
|
15
|
-
import { useMounted } from
|
|
16
|
-
import { useDrawingArea } from
|
|
17
|
-
import { getWordsByLines } from
|
|
18
|
-
import { isInfinity } from
|
|
19
|
-
import { isBandScale } from
|
|
10
|
+
import { useThemeProps, useTheme, styled } from '@mui/material/styles';
|
|
11
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
12
|
+
import { useTicks } from "../hooks/useTicks.js";
|
|
13
|
+
import { getAxisUtilityClass } from "../ChartsAxis/axisClasses.js";
|
|
14
|
+
import { AxisRoot } from "../internals/components/AxisSharedComponents.js";
|
|
15
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
16
|
+
import { getMinXTranslation } from "../internals/geometry.js";
|
|
17
|
+
import { useMounted } from "../hooks/useMounted.js";
|
|
18
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
19
|
+
import { getWordsByLines } from "../internals/getWordsByLines.js";
|
|
20
|
+
import { isInfinity } from "../internals/isInfinity.js";
|
|
21
|
+
import { isBandScale } from "../internals/isBandScale.js";
|
|
20
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
23
|
const useUtilityClasses = ownerState => {
|
|
22
24
|
const {
|
|
@@ -89,6 +91,11 @@ function addLabelDimension(xTicks, {
|
|
|
89
91
|
return item;
|
|
90
92
|
});
|
|
91
93
|
}
|
|
94
|
+
const XAxisRoot = styled(AxisRoot, {
|
|
95
|
+
name: 'MuiChartsXAxis',
|
|
96
|
+
slot: 'Root',
|
|
97
|
+
overridesResolver: (props, styles) => styles.root
|
|
98
|
+
})({});
|
|
92
99
|
const defaultProps = {
|
|
93
100
|
position: 'bottom',
|
|
94
101
|
disableLine: false,
|
|
@@ -210,7 +217,7 @@ function ChartsXAxis(inProps) {
|
|
|
210
217
|
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(isInfinity)) {
|
|
211
218
|
return null;
|
|
212
219
|
}
|
|
213
|
-
return /*#__PURE__*/_jsxs(
|
|
220
|
+
return /*#__PURE__*/_jsxs(XAxisRoot, {
|
|
214
221
|
transform: `translate(0, ${position === 'bottom' ? top + height : top})`,
|
|
215
222
|
className: classes.root,
|
|
216
223
|
sx: sx,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsXAxis.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
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 = ["scale", "tickNumber"];
|
|
@@ -5,16 +7,16 @@ import * as React from 'react';
|
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
7
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
|
-
import { useThemeProps, useTheme } from '@mui/material/styles';
|
|
10
|
+
import { useThemeProps, useTheme, styled } from '@mui/material/styles';
|
|
9
11
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
10
|
-
import { useCartesianContext } from
|
|
11
|
-
import { useTicks } from
|
|
12
|
-
import { useDrawingArea } from
|
|
13
|
-
import { AxisRoot } from
|
|
14
|
-
import { ChartsText } from
|
|
15
|
-
import { getAxisUtilityClass } from
|
|
16
|
-
import { isInfinity } from
|
|
17
|
-
import { isBandScale } from
|
|
12
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
13
|
+
import { useTicks } from "../hooks/useTicks.js";
|
|
14
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
15
|
+
import { AxisRoot } from "../internals/components/AxisSharedComponents.js";
|
|
16
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
17
|
+
import { getAxisUtilityClass } from "../ChartsAxis/axisClasses.js";
|
|
18
|
+
import { isInfinity } from "../internals/isInfinity.js";
|
|
19
|
+
import { isBandScale } from "../internals/isBandScale.js";
|
|
18
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
21
|
const useUtilityClasses = ownerState => {
|
|
20
22
|
const {
|
|
@@ -31,6 +33,11 @@ const useUtilityClasses = ownerState => {
|
|
|
31
33
|
};
|
|
32
34
|
return composeClasses(slots, getAxisUtilityClass, classes);
|
|
33
35
|
};
|
|
36
|
+
const YAxisRoot = styled(AxisRoot, {
|
|
37
|
+
name: 'MuiChartsYAxis',
|
|
38
|
+
slot: 'Root',
|
|
39
|
+
overridesResolver: (props, styles) => styles.root
|
|
40
|
+
})({});
|
|
34
41
|
const defaultProps = {
|
|
35
42
|
position: 'left',
|
|
36
43
|
disableLine: false,
|
|
@@ -157,7 +164,7 @@ function ChartsYAxis(inProps) {
|
|
|
157
164
|
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(isInfinity)) {
|
|
158
165
|
return null;
|
|
159
166
|
}
|
|
160
|
-
return /*#__PURE__*/_jsxs(
|
|
167
|
+
return /*#__PURE__*/_jsxs(YAxisRoot, {
|
|
161
168
|
transform: `translate(${position === 'right' ? left + width : left}, 0)`,
|
|
162
169
|
className: classes.root,
|
|
163
170
|
sx: sx,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsYAxis.js";
|
package/modern/Gauge/Gauge.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
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 = ["text", "children", "classes", "className"];
|
|
@@ -5,11 +7,11 @@ import * as React from 'react';
|
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
9
|
import clsx from 'clsx';
|
|
8
|
-
import { GaugeContainer } from
|
|
9
|
-
import { GaugeValueArc } from
|
|
10
|
-
import { GaugeReferenceArc } from
|
|
11
|
-
import { getGaugeUtilityClass } from
|
|
12
|
-
import { GaugeValueText } from
|
|
10
|
+
import { GaugeContainer } from "./GaugeContainer.js";
|
|
11
|
+
import { GaugeValueArc } from "./GaugeValueArc.js";
|
|
12
|
+
import { GaugeReferenceArc } from "./GaugeReferenceArc.js";
|
|
13
|
+
import { getGaugeUtilityClass } from "./gaugeClasses.js";
|
|
14
|
+
import { GaugeValueText } from "./GaugeValueText.js";
|
|
13
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
16
|
const useUtilityClasses = props => {
|
|
15
17
|
const {
|
|
@@ -1,3 +1,5 @@
|
|
|
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 = ["width", "height", "margin", "title", "desc", "value", "valueMin", "valueMax", "startAngle", "endAngle", "outerRadius", "innerRadius", "cornerRadius", "cx", "cy", "children"];
|
|
@@ -5,10 +7,10 @@ import * as React from 'react';
|
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import { styled } from '@mui/material/styles';
|
|
7
9
|
import useForkRef from '@mui/utils/useForkRef';
|
|
8
|
-
import { useChartContainerDimensions } from
|
|
9
|
-
import { ChartsSurface } from
|
|
10
|
-
import { DrawingProvider } from
|
|
11
|
-
import { GaugeProvider } from
|
|
10
|
+
import { useChartContainerDimensions } from "../ResponsiveChartContainer/useChartContainerDimensions.js";
|
|
11
|
+
import { ChartsSurface } from "../ChartsSurface/index.js";
|
|
12
|
+
import { DrawingProvider } from "../context/DrawingProvider.js";
|
|
13
|
+
import { GaugeProvider } from "./GaugeProvider.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
const ResizableContainer = styled('div', {
|
|
14
16
|
name: 'MuiGauge',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @ignore - do not document.
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { getPercentageValue } from
|
|
4
|
-
import { getArcRatios, getAvailableRadius } from
|
|
5
|
-
import { useDrawingArea } from
|
|
3
|
+
import { getPercentageValue } from "../internals/getPercentageValue.js";
|
|
4
|
+
import { getArcRatios, getAvailableRadius } from "./utils.js";
|
|
5
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export const GaugeContext = /*#__PURE__*/React.createContext({
|
|
8
8
|
value: null,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
|
|
4
6
|
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { useGaugeState } from
|
|
7
|
+
import { useGaugeState } from "./GaugeProvider.js";
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
const StyledPath = styled('path', {
|
|
8
10
|
name: 'MuiGauge',
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
|
|
4
6
|
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { useGaugeState } from
|
|
7
|
+
import { useGaugeState } from "./GaugeProvider.js";
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
const StyledPath = styled('path', {
|
|
8
10
|
name: 'MuiGauge',
|
|
@@ -1,10 +1,12 @@
|
|
|
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 = ["text", "className"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { useGaugeState } from
|
|
7
|
-
import { ChartsText } from
|
|
8
|
+
import { useGaugeState } from "./GaugeProvider.js";
|
|
9
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
8
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
11
|
function defaultFormatter({
|
|
10
12
|
value
|
package/modern/Gauge/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 { useGaugeState } from
|
|
1
|
+
export * from "./Gauge.js";
|
|
2
|
+
export * from "./GaugeContainer.js";
|
|
3
|
+
export * from "./GaugeValueText.js";
|
|
4
|
+
export * from "./GaugeValueArc.js";
|
|
5
|
+
export * from "./GaugeReferenceArc.js";
|
|
6
|
+
export * from "./gaugeClasses.js";
|
|
7
|
+
export { useGaugeState } from "./GaugeProvider.js";
|
|
@@ -1,14 +1,16 @@
|
|
|
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 = ["d", "skipAnimation", "ownerState"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import { styled } from '@mui/material/styles';
|
|
7
|
-
import { animated,
|
|
9
|
+
import { animated, useTransition } from '@react-spring/web';
|
|
8
10
|
import { color as d3Color } from '@mui/x-charts-vendor/d3-color';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
11
|
+
import { cleanId } from "../internals/cleanId.js";
|
|
12
|
+
import { useChartId, useDrawingArea } from "../hooks/index.js";
|
|
13
|
+
import { useStringInterpolator } from "../internals/useStringInterpolator.js";
|
|
12
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
15
|
export const AreaElementPath = styled(animated.path, {
|
|
14
16
|
name: 'MuiAreaElement',
|
|
@@ -48,16 +50,33 @@ function AnimatedArea(props) {
|
|
|
48
50
|
height
|
|
49
51
|
} = useDrawingArea();
|
|
50
52
|
const chartId = useChartId();
|
|
51
|
-
const
|
|
52
|
-
const {
|
|
53
|
-
animatedWidth
|
|
54
|
-
} = useSpring({
|
|
53
|
+
const stringInterpolator = useStringInterpolator(d);
|
|
54
|
+
const transitionAppear = useTransition([1], {
|
|
55
55
|
from: {
|
|
56
56
|
animatedWidth: left
|
|
57
57
|
},
|
|
58
58
|
to: {
|
|
59
59
|
animatedWidth: width + left + right
|
|
60
60
|
},
|
|
61
|
+
enter: {
|
|
62
|
+
animatedWidth: width + left + right
|
|
63
|
+
},
|
|
64
|
+
leave: {
|
|
65
|
+
animatedWidth: left
|
|
66
|
+
},
|
|
67
|
+
reset: false,
|
|
68
|
+
immediate: skipAnimation
|
|
69
|
+
});
|
|
70
|
+
const transitionChange = useTransition([stringInterpolator], {
|
|
71
|
+
from: {
|
|
72
|
+
value: 0
|
|
73
|
+
},
|
|
74
|
+
to: {
|
|
75
|
+
value: 1
|
|
76
|
+
},
|
|
77
|
+
enter: {
|
|
78
|
+
value: 1
|
|
79
|
+
},
|
|
61
80
|
reset: false,
|
|
62
81
|
immediate: skipAnimation
|
|
63
82
|
});
|
|
@@ -65,18 +84,18 @@ function AnimatedArea(props) {
|
|
|
65
84
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
66
85
|
children: [/*#__PURE__*/_jsx("clipPath", {
|
|
67
86
|
id: clipId,
|
|
68
|
-
children: /*#__PURE__*/_jsx(animated.rect, {
|
|
87
|
+
children: transitionAppear(style => /*#__PURE__*/_jsx(animated.rect, {
|
|
69
88
|
x: 0,
|
|
70
89
|
y: 0,
|
|
71
|
-
width: animatedWidth,
|
|
90
|
+
width: style.animatedWidth,
|
|
72
91
|
height: top + height + bottom
|
|
73
|
-
})
|
|
92
|
+
}))
|
|
74
93
|
}), /*#__PURE__*/_jsx("g", {
|
|
75
94
|
clipPath: `url(#${clipId})`,
|
|
76
|
-
children: /*#__PURE__*/_jsx(AreaElementPath, _extends({}, other, {
|
|
95
|
+
children: transitionChange((style, interpolator) => /*#__PURE__*/_jsx(AreaElementPath, _extends({}, other, {
|
|
77
96
|
ownerState: ownerState,
|
|
78
|
-
d:
|
|
79
|
-
}))
|
|
97
|
+
d: style.value.to(interpolator)
|
|
98
|
+
})))
|
|
80
99
|
})]
|
|
81
100
|
});
|
|
82
101
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
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 = ["d", "skipAnimation", "ownerState"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { animated,
|
|
8
|
+
import { animated, useTransition } from '@react-spring/web';
|
|
7
9
|
import { color as d3Color } from '@mui/x-charts-vendor/d3-color';
|
|
8
10
|
import { styled } from '@mui/material/styles';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { cleanId } from "../internals/cleanId.js";
|
|
12
|
+
import { useChartId } from "../hooks/useChartId.js";
|
|
13
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
14
|
+
import { useStringInterpolator } from "../internals/useStringInterpolator.js";
|
|
13
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
16
|
export const LineElementPath = styled(animated.path, {
|
|
15
17
|
name: 'MuiLineElement',
|
|
@@ -51,16 +53,33 @@ function AnimatedLine(props) {
|
|
|
51
53
|
right
|
|
52
54
|
} = useDrawingArea();
|
|
53
55
|
const chartId = useChartId();
|
|
54
|
-
const
|
|
55
|
-
const {
|
|
56
|
-
animatedWidth
|
|
57
|
-
} = useSpring({
|
|
56
|
+
const stringInterpolator = useStringInterpolator(d);
|
|
57
|
+
const transitionAppear = useTransition([1], {
|
|
58
58
|
from: {
|
|
59
59
|
animatedWidth: left
|
|
60
60
|
},
|
|
61
61
|
to: {
|
|
62
62
|
animatedWidth: width + left + right
|
|
63
63
|
},
|
|
64
|
+
enter: {
|
|
65
|
+
animatedWidth: width + left + right
|
|
66
|
+
},
|
|
67
|
+
leave: {
|
|
68
|
+
animatedWidth: left
|
|
69
|
+
},
|
|
70
|
+
reset: false,
|
|
71
|
+
immediate: skipAnimation
|
|
72
|
+
});
|
|
73
|
+
const transitionChange = useTransition([stringInterpolator], {
|
|
74
|
+
from: {
|
|
75
|
+
value: 0
|
|
76
|
+
},
|
|
77
|
+
to: {
|
|
78
|
+
value: 1
|
|
79
|
+
},
|
|
80
|
+
enter: {
|
|
81
|
+
value: 1
|
|
82
|
+
},
|
|
64
83
|
reset: false,
|
|
65
84
|
immediate: skipAnimation
|
|
66
85
|
});
|
|
@@ -68,18 +87,18 @@ function AnimatedLine(props) {
|
|
|
68
87
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
69
88
|
children: [/*#__PURE__*/_jsx("clipPath", {
|
|
70
89
|
id: clipId,
|
|
71
|
-
children: /*#__PURE__*/_jsx(animated.rect, {
|
|
90
|
+
children: transitionAppear(style => /*#__PURE__*/_jsx(animated.rect, {
|
|
72
91
|
x: 0,
|
|
73
92
|
y: 0,
|
|
74
|
-
width: animatedWidth,
|
|
93
|
+
width: style.animatedWidth,
|
|
75
94
|
height: top + height + bottom
|
|
76
|
-
})
|
|
95
|
+
}))
|
|
77
96
|
}), /*#__PURE__*/_jsx("g", {
|
|
78
97
|
clipPath: `url(#${clipId})`,
|
|
79
|
-
children: /*#__PURE__*/_jsx(LineElementPath, _extends({}, other, {
|
|
98
|
+
children: transitionChange((style, interpolator) => /*#__PURE__*/_jsx(LineElementPath, _extends({}, other, {
|
|
80
99
|
ownerState: ownerState,
|
|
81
|
-
d:
|
|
82
|
-
}))
|
|
100
|
+
d: style.value.to(interpolator)
|
|
101
|
+
})))
|
|
83
102
|
})]
|
|
84
103
|
});
|
|
85
104
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
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 = ["id", "classes", "color", "gradientId", "slots", "slotProps", "onClick"];
|
|
@@ -7,9 +9,9 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
7
9
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
10
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
9
11
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
10
|
-
import { useInteractionItemProps } from
|
|
11
|
-
import { AnimatedArea } from
|
|
12
|
-
import { useItemHighlighted } from
|
|
12
|
+
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
|
|
13
|
+
import { AnimatedArea } from "./AnimatedArea.js";
|
|
14
|
+
import { useItemHighlighted } from "../context/index.js";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
export function getAreaElementUtilityClass(slot) {
|
|
15
17
|
return generateUtilityClass('MuiAreaElement', slot);
|