@mui/x-charts 8.0.0-beta.1 → 8.0.0-beta.3
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/AnimatedBarElement.d.ts +38 -8
- package/BarChart/AnimatedBarElement.js +5 -5
- package/BarChart/BarChart.js +2 -0
- package/BarChart/BarClipPath.d.ts +19 -1
- package/BarChart/BarClipPath.js +84 -17
- package/BarChart/BarElement.d.ts +9 -20
- package/BarChart/BarElement.js +29 -26
- package/BarChart/BarLabel/BarLabel.d.ts +27 -854
- package/BarChart/BarLabel/BarLabel.js +32 -5
- package/BarChart/BarLabel/BarLabel.types.d.ts +2 -0
- package/BarChart/BarLabel/BarLabelItem.d.ts +24 -0
- package/BarChart/BarLabel/BarLabelItem.js +18 -6
- package/BarChart/BarLabel/BarLabelPlot.js +16 -46
- package/BarChart/BarLabel/barLabelClasses.d.ts +3 -1
- package/BarChart/BarLabel/barLabelClasses.js +4 -3
- package/BarChart/BarPlot.js +37 -61
- package/BarChart/barElementClasses.d.ts +21 -0
- package/BarChart/barElementClasses.js +29 -0
- package/BarChart/getRadius.d.ts +1 -1
- package/BarChart/index.d.ts +2 -1
- package/BarChart/index.js +11 -0
- package/BarChart/seriesConfig/index.js +3 -1
- package/BarChart/seriesConfig/tooltip.d.ts +2 -1
- package/BarChart/seriesConfig/tooltip.js +14 -1
- package/BarChart/types.d.ts +2 -2
- package/BarChart/useBarChartProps.d.ts +2 -1
- package/BarChart/useBarChartProps.js +20 -13
- package/CHANGELOG.md +235 -0
- package/ChartContainer/ChartContainer.js +4 -0
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
- package/ChartsLabel/ChartsLabelMark.js +0 -4
- package/ChartsLabel/index.d.ts +1 -0
- package/ChartsLabel/index.js +7 -0
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
- package/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
- package/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
- package/ChartsTooltip/ChartsTooltip.js +2 -2
- package/ChartsTooltip/ChartsTooltipContainer.js +4 -8
- package/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
- package/ChartsTooltip/ChartsTooltipTable.js +24 -9
- package/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
- package/ChartsTooltip/chartsTooltipClasses.js +2 -2
- package/ChartsTooltip/index.d.ts +1 -0
- package/ChartsTooltip/index.js +12 -0
- package/ChartsTooltip/useAxesTooltip.d.ts +7 -0
- package/ChartsTooltip/useAxesTooltip.js +18 -0
- package/ChartsTooltip/useAxisTooltip.d.ts +24 -3
- package/ChartsTooltip/useAxisTooltip.js +72 -38
- package/ChartsTooltip/useItemTooltip.js +4 -1
- package/ChartsXAxis/ChartsXAxis.js +5 -2
- package/ChartsYAxis/ChartsYAxis.js +69 -17
- package/LineChart/AnimatedArea.js +5 -22
- package/LineChart/AnimatedLine.d.ts +1 -4
- package/LineChart/AnimatedLine.js +10 -25
- package/LineChart/AppearingMask.d.ts +5 -0
- package/LineChart/AppearingMask.js +25 -18
- package/LineChart/CircleMarkElement.js +17 -23
- package/LineChart/LineChart.js +2 -0
- package/LineChart/LineHighlightPlot.js +3 -4
- package/LineChart/MarkElement.js +16 -27
- package/LineChart/MarkPlot.js +0 -1
- package/LineChart/markElementClasses.d.ts +3 -0
- package/LineChart/markElementClasses.js +4 -3
- package/LineChart/seriesConfig/index.js +3 -1
- package/LineChart/seriesConfig/tooltip.d.ts +2 -1
- package/LineChart/seriesConfig/tooltip.js +8 -1
- package/LineChart/useLineChartProps.d.ts +2 -1
- package/LineChart/useLineChartProps.js +7 -4
- package/PieChart/PieArc.d.ts +19 -11
- package/PieChart/PieArc.js +37 -24
- package/PieChart/PieArcLabel.d.ts +22 -13
- package/PieChart/PieArcLabel.js +52 -48
- package/PieChart/PieArcLabelPlot.js +16 -34
- package/PieChart/PieArcPlot.js +21 -34
- package/PieChart/seriesConfig/tooltip.js +3 -0
- package/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
- package/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
- package/RadarChart/RadarGrid/RadarGrid.js +5 -1
- package/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
- package/RadarChart/RadarGrid/useRadarGridData.js +3 -0
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
- package/ScatterChart/ScatterChart.js +2 -0
- package/ScatterChart/useScatterChartProps.d.ts +2 -1
- package/ScatterChart/useScatterChartProps.js +6 -3
- package/SparkLineChart/SparkLineChart.js +2 -0
- package/colorPalettes/colorPalettes.js +2 -2
- package/constants/index.d.ts +1 -1
- package/constants/index.js +1 -1
- package/context/AnimationProvider/AnimationProvider.js +4 -6
- package/esm/BarChart/AnimatedBarElement.d.ts +38 -8
- package/esm/BarChart/AnimatedBarElement.js +5 -5
- package/esm/BarChart/BarChart.js +2 -0
- package/esm/BarChart/BarClipPath.d.ts +19 -1
- package/esm/BarChart/BarClipPath.js +84 -17
- package/esm/BarChart/BarElement.d.ts +9 -20
- package/esm/BarChart/BarElement.js +28 -23
- package/esm/BarChart/BarLabel/BarLabel.d.ts +27 -854
- package/esm/BarChart/BarLabel/BarLabel.js +32 -5
- package/esm/BarChart/BarLabel/BarLabel.types.d.ts +2 -0
- package/esm/BarChart/BarLabel/BarLabelItem.d.ts +24 -0
- package/esm/BarChart/BarLabel/BarLabelItem.js +18 -6
- package/esm/BarChart/BarLabel/BarLabelPlot.js +16 -46
- package/esm/BarChart/BarLabel/barLabelClasses.d.ts +3 -1
- package/esm/BarChart/BarLabel/barLabelClasses.js +4 -3
- package/esm/BarChart/BarPlot.js +37 -61
- package/esm/BarChart/barElementClasses.d.ts +21 -0
- package/esm/BarChart/barElementClasses.js +19 -0
- package/esm/BarChart/getRadius.d.ts +1 -1
- package/esm/BarChart/index.d.ts +2 -1
- package/esm/BarChart/index.js +2 -1
- package/esm/BarChart/seriesConfig/index.js +2 -1
- package/esm/BarChart/seriesConfig/tooltip.d.ts +2 -1
- package/esm/BarChart/seriesConfig/tooltip.js +12 -0
- package/esm/BarChart/types.d.ts +2 -2
- package/esm/BarChart/useBarChartProps.d.ts +2 -1
- package/esm/BarChart/useBarChartProps.js +19 -13
- package/esm/ChartContainer/ChartContainer.js +4 -0
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
- package/esm/ChartsLabel/ChartsLabelMark.js +0 -4
- package/esm/ChartsLabel/index.d.ts +1 -0
- package/esm/ChartsLabel/index.js +1 -0
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
- package/esm/ChartsTooltip/ChartsTooltip.js +2 -2
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +5 -9
- package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
- package/esm/ChartsTooltip/ChartsTooltipTable.js +23 -9
- package/esm/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
- package/esm/ChartsTooltip/chartsTooltipClasses.js +2 -2
- package/esm/ChartsTooltip/index.d.ts +1 -0
- package/esm/ChartsTooltip/index.js +1 -0
- package/esm/ChartsTooltip/useAxesTooltip.d.ts +7 -0
- package/esm/ChartsTooltip/useAxesTooltip.js +12 -0
- package/esm/ChartsTooltip/useAxisTooltip.d.ts +24 -3
- package/esm/ChartsTooltip/useAxisTooltip.js +72 -38
- package/esm/ChartsTooltip/useItemTooltip.js +4 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +5 -2
- package/esm/ChartsYAxis/ChartsYAxis.js +69 -17
- package/esm/LineChart/AnimatedArea.js +5 -22
- package/esm/LineChart/AnimatedLine.d.ts +1 -4
- package/esm/LineChart/AnimatedLine.js +9 -24
- package/esm/LineChart/AppearingMask.d.ts +5 -0
- package/esm/LineChart/AppearingMask.js +23 -18
- package/esm/LineChart/CircleMarkElement.js +19 -25
- package/esm/LineChart/LineChart.js +2 -0
- package/esm/LineChart/LineHighlightPlot.js +3 -4
- package/esm/LineChart/MarkElement.js +17 -28
- package/esm/LineChart/MarkPlot.js +0 -1
- package/esm/LineChart/markElementClasses.d.ts +3 -0
- package/esm/LineChart/markElementClasses.js +4 -3
- package/esm/LineChart/seriesConfig/index.js +2 -1
- package/esm/LineChart/seriesConfig/tooltip.d.ts +2 -1
- package/esm/LineChart/seriesConfig/tooltip.js +6 -0
- package/esm/LineChart/useLineChartProps.d.ts +2 -1
- package/esm/LineChart/useLineChartProps.js +6 -4
- package/esm/PieChart/PieArc.d.ts +19 -11
- package/esm/PieChart/PieArc.js +36 -23
- package/esm/PieChart/PieArcLabel.d.ts +22 -13
- package/esm/PieChart/PieArcLabel.js +51 -47
- package/esm/PieChart/PieArcLabelPlot.js +16 -34
- package/esm/PieChart/PieArcPlot.js +21 -34
- package/esm/PieChart/seriesConfig/tooltip.js +3 -0
- package/esm/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
- package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/RadarGrid.js +5 -1
- package/esm/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/useRadarGridData.js +3 -0
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
- package/esm/ScatterChart/ScatterChart.js +2 -0
- package/esm/ScatterChart/useScatterChartProps.d.ts +2 -1
- package/esm/ScatterChart/useScatterChartProps.js +5 -3
- package/esm/SparkLineChart/SparkLineChart.js +2 -0
- package/esm/colorPalettes/colorPalettes.js +2 -2
- package/esm/constants/index.d.ts +1 -1
- package/esm/constants/index.js +1 -1
- package/esm/context/AnimationProvider/AnimationProvider.js +3 -6
- package/esm/hooks/animation/index.d.ts +6 -0
- package/esm/hooks/animation/index.js +6 -0
- package/esm/hooks/animation/useAnimateArea.d.ts +15 -0
- package/esm/hooks/animation/useAnimateArea.js +27 -0
- package/esm/hooks/animation/useAnimateBar.d.ts +17 -0
- package/esm/hooks/animation/useAnimateBar.js +56 -0
- package/esm/hooks/animation/useAnimateBarLabel.d.ts +19 -0
- package/esm/hooks/animation/useAnimateBarLabel.js +59 -0
- package/esm/hooks/animation/useAnimateLine.d.ts +14 -0
- package/esm/hooks/animation/useAnimateLine.js +26 -0
- package/esm/hooks/animation/useAnimatePieArc.d.ts +15 -0
- package/esm/hooks/animation/useAnimatePieArc.js +70 -0
- package/esm/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
- package/esm/hooks/animation/useAnimatePieArcLabel.js +72 -0
- package/esm/hooks/index.d.ts +2 -1
- package/esm/hooks/index.js +2 -1
- package/esm/hooks/useAxis.d.ts +5 -5
- package/esm/hooks/useInteractionItemProps.js +11 -0
- package/esm/hooks/useScale.d.ts +2 -2
- package/esm/hooks/useScale.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/animation/Transition.d.ts +37 -0
- package/esm/internals/animation/Transition.js +83 -0
- package/esm/internals/animation/animation.d.ts +4 -0
- package/esm/internals/animation/animation.js +4 -0
- package/esm/internals/animation/useAnimate.d.ts +19 -0
- package/esm/internals/animation/useAnimate.js +74 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +21 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +28 -22
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +9 -42
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +75 -0
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +4 -10
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +8 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +18 -13
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +16 -32
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +22 -0
- package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
- package/esm/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
- package/esm/internals/shallowEqual.d.ts +8 -0
- package/esm/internals/shallowEqual.js +31 -0
- package/esm/models/axis.d.ts +8 -0
- package/esm/themeAugmentation/overrides.d.ts +1 -1
- package/hooks/animation/index.d.ts +6 -0
- package/hooks/animation/index.js +71 -0
- package/hooks/animation/useAnimateArea.d.ts +15 -0
- package/hooks/animation/useAnimateArea.js +34 -0
- package/hooks/animation/useAnimateBar.d.ts +17 -0
- package/hooks/animation/useAnimateBar.js +62 -0
- package/hooks/animation/useAnimateBarLabel.d.ts +19 -0
- package/hooks/animation/useAnimateBarLabel.js +65 -0
- package/hooks/animation/useAnimateLine.d.ts +14 -0
- package/hooks/animation/useAnimateLine.js +33 -0
- package/hooks/animation/useAnimatePieArc.d.ts +15 -0
- package/hooks/animation/useAnimatePieArc.js +77 -0
- package/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
- package/hooks/animation/useAnimatePieArcLabel.js +79 -0
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +13 -1
- package/hooks/useAxis.d.ts +5 -5
- package/hooks/useInteractionItemProps.js +11 -0
- package/hooks/useScale.d.ts +2 -2
- package/hooks/useScale.js +2 -2
- package/index.js +1 -1
- package/internals/animation/Transition.d.ts +37 -0
- package/internals/animation/Transition.js +89 -0
- package/internals/animation/animation.d.ts +4 -0
- package/internals/animation/animation.js +11 -0
- package/internals/animation/useAnimate.d.ts +19 -0
- package/internals/animation/useAnimate.js +80 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +28 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +29 -22
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +7 -40
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +81 -0
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +5 -11
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +17 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +19 -13
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +16 -32
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +28 -0
- package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
- package/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
- package/internals/shallowEqual.d.ts +8 -0
- package/internals/shallowEqual.js +37 -0
- package/models/axis.d.ts +8 -0
- package/modern/BarChart/AnimatedBarElement.d.ts +38 -8
- package/modern/BarChart/AnimatedBarElement.js +5 -5
- package/modern/BarChart/BarChart.js +2 -0
- package/modern/BarChart/BarClipPath.d.ts +19 -1
- package/modern/BarChart/BarClipPath.js +84 -17
- package/modern/BarChart/BarElement.d.ts +9 -20
- package/modern/BarChart/BarElement.js +28 -23
- package/modern/BarChart/BarLabel/BarLabel.d.ts +27 -854
- package/modern/BarChart/BarLabel/BarLabel.js +32 -5
- package/modern/BarChart/BarLabel/BarLabel.types.d.ts +2 -0
- package/modern/BarChart/BarLabel/BarLabelItem.d.ts +24 -0
- package/modern/BarChart/BarLabel/BarLabelItem.js +18 -6
- package/modern/BarChart/BarLabel/BarLabelPlot.js +16 -46
- package/modern/BarChart/BarLabel/barLabelClasses.d.ts +3 -1
- package/modern/BarChart/BarLabel/barLabelClasses.js +4 -3
- package/modern/BarChart/BarPlot.js +37 -61
- package/modern/BarChart/barElementClasses.d.ts +21 -0
- package/modern/BarChart/barElementClasses.js +19 -0
- package/modern/BarChart/getRadius.d.ts +1 -1
- package/modern/BarChart/index.d.ts +2 -1
- package/modern/BarChart/index.js +2 -1
- package/modern/BarChart/seriesConfig/index.js +2 -1
- package/modern/BarChart/seriesConfig/tooltip.d.ts +2 -1
- package/modern/BarChart/seriesConfig/tooltip.js +12 -0
- package/modern/BarChart/types.d.ts +2 -2
- package/modern/BarChart/useBarChartProps.d.ts +2 -1
- package/modern/BarChart/useBarChartProps.js +19 -13
- package/modern/ChartContainer/ChartContainer.js +4 -0
- package/modern/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
- package/modern/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
- package/modern/ChartsLabel/ChartsLabelMark.js +0 -4
- package/modern/ChartsLabel/index.d.ts +1 -0
- package/modern/ChartsLabel/index.js +1 -0
- package/modern/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/modern/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
- package/modern/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
- package/modern/ChartsTooltip/ChartsTooltip.js +2 -2
- package/modern/ChartsTooltip/ChartsTooltipContainer.js +5 -9
- package/modern/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
- package/modern/ChartsTooltip/ChartsTooltipTable.js +23 -9
- package/modern/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
- package/modern/ChartsTooltip/chartsTooltipClasses.js +2 -2
- package/modern/ChartsTooltip/index.d.ts +1 -0
- package/modern/ChartsTooltip/index.js +1 -0
- package/modern/ChartsTooltip/useAxesTooltip.d.ts +7 -0
- package/modern/ChartsTooltip/useAxesTooltip.js +12 -0
- package/modern/ChartsTooltip/useAxisTooltip.d.ts +24 -3
- package/modern/ChartsTooltip/useAxisTooltip.js +72 -38
- package/modern/ChartsTooltip/useItemTooltip.js +4 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +5 -2
- package/modern/ChartsYAxis/ChartsYAxis.js +69 -17
- package/modern/LineChart/AnimatedArea.js +5 -22
- package/modern/LineChart/AnimatedLine.d.ts +1 -4
- package/modern/LineChart/AnimatedLine.js +9 -24
- package/modern/LineChart/AppearingMask.d.ts +5 -0
- package/modern/LineChart/AppearingMask.js +23 -18
- package/modern/LineChart/CircleMarkElement.js +19 -25
- package/modern/LineChart/LineChart.js +2 -0
- package/modern/LineChart/LineHighlightPlot.js +3 -4
- package/modern/LineChart/MarkElement.js +17 -28
- package/modern/LineChart/MarkPlot.js +0 -1
- package/modern/LineChart/markElementClasses.d.ts +3 -0
- package/modern/LineChart/markElementClasses.js +4 -3
- package/modern/LineChart/seriesConfig/index.js +2 -1
- package/modern/LineChart/seriesConfig/tooltip.d.ts +2 -1
- package/modern/LineChart/seriesConfig/tooltip.js +6 -0
- package/modern/LineChart/useLineChartProps.d.ts +2 -1
- package/modern/LineChart/useLineChartProps.js +6 -4
- package/modern/PieChart/PieArc.d.ts +19 -11
- package/modern/PieChart/PieArc.js +36 -23
- package/modern/PieChart/PieArcLabel.d.ts +22 -13
- package/modern/PieChart/PieArcLabel.js +51 -47
- package/modern/PieChart/PieArcLabelPlot.js +16 -34
- package/modern/PieChart/PieArcPlot.js +21 -34
- package/modern/PieChart/seriesConfig/tooltip.js +3 -0
- package/modern/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
- package/modern/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
- package/modern/RadarChart/RadarGrid/RadarGrid.js +5 -1
- package/modern/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
- package/modern/RadarChart/RadarGrid/useRadarGridData.js +3 -0
- package/modern/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
- package/modern/ScatterChart/ScatterChart.js +2 -0
- package/modern/ScatterChart/useScatterChartProps.d.ts +2 -1
- package/modern/ScatterChart/useScatterChartProps.js +5 -3
- package/modern/SparkLineChart/SparkLineChart.js +2 -0
- package/modern/colorPalettes/colorPalettes.js +2 -2
- package/modern/constants/index.d.ts +1 -1
- package/modern/constants/index.js +1 -1
- package/modern/context/AnimationProvider/AnimationProvider.js +3 -6
- package/modern/hooks/animation/index.d.ts +6 -0
- package/modern/hooks/animation/index.js +6 -0
- package/modern/hooks/animation/useAnimateArea.d.ts +15 -0
- package/modern/hooks/animation/useAnimateArea.js +27 -0
- package/modern/hooks/animation/useAnimateBar.d.ts +17 -0
- package/modern/hooks/animation/useAnimateBar.js +56 -0
- package/modern/hooks/animation/useAnimateBarLabel.d.ts +19 -0
- package/modern/hooks/animation/useAnimateBarLabel.js +59 -0
- package/modern/hooks/animation/useAnimateLine.d.ts +14 -0
- package/modern/hooks/animation/useAnimateLine.js +26 -0
- package/modern/hooks/animation/useAnimatePieArc.d.ts +15 -0
- package/modern/hooks/animation/useAnimatePieArc.js +70 -0
- package/modern/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
- package/modern/hooks/animation/useAnimatePieArcLabel.js +72 -0
- package/modern/hooks/index.d.ts +2 -1
- package/modern/hooks/index.js +2 -1
- package/modern/hooks/useAxis.d.ts +5 -5
- package/modern/hooks/useInteractionItemProps.js +11 -0
- package/modern/hooks/useScale.d.ts +2 -2
- package/modern/hooks/useScale.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internals/animation/Transition.d.ts +37 -0
- package/modern/internals/animation/Transition.js +83 -0
- package/modern/internals/animation/animation.d.ts +4 -0
- package/modern/internals/animation/animation.js +4 -0
- package/modern/internals/animation/useAnimate.d.ts +19 -0
- package/modern/internals/animation/useAnimate.js +74 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +21 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +28 -22
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +9 -42
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +75 -0
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +4 -10
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +8 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +18 -13
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +16 -32
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
- package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +22 -0
- package/modern/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
- package/modern/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
- package/modern/internals/shallowEqual.d.ts +8 -0
- package/modern/internals/shallowEqual.js +31 -0
- package/modern/models/axis.d.ts +8 -0
- package/modern/themeAugmentation/overrides.d.ts +1 -1
- package/package.json +8 -9
- package/themeAugmentation/overrides.d.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/PieChart/dataTransform/transition.d.ts +0 -4
- package/PieChart/dataTransform/transition.js +0 -145
- package/esm/PieChart/dataTransform/transition.d.ts +0 -4
- package/esm/PieChart/dataTransform/transition.js +0 -137
- package/modern/PieChart/dataTransform/transition.d.ts +0 -4
- package/modern/PieChart/dataTransform/transition.js +0 -137
|
@@ -15,6 +15,9 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
|
15
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
16
|
var _styles = require("@mui/material/styles");
|
|
17
17
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
18
|
+
var _useIsHydrated = require("../hooks/useIsHydrated");
|
|
19
|
+
var _defaultTextPlacement = require("../ChartsText/defaultTextPlacement");
|
|
20
|
+
var _ellipsize = require("../internals/ellipsize");
|
|
18
21
|
var _domUtils = require("../internals/domUtils");
|
|
19
22
|
var _useTicks = require("../hooks/useTicks");
|
|
20
23
|
var _useDrawingArea = require("../hooks/useDrawingArea");
|
|
@@ -25,6 +28,8 @@ var _isInfinity = require("../internals/isInfinity");
|
|
|
25
28
|
var _isBandScale = require("../internals/isBandScale");
|
|
26
29
|
var _ChartProvider = require("../context/ChartProvider");
|
|
27
30
|
var _hooks = require("../hooks");
|
|
31
|
+
var _clampAngle = require("../internals/clampAngle");
|
|
32
|
+
var _invertTextAnchor = require("../internals/invertTextAnchor");
|
|
28
33
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
34
|
const _excluded = ["scale", "tickNumber"];
|
|
30
35
|
const useUtilityClasses = ownerState => {
|
|
@@ -42,6 +47,47 @@ const useUtilityClasses = ownerState => {
|
|
|
42
47
|
};
|
|
43
48
|
return (0, _composeClasses.default)(slots, _axisClasses.getAxisUtilityClass, classes);
|
|
44
49
|
};
|
|
50
|
+
|
|
51
|
+
/* Gap between a tick and its label. */
|
|
52
|
+
const TICK_LABEL_GAP = 2;
|
|
53
|
+
/* Gap between the axis label and tick labels. */
|
|
54
|
+
const AXIS_LABEL_TICK_LABEL_GAP = 2;
|
|
55
|
+
function shortenLabels(visibleLabels, drawingArea, maxWidth, isRtl, tickLabelStyle) {
|
|
56
|
+
const shortenedLabels = new Map();
|
|
57
|
+
const angle = (0, _clampAngle.clampAngle)(tickLabelStyle?.angle ?? 0);
|
|
58
|
+
let topBoundFactor = 1;
|
|
59
|
+
let bottomBoundFactor = 1;
|
|
60
|
+
if (tickLabelStyle?.textAnchor === 'start') {
|
|
61
|
+
topBoundFactor = Infinity;
|
|
62
|
+
bottomBoundFactor = 1;
|
|
63
|
+
} else if (tickLabelStyle?.textAnchor === 'end') {
|
|
64
|
+
topBoundFactor = 1;
|
|
65
|
+
bottomBoundFactor = Infinity;
|
|
66
|
+
} else {
|
|
67
|
+
topBoundFactor = 2;
|
|
68
|
+
bottomBoundFactor = 2;
|
|
69
|
+
}
|
|
70
|
+
if (angle > 180) {
|
|
71
|
+
[topBoundFactor, bottomBoundFactor] = [bottomBoundFactor, topBoundFactor];
|
|
72
|
+
}
|
|
73
|
+
if (isRtl) {
|
|
74
|
+
[topBoundFactor, bottomBoundFactor] = [bottomBoundFactor, topBoundFactor];
|
|
75
|
+
}
|
|
76
|
+
for (const item of visibleLabels) {
|
|
77
|
+
if (item.formattedValue) {
|
|
78
|
+
// That maximum height of the tick depends on its proximity to the axis bounds.
|
|
79
|
+
const height = Math.min((item.offset + item.labelOffset) * topBoundFactor, (drawingArea.top + drawingArea.height + drawingArea.bottom - item.offset - item.labelOffset) * bottomBoundFactor);
|
|
80
|
+
const doesTextFit = text => (0, _ellipsize.doesTextFitInRect)(text, {
|
|
81
|
+
width: maxWidth,
|
|
82
|
+
height,
|
|
83
|
+
angle,
|
|
84
|
+
measureText: string => (0, _domUtils.getStringSize)(string, tickLabelStyle)
|
|
85
|
+
});
|
|
86
|
+
shortenedLabels.set(item, (0, _ellipsize.ellipsize)(item.formattedValue.toString(), doesTextFit));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return shortenedLabels;
|
|
90
|
+
}
|
|
45
91
|
const YAxisRoot = (0, _styles.styled)(_AxisSharedComponents.AxisRoot, {
|
|
46
92
|
name: 'MuiChartsYAxis',
|
|
47
93
|
slot: 'Root',
|
|
@@ -99,16 +145,18 @@ function ChartsYAxis(inProps) {
|
|
|
99
145
|
} = defaultizedProps;
|
|
100
146
|
const theme = (0, _styles.useTheme)();
|
|
101
147
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
148
|
+
const isHydrated = (0, _useIsHydrated.useIsHydrated)();
|
|
102
149
|
const classes = useUtilityClasses(defaultizedProps);
|
|
103
150
|
const {
|
|
104
151
|
instance
|
|
105
152
|
} = (0, _ChartProvider.useChartContext)();
|
|
153
|
+
const drawingArea = (0, _useDrawingArea.useDrawingArea)();
|
|
106
154
|
const {
|
|
107
155
|
left,
|
|
108
156
|
top,
|
|
109
157
|
width,
|
|
110
158
|
height
|
|
111
|
-
} =
|
|
159
|
+
} = drawingArea;
|
|
112
160
|
const tickSize = disableTicks ? 4 : tickSizeProp;
|
|
113
161
|
const yTicks = (0, _useTicks.useTicks)({
|
|
114
162
|
scale: yScale,
|
|
@@ -124,15 +172,16 @@ function ChartsYAxis(inProps) {
|
|
|
124
172
|
const Tick = slots?.axisTick ?? 'line';
|
|
125
173
|
const TickLabel = slots?.axisTickLabel ?? _ChartsText.ChartsText;
|
|
126
174
|
const Label = slots?.axisLabel ?? _ChartsText.ChartsText;
|
|
127
|
-
const
|
|
175
|
+
const defaultTextAnchor = (0, _defaultTextPlacement.getDefaultTextAnchor)((position === 'right' ? -90 : 90) - (tickLabelStyle?.angle ?? 0));
|
|
176
|
+
const defaultDominantBaseline = (0, _defaultTextPlacement.getDefaultBaseline)((position === 'right' ? -90 : 90) - (tickLabelStyle?.angle ?? 0));
|
|
128
177
|
const axisTickLabelProps = (0, _useSlotProps.default)({
|
|
129
178
|
elementType: TickLabel,
|
|
130
179
|
externalSlotProps: slotProps?.axisTickLabel,
|
|
131
180
|
additionalProps: {
|
|
132
181
|
style: (0, _extends2.default)({}, theme.typography.caption, {
|
|
133
182
|
fontSize: tickFontSize,
|
|
134
|
-
textAnchor:
|
|
135
|
-
dominantBaseline:
|
|
183
|
+
textAnchor: isRtl ? (0, _invertTextAnchor.invertTextAnchor)(defaultTextAnchor) : defaultTextAnchor,
|
|
184
|
+
dominantBaseline: defaultDominantBaseline
|
|
136
185
|
}, tickLabelStyle)
|
|
137
186
|
},
|
|
138
187
|
className: classes.tickLabel,
|
|
@@ -147,7 +196,7 @@ function ChartsYAxis(inProps) {
|
|
|
147
196
|
fontSize: 14,
|
|
148
197
|
angle: positionSign * 90,
|
|
149
198
|
textAnchor: 'middle',
|
|
150
|
-
dominantBaseline: '
|
|
199
|
+
dominantBaseline: 'text-before-edge'
|
|
151
200
|
}, labelStyle)
|
|
152
201
|
},
|
|
153
202
|
ownerState: {}
|
|
@@ -170,11 +219,13 @@ function ChartsYAxis(inProps) {
|
|
|
170
219
|
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(_isInfinity.isInfinity) || position === 'none') {
|
|
171
220
|
return null;
|
|
172
221
|
}
|
|
173
|
-
const labelHeight = label ? (0, _domUtils.getStringSize)(label, axisLabelProps.style).height : 0;
|
|
174
222
|
const labelRefPoint = {
|
|
175
|
-
x: positionSign *
|
|
223
|
+
x: positionSign * axisWidth,
|
|
176
224
|
y: top + height / 2
|
|
177
225
|
};
|
|
226
|
+
/* If there's an axis title, the tick labels have less space to render */
|
|
227
|
+
const tickLabelsMaxWidth = Math.max(0, axisWidth - (label ? (0, _domUtils.getStringSize)(label, axisLabelProps.style).height + AXIS_LABEL_TICK_LABEL_GAP : 0) - tickSize - TICK_LABEL_GAP);
|
|
228
|
+
const tickLabels = isHydrated ? shortenLabels(yTicks, drawingArea, tickLabelsMaxWidth, isRtl, axisTickLabelProps.style) : new Map(Array.from(yTicks).map(item => [item, item.formattedValue]));
|
|
178
229
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(YAxisRoot, {
|
|
179
230
|
transform: `translate(${position === 'right' ? left + width + offset : left - offset}, 0)`,
|
|
180
231
|
className: classes.root,
|
|
@@ -183,13 +234,13 @@ function ChartsYAxis(inProps) {
|
|
|
183
234
|
y1: top,
|
|
184
235
|
y2: top + height,
|
|
185
236
|
className: classes.line
|
|
186
|
-
}, lineSlotProps)), yTicks.map(({
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
const xTickLabel = positionSign * (tickSize +
|
|
237
|
+
}, lineSlotProps)), yTicks.map((item, index) => {
|
|
238
|
+
const {
|
|
239
|
+
offset: tickOffset,
|
|
240
|
+
labelOffset,
|
|
241
|
+
value
|
|
242
|
+
} = item;
|
|
243
|
+
const xTickLabel = positionSign * (tickSize + TICK_LABEL_GAP);
|
|
193
244
|
const yTickLabel = labelOffset;
|
|
194
245
|
const skipLabel = typeof tickLabelInterval === 'function' && !tickLabelInterval?.(value, index);
|
|
195
246
|
const showLabel = instance.isPointInside({
|
|
@@ -198,6 +249,7 @@ function ChartsYAxis(inProps) {
|
|
|
198
249
|
}, {
|
|
199
250
|
direction: 'y'
|
|
200
251
|
});
|
|
252
|
+
const tickLabel = tickLabels.get(item);
|
|
201
253
|
if (!showLabel) {
|
|
202
254
|
return null;
|
|
203
255
|
}
|
|
@@ -207,13 +259,13 @@ function ChartsYAxis(inProps) {
|
|
|
207
259
|
children: [!disableTicks && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tick, (0, _extends2.default)({
|
|
208
260
|
x2: positionSign * tickSize,
|
|
209
261
|
className: classes.tick
|
|
210
|
-
}, slotProps?.axisTick)),
|
|
262
|
+
}, slotProps?.axisTick)), tickLabel !== undefined && !skipLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(TickLabel, (0, _extends2.default)({
|
|
211
263
|
x: xTickLabel,
|
|
212
264
|
y: yTickLabel,
|
|
213
|
-
text:
|
|
265
|
+
text: tickLabel
|
|
214
266
|
}, axisTickLabelProps))]
|
|
215
267
|
}, index);
|
|
216
|
-
}), label && /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
268
|
+
}), label && isHydrated && /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
217
269
|
className: classes.label,
|
|
218
270
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Label, (0, _extends2.default)({}, labelRefPoint, axisLabelProps, {
|
|
219
271
|
text: label
|
|
@@ -11,11 +11,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var
|
|
15
|
-
var _useStringInterpolator = require("../internals/useStringInterpolator");
|
|
14
|
+
var _useAnimateArea = require("../hooks/animation/useAnimateArea");
|
|
16
15
|
var _AppearingMask = require("./AppearingMask");
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const _excluded = ["
|
|
17
|
+
const _excluded = ["skipAnimation", "ownerState"];
|
|
19
18
|
/**
|
|
20
19
|
* Demos:
|
|
21
20
|
*
|
|
@@ -28,38 +27,22 @@ const _excluded = ["d", "skipAnimation", "ownerState"];
|
|
|
28
27
|
*/
|
|
29
28
|
function AnimatedArea(props) {
|
|
30
29
|
const {
|
|
31
|
-
d,
|
|
32
30
|
skipAnimation,
|
|
33
31
|
ownerState
|
|
34
32
|
} = props,
|
|
35
33
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
36
|
-
const
|
|
37
|
-
const transitionChange = (0, _web.useTransition)([stringInterpolator], {
|
|
38
|
-
from: skipAnimation ? undefined : {
|
|
39
|
-
value: 0
|
|
40
|
-
},
|
|
41
|
-
to: {
|
|
42
|
-
value: 1
|
|
43
|
-
},
|
|
44
|
-
enter: {
|
|
45
|
-
value: 1
|
|
46
|
-
},
|
|
47
|
-
reset: false,
|
|
48
|
-
immediate: skipAnimation
|
|
49
|
-
});
|
|
34
|
+
const animatedProps = (0, _useAnimateArea.useAnimateArea)(props);
|
|
50
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppearingMask.AppearingMask, {
|
|
51
36
|
skipAnimation: skipAnimation,
|
|
52
37
|
id: `${ownerState.id}-area-clip`,
|
|
53
|
-
children:
|
|
54
|
-
// @ts-expect-error
|
|
55
|
-
d: style.value.to(interpolator),
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", (0, _extends2.default)({
|
|
56
39
|
fill: ownerState.gradientId ? `url(#${ownerState.gradientId})` : ownerState.color,
|
|
57
40
|
filter:
|
|
58
41
|
// eslint-disable-next-line no-nested-ternary
|
|
59
42
|
ownerState.isHighlighted ? 'brightness(140%)' : ownerState.gradientId ? undefined : 'brightness(120%)',
|
|
60
43
|
opacity: ownerState.isFaded ? 0.3 : 1,
|
|
61
44
|
stroke: "none"
|
|
62
|
-
}, other))
|
|
45
|
+
}, other, animatedProps))
|
|
63
46
|
});
|
|
64
47
|
}
|
|
65
48
|
process.env.NODE_ENV !== "production" ? AnimatedArea.propTypes = {
|
|
@@ -19,8 +19,5 @@ export interface AnimatedLineProps extends React.ComponentPropsWithoutRef<'path'
|
|
|
19
19
|
*
|
|
20
20
|
* - [AnimatedLine API](https://mui.com/x/api/charts/animated-line/)
|
|
21
21
|
*/
|
|
22
|
-
declare
|
|
23
|
-
declare namespace AnimatedLine {
|
|
24
|
-
var propTypes: any;
|
|
25
|
-
}
|
|
22
|
+
declare const AnimatedLine: React.ForwardRefExoticComponent<AnimatedLineProps & React.RefAttributes<SVGPathElement>>;
|
|
26
23
|
export { AnimatedLine };
|
|
@@ -6,16 +6,15 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.AnimatedLine =
|
|
9
|
+
exports.AnimatedLine = void 0;
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var
|
|
15
|
-
var _useStringInterpolator = require("../internals/useStringInterpolator");
|
|
14
|
+
var _hooks = require("../hooks");
|
|
16
15
|
var _AppearingMask = require("./AppearingMask");
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const _excluded = ["
|
|
17
|
+
const _excluded = ["skipAnimation", "ownerState"];
|
|
19
18
|
/**
|
|
20
19
|
* Demos:
|
|
21
20
|
*
|
|
@@ -26,42 +25,28 @@ const _excluded = ["d", "skipAnimation", "ownerState"];
|
|
|
26
25
|
*
|
|
27
26
|
* - [AnimatedLine API](https://mui.com/x/api/charts/animated-line/)
|
|
28
27
|
*/
|
|
29
|
-
function AnimatedLine(props) {
|
|
28
|
+
const AnimatedLine = exports.AnimatedLine = /*#__PURE__*/React.forwardRef(function AnimatedLine(props, ref) {
|
|
30
29
|
const {
|
|
31
|
-
d,
|
|
32
30
|
skipAnimation,
|
|
33
31
|
ownerState
|
|
34
32
|
} = props,
|
|
35
33
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
value: 0
|
|
40
|
-
},
|
|
41
|
-
to: {
|
|
42
|
-
value: 1
|
|
43
|
-
},
|
|
44
|
-
enter: {
|
|
45
|
-
value: 1
|
|
46
|
-
},
|
|
47
|
-
reset: false,
|
|
48
|
-
immediate: skipAnimation
|
|
49
|
-
});
|
|
34
|
+
const animateProps = (0, _hooks.useAnimateLine)((0, _extends2.default)({}, props, {
|
|
35
|
+
ref
|
|
36
|
+
}));
|
|
50
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppearingMask.AppearingMask, {
|
|
51
38
|
skipAnimation: skipAnimation,
|
|
52
39
|
id: `${ownerState.id}-line-clip`,
|
|
53
|
-
children:
|
|
54
|
-
// @ts-expect-error
|
|
55
|
-
d: style.value.to(interpolator),
|
|
40
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", (0, _extends2.default)({
|
|
56
41
|
stroke: ownerState.gradientId ? `url(#${ownerState.gradientId})` : ownerState.color,
|
|
57
42
|
strokeWidth: 2,
|
|
58
43
|
strokeLinejoin: "round",
|
|
59
44
|
fill: "none",
|
|
60
45
|
filter: ownerState.isHighlighted ? 'brightness(120%)' : undefined,
|
|
61
46
|
opacity: ownerState.isFaded ? 0.3 : 1
|
|
62
|
-
}, other))
|
|
47
|
+
}, other, animateProps))
|
|
63
48
|
});
|
|
64
|
-
}
|
|
49
|
+
});
|
|
65
50
|
process.env.NODE_ENV !== "production" ? AnimatedLine.propTypes = {
|
|
66
51
|
// ----------------------------- Warning --------------------------------
|
|
67
52
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -5,6 +5,11 @@ interface AppearingMaskProps {
|
|
|
5
5
|
skipAnimation?: boolean;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
+
export interface AppearingMaskClasses {
|
|
9
|
+
/** Styles applied if the element should be animated. */
|
|
10
|
+
animate: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const appearingMaskClasses: AppearingMaskClasses;
|
|
8
13
|
/**
|
|
9
14
|
* @ignore - internal component.
|
|
10
15
|
*/
|
|
@@ -1,46 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
5
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.AppearingMask = AppearingMask;
|
|
10
|
+
exports.appearingMaskClasses = void 0;
|
|
9
11
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
12
|
+
var _styles = require("@mui/material/styles");
|
|
13
|
+
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
14
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
|
+
var _animation = require("../internals/animation/animation");
|
|
11
16
|
var _cleanId = require("../internals/cleanId");
|
|
12
17
|
var _hooks = require("../hooks");
|
|
13
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
const appearingMaskClasses = exports.appearingMaskClasses = (0, _generateUtilityClasses.default)('MuiAppearingMask', ['animate']);
|
|
20
|
+
const AnimatedRect = (0, _styles.styled)('rect')({
|
|
21
|
+
animationName: 'animate-width',
|
|
22
|
+
animationTimingFunction: _animation.ANIMATION_TIMING_FUNCTION,
|
|
23
|
+
animationDuration: '0s',
|
|
24
|
+
[`&.${appearingMaskClasses.animate}`]: {
|
|
25
|
+
animationDuration: `${_animation.ANIMATION_DURATION_MS}ms`
|
|
26
|
+
},
|
|
27
|
+
'@keyframes animate-width': {
|
|
28
|
+
from: {
|
|
29
|
+
width: 0
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
14
34
|
/**
|
|
15
35
|
* @ignore - internal component.
|
|
16
36
|
*/
|
|
17
37
|
function AppearingMask(props) {
|
|
18
38
|
const drawingArea = (0, _hooks.useDrawingArea)();
|
|
19
39
|
const chartId = (0, _hooks.useChartId)();
|
|
20
|
-
const transitionAppear = (0, _web.useTransition)([drawingArea], {
|
|
21
|
-
from: props.skipAnimation ? undefined : v => ({
|
|
22
|
-
animatedWidth: v.left
|
|
23
|
-
}),
|
|
24
|
-
enter: v => ({
|
|
25
|
-
animatedWidth: v.width + v.left + v.right
|
|
26
|
-
}),
|
|
27
|
-
leave: v => ({
|
|
28
|
-
animatedWidth: v.width + v.left + v.right
|
|
29
|
-
}),
|
|
30
|
-
reset: false,
|
|
31
|
-
immediate: props.skipAnimation
|
|
32
|
-
});
|
|
33
40
|
const clipId = (0, _cleanId.cleanId)(`${chartId}-${props.id}`);
|
|
34
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
35
42
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("clipPath", {
|
|
36
43
|
id: clipId,
|
|
37
|
-
children:
|
|
38
|
-
|
|
44
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedRect, {
|
|
45
|
+
className: (0, _clsx.default)(!props.skipAnimation && appearingMaskClasses.animate),
|
|
39
46
|
x: 0,
|
|
40
47
|
y: 0,
|
|
41
|
-
width:
|
|
48
|
+
width: drawingArea.left + drawingArea.width + drawingArea.right,
|
|
42
49
|
height: drawingArea.top + drawingArea.height + drawingArea.bottom
|
|
43
|
-
})
|
|
50
|
+
})
|
|
44
51
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
45
52
|
clipPath: `url(#${clipId})`,
|
|
46
53
|
children: props.children
|
|
@@ -12,15 +12,23 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
|
-
var
|
|
15
|
+
var _animation = require("../internals/animation/animation");
|
|
16
16
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
17
17
|
var _useItemHighlighted = require("../hooks/useItemHighlighted");
|
|
18
18
|
var _markElementClasses = require("./markElementClasses");
|
|
19
19
|
var _useSelector = require("../internals/store/useSelector");
|
|
20
|
-
var
|
|
20
|
+
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
21
21
|
var _useStore = require("../internals/store/useStore");
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
const _excluded = ["x", "y", "id", "classes", "color", "dataIndex", "onClick", "skipAnimation"];
|
|
24
|
+
const Circle = (0, _styles.styled)('circle')({
|
|
25
|
+
[`&.${_markElementClasses.markElementClasses.animate}`]: {
|
|
26
|
+
transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
|
|
27
|
+
transitionProperty: 'cx, cy',
|
|
28
|
+
transitionTimingFunction: _animation.ANIMATION_TIMING_FUNCTION
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
24
32
|
/**
|
|
25
33
|
* The line mark element that only render circle for performance improvement.
|
|
26
34
|
*
|
|
@@ -58,33 +66,19 @@ function CircleMarkElement(props) {
|
|
|
58
66
|
seriesId: id
|
|
59
67
|
});
|
|
60
68
|
const store = (0, _useStore.useStore)();
|
|
61
|
-
const
|
|
62
|
-
const cx = (0, _web.useSpringValue)(x, {
|
|
63
|
-
immediate: skipAnimation
|
|
64
|
-
});
|
|
65
|
-
const cy = (0, _web.useSpringValue)(y, {
|
|
66
|
-
immediate: skipAnimation
|
|
67
|
-
});
|
|
68
|
-
React.useEffect(() => {
|
|
69
|
-
cy.start(y, {
|
|
70
|
-
immediate: skipAnimation
|
|
71
|
-
});
|
|
72
|
-
cx.start(x, {
|
|
73
|
-
immediate: skipAnimation
|
|
74
|
-
});
|
|
75
|
-
}, [cy, y, cx, x, skipAnimation]);
|
|
69
|
+
const xAxisInteractionIndex = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxisIndex);
|
|
76
70
|
const ownerState = {
|
|
77
71
|
id,
|
|
78
72
|
classes: innerClasses,
|
|
79
|
-
isHighlighted:
|
|
73
|
+
isHighlighted: xAxisInteractionIndex === dataIndex || isHighlighted,
|
|
80
74
|
isFaded,
|
|
81
|
-
color
|
|
75
|
+
color,
|
|
76
|
+
skipAnimation
|
|
82
77
|
};
|
|
83
78
|
const classes = (0, _markElementClasses.useUtilityClasses)(ownerState);
|
|
84
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
cy: cy,
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Circle, (0, _extends2.default)({}, other, {
|
|
80
|
+
cx: x,
|
|
81
|
+
cy: y,
|
|
88
82
|
r: 5,
|
|
89
83
|
fill: (theme.vars || theme).palette.background.paper,
|
|
90
84
|
stroke: color,
|
package/LineChart/LineChart.js
CHANGED
|
@@ -245,6 +245,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
245
245
|
height: _propTypes.default.number,
|
|
246
246
|
hideTooltip: _propTypes.default.bool,
|
|
247
247
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
248
|
+
ignoreTooltip: _propTypes.default.bool,
|
|
248
249
|
label: _propTypes.default.string,
|
|
249
250
|
labelStyle: _propTypes.default.object,
|
|
250
251
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
@@ -300,6 +301,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
300
301
|
fill: _propTypes.default.string,
|
|
301
302
|
hideTooltip: _propTypes.default.bool,
|
|
302
303
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
304
|
+
ignoreTooltip: _propTypes.default.bool,
|
|
303
305
|
label: _propTypes.default.string,
|
|
304
306
|
labelStyle: _propTypes.default.object,
|
|
305
307
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
@@ -19,7 +19,7 @@ var _constants = require("../constants");
|
|
|
19
19
|
var _useLineSeries = require("../hooks/useLineSeries");
|
|
20
20
|
var _getColor = _interopRequireDefault(require("./seriesConfig/getColor"));
|
|
21
21
|
var _ChartProvider = require("../context/ChartProvider");
|
|
22
|
-
var
|
|
22
|
+
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
23
23
|
var _useAxis = require("../hooks/useAxis");
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
const _excluded = ["slots", "slotProps"];
|
|
@@ -52,9 +52,8 @@ function LineHighlightPlot(props) {
|
|
|
52
52
|
instance
|
|
53
53
|
} = (0, _ChartProvider.useChartContext)();
|
|
54
54
|
const store = (0, _useStore.useStore)();
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
if (highlightedIndex === undefined) {
|
|
55
|
+
const highlightedIndex = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxisIndex);
|
|
56
|
+
if (highlightedIndex === null) {
|
|
58
57
|
return null;
|
|
59
58
|
}
|
|
60
59
|
if (seriesData === undefined) {
|
package/LineChart/MarkElement.js
CHANGED
|
@@ -13,17 +13,17 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
15
|
var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
16
|
-
var
|
|
16
|
+
var _animation = require("../internals/animation/animation");
|
|
17
17
|
var _getSymbol = require("../internals/getSymbol");
|
|
18
18
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
19
19
|
var _useItemHighlighted = require("../hooks/useItemHighlighted");
|
|
20
|
+
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
20
21
|
var _markElementClasses = require("./markElementClasses");
|
|
21
|
-
var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
|
|
22
22
|
var _useSelector = require("../internals/store/useSelector");
|
|
23
23
|
var _useStore = require("../internals/store/useStore");
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
const _excluded = ["x", "y", "id", "classes", "color", "shape", "dataIndex", "onClick", "skipAnimation"];
|
|
26
|
-
const MarkElementPath = (0, _styles.styled)(
|
|
26
|
+
const MarkElementPath = (0, _styles.styled)('path', {
|
|
27
27
|
name: 'MuiMarkElement',
|
|
28
28
|
slot: 'Root',
|
|
29
29
|
overridesResolver: (_, styles) => styles.root
|
|
@@ -33,7 +33,12 @@ const MarkElementPath = (0, _styles.styled)(_web.animated.path, {
|
|
|
33
33
|
}) => ({
|
|
34
34
|
fill: (theme.vars || theme).palette.background.paper,
|
|
35
35
|
stroke: ownerState.color,
|
|
36
|
-
strokeWidth: 2
|
|
36
|
+
strokeWidth: 2,
|
|
37
|
+
[`&.${_markElementClasses.markElementClasses.animate}`]: {
|
|
38
|
+
transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
|
|
39
|
+
transitionProperty: 'transform, transform-origin',
|
|
40
|
+
transitionTimingFunction: _animation.ANIMATION_TIMING_FUNCTION
|
|
41
|
+
}
|
|
37
42
|
}));
|
|
38
43
|
/**
|
|
39
44
|
* Demos:
|
|
@@ -70,37 +75,22 @@ function MarkElement(props) {
|
|
|
70
75
|
seriesId: id
|
|
71
76
|
});
|
|
72
77
|
const store = (0, _useStore.useStore)();
|
|
73
|
-
const
|
|
74
|
-
const cx = (0, _web.useSpringValue)(x, {
|
|
75
|
-
immediate: skipAnimation
|
|
76
|
-
});
|
|
77
|
-
const cy = (0, _web.useSpringValue)(y, {
|
|
78
|
-
immediate: skipAnimation
|
|
79
|
-
});
|
|
80
|
-
React.useEffect(() => {
|
|
81
|
-
cy.start(y, {
|
|
82
|
-
immediate: skipAnimation
|
|
83
|
-
});
|
|
84
|
-
cx.start(x, {
|
|
85
|
-
immediate: skipAnimation
|
|
86
|
-
});
|
|
87
|
-
}, [cy, y, cx, x, skipAnimation]);
|
|
78
|
+
const xAxisInteractionIndex = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxisIndex);
|
|
88
79
|
const ownerState = {
|
|
89
80
|
id,
|
|
90
81
|
classes: innerClasses,
|
|
91
|
-
isHighlighted:
|
|
82
|
+
isHighlighted: xAxisInteractionIndex === dataIndex || isHighlighted,
|
|
92
83
|
isFaded,
|
|
93
|
-
color
|
|
84
|
+
color,
|
|
85
|
+
skipAnimation
|
|
94
86
|
};
|
|
95
87
|
const classes = (0, _markElementClasses.useUtilityClasses)(ownerState);
|
|
96
88
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkElementPath, (0, _extends2.default)({}, other, {
|
|
97
89
|
style: {
|
|
98
|
-
transform:
|
|
99
|
-
transformOrigin:
|
|
90
|
+
transform: `translate(${x}px, ${y}px)`,
|
|
91
|
+
transformOrigin: `${x}px ${y}px`
|
|
100
92
|
},
|
|
101
|
-
ownerState: ownerState
|
|
102
|
-
// @ts-expect-error
|
|
103
|
-
,
|
|
93
|
+
ownerState: ownerState,
|
|
104
94
|
className: classes.root,
|
|
105
95
|
d: (0, _d3Shape.symbol)(_d3Shape.symbolsFill[(0, _getSymbol.getSymbol)(shape)])(),
|
|
106
96
|
onClick: onClick,
|
|
@@ -124,7 +114,6 @@ process.env.NODE_ENV !== "production" ? MarkElement.propTypes = {
|
|
|
124
114
|
shape: _propTypes.default.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']).isRequired,
|
|
125
115
|
/**
|
|
126
116
|
* If `true`, animations are skipped.
|
|
127
|
-
* @default false
|
|
128
117
|
*/
|
|
129
118
|
skipAnimation: _propTypes.default.bool
|
|
130
119
|
} : void 0;
|
package/LineChart/MarkPlot.js
CHANGED
|
@@ -6,6 +6,8 @@ export interface MarkElementClasses {
|
|
|
6
6
|
highlighted: string;
|
|
7
7
|
/** Styles applied to the root element when faded. */
|
|
8
8
|
faded: string;
|
|
9
|
+
/** Styles applied to the root element when animation is not skipped. */
|
|
10
|
+
animate: string;
|
|
9
11
|
}
|
|
10
12
|
export type MarkElementClassKey = keyof MarkElementClasses;
|
|
11
13
|
export interface MarkElementOwnerState {
|
|
@@ -14,6 +16,7 @@ export interface MarkElementOwnerState {
|
|
|
14
16
|
isFaded: boolean;
|
|
15
17
|
isHighlighted: boolean;
|
|
16
18
|
classes?: Partial<MarkElementClasses>;
|
|
19
|
+
skipAnimation?: boolean;
|
|
17
20
|
}
|
|
18
21
|
export declare function getMarkElementUtilityClass(slot: string): string;
|
|
19
22
|
export declare const markElementClasses: MarkElementClasses;
|
|
@@ -12,16 +12,17 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
|
|
|
12
12
|
function getMarkElementUtilityClass(slot) {
|
|
13
13
|
return (0, _generateUtilityClass.default)('MuiMarkElement', slot);
|
|
14
14
|
}
|
|
15
|
-
const markElementClasses = exports.markElementClasses = (0, _generateUtilityClasses.default)('MuiMarkElement', ['root', 'highlighted', 'faded']);
|
|
15
|
+
const markElementClasses = exports.markElementClasses = (0, _generateUtilityClasses.default)('MuiMarkElement', ['root', 'highlighted', 'faded', 'animate']);
|
|
16
16
|
const useUtilityClasses = ownerState => {
|
|
17
17
|
const {
|
|
18
18
|
classes,
|
|
19
19
|
id,
|
|
20
20
|
isFaded,
|
|
21
|
-
isHighlighted
|
|
21
|
+
isHighlighted,
|
|
22
|
+
skipAnimation
|
|
22
23
|
} = ownerState;
|
|
23
24
|
const slots = {
|
|
24
|
-
root: ['root', `series-${id}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
25
|
+
root: ['root', `series-${id}`, isHighlighted && 'highlighted', isFaded && 'faded', skipAnimation ? undefined : 'animate']
|
|
25
26
|
};
|
|
26
27
|
return (0, _composeClasses.default)(slots, getMarkElementUtilityClass, classes);
|
|
27
28
|
};
|