@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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const GridRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").SVGProps<SVGGElement>, keyof import("react").SVGProps<SVGGElement>>, {}>;
|
|
2
|
+
export declare const GridLine: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").SVGLineElementAttributes<SVGLineElement>, keyof import("react").SVGLineElementAttributes<SVGLineElement>>, {}>;
|
|
@@ -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,27 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ChartsLegendClasses } from './chartsLegendClasses';
|
|
3
2
|
import { LegendRendererProps } from './DefaultChartsLegend';
|
|
4
3
|
import { LegendPlacement } from './legend.types';
|
|
4
|
+
export type ChartsLegendPropsBase = Omit<LegendRendererProps, keyof LegendPlacement | 'series' | 'seriesToDisplay' | 'drawingArea'> & LegendPlacement;
|
|
5
5
|
export interface ChartsLegendSlots {
|
|
6
6
|
/**
|
|
7
7
|
* Custom rendering of the legend.
|
|
8
8
|
* @default DefaultChartsLegend
|
|
9
9
|
*/
|
|
10
|
-
legend?: React.JSXElementConstructor<
|
|
10
|
+
legend?: React.JSXElementConstructor<ChartsLegendPropsBase>;
|
|
11
11
|
}
|
|
12
12
|
export interface ChartsLegendSlotProps {
|
|
13
|
-
legend?: Partial<
|
|
13
|
+
legend?: Partial<ChartsLegendPropsBase>;
|
|
14
14
|
}
|
|
15
|
-
export interface ChartsLegendProps extends
|
|
16
|
-
/**
|
|
17
|
-
* Override or extend the styles applied to the component.
|
|
18
|
-
*/
|
|
19
|
-
classes?: Partial<ChartsLegendClasses>;
|
|
20
|
-
/**
|
|
21
|
-
* Set to true to hide the legend.
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
hidden?: boolean;
|
|
15
|
+
export interface ChartsLegendProps extends ChartsLegendPropsBase {
|
|
25
16
|
/**
|
|
26
17
|
* Overridable component slots.
|
|
27
18
|
* @default {}
|
|
@@ -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;
|
|
@@ -9,8 +9,13 @@ export interface LegendRendererProps extends Omit<LegendPerItemProps, 'itemsToDi
|
|
|
9
9
|
* @deprecated Use the `useDrawingArea` hook instead.
|
|
10
10
|
*/
|
|
11
11
|
drawingArea: Omit<DrawingArea, 'isPointInside'>;
|
|
12
|
+
/**
|
|
13
|
+
* Set to true to hide the legend.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
hidden?: boolean;
|
|
12
17
|
}
|
|
13
|
-
declare function DefaultChartsLegend(props: LegendRendererProps): React.JSX.Element;
|
|
18
|
+
declare function DefaultChartsLegend(props: LegendRendererProps): React.JSX.Element | null;
|
|
14
19
|
declare namespace DefaultChartsLegend {
|
|
15
20
|
var propTypes: any;
|
|
16
21
|
}
|
|
@@ -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
|
}));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DrawingArea } from '../context/DrawingProvider';
|
|
3
|
-
import { DefaultizedProps } from '../models/helpers';
|
|
4
3
|
import { ChartsTextStyle } from '../ChartsText';
|
|
5
4
|
import { CardinalDirections } from '../models/layout';
|
|
6
|
-
import type { ChartsLegendProps } from './ChartsLegend';
|
|
7
5
|
import { LegendItemParams } from './chartsLegend.types';
|
|
8
|
-
import { AnchorPosition, Direction } from './legend.types';
|
|
6
|
+
import { AnchorPosition, Direction, LegendPlacement } from './legend.types';
|
|
7
|
+
import { ChartsLegendClasses } from './chartsLegendClasses';
|
|
8
|
+
import { DefaultizedProps } from '../models/helpers';
|
|
9
9
|
export type ChartsLegendRootOwnerState = {
|
|
10
10
|
position: AnchorPosition;
|
|
11
11
|
direction: Direction;
|
|
@@ -15,12 +15,15 @@ export type ChartsLegendRootOwnerState = {
|
|
|
15
15
|
seriesNumber: number;
|
|
16
16
|
};
|
|
17
17
|
export declare const ChartsLegendRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGProps<SVGGElement>, keyof React.SVGProps<SVGGElement>>, {}>;
|
|
18
|
-
export interface LegendPerItemProps extends DefaultizedProps<
|
|
18
|
+
export interface LegendPerItemProps extends DefaultizedProps<LegendPlacement, keyof LegendPlacement> {
|
|
19
19
|
/**
|
|
20
20
|
* The ordered array of item to display in the legend.
|
|
21
21
|
*/
|
|
22
22
|
itemsToDisplay: LegendItemParams[];
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Override or extend the styles applied to the component.
|
|
25
|
+
*/
|
|
26
|
+
classes?: Partial<ChartsLegendClasses>;
|
|
24
27
|
/**
|
|
25
28
|
* Style applied to legend labels.
|
|
26
29
|
* @default theme.typography.subtitle1
|
|
@@ -58,4 +61,4 @@ export interface LegendPerItemProps extends DefaultizedProps<Omit<ChartsLegendPr
|
|
|
58
61
|
* Used for series legend, and threshold color legend.
|
|
59
62
|
* @ignore - Do not document
|
|
60
63
|
*/
|
|
61
|
-
export declare function LegendPerItem(props: LegendPerItemProps): React.JSX.Element
|
|
64
|
+
export declare function LegendPerItem(props: LegendPerItemProps): React.JSX.Element;
|
|
@@ -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
|
package/ChartsLegend/index.js
CHANGED
|
@@ -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";
|
package/ChartsLegend/useAxis.js
CHANGED
|
@@ -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
|
*/
|
package/ChartsLegend/utils.js
CHANGED
|
@@ -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();
|
package/ChartsOverlay/index.js
CHANGED
|
@@ -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
|
}) => ({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./ChartsReferenceLine.js";
|
|
2
|
+
export * from "./chartsReferenceLineClasses.js";
|
|
@@ -4,7 +4,7 @@ const _excluded = ["children", "width", "height", "viewBox", "disableAxisListene
|
|
|
4
4
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { useAxisEvents } from
|
|
7
|
+
import { useAxisEvents } from "../hooks/useAxisEvents.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
const ChartChartsSurfaceStyles = styled('svg', {
|
|
10
10
|
name: 'MuiChartsSurface',
|
package/ChartsSurface/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsSurface.js";
|
package/ChartsText/ChartsText.js
CHANGED
|
@@ -4,7 +4,7 @@ const _excluded = ["x", "y", "style", "text", "ownerState"],
|
|
|
4
4
|
_excluded2 = ["angle", "textAnchor", "dominantBaseline"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { getWordsByLines } from
|
|
7
|
+
import { getWordsByLines } from "../internals/getWordsByLines.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
/**
|
|
10
10
|
* Helper component to manage multiline text in SVG
|
package/ChartsText/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ChartsText } from
|
|
1
|
+
export { ChartsText } from "./ChartsText.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
4
|
-
import { useCartesianContext } from
|
|
5
|
-
import { DefaultChartsAxisTooltipContent } from
|
|
6
|
-
import { ZAxisContext } from
|
|
7
|
-
import { useColorProcessor } from
|
|
8
|
-
import { isCartesianSeriesType } from
|
|
9
|
-
import { useSeries } from
|
|
4
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
5
|
+
import { DefaultChartsAxisTooltipContent } from "./DefaultChartsAxisTooltipContent.js";
|
|
6
|
+
import { ZAxisContext } from "../context/ZAxisContextProvider.js";
|
|
7
|
+
import { useColorProcessor } from "../context/PluginProvider/useColorProcessor.js";
|
|
8
|
+
import { isCartesianSeriesType } from "../internals/isCartesian.js";
|
|
9
|
+
import { useSeries } from "../hooks/useSeries.js";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
/**
|
|
12
12
|
* @ignore - internal component.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
4
|
-
import { DefaultChartsItemTooltipContent } from
|
|
5
|
-
import { useCartesianContext } from
|
|
6
|
-
import { ZAxisContext } from
|
|
7
|
-
import { useColorProcessor } from
|
|
8
|
-
import { useSeries } from
|
|
4
|
+
import { DefaultChartsItemTooltipContent } from "./DefaultChartsItemTooltipContent.js";
|
|
5
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
6
|
+
import { ZAxisContext } from "../context/ZAxisContextProvider.js";
|
|
7
|
+
import { useColorProcessor } from "../context/PluginProvider/useColorProcessor.js";
|
|
8
|
+
import { useSeries } from "../hooks/useSeries.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
/**
|
|
11
11
|
* @ignore - internal component.
|
|
@@ -40,7 +40,7 @@ export interface ChartsTooltipProps<T extends ChartSeriesType> {
|
|
|
40
40
|
* - 'item': Shows data about the item below the mouse.
|
|
41
41
|
* - 'axis': Shows values associated with the hovered x value
|
|
42
42
|
* - 'none': Does not display tooltip
|
|
43
|
-
* @default '
|
|
43
|
+
* @default 'axis'
|
|
44
44
|
*/
|
|
45
45
|
trigger?: TriggerOptions;
|
|
46
46
|
/**
|
|
@@ -77,7 +77,7 @@ export interface ChartsTooltipProps<T extends ChartSeriesType> {
|
|
|
77
77
|
*
|
|
78
78
|
* - [ChartsTooltip API](https://mui.com/x/api/charts/charts-tool-tip/)
|
|
79
79
|
*/
|
|
80
|
-
declare function ChartsTooltip<T extends ChartSeriesType>(
|
|
80
|
+
declare function ChartsTooltip<T extends ChartSeriesType>(inProps: ChartsTooltipProps<T>): React.JSX.Element | null;
|
|
81
81
|
declare namespace ChartsTooltip {
|
|
82
82
|
var propTypes: any;
|
|
83
83
|
}
|