@mui/x-charts 7.15.0 → 7.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.js +26 -12
- package/BarChart/BarClipPath.js +1 -1
- package/BarChart/BarElement.js +4 -2
- package/BarChart/BarLabel/BarLabel.js +3 -1
- package/BarChart/BarLabel/BarLabelItem.js +4 -4
- package/BarChart/BarLabel/BarLabelPlot.js +1 -1
- package/BarChart/BarLabel/index.js +2 -2
- package/BarChart/BarPlot.js +10 -8
- package/BarChart/checkScaleErrors.js +2 -2
- package/BarChart/formatter.js +2 -2
- package/BarChart/index.js +4 -4
- package/BarChart/legend.js +4 -3
- package/BarChart/plugin.js +3 -3
- package/BarChart/useBarChartProps.js +3 -1
- package/CHANGELOG.md +185 -1
- package/ChartContainer/ChartContainer.js +11 -9
- package/ChartContainer/index.js +1 -1
- package/ChartContainer/useChartContainerProps.js +4 -2
- package/ChartContainer/useDefaultizeAxis.js +3 -1
- package/ChartsAxis/ChartsAxis.js +5 -3
- package/ChartsAxis/index.js +2 -2
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +6 -4
- package/ChartsAxisHighlight/index.js +1 -1
- package/ChartsClipPath/ChartsClipPath.js +3 -1
- package/ChartsClipPath/index.js +1 -1
- package/ChartsGrid/ChartsGrid.js +20 -66
- package/ChartsGrid/ChartsHorizontalGrid.d.ts +14 -0
- package/ChartsGrid/ChartsHorizontalGrid.js +36 -0
- package/ChartsGrid/ChartsVerticalGrid.d.ts +14 -0
- package/ChartsGrid/ChartsVerticalGrid.js +36 -0
- package/ChartsGrid/index.js +2 -2
- package/ChartsGrid/styledCommonents.d.ts +2 -0
- package/ChartsGrid/styledCommonents.js +22 -0
- package/ChartsLegend/ChartsLegend.d.ts +4 -13
- package/ChartsLegend/ChartsLegend.js +70 -26
- package/ChartsLegend/ChartsLegendItem.d.ts +26 -0
- package/ChartsLegend/ChartsLegendItem.js +65 -0
- package/ChartsLegend/ContinuousColorLegend.js +9 -7
- package/ChartsLegend/DefaultChartsLegend.d.ts +15 -2
- package/ChartsLegend/DefaultChartsLegend.js +31 -5
- package/ChartsLegend/LegendPerItem.d.ts +10 -6
- package/ChartsLegend/LegendPerItem.js +22 -35
- package/ChartsLegend/PiecewiseColorLegend.d.ts +9 -1
- package/ChartsLegend/PiecewiseColorLegend.js +31 -15
- package/ChartsLegend/chartsLegend.types.d.ts +39 -1
- package/ChartsLegend/chartsLegendClasses.d.ts +2 -0
- package/ChartsLegend/chartsLegendClasses.js +1 -1
- package/ChartsLegend/index.js +6 -6
- package/ChartsLegend/useAxis.js +4 -2
- package/ChartsLegend/utils.js +4 -4
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +7 -5
- package/ChartsOnAxisClickHandler/index.js +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +3 -1
- package/ChartsOverlay/ChartsNoDataOverlay.js +3 -1
- package/ChartsOverlay/ChartsOverlay.js +5 -3
- package/ChartsOverlay/index.js +3 -3
- package/ChartsReferenceLine/ChartsReferenceLine.js +4 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.js +7 -5
- package/ChartsReferenceLine/ChartsYReferenceLine.js +7 -5
- package/ChartsReferenceLine/common.js +1 -1
- package/ChartsReferenceLine/index.js +2 -2
- package/ChartsSurface/ChartsSurface.js +3 -1
- package/ChartsSurface/index.js +1 -1
- package/ChartsText/ChartsText.js +3 -1
- package/ChartsText/index.js +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +6 -6
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
- package/ChartsTooltip/ChartsTooltip.d.ts +2 -2
- package/ChartsTooltip/ChartsTooltip.js +15 -11
- package/ChartsTooltip/ChartsTooltipTable.js +10 -5
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +7 -5
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +5 -3
- package/ChartsTooltip/chartsTooltipClasses.d.ts +2 -0
- package/ChartsTooltip/chartsTooltipClasses.js +1 -1
- package/ChartsTooltip/index.js +7 -7
- package/ChartsTooltip/utils.js +1 -1
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +9 -7
- package/ChartsVoronoiHandler/index.js +1 -1
- package/ChartsXAxis/ChartsXAxis.js +20 -13
- package/ChartsXAxis/index.js +1 -1
- package/ChartsYAxis/ChartsYAxis.js +17 -10
- package/ChartsYAxis/index.js +1 -1
- package/Gauge/Gauge.js +7 -5
- package/Gauge/GaugeContainer.js +6 -4
- package/Gauge/GaugeProvider.js +3 -3
- package/Gauge/GaugeReferenceArc.js +3 -1
- package/Gauge/GaugeValueArc.js +3 -1
- package/Gauge/GaugeValueText.js +4 -2
- package/Gauge/index.js +7 -7
- package/LineChart/AnimatedArea.js +33 -14
- package/LineChart/AnimatedLine.js +34 -15
- package/LineChart/AreaElement.js +5 -3
- package/LineChart/AreaPlot.js +85 -78
- package/LineChart/CircleMarkElement.d.ts +34 -0
- package/LineChart/CircleMarkElement.js +107 -0
- package/LineChart/LineChart.d.ts +4 -0
- package/LineChart/LineChart.js +33 -15
- package/LineChart/LineElement.js +5 -3
- package/LineChart/LineHighlightElement.js +2 -0
- package/LineChart/LineHighlightPlot.js +10 -8
- package/LineChart/LinePlot.js +67 -60
- package/LineChart/MarkElement.d.ts +1 -19
- package/LineChart/MarkElement.js +7 -23
- package/LineChart/MarkPlot.d.ts +6 -0
- package/LineChart/MarkPlot.js +22 -12
- package/LineChart/formatter.js +2 -2
- package/LineChart/index.d.ts +2 -0
- package/LineChart/index.js +12 -11
- package/LineChart/legend.js +4 -3
- package/LineChart/markElementClasses.d.ts +20 -0
- package/LineChart/markElementClasses.js +19 -0
- package/LineChart/plugin.js +3 -3
- package/LineChart/useLineChartProps.js +8 -4
- package/PieChart/PieArc.js +3 -1
- package/PieChart/PieArcLabel.js +2 -0
- package/PieChart/PieArcLabelPlot.js +6 -4
- package/PieChart/PieArcPlot.js +6 -4
- package/PieChart/PieChart.js +22 -8
- package/PieChart/PiePlot.js +8 -6
- package/PieChart/dataTransform/useTransformData.js +3 -1
- package/PieChart/formatter.js +1 -1
- package/PieChart/getPieCoordinates.js +1 -1
- package/PieChart/index.js +7 -7
- package/PieChart/legend.js +4 -2
- package/PieChart/plugin.js +2 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +5 -3
- package/ResponsiveChartContainer/index.js +1 -1
- package/ResponsiveChartContainer/useChartContainerDimensions.js +3 -1
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -1
- package/ScatterChart/Scatter.js +7 -5
- package/ScatterChart/ScatterChart.js +26 -12
- package/ScatterChart/ScatterPlot.js +7 -5
- package/ScatterChart/formatter.js +1 -1
- package/ScatterChart/index.js +3 -3
- package/ScatterChart/legend.js +4 -3
- package/ScatterChart/plugin.js +3 -3
- package/ScatterChart/useScatterChartProps.js +2 -0
- package/SparkLineChart/SparkLineChart.js +8 -6
- package/SparkLineChart/index.js +1 -1
- package/colorPalettes/index.js +1 -1
- package/context/CartesianProvider/CartesianProvider.js +8 -6
- package/context/CartesianProvider/computeValue.js +6 -6
- package/context/CartesianProvider/defaultizeAxis.js +1 -1
- package/context/CartesianProvider/index.js +5 -5
- package/context/CartesianProvider/useCartesianContext.js +3 -1
- package/context/DrawingProvider.js +3 -1
- package/context/HighlightedProvider/HighlightedProvider.js +6 -4
- package/context/HighlightedProvider/index.js +4 -4
- package/context/HighlightedProvider/useHighlighted.js +3 -1
- package/context/HighlightedProvider/useItemHighlighted.js +3 -1
- package/context/InteractionProvider.js +2 -0
- package/context/PluginProvider/PluginProvider.js +4 -2
- package/context/PluginProvider/index.js +10 -10
- package/context/PluginProvider/mergePlugins.js +4 -4
- package/context/PluginProvider/useColorProcessor.js +3 -1
- package/context/PluginProvider/useSeriesFormatter.js +3 -1
- package/context/PluginProvider/useXExtremumGetter.js +1 -1
- package/context/PluginProvider/useYExtremumGetter.js +1 -1
- package/context/SeriesProvider/SeriesProvider.js +6 -4
- package/context/SeriesProvider/index.js +4 -4
- package/context/SeriesProvider/processSeries.js +1 -1
- package/context/ZAxisContextProvider.js +3 -1
- package/context/index.js +2 -2
- package/hooks/index.js +7 -7
- package/hooks/useAxis.js +3 -1
- package/hooks/useAxisEvents.js +8 -6
- package/hooks/useChartDimensions.js +3 -1
- package/hooks/useChartId.js +3 -1
- package/hooks/useColorScale.js +4 -2
- package/hooks/useDrawingArea.js +3 -1
- package/hooks/useInteractionItemProps.js +4 -2
- package/hooks/useMounted.js +2 -0
- package/hooks/useReducedMotion.js +15 -12
- package/hooks/useScale.js +4 -2
- package/hooks/useSeries.js +3 -1
- package/hooks/useSvgRef.js +3 -1
- package/hooks/useTicks.js +4 -2
- package/index.js +27 -27
- package/internals/components/AxisSharedComponents.js +1 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +5 -5
- package/internals/components/ChartsAxesGradients/index.js +1 -1
- package/internals/getWordsByLines.js +1 -1
- package/internals/index.js +31 -31
- package/internals/isCartesian.js +1 -1
- package/internals/useStringInterpolator.d.ts +1 -0
- package/{modern/internals/useAnimatedPath.js → internals/useStringInterpolator.js} +2 -15
- package/models/index.d.ts +1 -0
- package/models/index.js +5 -3
- package/models/seriesType/index.js +4 -4
- package/modern/BarChart/BarChart.js +26 -12
- package/modern/BarChart/BarClipPath.js +1 -1
- package/modern/BarChart/BarElement.js +4 -2
- package/modern/BarChart/BarLabel/BarLabel.js +3 -1
- package/modern/BarChart/BarLabel/BarLabelItem.js +4 -4
- package/modern/BarChart/BarLabel/BarLabelPlot.js +1 -1
- package/modern/BarChart/BarLabel/index.js +2 -2
- package/modern/BarChart/BarPlot.js +10 -8
- package/modern/BarChart/checkScaleErrors.js +2 -2
- package/modern/BarChart/formatter.js +2 -2
- package/modern/BarChart/index.js +4 -4
- package/modern/BarChart/legend.js +4 -3
- package/modern/BarChart/plugin.js +3 -3
- package/modern/BarChart/useBarChartProps.js +3 -1
- package/modern/ChartContainer/ChartContainer.js +11 -9
- package/modern/ChartContainer/index.js +1 -1
- package/modern/ChartContainer/useChartContainerProps.js +4 -2
- package/modern/ChartContainer/useDefaultizeAxis.js +3 -1
- package/modern/ChartsAxis/ChartsAxis.js +5 -3
- package/modern/ChartsAxis/index.js +2 -2
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +6 -4
- package/modern/ChartsAxisHighlight/index.js +1 -1
- package/modern/ChartsClipPath/ChartsClipPath.js +3 -1
- package/modern/ChartsClipPath/index.js +1 -1
- package/modern/ChartsGrid/ChartsGrid.js +20 -66
- package/modern/ChartsGrid/ChartsHorizontalGrid.js +36 -0
- package/modern/ChartsGrid/ChartsVerticalGrid.js +36 -0
- package/modern/ChartsGrid/index.js +2 -2
- package/modern/ChartsGrid/styledCommonents.js +22 -0
- package/modern/ChartsLegend/ChartsLegend.js +70 -26
- package/modern/ChartsLegend/ChartsLegendItem.js +65 -0
- package/modern/ChartsLegend/ContinuousColorLegend.js +9 -7
- package/modern/ChartsLegend/DefaultChartsLegend.js +31 -5
- package/modern/ChartsLegend/LegendPerItem.js +22 -35
- package/modern/ChartsLegend/PiecewiseColorLegend.js +31 -15
- package/modern/ChartsLegend/chartsLegendClasses.js +1 -1
- package/modern/ChartsLegend/index.js +6 -6
- package/modern/ChartsLegend/useAxis.js +4 -2
- package/modern/ChartsLegend/utils.js +4 -4
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +7 -5
- package/modern/ChartsOnAxisClickHandler/index.js +1 -1
- package/modern/ChartsOverlay/ChartsLoadingOverlay.js +3 -1
- package/modern/ChartsOverlay/ChartsNoDataOverlay.js +3 -1
- package/modern/ChartsOverlay/ChartsOverlay.js +5 -3
- package/modern/ChartsOverlay/index.js +3 -3
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +4 -2
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +7 -5
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +7 -5
- package/modern/ChartsReferenceLine/common.js +1 -1
- package/modern/ChartsReferenceLine/index.js +2 -2
- package/modern/ChartsSurface/ChartsSurface.js +3 -1
- package/modern/ChartsSurface/index.js +1 -1
- package/modern/ChartsText/ChartsText.js +3 -1
- package/modern/ChartsText/index.js +1 -1
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +6 -6
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
- package/modern/ChartsTooltip/ChartsTooltip.js +15 -11
- package/modern/ChartsTooltip/ChartsTooltipTable.js +10 -5
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +7 -5
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +5 -3
- package/modern/ChartsTooltip/chartsTooltipClasses.js +1 -1
- package/modern/ChartsTooltip/index.js +7 -7
- package/modern/ChartsTooltip/utils.js +1 -1
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +9 -7
- package/modern/ChartsVoronoiHandler/index.js +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +20 -13
- package/modern/ChartsXAxis/index.js +1 -1
- package/modern/ChartsYAxis/ChartsYAxis.js +17 -10
- package/modern/ChartsYAxis/index.js +1 -1
- package/modern/Gauge/Gauge.js +7 -5
- package/modern/Gauge/GaugeContainer.js +6 -4
- package/modern/Gauge/GaugeProvider.js +3 -3
- package/modern/Gauge/GaugeReferenceArc.js +3 -1
- package/modern/Gauge/GaugeValueArc.js +3 -1
- package/modern/Gauge/GaugeValueText.js +4 -2
- package/modern/Gauge/index.js +7 -7
- package/modern/LineChart/AnimatedArea.js +33 -14
- package/modern/LineChart/AnimatedLine.js +34 -15
- package/modern/LineChart/AreaElement.js +5 -3
- package/modern/LineChart/AreaPlot.js +85 -78
- package/modern/LineChart/CircleMarkElement.js +107 -0
- package/modern/LineChart/LineChart.js +33 -15
- package/modern/LineChart/LineElement.js +5 -3
- package/modern/LineChart/LineHighlightElement.js +2 -0
- package/modern/LineChart/LineHighlightPlot.js +10 -8
- package/modern/LineChart/LinePlot.js +67 -60
- package/modern/LineChart/MarkElement.js +7 -23
- package/modern/LineChart/MarkPlot.js +22 -12
- package/modern/LineChart/formatter.js +2 -2
- package/modern/LineChart/index.js +12 -11
- package/modern/LineChart/legend.js +4 -3
- package/modern/LineChart/markElementClasses.js +19 -0
- package/modern/LineChart/plugin.js +3 -3
- package/modern/LineChart/useLineChartProps.js +8 -4
- package/modern/PieChart/PieArc.js +3 -1
- package/modern/PieChart/PieArcLabel.js +2 -0
- package/modern/PieChart/PieArcLabelPlot.js +6 -4
- package/modern/PieChart/PieArcPlot.js +6 -4
- package/modern/PieChart/PieChart.js +22 -8
- package/modern/PieChart/PiePlot.js +8 -6
- package/modern/PieChart/dataTransform/useTransformData.js +3 -1
- package/modern/PieChart/formatter.js +1 -1
- package/modern/PieChart/getPieCoordinates.js +1 -1
- package/modern/PieChart/index.js +7 -7
- package/modern/PieChart/legend.js +4 -2
- package/modern/PieChart/plugin.js +2 -2
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +5 -3
- package/modern/ResponsiveChartContainer/index.js +1 -1
- package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +3 -1
- package/modern/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -1
- package/modern/ScatterChart/Scatter.js +7 -5
- package/modern/ScatterChart/ScatterChart.js +26 -12
- package/modern/ScatterChart/ScatterPlot.js +7 -5
- package/modern/ScatterChart/formatter.js +1 -1
- package/modern/ScatterChart/index.js +3 -3
- package/modern/ScatterChart/legend.js +4 -3
- package/modern/ScatterChart/plugin.js +3 -3
- package/modern/ScatterChart/useScatterChartProps.js +2 -0
- package/modern/SparkLineChart/SparkLineChart.js +8 -6
- package/modern/SparkLineChart/index.js +1 -1
- package/modern/colorPalettes/index.js +1 -1
- package/modern/context/CartesianProvider/CartesianProvider.js +8 -6
- package/modern/context/CartesianProvider/computeValue.js +6 -6
- package/modern/context/CartesianProvider/defaultizeAxis.js +1 -1
- package/modern/context/CartesianProvider/index.js +5 -5
- package/modern/context/CartesianProvider/useCartesianContext.js +3 -1
- package/modern/context/DrawingProvider.js +3 -1
- package/modern/context/HighlightedProvider/HighlightedProvider.js +6 -4
- package/modern/context/HighlightedProvider/index.js +4 -4
- package/modern/context/HighlightedProvider/useHighlighted.js +3 -1
- package/modern/context/HighlightedProvider/useItemHighlighted.js +3 -1
- package/modern/context/InteractionProvider.js +2 -0
- package/modern/context/PluginProvider/PluginProvider.js +4 -2
- package/modern/context/PluginProvider/index.js +10 -10
- package/modern/context/PluginProvider/mergePlugins.js +4 -4
- package/modern/context/PluginProvider/useColorProcessor.js +3 -1
- package/modern/context/PluginProvider/useSeriesFormatter.js +3 -1
- package/modern/context/PluginProvider/useXExtremumGetter.js +1 -1
- package/modern/context/PluginProvider/useYExtremumGetter.js +1 -1
- package/modern/context/SeriesProvider/SeriesProvider.js +6 -4
- package/modern/context/SeriesProvider/index.js +4 -4
- package/modern/context/SeriesProvider/processSeries.js +1 -1
- package/modern/context/ZAxisContextProvider.js +3 -1
- package/modern/context/index.js +2 -2
- package/modern/hooks/index.js +7 -7
- package/modern/hooks/useAxis.js +3 -1
- package/modern/hooks/useAxisEvents.js +8 -6
- package/modern/hooks/useChartDimensions.js +3 -1
- package/modern/hooks/useChartId.js +3 -1
- package/modern/hooks/useColorScale.js +4 -2
- package/modern/hooks/useDrawingArea.js +3 -1
- package/modern/hooks/useInteractionItemProps.js +4 -2
- package/modern/hooks/useMounted.js +2 -0
- package/modern/hooks/useReducedMotion.js +15 -12
- package/modern/hooks/useScale.js +4 -2
- package/modern/hooks/useSeries.js +3 -1
- package/modern/hooks/useSvgRef.js +3 -1
- package/modern/hooks/useTicks.js +4 -2
- package/modern/index.js +27 -27
- package/modern/internals/components/AxisSharedComponents.js +1 -1
- package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +5 -5
- package/modern/internals/components/ChartsAxesGradients/index.js +1 -1
- package/modern/internals/getWordsByLines.js +1 -1
- package/modern/internals/index.js +31 -31
- package/modern/internals/isCartesian.js +1 -1
- package/{internals/useAnimatedPath.js → modern/internals/useStringInterpolator.js} +2 -15
- package/modern/models/index.js +5 -3
- package/modern/models/seriesType/index.js +4 -4
- package/modern/themeAugmentation/index.js +0 -3
- package/node/BarChart/BarChart.js +16 -4
- package/node/BarChart/BarClipPath.js +2 -3
- package/node/BarChart/BarElement.js +3 -3
- package/node/BarChart/BarLabel/BarLabel.js +3 -3
- package/node/BarChart/BarLabel/BarLabelItem.js +2 -3
- package/node/BarChart/BarLabel/BarLabelPlot.js +2 -3
- package/node/BarChart/BarLabel/barLabelClasses.js +1 -1
- package/node/BarChart/BarPlot.js +3 -3
- package/node/BarChart/formatter.js +1 -1
- package/node/BarChart/legend.js +3 -2
- package/node/BarChart/plugin.js +1 -1
- package/node/BarChart/useBarChartProps.js +2 -1
- package/node/ChartContainer/ChartContainer.js +3 -3
- package/node/ChartContainer/useChartContainerProps.js +3 -3
- package/node/ChartContainer/useDefaultizeAxis.js +3 -3
- package/node/ChartsAxis/ChartsAxis.js +3 -3
- package/node/ChartsAxisHighlight/ChartsAxisHighlight.js +3 -3
- package/node/ChartsClipPath/ChartsClipPath.js +3 -3
- package/node/ChartsGrid/ChartsGrid.js +18 -66
- package/node/ChartsGrid/ChartsHorizontalGrid.js +43 -0
- package/node/ChartsGrid/ChartsVerticalGrid.js +43 -0
- package/node/ChartsGrid/chartsGridClasses.js +1 -1
- package/node/ChartsGrid/styledCommonents.js +28 -0
- package/node/ChartsLegend/ChartsLegend.js +66 -24
- package/node/ChartsLegend/ChartsLegendItem.js +72 -0
- package/node/ChartsLegend/ContinuousColorLegend.js +3 -3
- package/node/ChartsLegend/DefaultChartsLegend.js +31 -7
- package/node/ChartsLegend/LegendPerItem.js +20 -35
- package/node/ChartsLegend/PiecewiseColorLegend.js +29 -15
- package/node/ChartsLegend/chartsLegendClasses.js +1 -1
- package/node/ChartsLegend/legendItemsPlacement.js +1 -1
- package/node/ChartsLegend/useAxis.js +2 -2
- package/node/ChartsLegend/utils.js +1 -1
- package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +4 -4
- package/node/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
- package/node/ChartsOverlay/ChartsNoDataOverlay.js +3 -3
- package/node/ChartsOverlay/ChartsOverlay.js +3 -3
- package/node/ChartsReferenceLine/ChartsReferenceLine.js +3 -3
- package/node/ChartsReferenceLine/ChartsXReferenceLine.js +4 -4
- package/node/ChartsReferenceLine/ChartsYReferenceLine.js +4 -4
- package/node/ChartsReferenceLine/chartsReferenceLineClasses.js +1 -1
- package/node/ChartsReferenceLine/common.js +1 -1
- package/node/ChartsSurface/ChartsSurface.js +3 -3
- package/node/ChartsText/ChartsText.js +3 -3
- package/node/ChartsTooltip/ChartsAxisTooltipContent.js +2 -3
- package/node/ChartsTooltip/ChartsItemTooltipContent.js +2 -3
- package/node/ChartsTooltip/ChartsTooltip.js +11 -9
- package/node/ChartsTooltip/ChartsTooltipTable.js +9 -4
- package/node/ChartsTooltip/DefaultChartsAxisTooltipContent.js +4 -4
- package/node/ChartsTooltip/DefaultChartsItemTooltipContent.js +4 -4
- package/node/ChartsTooltip/chartsTooltipClasses.js +1 -1
- package/node/ChartsTooltip/utils.js +2 -3
- package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
- package/node/ChartsXAxis/ChartsXAxis.js +9 -4
- package/node/ChartsYAxis/ChartsYAxis.js +9 -4
- package/node/Gauge/Gauge.js +3 -3
- package/node/Gauge/GaugeContainer.js +3 -3
- package/node/Gauge/GaugeProvider.js +1 -2
- package/node/Gauge/GaugeReferenceArc.js +3 -3
- package/node/Gauge/GaugeValueArc.js +3 -3
- package/node/Gauge/GaugeValueText.js +3 -3
- package/node/Gauge/gaugeClasses.js +1 -1
- package/node/LineChart/AnimatedArea.js +31 -14
- package/node/LineChart/AnimatedLine.js +31 -14
- package/node/LineChart/AreaElement.js +3 -3
- package/node/LineChart/AreaPlot.js +79 -74
- package/node/LineChart/CircleMarkElement.js +113 -0
- package/node/LineChart/LineChart.js +20 -4
- package/node/LineChart/LineElement.js +3 -3
- package/node/LineChart/LineHighlightElement.js +3 -3
- package/node/LineChart/LineHighlightPlot.js +3 -3
- package/node/LineChart/LinePlot.js +61 -56
- package/node/LineChart/MarkElement.js +5 -25
- package/node/LineChart/MarkPlot.js +14 -6
- package/node/LineChart/formatter.js +1 -1
- package/node/LineChart/index.js +29 -1
- package/node/LineChart/legend.js +3 -2
- package/node/LineChart/markElementClasses.js +28 -0
- package/node/LineChart/plugin.js +1 -1
- package/node/LineChart/useLineChartProps.js +7 -4
- package/node/PieChart/PieArc.js +3 -3
- package/node/PieChart/PieArcLabel.js +3 -3
- package/node/PieChart/PieArcLabelPlot.js +3 -3
- package/node/PieChart/PieArcPlot.js +3 -3
- package/node/PieChart/PieChart.js +15 -3
- package/node/PieChart/PiePlot.js +3 -3
- package/node/PieChart/dataTransform/useTransformData.js +3 -3
- package/node/PieChart/formatter.js +1 -1
- package/node/PieChart/legend.js +3 -1
- package/node/PieChart/plugin.js +1 -1
- package/node/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -3
- package/node/ResponsiveChartContainer/useChartContainerDimensions.js +4 -4
- package/node/ResponsiveChartContainer/useResponsiveChartContainerProps.js +2 -1
- package/node/ScatterChart/Scatter.js +3 -3
- package/node/ScatterChart/ScatterChart.js +16 -4
- package/node/ScatterChart/ScatterPlot.js +3 -3
- package/node/ScatterChart/legend.js +3 -2
- package/node/ScatterChart/plugin.js +1 -1
- package/node/ScatterChart/useScatterChartProps.js +2 -1
- package/node/SparkLineChart/SparkLineChart.js +3 -3
- package/node/context/CartesianProvider/CartesianContext.js +1 -2
- package/node/context/CartesianProvider/CartesianProvider.js +2 -2
- package/node/context/CartesianProvider/computeValue.js +1 -1
- package/node/context/CartesianProvider/defaultizeAxis.js +1 -1
- package/node/context/CartesianProvider/useCartesianContext.js +2 -2
- package/node/context/DrawingProvider.js +3 -3
- package/node/context/HighlightedProvider/HighlightedContext.js +1 -2
- package/node/context/HighlightedProvider/HighlightedProvider.js +3 -3
- package/node/context/HighlightedProvider/useHighlighted.js +2 -2
- package/node/context/HighlightedProvider/useItemHighlighted.js +1 -0
- package/node/context/InteractionProvider.js +3 -3
- package/node/context/PluginProvider/PluginContext.js +1 -2
- package/node/context/PluginProvider/PluginProvider.js +2 -2
- package/node/context/PluginProvider/useColorProcessor.js +2 -2
- package/node/context/PluginProvider/useSeriesFormatter.js +2 -2
- package/node/context/PluginProvider/useXExtremumGetter.js +1 -2
- package/node/context/PluginProvider/useYExtremumGetter.js +1 -2
- package/node/context/SeriesProvider/SeriesContext.js +1 -2
- package/node/context/SeriesProvider/SeriesProvider.js +2 -2
- package/node/context/SeriesProvider/processSeries.js +1 -1
- package/node/context/ZAxisContextProvider.js +3 -3
- package/node/hooks/useAxis.js +1 -0
- package/node/hooks/useAxisEvents.js +2 -2
- package/node/hooks/useChartDimensions.js +3 -3
- package/node/hooks/useChartId.js +2 -2
- package/node/hooks/useColorScale.js +2 -2
- package/node/hooks/useDrawingArea.js +2 -2
- package/node/hooks/useInteractionItemProps.js +2 -2
- package/node/hooks/useMounted.js +3 -3
- package/node/hooks/useReducedMotion.js +15 -12
- package/node/hooks/useScale.js +1 -0
- package/node/hooks/useSeries.js +2 -2
- package/node/hooks/useSvgRef.js +2 -2
- package/node/hooks/useTicks.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/components/AxisSharedComponents.js +1 -1
- package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +2 -3
- package/node/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +1 -2
- package/node/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +1 -2
- package/node/internals/defaultizeColor.js +1 -1
- package/node/internals/defaultizeValueFormatter.js +1 -1
- package/node/internals/domUtils.js +1 -1
- package/node/internals/getWordsByLines.js +1 -1
- package/node/internals/useStringInterpolator.js +28 -0
- package/node/tests/firePointerEvent.js +1 -1
- package/node/themeAugmentation/index.js +1 -38
- package/package.json +4 -3
- package/themeAugmentation/components.d.ts +2 -0
- package/themeAugmentation/index.d.ts +3 -3
- package/themeAugmentation/index.js +0 -3
- package/themeAugmentation/overrides.d.ts +6 -4
- package/internals/useAnimatedPath.d.ts +0 -1
- package/internals/warning.d.ts +0 -2
- package/internals/warning.js +0 -21
- package/modern/internals/warning.js +0 -21
- package/node/internals/useAnimatedPath.js +0 -42
- package/node/internals/warning.js +0 -28
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["rotate", "dominantBaseline"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import NoSsr from '@mui/material/NoSsr';
|
|
6
8
|
import { useTheme, styled } from '@mui/material/styles';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { jsx as _jsx
|
|
9
|
+
import { getWordsByLines } from "../internals/getWordsByLines.js";
|
|
10
|
+
import { legendItemPlacements } from "./legendItemsPlacement.js";
|
|
11
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
12
|
+
import { ChartsLegendItem } from "./ChartsLegendItem.js";
|
|
13
|
+
import { createElement as _createElement } from "react";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
export const ChartsLegendRoot = styled('g', {
|
|
14
16
|
name: 'MuiChartsLegend',
|
|
15
17
|
slot: 'Root',
|
|
@@ -42,7 +44,6 @@ const getStandardizedPadding = padding => {
|
|
|
42
44
|
*/
|
|
43
45
|
export function LegendPerItem(props) {
|
|
44
46
|
const {
|
|
45
|
-
hidden,
|
|
46
47
|
position,
|
|
47
48
|
direction,
|
|
48
49
|
itemsToDisplay,
|
|
@@ -52,10 +53,10 @@ export function LegendPerItem(props) {
|
|
|
52
53
|
markGap = 5,
|
|
53
54
|
itemGap = 10,
|
|
54
55
|
padding: paddingProps = 10,
|
|
55
|
-
labelStyle: inLabelStyle
|
|
56
|
+
labelStyle: inLabelStyle,
|
|
57
|
+
onItemClick
|
|
56
58
|
} = props;
|
|
57
59
|
const theme = useTheme();
|
|
58
|
-
const isRtl = useRtl();
|
|
59
60
|
const drawingArea = useDrawingArea();
|
|
60
61
|
const labelStyle = React.useMemo(() => _extends({}, theme.typography.subtitle1, {
|
|
61
62
|
color: 'inherit',
|
|
@@ -108,35 +109,21 @@ export function LegendPerItem(props) {
|
|
|
108
109
|
return (totalHeight - legendHeight) / 2;
|
|
109
110
|
}
|
|
110
111
|
}, [position.vertical, padding.top, padding.bottom, totalHeight, legendHeight]);
|
|
111
|
-
if (hidden) {
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
112
|
return /*#__PURE__*/_jsx(NoSsr, {
|
|
115
113
|
children: /*#__PURE__*/_jsx(ChartsLegendRoot, {
|
|
116
114
|
className: classes?.root,
|
|
117
|
-
children: itemsWithPosition.map(({
|
|
118
|
-
id,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
y: -itemMarkHeight / 2,
|
|
130
|
-
width: itemMarkWidth,
|
|
131
|
-
height: itemMarkHeight,
|
|
132
|
-
fill: color
|
|
133
|
-
}), /*#__PURE__*/_jsx(ChartsText, {
|
|
134
|
-
style: labelStyle,
|
|
135
|
-
text: label,
|
|
136
|
-
x: (isRtl ? -1 : 1) * (itemMarkWidth + markGap),
|
|
137
|
-
y: 0
|
|
138
|
-
})]
|
|
139
|
-
}, id))
|
|
115
|
+
children: itemsWithPosition.map((item, i) => /*#__PURE__*/_createElement(ChartsLegendItem, _extends({}, item, {
|
|
116
|
+
key: item.id,
|
|
117
|
+
gapX: gapX,
|
|
118
|
+
gapY: gapY,
|
|
119
|
+
legendWidth: legendWidth,
|
|
120
|
+
itemMarkHeight: itemMarkHeight,
|
|
121
|
+
itemMarkWidth: itemMarkWidth,
|
|
122
|
+
markGap: markGap,
|
|
123
|
+
labelStyle: labelStyle,
|
|
124
|
+
classes: classes,
|
|
125
|
+
onClick: onItemClick ? e => onItemClick(e, i) : undefined
|
|
126
|
+
})))
|
|
140
127
|
})
|
|
141
128
|
});
|
|
142
129
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["axisDirection", "axisId", "hideFirst", "hideLast", "labelFormatter"];
|
|
5
|
+
const _excluded = ["axisDirection", "axisId", "hideFirst", "hideLast", "labelFormatter", "onItemClick"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { useAxis } from
|
|
7
|
-
import { LegendPerItem } from
|
|
8
|
-
import { notNull } from
|
|
8
|
+
import { useAxis } from "./useAxis.js";
|
|
9
|
+
import { LegendPerItem } from "./LegendPerItem.js";
|
|
10
|
+
import { notNull } from "../internals/notNull.js";
|
|
9
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
12
|
function defaultLabelFormatter(params) {
|
|
11
13
|
if (params.min === null) {
|
|
@@ -16,13 +18,21 @@ function defaultLabelFormatter(params) {
|
|
|
16
18
|
}
|
|
17
19
|
return `${params.formattedMin}-${params.formattedMax}`;
|
|
18
20
|
}
|
|
21
|
+
const piecewiseColorContextBuilder = context => ({
|
|
22
|
+
type: 'piecewiseColor',
|
|
23
|
+
color: context.color,
|
|
24
|
+
label: context.label,
|
|
25
|
+
maxValue: context.maxValue,
|
|
26
|
+
minValue: context.minValue
|
|
27
|
+
});
|
|
19
28
|
function PiecewiseColorLegend(props) {
|
|
20
29
|
const {
|
|
21
30
|
axisDirection,
|
|
22
31
|
axisId,
|
|
23
32
|
hideFirst,
|
|
24
33
|
hideLast,
|
|
25
|
-
labelFormatter = defaultLabelFormatter
|
|
34
|
+
labelFormatter = defaultLabelFormatter,
|
|
35
|
+
onItemClick
|
|
26
36
|
} = props,
|
|
27
37
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
28
38
|
const axisItem = useAxis({
|
|
@@ -43,30 +53,34 @@ function PiecewiseColorLegend(props) {
|
|
|
43
53
|
if (hideFirst && isFirst || hideLast && isLast) {
|
|
44
54
|
return null;
|
|
45
55
|
}
|
|
46
|
-
const
|
|
56
|
+
const data = _extends({}, isFirst ? {
|
|
47
57
|
min: null,
|
|
48
58
|
formattedMin: null
|
|
49
59
|
} : {
|
|
50
60
|
min: colorMap.thresholds[index - 1],
|
|
51
61
|
formattedMin: formattedLabels[index - 1]
|
|
52
|
-
},
|
|
62
|
+
}, isLast ? {
|
|
53
63
|
max: null,
|
|
54
64
|
formattedMax: null
|
|
55
65
|
} : {
|
|
56
66
|
max: colorMap.thresholds[index],
|
|
57
67
|
formattedMax: formattedLabels[index]
|
|
58
|
-
})
|
|
68
|
+
});
|
|
69
|
+
const label = labelFormatter(data);
|
|
59
70
|
if (label === null) {
|
|
60
71
|
return null;
|
|
61
72
|
}
|
|
62
73
|
return {
|
|
63
74
|
id: label,
|
|
64
75
|
color,
|
|
65
|
-
label
|
|
76
|
+
label,
|
|
77
|
+
minValue: data.min,
|
|
78
|
+
maxValue: data.max
|
|
66
79
|
};
|
|
67
80
|
}).filter(notNull);
|
|
68
81
|
return /*#__PURE__*/_jsx(LegendPerItem, _extends({}, other, {
|
|
69
|
-
itemsToDisplay: itemsToDisplay
|
|
82
|
+
itemsToDisplay: itemsToDisplay,
|
|
83
|
+
onItemClick: onItemClick ? (e, i) => onItemClick(e, piecewiseColorContextBuilder(itemsToDisplay[i]), i) : undefined
|
|
70
84
|
}));
|
|
71
85
|
}
|
|
72
86
|
process.env.NODE_ENV !== "production" ? PiecewiseColorLegend.propTypes = {
|
|
@@ -93,11 +107,6 @@ process.env.NODE_ENV !== "production" ? PiecewiseColorLegend.propTypes = {
|
|
|
93
107
|
* The default depends on the chart.
|
|
94
108
|
*/
|
|
95
109
|
direction: PropTypes.oneOf(['column', 'row']).isRequired,
|
|
96
|
-
/**
|
|
97
|
-
* Set to true to hide the legend.
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
hidden: PropTypes.bool,
|
|
101
110
|
/**
|
|
102
111
|
* Hide the first item of the legend, corresponding to the [-infinity, min] piece.
|
|
103
112
|
* @default false
|
|
@@ -139,6 +148,13 @@ process.env.NODE_ENV !== "production" ? PiecewiseColorLegend.propTypes = {
|
|
|
139
148
|
* @default 5
|
|
140
149
|
*/
|
|
141
150
|
markGap: PropTypes.number,
|
|
151
|
+
/**
|
|
152
|
+
* Callback fired when a legend item is clicked.
|
|
153
|
+
* @param {React.MouseEvent<SVGRectElement, MouseEvent>} event The click event.
|
|
154
|
+
* @param {PiecewiseColorLegendItemContext} legendItem The legend item data.
|
|
155
|
+
* @param {number} index The index of the clicked legend item.
|
|
156
|
+
*/
|
|
157
|
+
onItemClick: PropTypes.func,
|
|
142
158
|
/**
|
|
143
159
|
* Legend padding (in px).
|
|
144
160
|
* Can either be a single number, or an object with top, left, bottom, right properties.
|
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClass as generateUtilityClass, unstable_generat
|
|
|
2
2
|
export function getLegendUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiChartsLegend', slot);
|
|
4
4
|
}
|
|
5
|
-
export const legendClasses = generateUtilityClasses('MuiChartsLegend', ['root', 'series', 'mark', 'label', 'column', 'row']);
|
|
5
|
+
export const legendClasses = generateUtilityClasses('MuiChartsLegend', ['root', 'series', 'itemBackground', 'mark', 'label', 'column', 'row']);
|
|
@@ -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,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
import { ZAxisContext } from
|
|
3
|
-
import { useCartesianContext } from
|
|
4
|
+
import { ZAxisContext } from "../context/ZAxisContextProvider.js";
|
|
5
|
+
import { useCartesianContext } from "../context/CartesianProvider/useCartesianContext.js";
|
|
4
6
|
/**
|
|
5
7
|
* Helper to select an axis definition according to its direction and id.
|
|
6
8
|
*/
|
|
@@ -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,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { InteractionContext } from
|
|
4
|
-
import { useSeries } from
|
|
5
|
-
import { useSvgRef } from
|
|
6
|
-
import { useCartesianContext } from
|
|
5
|
+
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
6
|
+
import { useSeries } from "../hooks/useSeries.js";
|
|
7
|
+
import { useSvgRef } from "../hooks/index.js";
|
|
8
|
+
import { useCartesianContext } from "../context/CartesianProvider/index.js";
|
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
10
|
function ChartsOnAxisClickHandler(props) {
|
|
9
11
|
const {
|
|
@@ -27,7 +29,7 @@ function ChartsOnAxisClickHandler(props) {
|
|
|
27
29
|
}
|
|
28
30
|
const handleMouseClick = event => {
|
|
29
31
|
event.preventDefault();
|
|
30
|
-
const isXaxis =
|
|
32
|
+
const isXaxis = axis.x && axis.x.index !== -1;
|
|
31
33
|
const USED_AXIS_ID = isXaxis ? xAxisIds[0] : yAxisIds[0];
|
|
32
34
|
const dataIndex = isXaxis ? axis.x && axis.x.index : axis.y && axis.y.index;
|
|
33
35
|
if (dataIndex == null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsOnAxisClickHandler.js";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["message"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { useDrawingArea } from
|
|
8
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
10
|
const StyledText = styled('text')(({
|
|
9
11
|
theme
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["message"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { useDrawingArea } from
|
|
8
|
+
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
10
|
const StyledText = styled('text')(({
|
|
9
11
|
theme
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
|
-
import { ChartsLoadingOverlay } from
|
|
4
|
-
import { useSeries } from
|
|
5
|
-
import { ChartsNoDataOverlay } from
|
|
5
|
+
import { ChartsLoadingOverlay } from "./ChartsLoadingOverlay.js";
|
|
6
|
+
import { useSeries } from "../hooks/useSeries.js";
|
|
7
|
+
import { ChartsNoDataOverlay } from "./ChartsNoDataOverlay.js";
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
export function useNoData() {
|
|
8
10
|
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,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { ChartsXReferenceLine } from
|
|
5
|
-
import { ChartsYReferenceLine } from
|
|
6
|
+
import { ChartsXReferenceLine } from "./ChartsXReferenceLine.js";
|
|
7
|
+
import { ChartsYReferenceLine } from "./ChartsYReferenceLine.js";
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
function ChartsReferenceLine(props) {
|
|
8
10
|
const {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
7
|
+
import { useDrawingArea, useXScale } from "../hooks/index.js";
|
|
8
|
+
import { ReferenceLineRoot } from "./common.js";
|
|
9
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
10
|
+
import { getReferenceLineUtilityClass } from "./chartsReferenceLineClasses.js";
|
|
9
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
const getTextParams = ({
|
|
11
13
|
top,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
7
|
+
import { useDrawingArea, useYScale } from "../hooks/index.js";
|
|
8
|
+
import { ReferenceLineRoot } from "./common.js";
|
|
9
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
10
|
+
import { getReferenceLineUtilityClass } from "./chartsReferenceLineClasses.js";
|
|
9
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
const getTextParams = ({
|
|
11
13
|
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";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["children", "width", "height", "viewBox", "disableAxisListener", "className", "title", "desc"];
|
|
4
6
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import * as React from 'react';
|
|
7
|
-
import { useAxisEvents } from
|
|
9
|
+
import { useAxisEvents } from "../hooks/useAxisEvents.js";
|
|
8
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
const ChartChartsSurfaceStyles = styled('svg', {
|
|
10
12
|
name: 'MuiChartsSurface',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartsSurface.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["x", "y", "style", "text", "ownerState"],
|
|
4
6
|
_excluded2 = ["angle", "textAnchor", "dominantBaseline"];
|
|
5
7
|
import * as React from 'react';
|
|
6
8
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { getWordsByLines } from
|
|
9
|
+
import { getWordsByLines } from "../internals/getWordsByLines.js";
|
|
8
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
11
|
/**
|
|
10
12
|
* Helper component to manage multiline text in SVG
|
|
@@ -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.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
@@ -6,11 +8,11 @@ import { styled, useThemeProps } from '@mui/material/styles';
|
|
|
6
8
|
import Popper from '@mui/material/Popper';
|
|
7
9
|
import NoSsr from '@mui/material/NoSsr';
|
|
8
10
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
|
-
import { InteractionContext } from
|
|
10
|
-
import { generateVirtualElement, useMouseTracker, getTooltipHasData } from
|
|
11
|
-
import { ChartsItemTooltipContent } from
|
|
12
|
-
import { ChartsAxisTooltipContent } from
|
|
13
|
-
import { getChartsTooltipUtilityClass } from
|
|
11
|
+
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
12
|
+
import { generateVirtualElement, useMouseTracker, getTooltipHasData } from "./utils.js";
|
|
13
|
+
import { ChartsItemTooltipContent } from "./ChartsItemTooltipContent.js";
|
|
14
|
+
import { ChartsAxisTooltipContent } from "./ChartsAxisTooltipContent.js";
|
|
15
|
+
import { getChartsTooltipUtilityClass } from "./chartsTooltipClasses.js";
|
|
14
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
17
|
const useUtilityClasses = ownerState => {
|
|
16
18
|
const {
|
|
@@ -18,6 +20,7 @@ const useUtilityClasses = ownerState => {
|
|
|
18
20
|
} = ownerState;
|
|
19
21
|
const slots = {
|
|
20
22
|
root: ['root'],
|
|
23
|
+
paper: ['paper'],
|
|
21
24
|
table: ['table'],
|
|
22
25
|
row: ['row'],
|
|
23
26
|
cell: ['cell'],
|
|
@@ -48,9 +51,9 @@ const ChartsTooltipRoot = styled(Popper, {
|
|
|
48
51
|
*
|
|
49
52
|
* - [ChartsTooltip API](https://mui.com/x/api/charts/charts-tool-tip/)
|
|
50
53
|
*/
|
|
51
|
-
function ChartsTooltip(
|
|
52
|
-
const
|
|
53
|
-
props,
|
|
54
|
+
function ChartsTooltip(inProps) {
|
|
55
|
+
const props = useThemeProps({
|
|
56
|
+
props: inProps,
|
|
54
57
|
name: 'MuiChartsTooltip'
|
|
55
58
|
});
|
|
56
59
|
const {
|
|
@@ -59,7 +62,7 @@ function ChartsTooltip(props) {
|
|
|
59
62
|
axisContent,
|
|
60
63
|
slots,
|
|
61
64
|
slotProps
|
|
62
|
-
} =
|
|
65
|
+
} = props;
|
|
63
66
|
const mousePosition = useMouseTracker();
|
|
64
67
|
const {
|
|
65
68
|
item,
|
|
@@ -69,7 +72,7 @@ function ChartsTooltip(props) {
|
|
|
69
72
|
const tooltipHasData = getTooltipHasData(trigger, displayedData);
|
|
70
73
|
const popperOpen = mousePosition !== null && tooltipHasData;
|
|
71
74
|
const classes = useUtilityClasses({
|
|
72
|
-
classes:
|
|
75
|
+
classes: props.classes
|
|
73
76
|
});
|
|
74
77
|
const PopperComponent = slots?.popper ?? ChartsTooltipRoot;
|
|
75
78
|
const popperProps = useSlotProps({
|
|
@@ -93,6 +96,7 @@ function ChartsTooltip(props) {
|
|
|
93
96
|
}
|
|
94
97
|
return /*#__PURE__*/_jsx(NoSsr, {
|
|
95
98
|
children: popperOpen && /*#__PURE__*/_jsx(PopperComponent, _extends({}, popperProps, {
|
|
99
|
+
className: classes.root,
|
|
96
100
|
children: trigger === 'item' ? /*#__PURE__*/_jsx(ChartsItemTooltipContent, {
|
|
97
101
|
itemData: displayedData,
|
|
98
102
|
content: slots?.itemContent ?? itemContent,
|
|
@@ -147,7 +151,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
|
|
|
147
151
|
* - 'item': Shows data about the item below the mouse.
|
|
148
152
|
* - 'axis': Shows values associated with the hovered x value
|
|
149
153
|
* - 'none': Does not display tooltip
|
|
150
|
-
* @default '
|
|
154
|
+
* @default 'axis'
|
|
151
155
|
*/
|
|
152
156
|
trigger: PropTypes.oneOf(['axis', 'item', 'none'])
|
|
153
157
|
} : void 0;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { styled } from '@mui/material/styles';
|
|
2
2
|
import { shouldForwardProp } from '@mui/system';
|
|
3
|
-
import { chartsTooltipClasses } from
|
|
3
|
+
import { chartsTooltipClasses } from "./chartsTooltipClasses.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @ignore - internal component.
|
|
7
7
|
*/
|
|
8
8
|
export const ChartsTooltipPaper = styled('div', {
|
|
9
9
|
name: 'MuiChartsTooltip',
|
|
10
|
-
slot: 'Container'
|
|
10
|
+
slot: 'Container',
|
|
11
|
+
overridesResolver: (props, styles) => styles.paper
|
|
11
12
|
})(({
|
|
12
13
|
theme
|
|
13
14
|
}) => ({
|
|
@@ -23,7 +24,8 @@ export const ChartsTooltipPaper = styled('div', {
|
|
|
23
24
|
*/
|
|
24
25
|
export const ChartsTooltipTable = styled('table', {
|
|
25
26
|
name: 'MuiChartsTooltip',
|
|
26
|
-
slot: 'Table'
|
|
27
|
+
slot: 'Table',
|
|
28
|
+
overridesResolver: (props, styles) => styles.table
|
|
27
29
|
})(({
|
|
28
30
|
theme
|
|
29
31
|
}) => ({
|
|
@@ -38,7 +40,8 @@ export const ChartsTooltipTable = styled('table', {
|
|
|
38
40
|
*/
|
|
39
41
|
export const ChartsTooltipRow = styled('tr', {
|
|
40
42
|
name: 'MuiChartsTooltip',
|
|
41
|
-
slot: 'Row'
|
|
43
|
+
slot: 'Row',
|
|
44
|
+
overridesResolver: (props, styles) => styles.row
|
|
42
45
|
})(({
|
|
43
46
|
theme
|
|
44
47
|
}) => ({
|
|
@@ -55,7 +58,8 @@ export const ChartsTooltipRow = styled('tr', {
|
|
|
55
58
|
*/
|
|
56
59
|
export const ChartsTooltipCell = styled('td', {
|
|
57
60
|
name: 'MuiChartsTooltip',
|
|
58
|
-
slot: 'Cell'
|
|
61
|
+
slot: 'Cell',
|
|
62
|
+
overridesResolver: (props, styles) => styles.cell
|
|
59
63
|
})(({
|
|
60
64
|
theme
|
|
61
65
|
}) => ({
|
|
@@ -82,6 +86,7 @@ export const ChartsTooltipCell = styled('td', {
|
|
|
82
86
|
export const ChartsTooltipMark = styled('div', {
|
|
83
87
|
name: 'MuiChartsTooltip',
|
|
84
88
|
slot: 'Mark',
|
|
89
|
+
overridesResolver: (props, styles) => styles.mark,
|
|
85
90
|
shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'color'
|
|
86
91
|
})(({
|
|
87
92
|
theme,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import clsx from 'clsx';
|
|
4
6
|
import Typography from '@mui/material/Typography';
|
|
5
|
-
import { ChartsTooltipCell, ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipMark, ChartsTooltipRow } from
|
|
6
|
-
import { utcFormatter } from
|
|
7
|
-
import { getLabel } from
|
|
8
|
-
import { isCartesianSeries } from
|
|
7
|
+
import { ChartsTooltipCell, ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipMark, ChartsTooltipRow } from "./ChartsTooltipTable.js";
|
|
8
|
+
import { utcFormatter } from "./utils.js";
|
|
9
|
+
import { getLabel } from "../internals/getLabel.js";
|
|
10
|
+
import { isCartesianSeries } from "../internals/isCartesian.js";
|
|
9
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
function DefaultChartsAxisTooltipContent(props) {
|
|
11
13
|
const {
|
|
@@ -22,7 +24,7 @@ function DefaultChartsAxisTooltipContent(props) {
|
|
|
22
24
|
const axisFormatter = axis.valueFormatter ?? (v => axis.scaleType === 'utc' ? utcFormatter(v) : v.toLocaleString());
|
|
23
25
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
24
26
|
sx: sx,
|
|
25
|
-
className: classes.
|
|
27
|
+
className: classes.paper,
|
|
26
28
|
children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
|
|
27
29
|
className: classes.table,
|
|
28
30
|
children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx("thead", {
|