@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
|
@@ -151,6 +151,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
151
151
|
height: PropTypes.number,
|
|
152
152
|
hideTooltip: PropTypes.bool,
|
|
153
153
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
154
|
+
ignoreTooltip: PropTypes.bool,
|
|
154
155
|
label: PropTypes.string,
|
|
155
156
|
labelStyle: PropTypes.object,
|
|
156
157
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -208,6 +209,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
208
209
|
height: PropTypes.number,
|
|
209
210
|
hideTooltip: PropTypes.bool,
|
|
210
211
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
212
|
+
ignoreTooltip: PropTypes.bool,
|
|
211
213
|
label: PropTypes.string,
|
|
212
214
|
labelGap: PropTypes.number,
|
|
213
215
|
labelStyle: PropTypes.object,
|
|
@@ -288,6 +290,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
288
290
|
height: PropTypes.number,
|
|
289
291
|
hideTooltip: PropTypes.bool,
|
|
290
292
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
293
|
+
ignoreTooltip: PropTypes.bool,
|
|
291
294
|
label: PropTypes.string,
|
|
292
295
|
labelStyle: PropTypes.object,
|
|
293
296
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -343,6 +346,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
343
346
|
fill: PropTypes.string,
|
|
344
347
|
hideTooltip: PropTypes.bool,
|
|
345
348
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
349
|
+
ignoreTooltip: PropTypes.bool,
|
|
346
350
|
label: PropTypes.string,
|
|
347
351
|
labelStyle: PropTypes.object,
|
|
348
352
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -5,7 +5,7 @@ import { getValueToPositionMapper, useXScale } from "../hooks/useScale.js";
|
|
|
5
5
|
import { isBandScale } from "../internals/isBandScale.js";
|
|
6
6
|
import { useSelector } from "../internals/store/useSelector.js";
|
|
7
7
|
import { useStore } from "../internals/store/useStore.js";
|
|
8
|
-
import {
|
|
8
|
+
import { selectorChartsInteractionXAxisValue } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
9
9
|
import { useDrawingArea } from "../hooks/index.js";
|
|
10
10
|
import { ChartsAxisHighlightPath } from "./ChartsAxisHighlightPath.js";
|
|
11
11
|
|
|
@@ -24,26 +24,26 @@ export default function ChartsXHighlight(props) {
|
|
|
24
24
|
} = useDrawingArea();
|
|
25
25
|
const xScale = useXScale();
|
|
26
26
|
const store = useStore();
|
|
27
|
-
const
|
|
27
|
+
const axisXValue = useSelector(store, selectorChartsInteractionXAxisValue);
|
|
28
28
|
const getXPosition = getValueToPositionMapper(xScale);
|
|
29
|
-
const isBandScaleX = type === 'band' &&
|
|
29
|
+
const isBandScaleX = type === 'band' && axisXValue !== null && isBandScale(xScale);
|
|
30
30
|
if (process.env.NODE_ENV !== 'production') {
|
|
31
|
-
const isError = isBandScaleX && xScale(
|
|
31
|
+
const isError = isBandScaleX && xScale(axisXValue) === undefined;
|
|
32
32
|
if (isError) {
|
|
33
33
|
console.error([`MUI X: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
37
|
-
children: [isBandScaleX && xScale(
|
|
37
|
+
children: [isBandScaleX && xScale(axisXValue) !== undefined && /*#__PURE__*/_jsx(ChartsAxisHighlightPath
|
|
38
38
|
// @ts-expect-error, xScale value is checked in the statement above
|
|
39
39
|
, {
|
|
40
|
-
d: `M ${xScale(
|
|
40
|
+
d: `M ${xScale(axisXValue) - (xScale.step() - xScale.bandwidth()) / 2} ${top} l ${xScale.step()} 0 l 0 ${height} l ${-xScale.step()} 0 Z`,
|
|
41
41
|
className: classes.root,
|
|
42
42
|
ownerState: {
|
|
43
43
|
axisHighlight: 'band'
|
|
44
44
|
}
|
|
45
|
-
}), type === 'line' &&
|
|
46
|
-
d: `M ${getXPosition(
|
|
45
|
+
}), type === 'line' && axisXValue !== null && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
|
|
46
|
+
d: `M ${getXPosition(axisXValue)} ${top} L ${getXPosition(axisXValue)} ${top + height}`,
|
|
47
47
|
className: classes.root,
|
|
48
48
|
ownerState: {
|
|
49
49
|
axisHighlight: 'line'
|
|
@@ -5,7 +5,7 @@ import { getValueToPositionMapper, useYScale } from "../hooks/useScale.js";
|
|
|
5
5
|
import { isBandScale } from "../internals/isBandScale.js";
|
|
6
6
|
import { useSelector } from "../internals/store/useSelector.js";
|
|
7
7
|
import { useStore } from "../internals/store/useStore.js";
|
|
8
|
-
import {
|
|
8
|
+
import { selectorChartsInteractionYAxisValue } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
9
9
|
import { useDrawingArea } from "../hooks/index.js";
|
|
10
10
|
import { ChartsAxisHighlightPath } from "./ChartsAxisHighlightPath.js";
|
|
11
11
|
|
|
@@ -24,26 +24,26 @@ export default function ChartsYHighlight(props) {
|
|
|
24
24
|
} = useDrawingArea();
|
|
25
25
|
const yScale = useYScale();
|
|
26
26
|
const store = useStore();
|
|
27
|
-
const
|
|
27
|
+
const axisYValue = useSelector(store, selectorChartsInteractionYAxisValue);
|
|
28
28
|
const getYPosition = getValueToPositionMapper(yScale);
|
|
29
|
-
const isBandScaleY = type === 'band' &&
|
|
29
|
+
const isBandScaleY = type === 'band' && axisYValue !== null && isBandScale(yScale);
|
|
30
30
|
if (process.env.NODE_ENV !== 'production') {
|
|
31
|
-
const isError = isBandScaleY && yScale(
|
|
31
|
+
const isError = isBandScaleY && yScale(axisYValue) === undefined;
|
|
32
32
|
if (isError) {
|
|
33
33
|
console.error([`MUI X: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
37
|
-
children: [isBandScaleY && yScale(
|
|
37
|
+
children: [isBandScaleY && yScale(axisYValue) !== undefined && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
|
|
38
38
|
d: `M ${left} ${
|
|
39
39
|
// @ts-expect-error, yScale value is checked in the statement above
|
|
40
|
-
yScale(
|
|
40
|
+
yScale(axisYValue) - (yScale.step() - yScale.bandwidth()) / 2} l 0 ${yScale.step()} l ${width} 0 l 0 ${-yScale.step()} Z`,
|
|
41
41
|
className: classes.root,
|
|
42
42
|
ownerState: {
|
|
43
43
|
axisHighlight: 'band'
|
|
44
44
|
}
|
|
45
|
-
}), type === 'line' &&
|
|
46
|
-
d: `M ${left} ${getYPosition(
|
|
45
|
+
}), type === 'line' && axisYValue !== null && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
|
|
46
|
+
d: `M ${left} ${getYPosition(axisYValue)} L ${left + width} ${getYPosition(axisYValue)}`,
|
|
47
47
|
className: classes.root,
|
|
48
48
|
ownerState: {
|
|
49
49
|
axisHighlight: 'line'
|
|
@@ -17,15 +17,11 @@ const Root = styled('div', {
|
|
|
17
17
|
})(() => {
|
|
18
18
|
return {
|
|
19
19
|
display: 'flex',
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
justifyContent: 'center',
|
|
22
|
-
flexShrink: 0,
|
|
23
20
|
width: 14,
|
|
24
21
|
height: 14,
|
|
25
22
|
[`&.${labelMarkClasses.line}`]: {
|
|
26
23
|
width: 16,
|
|
27
24
|
height: 'unset',
|
|
28
|
-
display: 'flex',
|
|
29
25
|
alignItems: 'center',
|
|
30
26
|
[`.${labelMarkClasses.mask}`]: {
|
|
31
27
|
height: 4,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { ChartsLabelMarkProps, ChartsLabelCustomMarkProps } from './ChartsLabelMark';
|
|
2
|
+
export { ChartsLabelMark } from "./ChartsLabelMark.js";
|
|
2
3
|
export { labelClasses } from "./labelClasses.js";
|
|
3
4
|
export type { ChartsLabelClasses } from './labelClasses';
|
|
4
5
|
export { labelMarkClasses } from "./labelMarkClasses.js";
|
|
@@ -22,5 +22,5 @@ export interface ContinuousColorLegendClasses {
|
|
|
22
22
|
/** Styles applied to the series label. */
|
|
23
23
|
label: string;
|
|
24
24
|
}
|
|
25
|
-
export declare const useUtilityClasses: (props: ContinuousColorLegendProps & ChartsLegendSlotExtension) => Record<"root" | "label" | "mark" | "
|
|
25
|
+
export declare const useUtilityClasses: (props: ContinuousColorLegendProps & ChartsLegendSlotExtension) => Record<"root" | "label" | "mark" | "gradient" | "minLabel" | "maxLabel", string>;
|
|
26
26
|
export declare const continuousColorLegendClasses: ContinuousColorLegendClasses;
|
|
@@ -11,7 +11,7 @@ const StyledText = styled('text')(({
|
|
|
11
11
|
theme
|
|
12
12
|
}) => _extends({}, theme.typography.body2, {
|
|
13
13
|
stroke: 'none',
|
|
14
|
-
fill: theme.palette.text.primary,
|
|
14
|
+
fill: (theme.vars || theme).palette.text.primary,
|
|
15
15
|
shapeRendering: 'crispEdges',
|
|
16
16
|
textAnchor: 'middle',
|
|
17
17
|
dominantBaseline: 'middle'
|
|
@@ -11,7 +11,7 @@ const StyledText = styled('text')(({
|
|
|
11
11
|
theme
|
|
12
12
|
}) => _extends({}, theme.typography.body2, {
|
|
13
13
|
stroke: 'none',
|
|
14
|
-
fill: theme.palette.text.primary,
|
|
14
|
+
fill: (theme.vars || theme).palette.text.primary,
|
|
15
15
|
shapeRendering: 'crispEdges',
|
|
16
16
|
textAnchor: 'middle',
|
|
17
17
|
dominantBaseline: 'middle'
|
|
@@ -6,7 +6,7 @@ import Typography from '@mui/material/Typography';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { useUtilityClasses } from "./chartsTooltipClasses.js";
|
|
8
8
|
import { ChartsTooltipCell, ChartsTooltipPaper, ChartsTooltipRow, ChartsTooltipTable } from "./ChartsTooltipTable.js";
|
|
9
|
-
import {
|
|
9
|
+
import { useAxesTooltip } from "./useAxesTooltip.js";
|
|
10
10
|
import { useXAxis, useYAxis } from "../hooks/index.js";
|
|
11
11
|
import { ChartsLabelMark } from "../ChartsLabel/ChartsLabelMark.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -15,70 +15,62 @@ function ChartsAxisTooltipContent(props) {
|
|
|
15
15
|
classes: propClasses,
|
|
16
16
|
sx
|
|
17
17
|
} = props;
|
|
18
|
-
const tooltipData =
|
|
18
|
+
const tooltipData = useAxesTooltip();
|
|
19
19
|
const xAxis = useXAxis();
|
|
20
20
|
const yAxis = useYAxis();
|
|
21
21
|
const classes = useUtilityClasses(propClasses);
|
|
22
22
|
if (tooltipData === null) {
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
|
-
const {
|
|
26
|
-
axisDirection,
|
|
27
|
-
axisValue,
|
|
28
|
-
axisFormattedValue,
|
|
29
|
-
seriesItems
|
|
30
|
-
} = tooltipData;
|
|
31
|
-
const axis = axisDirection === 'x' ? xAxis : yAxis;
|
|
32
25
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
33
26
|
sx: sx,
|
|
34
27
|
className: classes.paper,
|
|
35
|
-
children:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
|
28
|
+
children: tooltipData.map(({
|
|
29
|
+
axisId,
|
|
30
|
+
axisDirection,
|
|
31
|
+
axisValue,
|
|
32
|
+
axisFormattedValue,
|
|
33
|
+
seriesItems
|
|
34
|
+
}) => {
|
|
35
|
+
const axis = axisDirection === 'x' ? xAxis : yAxis;
|
|
36
|
+
return /*#__PURE__*/_jsxs(ChartsTooltipTable, {
|
|
37
|
+
className: classes.table,
|
|
38
|
+
children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx(Typography, {
|
|
39
|
+
component: "caption",
|
|
40
|
+
children: axisFormattedValue
|
|
41
|
+
}), /*#__PURE__*/_jsx("tbody", {
|
|
42
|
+
children: seriesItems.map(({
|
|
43
|
+
seriesId,
|
|
44
|
+
color,
|
|
45
|
+
formattedValue,
|
|
46
|
+
formattedLabel,
|
|
47
|
+
markType
|
|
48
|
+
}) => {
|
|
49
|
+
if (formattedValue == null) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/_jsxs(ChartsTooltipRow, {
|
|
53
|
+
className: classes.row,
|
|
54
|
+
children: [/*#__PURE__*/_jsxs(ChartsTooltipCell, {
|
|
55
|
+
className: clsx(classes.labelCell, classes.cell),
|
|
56
|
+
component: "th",
|
|
57
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
58
|
+
className: classes.markContainer,
|
|
59
|
+
children: /*#__PURE__*/_jsx(ChartsLabelMark, {
|
|
60
|
+
type: markType,
|
|
61
|
+
color: color,
|
|
62
|
+
className: classes.mark
|
|
63
|
+
})
|
|
64
|
+
}), formattedLabel || null]
|
|
65
|
+
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
66
|
+
className: clsx(classes.valueCell, classes.cell),
|
|
67
|
+
component: "td",
|
|
76
68
|
children: formattedValue
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
|
-
})
|
|
81
|
-
})
|
|
69
|
+
})]
|
|
70
|
+
}, seriesId);
|
|
71
|
+
})
|
|
72
|
+
})]
|
|
73
|
+
}, axisId);
|
|
82
74
|
})
|
|
83
75
|
});
|
|
84
76
|
}
|
|
@@ -32,18 +32,20 @@ function ChartsItemTooltipContent(props) {
|
|
|
32
32
|
children: /*#__PURE__*/_jsx("tbody", {
|
|
33
33
|
children: /*#__PURE__*/_jsxs(ChartsTooltipRow, {
|
|
34
34
|
className: classes.row,
|
|
35
|
-
children: [/*#__PURE__*/
|
|
36
|
-
className: clsx(classes.markCell, classes.cell),
|
|
37
|
-
children: /*#__PURE__*/_jsx(ChartsLabelMark, {
|
|
38
|
-
type: markType,
|
|
39
|
-
color: color,
|
|
40
|
-
className: classes.mark
|
|
41
|
-
})
|
|
42
|
-
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
35
|
+
children: [/*#__PURE__*/_jsxs(ChartsTooltipCell, {
|
|
43
36
|
className: clsx(classes.labelCell, classes.cell),
|
|
44
|
-
|
|
37
|
+
component: "th",
|
|
38
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
39
|
+
className: classes.markContainer,
|
|
40
|
+
children: /*#__PURE__*/_jsx(ChartsLabelMark, {
|
|
41
|
+
type: markType,
|
|
42
|
+
color: color,
|
|
43
|
+
className: classes.mark
|
|
44
|
+
})
|
|
45
|
+
}), label]
|
|
45
46
|
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
46
47
|
className: clsx(classes.valueCell, classes.cell),
|
|
48
|
+
component: "td",
|
|
47
49
|
children: formattedValue
|
|
48
50
|
})]
|
|
49
51
|
})
|
|
@@ -58,7 +58,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
|
|
|
58
58
|
* The components used for each slot inside the Popper.
|
|
59
59
|
* Either a string to use a HTML element or a component.
|
|
60
60
|
*
|
|
61
|
-
* @deprecated use the `slots` prop instead. This prop will be removed in
|
|
61
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
62
62
|
* @default {}
|
|
63
63
|
*/
|
|
64
64
|
components: PropTypes.shape({
|
|
@@ -67,7 +67,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
|
|
|
67
67
|
/**
|
|
68
68
|
* The props used for each slot inside the Popper.
|
|
69
69
|
*
|
|
70
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in
|
|
70
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
71
71
|
* @default {}
|
|
72
72
|
*/
|
|
73
73
|
componentsProps: PropTypes.shape({
|
|
@@ -14,8 +14,8 @@ import { useSvgRef } from "../hooks/useSvgRef.js";
|
|
|
14
14
|
import { usePointerType } from "./utils.js";
|
|
15
15
|
import { useSelector } from "../internals/store/useSelector.js";
|
|
16
16
|
import { useStore } from "../internals/store/useStore.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { selectorChartsInteractionItemIsDefined } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
18
|
+
import { selectorChartsInteractionAxisTooltip } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
const ChartsTooltipRoot = styled(Popper, {
|
|
21
21
|
name: 'MuiChartsTooltip',
|
|
@@ -27,7 +27,6 @@ const ChartsTooltipRoot = styled(Popper, {
|
|
|
27
27
|
pointerEvents: 'none',
|
|
28
28
|
zIndex: theme.zIndex.modal
|
|
29
29
|
}));
|
|
30
|
-
const axisHasData = axis => axis?.data !== undefined && axis.data.length !== 0;
|
|
31
30
|
|
|
32
31
|
/**
|
|
33
32
|
* Demos:
|
|
@@ -51,16 +50,13 @@ function ChartsTooltipContainer(inProps) {
|
|
|
51
50
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
52
51
|
const svgRef = useSvgRef();
|
|
53
52
|
const pointerType = usePointerType();
|
|
54
|
-
const xAxis = useXAxis();
|
|
55
53
|
const popperRef = React.useRef(null);
|
|
56
54
|
const positionRef = useLazyRef(() => ({
|
|
57
55
|
x: 0,
|
|
58
56
|
y: 0
|
|
59
57
|
}));
|
|
60
58
|
const store = useStore();
|
|
61
|
-
const isOpen = useSelector(store,
|
|
62
|
-
// eslint-disable-next-line no-nested-ternary
|
|
63
|
-
trigger === 'axis' ? axisHasData(xAxis) ? selectorChartsInteractionXAxisIsDefined : selectorChartsInteractionYAxisIsDefined : selectorChartsInteractionItemIsDefined);
|
|
59
|
+
const isOpen = useSelector(store, trigger === 'axis' ? selectorChartsInteractionAxisTooltip : selectorChartsInteractionItemIsDefined);
|
|
64
60
|
const popperOpen = pointerType !== null && isOpen; // tooltipHasData;
|
|
65
61
|
|
|
66
62
|
React.useEffect(() => {
|
|
@@ -154,7 +150,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltipContainer.propTypes = {
|
|
|
154
150
|
* The components used for each slot inside the Popper.
|
|
155
151
|
* Either a string to use a HTML element or a component.
|
|
156
152
|
*
|
|
157
|
-
* @deprecated use the `slots` prop instead. This prop will be removed in
|
|
153
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
158
154
|
* @default {}
|
|
159
155
|
*/
|
|
160
156
|
components: PropTypes.shape({
|
|
@@ -163,7 +159,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltipContainer.propTypes = {
|
|
|
163
159
|
/**
|
|
164
160
|
* The props used for each slot inside the Popper.
|
|
165
161
|
*
|
|
166
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in
|
|
162
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
167
163
|
* @default {}
|
|
168
164
|
*/
|
|
169
165
|
componentsProps: PropTypes.shape({
|
|
@@ -13,4 +13,6 @@ export declare const ChartsTooltipRow: import("@emotion/styled").StyledComponent
|
|
|
13
13
|
/**
|
|
14
14
|
* @ignore - internal component.
|
|
15
15
|
*/
|
|
16
|
-
export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<import("@mui/
|
|
16
|
+
export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "className" | "children" | "sx" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping">, "p" | "slot" | "style" | "title" | "ref" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "sx" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
17
|
+
component?: React.ElementType;
|
|
18
|
+
}, {}, {}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { styled } from '@mui/material/styles';
|
|
2
|
+
import Typography from '@mui/material/Typography';
|
|
2
3
|
import { chartsTooltipClasses } from "./chartsTooltipClasses.js";
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -28,8 +29,14 @@ export const ChartsTooltipTable = styled('table', {
|
|
|
28
29
|
theme
|
|
29
30
|
}) => ({
|
|
30
31
|
borderSpacing: 0,
|
|
31
|
-
'&
|
|
32
|
-
borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px
|
|
32
|
+
'& caption': {
|
|
33
|
+
borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px`,
|
|
34
|
+
padding: theme.spacing(0.5, 1.5),
|
|
35
|
+
textAlign: 'start',
|
|
36
|
+
whiteSpace: 'nowrap',
|
|
37
|
+
'& span': {
|
|
38
|
+
marginRight: theme.spacing(1.5)
|
|
39
|
+
}
|
|
33
40
|
}
|
|
34
41
|
}));
|
|
35
42
|
|
|
@@ -54,20 +61,27 @@ export const ChartsTooltipRow = styled('tr', {
|
|
|
54
61
|
/**
|
|
55
62
|
* @ignore - internal component.
|
|
56
63
|
*/
|
|
57
|
-
export const ChartsTooltipCell = styled(
|
|
64
|
+
export const ChartsTooltipCell = styled(Typography, {
|
|
58
65
|
name: 'MuiChartsTooltip',
|
|
59
|
-
slot: 'Cell'
|
|
60
|
-
overridesResolver: (props, styles) => styles.cell
|
|
66
|
+
slot: 'Cell'
|
|
61
67
|
})(({
|
|
62
68
|
theme
|
|
63
69
|
}) => ({
|
|
64
70
|
verticalAlign: 'middle',
|
|
65
71
|
color: (theme.vars || theme).palette.text.secondary,
|
|
66
|
-
|
|
72
|
+
textAlign: 'start',
|
|
73
|
+
[`&.${chartsTooltipClasses.cell}`]: {
|
|
67
74
|
paddingLeft: theme.spacing(1),
|
|
68
|
-
paddingRight: theme.spacing(1
|
|
75
|
+
paddingRight: theme.spacing(1)
|
|
76
|
+
},
|
|
77
|
+
[`&.${chartsTooltipClasses.labelCell}`]: {
|
|
69
78
|
fontWeight: theme.typography.fontWeightRegular
|
|
70
79
|
},
|
|
80
|
+
[`& .${chartsTooltipClasses.markContainer}`]: {
|
|
81
|
+
display: 'inline-block',
|
|
82
|
+
width: `calc(20px + ${theme.spacing(1.5)})`,
|
|
83
|
+
verticalAlign: 'middle'
|
|
84
|
+
},
|
|
71
85
|
[`&.${chartsTooltipClasses.valueCell}, &.${chartsTooltipClasses.axisValueCell}`]: {
|
|
72
86
|
color: (theme.vars || theme).palette.text.primary,
|
|
73
87
|
fontWeight: theme.typography.fontWeightMedium
|
|
@@ -76,10 +90,10 @@ export const ChartsTooltipCell = styled('td', {
|
|
|
76
90
|
paddingLeft: theme.spacing(1.5),
|
|
77
91
|
paddingRight: theme.spacing(1.5)
|
|
78
92
|
},
|
|
79
|
-
'td:first-of-type&': {
|
|
93
|
+
'td:first-of-type&, th:first-of-type&': {
|
|
80
94
|
paddingLeft: theme.spacing(1.5)
|
|
81
95
|
},
|
|
82
|
-
'td:last-of-type&': {
|
|
96
|
+
'td:last-of-type&, th:last-of-type&': {
|
|
83
97
|
paddingRight: theme.spacing(1.5)
|
|
84
98
|
}
|
|
85
99
|
}));
|
|
@@ -11,8 +11,8 @@ export interface ChartsTooltipClasses {
|
|
|
11
11
|
cell: string;
|
|
12
12
|
/** Styles applied to the mark element. */
|
|
13
13
|
mark: string;
|
|
14
|
-
/** Styles applied to the
|
|
15
|
-
|
|
14
|
+
/** Styles applied to the markContainer element. */
|
|
15
|
+
markContainer: string;
|
|
16
16
|
/** Styles applied to the labelCell element. */
|
|
17
17
|
labelCell: string;
|
|
18
18
|
/** Styles applied to the valueCell element. */
|
|
@@ -20,7 +20,7 @@ export interface ChartsTooltipClasses {
|
|
|
20
20
|
/** Styles applied to the axisValueCell element. Only available for axis tooltip. */
|
|
21
21
|
axisValueCell: string;
|
|
22
22
|
}
|
|
23
|
-
export type ChartsTooltipClassKey = keyof Omit<ChartsTooltipClasses, '
|
|
23
|
+
export type ChartsTooltipClassKey = keyof Omit<ChartsTooltipClasses, 'markContainer' | 'labelCell' | 'valueCell'>;
|
|
24
24
|
export declare function getChartsTooltipUtilityClass(slot: string): string;
|
|
25
25
|
export declare const chartsTooltipClasses: ChartsTooltipClasses;
|
|
26
|
-
export declare const useUtilityClasses: (classes?: Partial<ChartsTooltipClasses>) => Record<"root" | "mark" | "table" | "cell" | "row" | "
|
|
26
|
+
export declare const useUtilityClasses: (classes?: Partial<ChartsTooltipClasses>) => Record<"root" | "mark" | "table" | "cell" | "row" | "markContainer" | "labelCell" | "valueCell" | "paper" | "axisValueCell", string>;
|
|
@@ -4,7 +4,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
4
4
|
export function getChartsTooltipUtilityClass(slot) {
|
|
5
5
|
return generateUtilityClass('MuiChartsTooltip', slot);
|
|
6
6
|
}
|
|
7
|
-
export const chartsTooltipClasses = generateUtilityClasses('MuiChartsTooltip', ['root', 'paper', 'table', 'row', 'cell', 'mark', '
|
|
7
|
+
export const chartsTooltipClasses = generateUtilityClasses('MuiChartsTooltip', ['root', 'paper', 'table', 'row', 'cell', 'mark', 'markContainer', 'labelCell', 'valueCell', 'axisValueCell']);
|
|
8
8
|
export const useUtilityClasses = classes => {
|
|
9
9
|
const slots = {
|
|
10
10
|
root: ['root'],
|
|
@@ -13,7 +13,7 @@ export const useUtilityClasses = classes => {
|
|
|
13
13
|
row: ['row'],
|
|
14
14
|
cell: ['cell'],
|
|
15
15
|
mark: ['mark'],
|
|
16
|
-
|
|
16
|
+
markContainer: ['markContainer'],
|
|
17
17
|
labelCell: ['labelCell'],
|
|
18
18
|
valueCell: ['valueCell'],
|
|
19
19
|
axisValueCell: ['axisValueCell']
|
|
@@ -7,5 +7,6 @@ export * from "./ChartsItemTooltipContent.js";
|
|
|
7
7
|
export * from "./ChartsTooltipTable.js";
|
|
8
8
|
export * from "./useItemTooltip.js";
|
|
9
9
|
export * from "./useAxisTooltip.js";
|
|
10
|
+
export * from "./useAxesTooltip.js";
|
|
10
11
|
export { useMouseTracker } from "./utils.js";
|
|
11
12
|
export * from "./ChartTooltip.types.js";
|
|
@@ -6,5 +6,6 @@ export * from "./ChartsItemTooltipContent.js";
|
|
|
6
6
|
export * from "./ChartsTooltipTable.js";
|
|
7
7
|
export * from "./useItemTooltip.js";
|
|
8
8
|
export * from "./useAxisTooltip.js";
|
|
9
|
+
export * from "./useAxesTooltip.js";
|
|
9
10
|
export { useMouseTracker } from "./utils.js";
|
|
10
11
|
export * from "./ChartTooltip.types.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UseAxisTooltipParams, UseAxisTooltipReturnValue } from "./useAxisTooltip.js";
|
|
2
|
+
type UseAxesTooltipParams = Omit<UseAxisTooltipParams, 'multipleAxes'>;
|
|
3
|
+
/**
|
|
4
|
+
* Returns the axes to display in the tooltip and the series item related to them.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAxesTooltip(params?: UseAxesTooltipParams): UseAxisTooltipReturnValue[] | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import { useAxisTooltip } from "./useAxisTooltip.js";
|
|
5
|
+
/**
|
|
6
|
+
* Returns the axes to display in the tooltip and the series item related to them.
|
|
7
|
+
*/
|
|
8
|
+
export function useAxesTooltip(params) {
|
|
9
|
+
return useAxisTooltip(_extends({}, params, {
|
|
10
|
+
multipleAxes: true
|
|
11
|
+
}));
|
|
12
|
+
}
|