@mui/x-charts 7.15.0 → 7.16.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 +23 -12
- package/BarChart/BarClipPath.js +1 -1
- package/BarChart/BarElement.js +2 -2
- package/BarChart/BarLabel/BarLabel.js +1 -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 +8 -8
- package/BarChart/checkScaleErrors.js +2 -2
- package/BarChart/formatter.js +2 -2
- package/BarChart/index.js +4 -4
- package/BarChart/legend.js +1 -1
- package/BarChart/plugin.js +3 -3
- package/BarChart/useBarChartProps.js +1 -1
- package/CHANGELOG.md +98 -1
- package/ChartContainer/ChartContainer.js +9 -9
- package/ChartContainer/index.js +1 -1
- package/ChartContainer/useChartContainerProps.js +2 -2
- package/ChartContainer/useDefaultizeAxis.js +1 -1
- package/ChartsAxis/ChartsAxis.js +3 -3
- package/ChartsAxis/index.js +2 -2
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +4 -4
- package/ChartsAxisHighlight/index.js +1 -1
- package/ChartsClipPath/ChartsClipPath.js +1 -1
- package/ChartsClipPath/index.js +1 -1
- package/ChartsGrid/ChartsGrid.js +18 -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 +59 -25
- package/ChartsLegend/ContinuousColorLegend.js +7 -7
- package/ChartsLegend/DefaultChartsLegend.d.ts +6 -1
- package/ChartsLegend/DefaultChartsLegend.js +7 -3
- package/ChartsLegend/LegendPerItem.d.ts +9 -6
- package/ChartsLegend/LegendPerItem.js +4 -8
- package/ChartsLegend/PiecewiseColorLegend.js +3 -8
- package/ChartsLegend/index.js +6 -6
- package/ChartsLegend/useAxis.js +2 -2
- package/ChartsLegend/utils.js +4 -4
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +4 -4
- package/ChartsOnAxisClickHandler/index.js +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
- package/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
- package/ChartsOverlay/ChartsOverlay.js +3 -3
- package/ChartsOverlay/index.js +3 -3
- package/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.js +5 -5
- package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -5
- package/ChartsReferenceLine/common.js +1 -1
- package/ChartsReferenceLine/index.js +2 -2
- package/ChartsSurface/ChartsSurface.js +1 -1
- package/ChartsSurface/index.js +1 -1
- package/ChartsText/ChartsText.js +1 -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 +13 -11
- package/ChartsTooltip/ChartsTooltipTable.js +10 -5
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -5
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +3 -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 +7 -7
- package/ChartsVoronoiHandler/index.js +1 -1
- package/ChartsXAxis/ChartsXAxis.js +18 -13
- package/ChartsXAxis/index.js +1 -1
- package/ChartsYAxis/ChartsYAxis.js +15 -10
- package/ChartsYAxis/index.js +1 -1
- package/Gauge/Gauge.js +5 -5
- package/Gauge/GaugeContainer.js +4 -4
- package/Gauge/GaugeProvider.js +3 -3
- package/Gauge/GaugeReferenceArc.js +1 -1
- package/Gauge/GaugeValueArc.js +1 -1
- package/Gauge/GaugeValueText.js +2 -2
- package/Gauge/index.js +7 -7
- package/LineChart/AnimatedArea.js +31 -14
- package/LineChart/AnimatedLine.js +32 -15
- package/LineChart/AreaElement.js +3 -3
- package/LineChart/AreaPlot.js +83 -78
- package/LineChart/LineChart.js +26 -15
- package/LineChart/LineElement.js +3 -3
- package/LineChart/LineHighlightPlot.js +8 -8
- package/LineChart/LinePlot.js +65 -60
- package/LineChart/MarkElement.js +4 -4
- package/LineChart/MarkPlot.js +9 -9
- package/LineChart/formatter.js +2 -2
- package/LineChart/index.js +11 -11
- package/LineChart/legend.js +1 -1
- package/LineChart/plugin.js +3 -3
- package/LineChart/useLineChartProps.js +1 -1
- package/PieChart/PieArc.js +1 -1
- package/PieChart/PieArcLabelPlot.js +4 -4
- package/PieChart/PieArcPlot.js +4 -4
- package/PieChart/PieChart.js +19 -8
- package/PieChart/PiePlot.js +6 -6
- package/PieChart/dataTransform/useTransformData.js +1 -1
- package/PieChart/formatter.js +1 -1
- package/PieChart/getPieCoordinates.js +1 -1
- package/PieChart/index.js +7 -7
- package/PieChart/legend.js +1 -1
- package/PieChart/plugin.js +2 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -3
- package/ResponsiveChartContainer/index.js +1 -1
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.js +1 -1
- package/ScatterChart/Scatter.js +5 -5
- package/ScatterChart/ScatterChart.js +23 -12
- package/ScatterChart/ScatterPlot.js +5 -5
- package/ScatterChart/formatter.js +1 -1
- package/ScatterChart/index.js +3 -3
- package/ScatterChart/legend.js +1 -1
- package/ScatterChart/plugin.js +3 -3
- package/SparkLineChart/SparkLineChart.js +6 -6
- package/SparkLineChart/index.js +1 -1
- package/colorPalettes/index.js +1 -1
- package/context/CartesianProvider/CartesianProvider.js +6 -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 +1 -1
- package/context/DrawingProvider.js +1 -1
- package/context/HighlightedProvider/HighlightedProvider.js +4 -4
- package/context/HighlightedProvider/index.js +4 -4
- package/context/HighlightedProvider/useHighlighted.js +1 -1
- package/context/HighlightedProvider/useItemHighlighted.js +1 -1
- package/context/PluginProvider/PluginProvider.js +2 -2
- package/context/PluginProvider/index.js +10 -10
- package/context/PluginProvider/mergePlugins.js +4 -4
- package/context/PluginProvider/useColorProcessor.js +1 -1
- package/context/PluginProvider/useSeriesFormatter.js +1 -1
- package/context/PluginProvider/useXExtremumGetter.js +1 -1
- package/context/PluginProvider/useYExtremumGetter.js +1 -1
- package/context/SeriesProvider/SeriesProvider.js +4 -4
- package/context/SeriesProvider/index.js +4 -4
- package/context/SeriesProvider/processSeries.js +1 -1
- package/context/ZAxisContextProvider.js +1 -1
- package/context/index.js +2 -2
- package/hooks/index.js +7 -7
- package/hooks/useAxis.js +1 -1
- package/hooks/useAxisEvents.js +6 -6
- package/hooks/useChartDimensions.js +1 -1
- package/hooks/useChartId.js +1 -1
- package/hooks/useColorScale.js +2 -2
- package/hooks/useDrawingArea.js +1 -1
- package/hooks/useInteractionItemProps.js +2 -2
- package/hooks/useReducedMotion.js +13 -12
- package/hooks/useScale.js +2 -2
- package/hooks/useSeries.js +1 -1
- package/hooks/useSvgRef.js +1 -1
- package/hooks/useTicks.js +2 -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/internals/{useAnimatedPath.js → 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 +23 -12
- package/modern/BarChart/BarClipPath.js +1 -1
- package/modern/BarChart/BarElement.js +2 -2
- package/modern/BarChart/BarLabel/BarLabel.js +1 -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 +8 -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 +1 -1
- package/modern/BarChart/plugin.js +3 -3
- package/modern/BarChart/useBarChartProps.js +1 -1
- package/modern/ChartContainer/ChartContainer.js +9 -9
- package/modern/ChartContainer/index.js +1 -1
- package/modern/ChartContainer/useChartContainerProps.js +2 -2
- package/modern/ChartContainer/useDefaultizeAxis.js +1 -1
- package/modern/ChartsAxis/ChartsAxis.js +3 -3
- package/modern/ChartsAxis/index.js +2 -2
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +4 -4
- package/modern/ChartsAxisHighlight/index.js +1 -1
- package/modern/ChartsClipPath/ChartsClipPath.js +1 -1
- package/modern/ChartsClipPath/index.js +1 -1
- package/modern/ChartsGrid/ChartsGrid.js +18 -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 +59 -25
- package/modern/ChartsLegend/ContinuousColorLegend.js +7 -7
- package/modern/ChartsLegend/DefaultChartsLegend.js +7 -3
- package/modern/ChartsLegend/LegendPerItem.js +4 -8
- package/modern/ChartsLegend/PiecewiseColorLegend.js +3 -8
- package/modern/ChartsLegend/index.js +6 -6
- package/modern/ChartsLegend/useAxis.js +2 -2
- package/modern/ChartsLegend/utils.js +4 -4
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +4 -4
- package/modern/ChartsOnAxisClickHandler/index.js +1 -1
- package/modern/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
- package/modern/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
- package/modern/ChartsOverlay/ChartsOverlay.js +3 -3
- package/modern/ChartsOverlay/index.js +3 -3
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +5 -5
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +5 -5
- package/modern/ChartsReferenceLine/common.js +1 -1
- package/modern/ChartsReferenceLine/index.js +2 -2
- package/modern/ChartsSurface/ChartsSurface.js +1 -1
- package/modern/ChartsSurface/index.js +1 -1
- package/modern/ChartsText/ChartsText.js +1 -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 +13 -11
- package/modern/ChartsTooltip/ChartsTooltipTable.js +10 -5
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -5
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +3 -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 +7 -7
- package/modern/ChartsVoronoiHandler/index.js +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +18 -13
- package/modern/ChartsXAxis/index.js +1 -1
- package/modern/ChartsYAxis/ChartsYAxis.js +15 -10
- package/modern/ChartsYAxis/index.js +1 -1
- package/modern/Gauge/Gauge.js +5 -5
- package/modern/Gauge/GaugeContainer.js +4 -4
- package/modern/Gauge/GaugeProvider.js +3 -3
- package/modern/Gauge/GaugeReferenceArc.js +1 -1
- package/modern/Gauge/GaugeValueArc.js +1 -1
- package/modern/Gauge/GaugeValueText.js +2 -2
- package/modern/Gauge/index.js +7 -7
- package/modern/LineChart/AnimatedArea.js +31 -14
- package/modern/LineChart/AnimatedLine.js +32 -15
- package/modern/LineChart/AreaElement.js +3 -3
- package/modern/LineChart/AreaPlot.js +83 -78
- package/modern/LineChart/LineChart.js +26 -15
- package/modern/LineChart/LineElement.js +3 -3
- package/modern/LineChart/LineHighlightPlot.js +8 -8
- package/modern/LineChart/LinePlot.js +65 -60
- package/modern/LineChart/MarkElement.js +4 -4
- package/modern/LineChart/MarkPlot.js +9 -9
- package/modern/LineChart/formatter.js +2 -2
- package/modern/LineChart/index.js +11 -11
- package/modern/LineChart/legend.js +1 -1
- package/modern/LineChart/plugin.js +3 -3
- package/modern/LineChart/useLineChartProps.js +1 -1
- package/modern/PieChart/PieArc.js +1 -1
- package/modern/PieChart/PieArcLabelPlot.js +4 -4
- package/modern/PieChart/PieArcPlot.js +4 -4
- package/modern/PieChart/PieChart.js +19 -8
- package/modern/PieChart/PiePlot.js +6 -6
- package/modern/PieChart/dataTransform/useTransformData.js +1 -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 +1 -1
- package/modern/PieChart/plugin.js +2 -2
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -3
- package/modern/ResponsiveChartContainer/index.js +1 -1
- package/modern/ResponsiveChartContainer/useResponsiveChartContainerProps.js +1 -1
- package/modern/ScatterChart/Scatter.js +5 -5
- package/modern/ScatterChart/ScatterChart.js +23 -12
- package/modern/ScatterChart/ScatterPlot.js +5 -5
- package/modern/ScatterChart/formatter.js +1 -1
- package/modern/ScatterChart/index.js +3 -3
- package/modern/ScatterChart/legend.js +1 -1
- package/modern/ScatterChart/plugin.js +3 -3
- package/modern/SparkLineChart/SparkLineChart.js +6 -6
- package/modern/SparkLineChart/index.js +1 -1
- package/modern/colorPalettes/index.js +1 -1
- package/modern/context/CartesianProvider/CartesianProvider.js +6 -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 +1 -1
- package/modern/context/DrawingProvider.js +1 -1
- package/modern/context/HighlightedProvider/HighlightedProvider.js +4 -4
- package/modern/context/HighlightedProvider/index.js +4 -4
- package/modern/context/HighlightedProvider/useHighlighted.js +1 -1
- package/modern/context/HighlightedProvider/useItemHighlighted.js +1 -1
- package/modern/context/PluginProvider/PluginProvider.js +2 -2
- package/modern/context/PluginProvider/index.js +10 -10
- package/modern/context/PluginProvider/mergePlugins.js +4 -4
- package/modern/context/PluginProvider/useColorProcessor.js +1 -1
- package/modern/context/PluginProvider/useSeriesFormatter.js +1 -1
- package/modern/context/PluginProvider/useXExtremumGetter.js +1 -1
- package/modern/context/PluginProvider/useYExtremumGetter.js +1 -1
- package/modern/context/SeriesProvider/SeriesProvider.js +4 -4
- package/modern/context/SeriesProvider/index.js +4 -4
- package/modern/context/SeriesProvider/processSeries.js +1 -1
- package/modern/context/ZAxisContextProvider.js +1 -1
- package/modern/context/index.js +2 -2
- package/modern/hooks/index.js +7 -7
- package/modern/hooks/useAxis.js +1 -1
- package/modern/hooks/useAxisEvents.js +6 -6
- package/modern/hooks/useChartDimensions.js +1 -1
- package/modern/hooks/useChartId.js +1 -1
- package/modern/hooks/useColorScale.js +2 -2
- package/modern/hooks/useDrawingArea.js +1 -1
- package/modern/hooks/useInteractionItemProps.js +2 -2
- package/modern/hooks/useReducedMotion.js +13 -12
- package/modern/hooks/useScale.js +2 -2
- package/modern/hooks/useSeries.js +1 -1
- package/modern/hooks/useSvgRef.js +1 -1
- package/modern/hooks/useTicks.js +2 -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/modern/internals/{useAnimatedPath.js → 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 +14 -4
- package/node/BarChart/BarClipPath.js +2 -3
- package/node/BarChart/BarElement.js +2 -3
- package/node/BarChart/BarLabel/BarLabel.js +2 -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 +2 -3
- package/node/BarChart/formatter.js +1 -1
- package/node/BarChart/plugin.js +1 -1
- package/node/BarChart/useBarChartProps.js +1 -1
- package/node/ChartContainer/ChartContainer.js +2 -3
- package/node/ChartContainer/useChartContainerProps.js +2 -3
- package/node/ChartContainer/useDefaultizeAxis.js +2 -3
- package/node/ChartsAxis/ChartsAxis.js +2 -3
- package/node/ChartsAxisHighlight/ChartsAxisHighlight.js +2 -3
- package/node/ChartsClipPath/ChartsClipPath.js +2 -3
- package/node/ChartsGrid/ChartsGrid.js +17 -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 +56 -23
- package/node/ChartsLegend/ContinuousColorLegend.js +2 -3
- package/node/ChartsLegend/DefaultChartsLegend.js +8 -5
- package/node/ChartsLegend/LegendPerItem.js +2 -7
- package/node/ChartsLegend/PiecewiseColorLegend.js +2 -8
- package/node/ChartsLegend/legendItemsPlacement.js +1 -1
- package/node/ChartsLegend/useAxis.js +1 -2
- package/node/ChartsLegend/utils.js +1 -1
- package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -3
- package/node/ChartsOverlay/ChartsLoadingOverlay.js +2 -3
- package/node/ChartsOverlay/ChartsNoDataOverlay.js +2 -3
- package/node/ChartsOverlay/ChartsOverlay.js +2 -3
- package/node/ChartsReferenceLine/ChartsReferenceLine.js +2 -3
- package/node/ChartsReferenceLine/ChartsXReferenceLine.js +2 -3
- package/node/ChartsReferenceLine/ChartsYReferenceLine.js +2 -3
- package/node/ChartsReferenceLine/chartsReferenceLineClasses.js +1 -1
- package/node/ChartsReferenceLine/common.js +1 -1
- package/node/ChartsSurface/ChartsSurface.js +2 -3
- package/node/ChartsText/ChartsText.js +2 -3
- package/node/ChartsTooltip/ChartsAxisTooltipContent.js +2 -3
- package/node/ChartsTooltip/ChartsItemTooltipContent.js +2 -3
- package/node/ChartsTooltip/ChartsTooltip.js +10 -9
- package/node/ChartsTooltip/ChartsTooltipTable.js +9 -4
- package/node/ChartsTooltip/DefaultChartsAxisTooltipContent.js +3 -4
- package/node/ChartsTooltip/DefaultChartsItemTooltipContent.js +3 -4
- package/node/ChartsTooltip/chartsTooltipClasses.js +1 -1
- package/node/ChartsTooltip/utils.js +2 -3
- package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
- package/node/ChartsXAxis/ChartsXAxis.js +8 -4
- package/node/ChartsYAxis/ChartsYAxis.js +8 -4
- package/node/Gauge/Gauge.js +2 -3
- package/node/Gauge/GaugeContainer.js +2 -3
- package/node/Gauge/GaugeProvider.js +1 -2
- package/node/Gauge/GaugeReferenceArc.js +2 -3
- package/node/Gauge/GaugeValueArc.js +2 -3
- package/node/Gauge/GaugeValueText.js +2 -3
- package/node/Gauge/gaugeClasses.js +1 -1
- package/node/LineChart/AnimatedArea.js +30 -14
- package/node/LineChart/AnimatedLine.js +30 -14
- package/node/LineChart/AreaElement.js +2 -3
- package/node/LineChart/AreaPlot.js +78 -74
- package/node/LineChart/LineChart.js +14 -4
- package/node/LineChart/LineElement.js +2 -3
- package/node/LineChart/LineHighlightElement.js +2 -3
- package/node/LineChart/LineHighlightPlot.js +2 -3
- package/node/LineChart/LinePlot.js +60 -56
- package/node/LineChart/MarkElement.js +2 -3
- package/node/LineChart/MarkPlot.js +2 -3
- package/node/LineChart/formatter.js +1 -1
- package/node/LineChart/plugin.js +1 -1
- package/node/LineChart/useLineChartProps.js +1 -1
- package/node/PieChart/PieArc.js +2 -3
- package/node/PieChart/PieArcLabel.js +2 -3
- package/node/PieChart/PieArcLabelPlot.js +2 -3
- package/node/PieChart/PieArcPlot.js +2 -3
- package/node/PieChart/PieChart.js +13 -3
- package/node/PieChart/PiePlot.js +2 -3
- package/node/PieChart/dataTransform/useTransformData.js +2 -3
- package/node/PieChart/formatter.js +1 -1
- package/node/PieChart/plugin.js +1 -1
- package/node/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -3
- package/node/ResponsiveChartContainer/useChartContainerDimensions.js +2 -3
- package/node/ResponsiveChartContainer/useResponsiveChartContainerProps.js +1 -1
- package/node/ScatterChart/Scatter.js +2 -3
- package/node/ScatterChart/ScatterChart.js +14 -4
- package/node/ScatterChart/ScatterPlot.js +2 -3
- package/node/ScatterChart/plugin.js +1 -1
- package/node/ScatterChart/useScatterChartProps.js +1 -1
- package/node/SparkLineChart/SparkLineChart.js +2 -3
- package/node/context/CartesianProvider/CartesianContext.js +1 -2
- package/node/context/CartesianProvider/CartesianProvider.js +1 -2
- package/node/context/CartesianProvider/computeValue.js +1 -1
- package/node/context/CartesianProvider/defaultizeAxis.js +1 -1
- package/node/context/CartesianProvider/useCartesianContext.js +1 -2
- package/node/context/DrawingProvider.js +2 -3
- package/node/context/HighlightedProvider/HighlightedContext.js +1 -2
- package/node/context/HighlightedProvider/HighlightedProvider.js +2 -3
- package/node/context/HighlightedProvider/useHighlighted.js +1 -2
- package/node/context/InteractionProvider.js +2 -3
- package/node/context/PluginProvider/PluginContext.js +1 -2
- package/node/context/PluginProvider/PluginProvider.js +1 -2
- package/node/context/PluginProvider/useColorProcessor.js +1 -2
- package/node/context/PluginProvider/useSeriesFormatter.js +1 -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 +1 -2
- package/node/context/SeriesProvider/processSeries.js +1 -1
- package/node/context/ZAxisContextProvider.js +2 -3
- package/node/hooks/useAxisEvents.js +1 -2
- package/node/hooks/useChartDimensions.js +2 -3
- package/node/hooks/useChartId.js +1 -2
- package/node/hooks/useColorScale.js +1 -2
- package/node/hooks/useDrawingArea.js +1 -2
- package/node/hooks/useInteractionItemProps.js +1 -2
- package/node/hooks/useMounted.js +2 -3
- package/node/hooks/useReducedMotion.js +14 -12
- package/node/hooks/useSeries.js +1 -2
- package/node/hooks/useSvgRef.js +1 -2
- package/node/hooks/useTicks.js +1 -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/node/internals/useAnimatedPath.js +0 -42
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { useCartesianContext } from
|
|
5
|
-
import { ChartsXAxis } from
|
|
6
|
-
import { ChartsYAxis } from
|
|
4
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
5
|
+
import { ChartsXAxis } from "../ChartsXAxis/index.js";
|
|
6
|
+
import { ChartsYAxis } from "../ChartsYAxis/index.js";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const getAxisId = (propsValue, defaultAxisId) => {
|
|
9
9
|
if (propsValue == null) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./ChartsAxis.js";
|
|
2
|
+
export * from "./axisClasses.js";
|
|
@@ -5,10 +5,10 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
5
5
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
6
6
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
7
7
|
import { styled } from '@mui/material/styles';
|
|
8
|
-
import { InteractionContext } from
|
|
9
|
-
import { useCartesianContext } from
|
|
10
|
-
import { getValueToPositionMapper } from
|
|
11
|
-
import { isBandScale } from
|
|
8
|
+
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
9
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
10
|
+
import { getValueToPositionMapper } from "../hooks/useScale.js";
|
|
11
|
+
import { isBandScale } from "../internals/isBandScale.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
export function getAxisHighlightUtilityClass(slot) {
|
|
14
14
|
return generateUtilityClass('MuiChartsAxisHighlight', slot);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsAxisHighlight.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { useDrawingArea } from
|
|
4
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
/**
|
|
7
7
|
* API:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsClipPath.js";
|
|
@@ -4,32 +4,14 @@ const _excluded = ["vertical", "horizontal"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
|
-
import {
|
|
8
|
-
import { useCartesianContext } from
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
8
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
9
|
+
import { getChartsGridUtilityClass } from "./chartsGridClasses.js";
|
|
10
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
11
|
+
import { GridRoot } from "./styledCommonents.js";
|
|
12
|
+
import { ChartsGridVertical } from "./ChartsVerticalGrid.js";
|
|
13
|
+
import { ChartsGridHorizontal } from "./ChartsHorizontalGrid.js";
|
|
12
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const GridRoot = styled('g', {
|
|
14
|
-
name: 'MuiChartsGrid',
|
|
15
|
-
slot: 'Root',
|
|
16
|
-
overridesResolver: (props, styles) => [{
|
|
17
|
-
[`&.${chartsGridClasses.verticalLine}`]: styles.verticalLine
|
|
18
|
-
}, {
|
|
19
|
-
[`&.${chartsGridClasses.horizontalLine}`]: styles.horizontalLine
|
|
20
|
-
}, styles.root]
|
|
21
|
-
})({});
|
|
22
|
-
const GridLine = styled('line', {
|
|
23
|
-
name: 'MuiChartsGrid',
|
|
24
|
-
slot: 'Line',
|
|
25
|
-
overridesResolver: (props, styles) => styles.line
|
|
26
|
-
})(({
|
|
27
|
-
theme
|
|
28
|
-
}) => ({
|
|
29
|
-
stroke: (theme.vars || theme).palette.divider,
|
|
30
|
-
shapeRendering: 'crispEdges',
|
|
31
|
-
strokeWidth: 1
|
|
32
|
-
}));
|
|
33
15
|
const useUtilityClasses = ({
|
|
34
16
|
classes
|
|
35
17
|
}) => {
|
|
@@ -67,49 +49,19 @@ function ChartsGrid(inProps) {
|
|
|
67
49
|
yAxisIds
|
|
68
50
|
} = useCartesianContext();
|
|
69
51
|
const classes = useUtilityClasses(props);
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const {
|
|
73
|
-
scale: xScale,
|
|
74
|
-
tickNumber: xTickNumber,
|
|
75
|
-
tickInterval: xTickInterval
|
|
76
|
-
} = xAxis[verticalAxisId];
|
|
77
|
-
const {
|
|
78
|
-
scale: yScale,
|
|
79
|
-
tickNumber: yTickNumber,
|
|
80
|
-
tickInterval: yTickInterval
|
|
81
|
-
} = yAxis[horizontalAxisId];
|
|
82
|
-
const xTicks = useTicks({
|
|
83
|
-
scale: xScale,
|
|
84
|
-
tickNumber: xTickNumber,
|
|
85
|
-
tickInterval: xTickInterval
|
|
86
|
-
});
|
|
87
|
-
const yTicks = useTicks({
|
|
88
|
-
scale: yScale,
|
|
89
|
-
tickNumber: yTickNumber,
|
|
90
|
-
tickInterval: yTickInterval
|
|
91
|
-
});
|
|
52
|
+
const horizontalAxis = yAxis[yAxisIds[0]];
|
|
53
|
+
const verticalAxis = xAxis[xAxisIds[0]];
|
|
92
54
|
return /*#__PURE__*/_jsxs(GridRoot, _extends({}, other, {
|
|
93
55
|
className: classes.root,
|
|
94
|
-
children: [vertical &&
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}, `vertical-${formattedValue}`)), horizontal && yTicks.map(({
|
|
104
|
-
formattedValue,
|
|
105
|
-
offset
|
|
106
|
-
}) => /*#__PURE__*/_jsx(GridLine, {
|
|
107
|
-
y1: offset,
|
|
108
|
-
y2: offset,
|
|
109
|
-
x1: drawingArea.left,
|
|
110
|
-
x2: drawingArea.left + drawingArea.width,
|
|
111
|
-
className: classes.horizontalLine
|
|
112
|
-
}, `horizontal-${formattedValue}`))]
|
|
56
|
+
children: [vertical && /*#__PURE__*/_jsx(ChartsGridVertical, {
|
|
57
|
+
axis: verticalAxis,
|
|
58
|
+
drawingArea: drawingArea,
|
|
59
|
+
classes: classes
|
|
60
|
+
}), horizontal && /*#__PURE__*/_jsx(ChartsGridHorizontal, {
|
|
61
|
+
axis: horizontalAxis,
|
|
62
|
+
drawingArea: drawingArea,
|
|
63
|
+
classes: classes
|
|
64
|
+
})]
|
|
113
65
|
}));
|
|
114
66
|
}
|
|
115
67
|
process.env.NODE_ENV !== "production" ? ChartsGrid.propTypes = {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTicks } from "../hooks/useTicks.js";
|
|
3
|
+
import { GridLine } from "./styledCommonents.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
/**
|
|
6
|
+
* @ignore - internal component.
|
|
7
|
+
*/
|
|
8
|
+
export function ChartsGridHorizontal(props) {
|
|
9
|
+
const {
|
|
10
|
+
axis,
|
|
11
|
+
drawingArea,
|
|
12
|
+
classes
|
|
13
|
+
} = props;
|
|
14
|
+
const {
|
|
15
|
+
scale,
|
|
16
|
+
tickNumber,
|
|
17
|
+
tickInterval
|
|
18
|
+
} = axis;
|
|
19
|
+
const yTicks = useTicks({
|
|
20
|
+
scale,
|
|
21
|
+
tickNumber,
|
|
22
|
+
tickInterval
|
|
23
|
+
});
|
|
24
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
25
|
+
children: yTicks.map(({
|
|
26
|
+
formattedValue,
|
|
27
|
+
offset
|
|
28
|
+
}) => /*#__PURE__*/_jsx(GridLine, {
|
|
29
|
+
y1: offset,
|
|
30
|
+
y2: offset,
|
|
31
|
+
x1: drawingArea.left,
|
|
32
|
+
x2: drawingArea.left + drawingArea.width,
|
|
33
|
+
className: classes.horizontalLine
|
|
34
|
+
}, `horizontal-${formattedValue}`))
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTicks } from "../hooks/useTicks.js";
|
|
3
|
+
import { GridLine } from "./styledCommonents.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
/**
|
|
6
|
+
* @ignore - internal component.
|
|
7
|
+
*/
|
|
8
|
+
export function ChartsGridVertical(props) {
|
|
9
|
+
const {
|
|
10
|
+
axis,
|
|
11
|
+
drawingArea,
|
|
12
|
+
classes
|
|
13
|
+
} = props;
|
|
14
|
+
const {
|
|
15
|
+
scale,
|
|
16
|
+
tickNumber,
|
|
17
|
+
tickInterval
|
|
18
|
+
} = axis;
|
|
19
|
+
const xTicks = useTicks({
|
|
20
|
+
scale,
|
|
21
|
+
tickNumber,
|
|
22
|
+
tickInterval
|
|
23
|
+
});
|
|
24
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
25
|
+
children: xTicks.map(({
|
|
26
|
+
formattedValue,
|
|
27
|
+
offset
|
|
28
|
+
}) => /*#__PURE__*/_jsx(GridLine, {
|
|
29
|
+
y1: drawingArea.top,
|
|
30
|
+
y2: drawingArea.top + drawingArea.height,
|
|
31
|
+
x1: offset,
|
|
32
|
+
x2: offset,
|
|
33
|
+
className: classes.verticalLine
|
|
34
|
+
}, `vertical-${formattedValue}`))
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./ChartsGrid.js";
|
|
2
|
+
export * from "./chartsGridClasses.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { styled } from '@mui/material/styles';
|
|
2
|
+
import { chartsGridClasses } from "./chartsGridClasses.js";
|
|
3
|
+
export const GridRoot = styled('g', {
|
|
4
|
+
name: 'MuiChartsGrid',
|
|
5
|
+
slot: 'Root',
|
|
6
|
+
overridesResolver: (props, styles) => [{
|
|
7
|
+
[`&.${chartsGridClasses.verticalLine}`]: styles.verticalLine
|
|
8
|
+
}, {
|
|
9
|
+
[`&.${chartsGridClasses.horizontalLine}`]: styles.horizontalLine
|
|
10
|
+
}, styles.root]
|
|
11
|
+
})({});
|
|
12
|
+
export const GridLine = styled('line', {
|
|
13
|
+
name: 'MuiChartsGrid',
|
|
14
|
+
slot: 'Line',
|
|
15
|
+
overridesResolver: (props, styles) => styles.line
|
|
16
|
+
})(({
|
|
17
|
+
theme
|
|
18
|
+
}) => ({
|
|
19
|
+
stroke: (theme.vars || theme).palette.divider,
|
|
20
|
+
shapeRendering: 'crispEdges',
|
|
21
|
+
strokeWidth: 1
|
|
22
|
+
}));
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["slots", "slotProps"];
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
5
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
6
8
|
import { useThemeProps, useTheme } from '@mui/material/styles';
|
|
7
|
-
import { getSeriesToDisplay } from
|
|
8
|
-
import { getLegendUtilityClass } from
|
|
9
|
-
import { DefaultChartsLegend } from
|
|
10
|
-
import { useDrawingArea } from
|
|
11
|
-
import { useSeries } from
|
|
9
|
+
import { getSeriesToDisplay } from "./utils.js";
|
|
10
|
+
import { getLegendUtilityClass } from "./chartsLegendClasses.js";
|
|
11
|
+
import { DefaultChartsLegend } from "./DefaultChartsLegend.js";
|
|
12
|
+
import { useDrawingArea } from "../hooks/index.js";
|
|
13
|
+
import { useSeries } from "../hooks/useSeries.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
const useUtilityClasses = ownerState => {
|
|
14
16
|
const {
|
|
@@ -23,27 +25,26 @@ const useUtilityClasses = ownerState => {
|
|
|
23
25
|
};
|
|
24
26
|
return composeClasses(slots, getLegendUtilityClass, classes);
|
|
25
27
|
};
|
|
26
|
-
const defaultProps = {
|
|
27
|
-
position: {
|
|
28
|
-
horizontal: 'middle',
|
|
29
|
-
vertical: 'top'
|
|
30
|
-
},
|
|
31
|
-
direction: 'row'
|
|
32
|
-
};
|
|
33
28
|
function ChartsLegend(inProps) {
|
|
34
29
|
const props = useThemeProps({
|
|
35
|
-
props:
|
|
30
|
+
props: inProps,
|
|
36
31
|
name: 'MuiChartsLegend'
|
|
37
32
|
});
|
|
33
|
+
const defaultizedProps = _extends({
|
|
34
|
+
direction: 'row'
|
|
35
|
+
}, props, {
|
|
36
|
+
position: _extends({
|
|
37
|
+
horizontal: 'middle',
|
|
38
|
+
vertical: 'top'
|
|
39
|
+
}, props.position)
|
|
40
|
+
});
|
|
38
41
|
const {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
slotProps
|
|
44
|
-
} = props;
|
|
42
|
+
slots,
|
|
43
|
+
slotProps
|
|
44
|
+
} = defaultizedProps,
|
|
45
|
+
other = _objectWithoutPropertiesLoose(defaultizedProps, _excluded);
|
|
45
46
|
const theme = useTheme();
|
|
46
|
-
const classes = useUtilityClasses(_extends({},
|
|
47
|
+
const classes = useUtilityClasses(_extends({}, defaultizedProps, {
|
|
47
48
|
theme
|
|
48
49
|
}));
|
|
49
50
|
const drawingArea = useDrawingArea();
|
|
@@ -53,15 +54,12 @@ function ChartsLegend(inProps) {
|
|
|
53
54
|
const chartLegendRenderProps = useSlotProps({
|
|
54
55
|
elementType: ChartLegendRender,
|
|
55
56
|
externalSlotProps: slotProps?.legend,
|
|
56
|
-
additionalProps: {
|
|
57
|
-
position,
|
|
58
|
-
direction,
|
|
57
|
+
additionalProps: _extends({}, other, {
|
|
59
58
|
classes,
|
|
60
59
|
drawingArea,
|
|
61
60
|
series,
|
|
62
|
-
hidden,
|
|
63
61
|
seriesToDisplay
|
|
64
|
-
},
|
|
62
|
+
}),
|
|
65
63
|
ownerState: {}
|
|
66
64
|
});
|
|
67
65
|
return /*#__PURE__*/_jsx(ChartLegendRender, _extends({}, chartLegendRenderProps));
|
|
@@ -85,6 +83,42 @@ process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
|
|
|
85
83
|
* @default false
|
|
86
84
|
*/
|
|
87
85
|
hidden: PropTypes.bool,
|
|
86
|
+
/**
|
|
87
|
+
* Space between two legend items (in px).
|
|
88
|
+
* @default 10
|
|
89
|
+
*/
|
|
90
|
+
itemGap: PropTypes.number,
|
|
91
|
+
/**
|
|
92
|
+
* Height of the item mark (in px).
|
|
93
|
+
* @default 20
|
|
94
|
+
*/
|
|
95
|
+
itemMarkHeight: PropTypes.number,
|
|
96
|
+
/**
|
|
97
|
+
* Width of the item mark (in px).
|
|
98
|
+
* @default 20
|
|
99
|
+
*/
|
|
100
|
+
itemMarkWidth: PropTypes.number,
|
|
101
|
+
/**
|
|
102
|
+
* Style applied to legend labels.
|
|
103
|
+
* @default theme.typography.subtitle1
|
|
104
|
+
*/
|
|
105
|
+
labelStyle: PropTypes.object,
|
|
106
|
+
/**
|
|
107
|
+
* Space between the mark and the label (in px).
|
|
108
|
+
* @default 5
|
|
109
|
+
*/
|
|
110
|
+
markGap: PropTypes.number,
|
|
111
|
+
/**
|
|
112
|
+
* Legend padding (in px).
|
|
113
|
+
* Can either be a single number, or an object with top, left, bottom, right properties.
|
|
114
|
+
* @default 10
|
|
115
|
+
*/
|
|
116
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
117
|
+
bottom: PropTypes.number,
|
|
118
|
+
left: PropTypes.number,
|
|
119
|
+
right: PropTypes.number,
|
|
120
|
+
top: PropTypes.number
|
|
121
|
+
})]),
|
|
88
122
|
/**
|
|
89
123
|
* The position of the legend.
|
|
90
124
|
*/
|
|
@@ -3,13 +3,13 @@ import * as React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useTheme } from '@mui/material/styles';
|
|
5
5
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
6
|
-
import ChartsContinuousGradient from
|
|
7
|
-
import { useChartId, useDrawingArea } from
|
|
8
|
-
import { getScale } from
|
|
9
|
-
import { getPercentageValue } from
|
|
10
|
-
import { ChartsText } from
|
|
11
|
-
import { getStringSize } from
|
|
12
|
-
import { useAxis } from
|
|
6
|
+
import ChartsContinuousGradient from "../internals/components/ChartsAxesGradients/ChartsContinuousGradient.js";
|
|
7
|
+
import { useChartId, useDrawingArea } from "../hooks/index.js";
|
|
8
|
+
import { getScale } from "../internals/getScale.js";
|
|
9
|
+
import { getPercentageValue } from "../internals/getPercentageValue.js";
|
|
10
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
11
|
+
import { getStringSize } from "../internals/domUtils.js";
|
|
12
|
+
import { useAxis } from "./useAxis.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
function getPositionOffset(position, legendBox, svgBox) {
|
|
15
15
|
let offsetX = 0;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["drawingArea", "seriesToDisplay"];
|
|
3
|
+
const _excluded = ["drawingArea", "seriesToDisplay", "hidden"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { LegendPerItem } from
|
|
6
|
+
import { LegendPerItem } from "./LegendPerItem.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
function DefaultChartsLegend(props) {
|
|
9
9
|
const {
|
|
10
|
-
seriesToDisplay
|
|
10
|
+
seriesToDisplay,
|
|
11
|
+
hidden
|
|
11
12
|
} = props,
|
|
12
13
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
14
|
+
if (hidden) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
13
17
|
return /*#__PURE__*/_jsx(LegendPerItem, _extends({}, other, {
|
|
14
18
|
itemsToDisplay: seriesToDisplay
|
|
15
19
|
}));
|
|
@@ -5,10 +5,10 @@ import * as React from 'react';
|
|
|
5
5
|
import NoSsr from '@mui/material/NoSsr';
|
|
6
6
|
import { useTheme, styled } from '@mui/material/styles';
|
|
7
7
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
8
|
-
import { ChartsText } from
|
|
9
|
-
import { getWordsByLines } from
|
|
10
|
-
import { legendItemPlacements } from
|
|
11
|
-
import { useDrawingArea } from
|
|
8
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
9
|
+
import { getWordsByLines } from "../internals/getWordsByLines.js";
|
|
10
|
+
import { legendItemPlacements } from "./legendItemsPlacement.js";
|
|
11
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
export const ChartsLegendRoot = styled('g', {
|
|
14
14
|
name: 'MuiChartsLegend',
|
|
@@ -42,7 +42,6 @@ const getStandardizedPadding = padding => {
|
|
|
42
42
|
*/
|
|
43
43
|
export function LegendPerItem(props) {
|
|
44
44
|
const {
|
|
45
|
-
hidden,
|
|
46
45
|
position,
|
|
47
46
|
direction,
|
|
48
47
|
itemsToDisplay,
|
|
@@ -108,9 +107,6 @@ export function LegendPerItem(props) {
|
|
|
108
107
|
return (totalHeight - legendHeight) / 2;
|
|
109
108
|
}
|
|
110
109
|
}, [position.vertical, padding.top, padding.bottom, totalHeight, legendHeight]);
|
|
111
|
-
if (hidden) {
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
110
|
return /*#__PURE__*/_jsx(NoSsr, {
|
|
115
111
|
children: /*#__PURE__*/_jsx(ChartsLegendRoot, {
|
|
116
112
|
className: classes?.root,
|
|
@@ -3,9 +3,9 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["axisDirection", "axisId", "hideFirst", "hideLast", "labelFormatter"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { useAxis } from
|
|
7
|
-
import { LegendPerItem } from
|
|
8
|
-
import { notNull } from
|
|
6
|
+
import { useAxis } from "./useAxis.js";
|
|
7
|
+
import { LegendPerItem } from "./LegendPerItem.js";
|
|
8
|
+
import { notNull } from "../internals/notNull.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
function defaultLabelFormatter(params) {
|
|
11
11
|
if (params.min === null) {
|
|
@@ -93,11 +93,6 @@ process.env.NODE_ENV !== "production" ? PiecewiseColorLegend.propTypes = {
|
|
|
93
93
|
* The default depends on the chart.
|
|
94
94
|
*/
|
|
95
95
|
direction: PropTypes.oneOf(['column', 'row']).isRequired,
|
|
96
|
-
/**
|
|
97
|
-
* Set to true to hide the legend.
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
hidden: PropTypes.bool,
|
|
101
96
|
/**
|
|
102
97
|
* Hide the first item of the legend, corresponding to the [-infinity, min] piece.
|
|
103
98
|
* @default false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export * from "./ChartsLegend.js";
|
|
2
|
+
export * from "./DefaultChartsLegend.js";
|
|
3
|
+
export * from "./ContinuousColorLegend.js";
|
|
4
|
+
export * from "./PiecewiseColorLegend.js";
|
|
5
|
+
export * from "./chartsLegendClasses.js";
|
|
6
|
+
export * from "./utils.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ZAxisContext } from
|
|
3
|
-
import { useCartesianContext } from
|
|
2
|
+
import { ZAxisContext } from "../context/ZAxisContextProvider.js";
|
|
3
|
+
import { useCartesianContext } from "../context/CartesianProvider/useCartesianContext.js";
|
|
4
4
|
/**
|
|
5
5
|
* Helper to select an axis definition according to its direction and id.
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import getBarLegend from
|
|
2
|
-
import getScatterLegend from
|
|
3
|
-
import getLineLegend from
|
|
4
|
-
import getPieLegend from
|
|
1
|
+
import getBarLegend from "../BarChart/legend.js";
|
|
2
|
+
import getScatterLegend from "../ScatterChart/legend.js";
|
|
3
|
+
import getLineLegend from "../LineChart/legend.js";
|
|
4
|
+
import getPieLegend from "../PieChart/legend.js";
|
|
5
5
|
const legendGetter = {
|
|
6
6
|
bar: getBarLegend,
|
|
7
7
|
scatter: getScatterLegend,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { InteractionContext } from
|
|
4
|
-
import { useSeries } from
|
|
5
|
-
import { useSvgRef } from
|
|
6
|
-
import { useCartesianContext } from
|
|
3
|
+
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
4
|
+
import { useSeries } from "../hooks/useSeries.js";
|
|
5
|
+
import { useSvgRef } from "../hooks/index.js";
|
|
6
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
function ChartsOnAxisClickHandler(props) {
|
|
9
9
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsOnAxisClickHandler.js";
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
const _excluded = ["message"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { useDrawingArea } from
|
|
6
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const StyledText = styled('text')(({
|
|
9
9
|
theme
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
const _excluded = ["message"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { useDrawingArea } from
|
|
6
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const StyledText = styled('text')(({
|
|
9
9
|
theme
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { ChartsLoadingOverlay } from
|
|
4
|
-
import { useSeries } from
|
|
5
|
-
import { ChartsNoDataOverlay } from
|
|
3
|
+
import { ChartsLoadingOverlay } from "./ChartsLoadingOverlay.js";
|
|
4
|
+
import { useSeries } from "../hooks/useSeries.js";
|
|
5
|
+
import { ChartsNoDataOverlay } from "./ChartsNoDataOverlay.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export function useNoData() {
|
|
8
8
|
const seriesPerType = useSeries();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ChartsOverlay } from
|
|
2
|
-
export { ChartsLoadingOverlay } from
|
|
3
|
-
export { ChartsNoDataOverlay } from
|
|
1
|
+
export { ChartsOverlay } from "./ChartsOverlay.js";
|
|
2
|
+
export { ChartsLoadingOverlay } from "./ChartsLoadingOverlay.js";
|
|
3
|
+
export { ChartsNoDataOverlay } from "./ChartsNoDataOverlay.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { ChartsXReferenceLine } from
|
|
5
|
-
import { ChartsYReferenceLine } from
|
|
4
|
+
import { ChartsXReferenceLine } from "./ChartsXReferenceLine.js";
|
|
5
|
+
import { ChartsYReferenceLine } from "./ChartsYReferenceLine.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
function ChartsReferenceLine(props) {
|
|
8
8
|
const {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
-
import { useDrawingArea, useXScale } from
|
|
5
|
-
import { ReferenceLineRoot } from
|
|
6
|
-
import { ChartsText } from
|
|
7
|
-
import { getReferenceLineUtilityClass } from
|
|
8
|
-
import { warnOnce } from
|
|
4
|
+
import { useDrawingArea, useXScale } from "../hooks/index.js";
|
|
5
|
+
import { ReferenceLineRoot } from "./common.js";
|
|
6
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
7
|
+
import { getReferenceLineUtilityClass } from "./chartsReferenceLineClasses.js";
|
|
8
|
+
import { warnOnce } from "../internals/warning.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const getTextParams = ({
|
|
11
11
|
top,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
-
import { useDrawingArea, useYScale } from
|
|
5
|
-
import { ReferenceLineRoot } from
|
|
6
|
-
import { ChartsText } from
|
|
7
|
-
import { getReferenceLineUtilityClass } from
|
|
8
|
-
import { warnOnce } from
|
|
4
|
+
import { useDrawingArea, useYScale } from "../hooks/index.js";
|
|
5
|
+
import { ReferenceLineRoot } from "./common.js";
|
|
6
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
7
|
+
import { getReferenceLineUtilityClass } from "./chartsReferenceLineClasses.js";
|
|
8
|
+
import { warnOnce } from "../internals/warning.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const getTextParams = ({
|
|
11
11
|
left,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
-
import { referenceLineClasses } from
|
|
3
|
+
import { referenceLineClasses } from "./chartsReferenceLineClasses.js";
|
|
4
4
|
export const ReferenceLineRoot = styled('g')(({
|
|
5
5
|
theme
|
|
6
6
|
}) => ({
|