@mui/x-charts 8.11.3 → 8.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.d.ts +2 -2
- package/BarChart/BarChart.js +1 -0
- package/BarChart/BarChart.plugins.d.ts +3 -2
- package/BarChart/BarChart.plugins.js +2 -1
- package/BarChart/BarElement.js +10 -2
- package/BarChart/index.d.ts +1 -0
- package/BarChart/index.js +12 -0
- package/BarChart/useBarChartProps.d.ts +2 -2
- package/CHANGELOG.md +151 -6
- package/ChartContainer/ChartContainer.js +4 -2
- package/ChartContainer/useChartContainerProps.js +4 -2
- package/ChartsLegend/ContinuousColorLegend.js +1 -0
- package/ChartsLegend/PiecewiseColorLegend.js +1 -0
- package/ChartsSurface/ChartsSurface.js +21 -2
- package/ChartsWrapper/ChartsWrapper.d.ts +2 -1
- package/ChartsWrapper/ChartsWrapper.js +49 -46
- package/ChartsXAxis/useAxisTicksProps.d.ts +3 -3
- package/ChartsYAxis/useAxisTicksProps.d.ts +3 -3
- package/LineChart/FocusedMark.d.ts +2 -0
- package/LineChart/FocusedMark.js +44 -0
- package/LineChart/LineChart.d.ts +2 -2
- package/LineChart/LineChart.js +3 -1
- package/LineChart/LineChart.plugins.d.ts +3 -2
- package/LineChart/LineChart.plugins.js +2 -1
- package/LineChart/index.d.ts +1 -0
- package/LineChart/index.js +12 -0
- package/LineChart/useLineChartProps.d.ts +2 -2
- package/PieChart/PieArc.d.ts +1 -0
- package/PieChart/PieArc.js +7 -3
- package/PieChart/PieArcPlot.js +1 -0
- package/PieChart/PieChart.js +1 -0
- package/PieChart/PieChart.plugins.d.ts +2 -1
- package/PieChart/PieChart.plugins.js +2 -1
- package/PieChart/dataTransform/useTransformData.d.ts +1 -0
- package/PieChart/dataTransform/useTransformData.js +9 -1
- package/PieChart/index.d.ts +1 -0
- package/PieChart/index.js +12 -0
- package/RadarChart/RadarChart.plugins.d.ts +1 -1
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +3 -3
- package/RadarChart/index.d.ts +2 -1
- package/RadarChart/index.js +12 -0
- package/RadarChart/useRadarChartProps.d.ts +2 -2
- package/ScatterChart/BatchScatter.d.ts +32 -0
- package/ScatterChart/BatchScatter.js +171 -0
- package/ScatterChart/Scatter.js +13 -5
- package/ScatterChart/ScatterChart.d.ts +4 -4
- package/ScatterChart/ScatterChart.js +13 -2
- package/ScatterChart/ScatterChart.plugins.d.ts +4 -3
- package/ScatterChart/ScatterChart.plugins.js +3 -2
- package/ScatterChart/ScatterPlot.d.ts +10 -0
- package/ScatterChart/ScatterPlot.js +14 -2
- package/ScatterChart/index.d.ts +1 -0
- package/ScatterChart/index.js +12 -0
- package/ScatterChart/useScatterChartProps.d.ts +2 -2
- package/ScatterChart/useScatterChartProps.js +8 -5
- package/SparkLineChart/SparkLineChart.js +10 -5
- package/Toolbar/Toolbar.js +1 -2
- package/colorPalettes/types.d.ts +1 -1
- package/context/ChartApi.d.ts +6 -6
- package/esm/BarChart/BarChart.d.ts +2 -2
- package/esm/BarChart/BarChart.js +1 -0
- package/esm/BarChart/BarChart.plugins.d.ts +3 -2
- package/esm/BarChart/BarChart.plugins.js +2 -1
- package/esm/BarChart/BarElement.js +10 -2
- package/esm/BarChart/index.d.ts +1 -0
- package/esm/BarChart/index.js +1 -0
- package/esm/BarChart/useBarChartProps.d.ts +2 -2
- package/esm/ChartContainer/ChartContainer.js +4 -2
- package/esm/ChartContainer/useChartContainerProps.js +4 -2
- package/esm/ChartsLegend/ContinuousColorLegend.js +1 -0
- package/esm/ChartsLegend/PiecewiseColorLegend.js +1 -0
- package/esm/ChartsSurface/ChartsSurface.js +21 -2
- package/esm/ChartsWrapper/ChartsWrapper.d.ts +2 -1
- package/esm/ChartsWrapper/ChartsWrapper.js +49 -46
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +3 -3
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +3 -3
- package/esm/LineChart/FocusedMark.d.ts +2 -0
- package/esm/LineChart/FocusedMark.js +38 -0
- package/esm/LineChart/LineChart.d.ts +2 -2
- package/esm/LineChart/LineChart.js +3 -1
- package/esm/LineChart/LineChart.plugins.d.ts +3 -2
- package/esm/LineChart/LineChart.plugins.js +2 -1
- package/esm/LineChart/index.d.ts +1 -0
- package/esm/LineChart/index.js +1 -0
- package/esm/LineChart/useLineChartProps.d.ts +2 -2
- package/esm/PieChart/PieArc.d.ts +1 -0
- package/esm/PieChart/PieArc.js +7 -3
- package/esm/PieChart/PieArcPlot.js +1 -0
- package/esm/PieChart/PieChart.js +1 -0
- package/esm/PieChart/PieChart.plugins.d.ts +2 -1
- package/esm/PieChart/PieChart.plugins.js +2 -1
- package/esm/PieChart/dataTransform/useTransformData.d.ts +1 -0
- package/esm/PieChart/dataTransform/useTransformData.js +9 -1
- package/esm/PieChart/index.d.ts +1 -0
- package/esm/PieChart/index.js +1 -0
- package/esm/RadarChart/RadarChart.plugins.d.ts +1 -1
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +3 -3
- package/esm/RadarChart/index.d.ts +2 -1
- package/esm/RadarChart/index.js +2 -1
- package/esm/RadarChart/useRadarChartProps.d.ts +2 -2
- package/esm/ScatterChart/BatchScatter.d.ts +32 -0
- package/esm/ScatterChart/BatchScatter.js +165 -0
- package/esm/ScatterChart/Scatter.js +13 -5
- package/esm/ScatterChart/ScatterChart.d.ts +4 -4
- package/esm/ScatterChart/ScatterChart.js +13 -2
- package/esm/ScatterChart/ScatterChart.plugins.d.ts +4 -3
- package/esm/ScatterChart/ScatterChart.plugins.js +3 -2
- package/esm/ScatterChart/ScatterPlot.d.ts +10 -0
- package/esm/ScatterChart/ScatterPlot.js +14 -2
- package/esm/ScatterChart/index.d.ts +1 -0
- package/esm/ScatterChart/index.js +1 -0
- package/esm/ScatterChart/useScatterChartProps.d.ts +2 -2
- package/esm/ScatterChart/useScatterChartProps.js +8 -5
- package/esm/SparkLineChart/SparkLineChart.js +10 -5
- package/esm/Toolbar/Toolbar.js +1 -2
- package/esm/colorPalettes/types.d.ts +1 -1
- package/esm/context/ChartApi.d.ts +6 -6
- package/esm/hooks/useAxis.d.ts +5 -5
- package/esm/hooks/useDrawingArea.d.ts +20 -2
- package/esm/hooks/useFocusedItem.d.ts +15 -0
- package/esm/hooks/useFocusedItem.js +20 -0
- package/esm/hooks/useIsItemFocused.d.ts +12 -0
- package/esm/hooks/useIsItemFocused.js +15 -0
- package/esm/hooks/useIsItemFocusedGetter.d.ts +8 -0
- package/esm/hooks/useIsItemFocusedGetter.js +14 -0
- package/esm/hooks/useScale.js +6 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/internals/animation/Transition.js +1 -3
- package/esm/internals/index.d.ts +3 -2
- package/esm/internals/index.js +3 -2
- package/esm/internals/plugins/allPlugins.d.ts +5 -4
- package/esm/internals/plugins/allPlugins.js +3 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +2 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +66 -72
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +3 -19
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +10 -18
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/{getAxisExtremum.d.ts → getAxisExtrema.d.ts} +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js +24 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +63 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +123 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +8 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +2 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +46 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +32 -21
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/index.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.js → useChartClosestPoint/useChartClosestPoint.js} +9 -7
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.js +3 -0
- package/esm/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.types.d.ts → useChartClosestPoint/useChartClosestPoint.types.d.ts} +8 -4
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +16 -0
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +32 -0
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -0
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +5 -0
- package/esm/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.js +3 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.d.ts +20 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.js +88 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +210 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +25 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +7 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +34 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.js +1 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +10 -8
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +2 -1
- package/esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +1 -1
- package/esm/internals/scaleGuards.d.ts +7 -0
- package/esm/internals/scaleGuards.js +6 -0
- package/esm/locales/elGR.d.ts +96 -0
- package/esm/locales/elGR.js +100 -0
- package/esm/locales/enUS.d.ts +96 -0
- package/esm/locales/enUS.js +99 -1
- package/esm/locales/frFR.d.ts +96 -0
- package/esm/locales/frFR.js +100 -2
- package/esm/locales/ptBR.d.ts +96 -0
- package/esm/locales/ptBR.js +100 -0
- package/esm/locales/ptPT.d.ts +96 -0
- package/esm/locales/ptPT.js +100 -0
- package/esm/locales/svSE.d.ts +97 -1
- package/esm/locales/svSE.js +100 -0
- package/esm/locales/utils/chartsLocaleTextApi.d.ts +384 -0
- package/esm/locales/utils/getChartsLocalization.d.ts +96 -0
- package/esm/plugins/index.d.ts +6 -0
- package/esm/plugins/index.js +12 -0
- package/hooks/useAxis.d.ts +5 -5
- package/hooks/useDrawingArea.d.ts +20 -2
- package/hooks/useFocusedItem.d.ts +15 -0
- package/hooks/useFocusedItem.js +26 -0
- package/hooks/useIsItemFocused.d.ts +12 -0
- package/hooks/useIsItemFocused.js +20 -0
- package/hooks/useIsItemFocusedGetter.d.ts +8 -0
- package/hooks/useIsItemFocusedGetter.js +18 -0
- package/hooks/useScale.js +6 -0
- package/index.d.ts +1 -0
- package/index.js +13 -1
- package/internals/animation/Transition.js +0 -2
- package/internals/index.d.ts +3 -2
- package/internals/index.js +20 -8
- package/internals/plugins/allPlugins.d.ts +5 -4
- package/internals/plugins/allPlugins.js +3 -2
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +63 -69
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +3 -19
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +10 -18
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/{getAxisExtremum.d.ts → getAxisExtrema.d.ts} +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +63 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +134 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +8 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +47 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +33 -22
- package/internals/plugins/featurePlugins/useChartClosestPoint/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/index.js +27 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.d.ts +3 -0
- package/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.js → useChartClosestPoint/useChartClosestPoint.js} +11 -9
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.js +9 -0
- package/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.types.d.ts → useChartClosestPoint/useChartClosestPoint.types.d.ts} +8 -4
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +16 -0
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +41 -0
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -0
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +6 -1
- package/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.js +9 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js +27 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.d.ts +20 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.js +96 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +218 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +25 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +13 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +34 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.js +5 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +10 -8
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +2 -1
- package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +1 -1
- package/internals/scaleGuards.d.ts +7 -0
- package/internals/scaleGuards.js +8 -0
- package/locales/elGR.d.ts +96 -0
- package/locales/elGR.js +100 -0
- package/locales/enUS.d.ts +96 -0
- package/locales/enUS.js +99 -1
- package/locales/frFR.d.ts +96 -0
- package/locales/frFR.js +100 -2
- package/locales/ptBR.d.ts +96 -0
- package/locales/ptBR.js +100 -0
- package/locales/ptPT.d.ts +96 -0
- package/locales/ptPT.js +100 -0
- package/locales/svSE.d.ts +97 -1
- package/locales/svSE.js +100 -0
- package/locales/utils/chartsLocaleTextApi.d.ts +384 -0
- package/locales/utils/getChartsLocalization.d.ts +96 -0
- package/package.json +4 -4
- package/plugins/index.d.ts +6 -0
- package/plugins/index.js +47 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.js +0 -22
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/index.d.ts +0 -3
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/index.js +0 -2
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.d.ts +0 -3
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +0 -5
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.js +0 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.js +0 -29
- package/internals/plugins/featurePlugins/useChartVoronoi/index.d.ts +0 -3
- package/internals/plugins/featurePlugins/useChartVoronoi/index.js +0 -27
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.d.ts +0 -3
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +0 -5
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.js +0 -9
- /package/esm/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.types.js → useChartClosestPoint/useChartClosestPoint.types.js} +0 -0
- /package/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.types.js → useChartClosestPoint/useChartClosestPoint.types.js} +0 -0
package/BarChart/BarChart.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ import { ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js";
|
|
|
12
12
|
import { ChartsAxisSlots, ChartsAxisSlotProps } from "../models/axis.js";
|
|
13
13
|
import { ChartsGridProps } from "../ChartsGrid/index.js";
|
|
14
14
|
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from "../ChartsOverlay/ChartsOverlay.js";
|
|
15
|
-
import {
|
|
15
|
+
import { BarChartPluginSignatures } from "./BarChart.plugins.js";
|
|
16
16
|
export interface BarChartSlots extends ChartsAxisSlots, BarPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
|
|
17
17
|
export interface BarChartSlotProps extends ChartsAxisSlotProps, BarPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
|
|
18
18
|
export type BarSeries = MakeOptional<BarSeriesType, 'type'>;
|
|
19
|
-
export interface BarChartProps extends Omit<ChartContainerProps<'bar',
|
|
19
|
+
export interface BarChartProps extends Omit<ChartContainerProps<'bar', BarChartPluginSignatures>, 'series' | 'plugins' | 'zAxis' | 'experimentalFeatures'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<BarPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
20
20
|
/**
|
|
21
21
|
* The series to display in the bar chart.
|
|
22
22
|
* An array of [[BarSeries]] objects.
|
package/BarChart/BarChart.js
CHANGED
|
@@ -119,6 +119,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
119
119
|
* @default false
|
|
120
120
|
*/
|
|
121
121
|
disableAxisListener: _propTypes.default.bool,
|
|
122
|
+
enableKeyboardNavigation: _propTypes.default.bool,
|
|
122
123
|
/**
|
|
123
124
|
* Option to display a cartesian grid in the background.
|
|
124
125
|
*/
|
|
@@ -2,6 +2,7 @@ import { UseChartZAxisSignature } from "../internals/plugins/featurePlugins/useC
|
|
|
2
2
|
import { UseChartCartesianAxisSignature } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
3
3
|
import { UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
4
4
|
import { UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
5
|
+
import { UseChartKeyboardNavigationSignature } from "../internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js";
|
|
5
6
|
import { ConvertSignaturesIntoPlugins } from "../internals/plugins/models/helpers.js";
|
|
6
|
-
export type
|
|
7
|
-
export declare const BAR_CHART_PLUGINS: ConvertSignaturesIntoPlugins<
|
|
7
|
+
export type BarChartPluginSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'bar'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature];
|
|
8
|
+
export declare const BAR_CHART_PLUGINS: ConvertSignaturesIntoPlugins<BarChartPluginSignatures>;
|
|
@@ -8,4 +8,5 @@ var _useChartZAxis = require("../internals/plugins/featurePlugins/useChartZAxis"
|
|
|
8
8
|
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
9
9
|
var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
|
|
10
10
|
var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight");
|
|
11
|
-
|
|
11
|
+
var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
|
|
12
|
+
const BAR_CHART_PLUGINS = exports.BAR_CHART_PLUGINS = [_useChartZAxis.useChartZAxis, _useChartCartesianAxis.useChartCartesianAxis, _useChartInteraction.useChartInteraction, _useChartHighlight.useChartHighlight, _useChartKeyboardNavigation.useChartKeyboardNavigation];
|
package/BarChart/BarElement.js
CHANGED
|
@@ -16,6 +16,7 @@ var _barElementClasses = require("./barElementClasses");
|
|
|
16
16
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
17
17
|
var _useItemHighlighted = require("../hooks/useItemHighlighted");
|
|
18
18
|
var _AnimatedBarElement = require("./AnimatedBarElement");
|
|
19
|
+
var _useIsItemFocused = require("../hooks/useIsItemFocused");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
const _excluded = ["id", "dataIndex", "classes", "color", "slots", "slotProps", "style", "onClick", "skipAnimation", "layout", "x", "xOrigin", "y", "yOrigin", "width", "height"];
|
|
21
22
|
function BarElement(props) {
|
|
@@ -50,13 +51,19 @@ function BarElement(props) {
|
|
|
50
51
|
seriesId: id,
|
|
51
52
|
dataIndex
|
|
52
53
|
});
|
|
54
|
+
const isFocused = (0, _useIsItemFocused.useIsItemFocused)({
|
|
55
|
+
seriesType: 'bar',
|
|
56
|
+
seriesId: id,
|
|
57
|
+
dataIndex
|
|
58
|
+
});
|
|
53
59
|
const ownerState = {
|
|
54
60
|
id,
|
|
55
61
|
dataIndex,
|
|
56
62
|
classes: innerClasses,
|
|
57
63
|
color,
|
|
58
64
|
isFaded,
|
|
59
|
-
isHighlighted
|
|
65
|
+
isHighlighted,
|
|
66
|
+
isFocused
|
|
60
67
|
};
|
|
61
68
|
const classes = (0, _barElementClasses.useUtilityClasses)(ownerState);
|
|
62
69
|
const Bar = slots?.bar ?? _AnimatedBarElement.AnimatedBarElement;
|
|
@@ -80,7 +87,8 @@ function BarElement(props) {
|
|
|
80
87
|
stroke: 'none',
|
|
81
88
|
fill: color,
|
|
82
89
|
skipAnimation,
|
|
83
|
-
layout
|
|
90
|
+
layout,
|
|
91
|
+
'data-focused': isFocused || undefined
|
|
84
92
|
}),
|
|
85
93
|
className: classes.root,
|
|
86
94
|
ownerState
|
package/BarChart/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./BarPlot.js";
|
|
|
3
3
|
export * from "./BarElement.js";
|
|
4
4
|
export * from "./BarLabel/index.js";
|
|
5
5
|
export * from "./barElementClasses.js";
|
|
6
|
+
export * from "./BarChart.plugins.js";
|
|
6
7
|
export { type BarProps } from "./AnimatedBarElement.js";
|
|
7
8
|
export { barClasses, getBarUtilityClass } from "./barClasses.js";
|
|
8
9
|
export type { BarClassKey, BarClasses } from "./barClasses.js";
|
package/BarChart/index.js
CHANGED
|
@@ -79,4 +79,16 @@ Object.keys(_barElementClasses).forEach(function (key) {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
|
+
var _BarChart2 = require("./BarChart.plugins");
|
|
83
|
+
Object.keys(_BarChart2).forEach(function (key) {
|
|
84
|
+
if (key === "default" || key === "__esModule") return;
|
|
85
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
86
|
+
if (key in exports && exports[key] === _BarChart2[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return _BarChart2[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
82
94
|
var _barClasses = require("./barClasses");
|
|
@@ -9,7 +9,7 @@ import { ChartsAxisProps } from "../ChartsAxis/index.js";
|
|
|
9
9
|
import { ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js";
|
|
10
10
|
import { ChartsLegendSlotExtension } from "../ChartsLegend/index.js";
|
|
11
11
|
import type { ChartsWrapperProps } from "../ChartsWrapper/index.js";
|
|
12
|
-
import {
|
|
12
|
+
import { BarChartPluginSignatures } from "./BarChart.plugins.js";
|
|
13
13
|
/**
|
|
14
14
|
* A helper function that extracts BarChartProps from the input props
|
|
15
15
|
* and returns an object with props for the children components of BarChart.
|
|
@@ -19,7 +19,7 @@ import { BarChartPluginsSignatures } from "./BarChart.plugins.js";
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const useBarChartProps: (props: BarChartProps) => {
|
|
21
21
|
chartsWrapperProps: Omit<ChartsWrapperProps, "children">;
|
|
22
|
-
chartContainerProps: ChartContainerProps<"bar",
|
|
22
|
+
chartContainerProps: ChartContainerProps<"bar", BarChartPluginSignatures>;
|
|
23
23
|
barPlotProps: BarPlotProps;
|
|
24
24
|
gridProps: ChartsGridProps;
|
|
25
25
|
clipPathProps: ChartsClipPathProps;
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,151 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.12.0
|
|
9
|
+
|
|
10
|
+
_Sep 25, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🤝 Grid-Charts integration
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
👉 [🎥 Watch the full video](https://github.com/user-attachments/assets/28f1848e-dc85-4077-8756-a3e88afd4e54)
|
|
19
|
+
|
|
20
|
+
- ⌨️ Charts keyboard navigation
|
|
21
|
+
- ⚡️ Charts: Add new `renderer="svg-batch"` prop to Scatter charts that provides improved performance for large datasets
|
|
22
|
+
- 🐞 Bugfixes
|
|
23
|
+
- 📚 Documentation improvements
|
|
24
|
+
- 🧰 Codemod requires Node >=20.19
|
|
25
|
+
|
|
26
|
+
`@mui/x-codemod` minimum supported Node version is `20.19`.
|
|
27
|
+
This was only the case due to using the v18 `yargs` package; this now explicitly aligns with it. (#18979)
|
|
28
|
+
|
|
29
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
30
|
+
@deade1e, @sai6855, @thomas-mcdonald
|
|
31
|
+
|
|
32
|
+
The following are all team members who have contributed to this release:
|
|
33
|
+
@alexfauquette, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @michelengelen, @prakhargupta1, @rita-codes, @siriwatknp, @arminmeh, @romgrk
|
|
34
|
+
|
|
35
|
+
### Data Grid
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-data-grid@8.12.0`
|
|
38
|
+
|
|
39
|
+
- [DataGrid] Fix flex column width diff calculation while resizing (#19667) @arminmeh
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-data-grid-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-data-grid@8.12.0`.
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-data-grid-premium@8.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-data-grid-pro@8.12.0`, plus:
|
|
48
|
+
|
|
49
|
+
- [DataGridPremium] Grid-Charts integration (#18021) @arminmeh
|
|
50
|
+
- [DataGridPremium] Fix sorting and filtering of the tree group columns with aggregation (#19607) @arminmeh
|
|
51
|
+
- [DataGridPremium] Disable aggregation on the grouping column by default (#19692) @arminmeh
|
|
52
|
+
- [DataGridPremium] Do not rely on the group separation constant to retrieve the column name for the charts panel (#19677) @arminmeh
|
|
53
|
+
- [DataGridPremium] Fix stale aggregation state (#19690) @arminmeh
|
|
54
|
+
- [DataGridPremium] Fix pivot column being hidden on autosizing (#19699) @cherniavskii
|
|
55
|
+
|
|
56
|
+
### Date and Time Pickers
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-date-pickers@8.12.0`
|
|
59
|
+
|
|
60
|
+
- [pickers] Ensure reference value is not updated for invalid values (#19635) @michelengelen
|
|
61
|
+
- [pickers] Fix `slotProps.textField.slotProps.htmlInput` resolution (#19713) @LukasTy
|
|
62
|
+
- [pickers] Preserve time format when using single column layout on Time Range Picker (#19626) @sai6855
|
|
63
|
+
- [pickers] Preserve time format when using single column layout on Date Time Picker and Date Time Range Picker (#19608) @sai6855
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-date-pickers-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
66
|
+
|
|
67
|
+
Same changes as in `@mui/x-date-pickers@8.12.0`.
|
|
68
|
+
|
|
69
|
+
### Charts
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts@8.12.0`
|
|
72
|
+
|
|
73
|
+
- [charts] Add batch renderer for scatter chart (#19075) @bernardobelchior
|
|
74
|
+
- [charts] Add renderer suffix to performance benchmarks (#19620) @bernardobelchior
|
|
75
|
+
- [charts] Document how plugins can be used (#19343) @alexfauquette
|
|
76
|
+
- [charts] Export chart plugins per series type (#19337) @alexfauquette
|
|
77
|
+
- [charts] Export plugins (#19335) @alexfauquette
|
|
78
|
+
- [charts] Fix horizontal layout and toolbar (#19655) @alexfauquette
|
|
79
|
+
- [charts] Fix performance issue with JS animations (#19606) @bernardobelchior
|
|
80
|
+
- [charts] Fix piecewise scale causing wrong colors in axis with min/max (#19610) @bernardobelchior
|
|
81
|
+
- [charts] Fix zoom discard inconsistency (#19535) @bernardobelchior
|
|
82
|
+
- [charts] Introduce keyboard navigation (#19155) @alexfauquette
|
|
83
|
+
- [charts] Refactor `getAxisExtremum` (#19627) @bernardobelchior
|
|
84
|
+
- [charts] Remove unused code path from `getAxisScale` (#19673) @bernardobelchior
|
|
85
|
+
- [charts] Make new hideLegend prop on ChartWrapper optional (#19694) @thomas-mcdonald
|
|
86
|
+
- [charts] Fix chart crash in test environment (#19711) @JCQuintas
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-charts-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
89
|
+
|
|
90
|
+
Same changes as in `@mui/x-charts@8.12.0`, plus:
|
|
91
|
+
|
|
92
|
+
- [charts-pro] Add `valueFormatter` to sankey (#19636) @JCQuintas
|
|
93
|
+
- [charts-pro] Allow `source/target` keywords in sankey link color (#19634) @JCQuintas
|
|
94
|
+
- [charts-pro] Allow exporting `SankeyChart` (#19659) @JCQuintas
|
|
95
|
+
- [charts-pro] Fix axis inversion when using axis `max` and `filterMode: 'discard'` (#19200) @bernardobelchior
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-charts-premium@8.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
98
|
+
|
|
99
|
+
Same changes as in `@mui/x-charts-pro@8.12.0`, plus:
|
|
100
|
+
|
|
101
|
+
- [charts-premium] Grid-Charts integration (#18021) @arminmeh
|
|
102
|
+
|
|
103
|
+
### Tree View
|
|
104
|
+
|
|
105
|
+
#### `@mui/x-tree-view@8.12.0`
|
|
106
|
+
|
|
107
|
+
- [tree view] Allow to pass `null` to the icon slots (#19569) @flaviendelangle
|
|
108
|
+
- [tree view] Fix `apiRef.current.isItemExpanded()` method (#19619) @flaviendelangle
|
|
109
|
+
|
|
110
|
+
#### `@mui/x-tree-view-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
111
|
+
|
|
112
|
+
Same changes as in `@mui/x-tree-view@8.12.0`.
|
|
113
|
+
|
|
114
|
+
### Codemod
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-codemod@8.12.0`
|
|
117
|
+
|
|
118
|
+
- [codemod] Bump `engines.node` to `>=20.19` to align with `yargs` package (#18979) @LukasTy
|
|
119
|
+
|
|
120
|
+
### Docs
|
|
121
|
+
|
|
122
|
+
- [docs] Add missing label to Charts example (#19616) @prakhargupta1
|
|
123
|
+
- [docs] Replace axis type and axis data with a table (#19618) @prakhargupta1
|
|
124
|
+
- [docs] Add Charts example collection page (#18353) @prakhargupta1
|
|
125
|
+
- [docs] Add a Charts demo showcasing bar and scatter composition (#19605) @prakhargupta1
|
|
126
|
+
- [docs] Add composition Charts demo for legends and tooltip (#19602) @prakhargupta1
|
|
127
|
+
- [docs] Add recipe about server-side data export (#19617) @siriwatknp
|
|
128
|
+
- [docs] Clarify DataGrid layout requirements (#19413) @romgrk
|
|
129
|
+
- [docs] Fix `ExportServerSideData` demo layout shift (#19669) @siriwatknp
|
|
130
|
+
- [docs] Improve server-side `updateRow()` description (#19554) @deade1e
|
|
131
|
+
- [docs] Show how to customize drawing area background (#19682) @alexfauquette
|
|
132
|
+
- [docs] Add hook documentation pages (#19334) @Copilot
|
|
133
|
+
|
|
134
|
+
### Core
|
|
135
|
+
|
|
136
|
+
- [code-infra] Add copilot instructions specific to x repo (#19623) @JCQuintas
|
|
137
|
+
- [code-infra] Load `tsx` files in visual regression (#19595) @JCQuintas
|
|
138
|
+
- [code-infra] Remove renovate automerge (#19501) @Janpot
|
|
139
|
+
- [code-infra] Update `DEFAULT_TIMESTAMP` format to ISO 8601 (#19624) @Janpot
|
|
140
|
+
- [code-infra] Update `findLatestTaggedVersion` to filter tags based on major version (#19693) @michelengelen
|
|
141
|
+
- [code-infra] Fix changelog generation for charts premium (#19701) @JCQuintas
|
|
142
|
+
- [code-infra] Run prettier on `createReleasePR.mjs` (#19702) @bernardobelchior
|
|
143
|
+
- [code-infra] Make `x-charts-premium` releasable (#18959) @JCQuintas
|
|
144
|
+
- [docs-infra] Ensure `create-playground` script only runs if target file is absent (#19603) @michelengelen
|
|
145
|
+
- [docs-infra] Add @prakhargupta1 as a codeowner of the docs (#19679) @alexfauquette
|
|
146
|
+
|
|
147
|
+
### Miscellaneous
|
|
148
|
+
|
|
149
|
+
- [test] Reduce time for wheel zoom test (#19571) @alexfauquette
|
|
150
|
+
- Change `matchPackageNames` to `matchDepNames` for date-fns-v2 @Janpot
|
|
151
|
+
- Remove groupName for date-fns-v2 in renovate.json @Janpot
|
|
152
|
+
|
|
8
153
|
## 8.11.3
|
|
9
154
|
|
|
10
155
|
_Sep 16, 2025_
|
|
@@ -27,11 +172,11 @@ The following are all team members who have contributed to this release:
|
|
|
27
172
|
- [DataGrid] Fix numeric font size not being applied (#19552) @cherniavskii
|
|
28
173
|
- [DataGrid] Improve `operator` types to display literal values (#19529) @siriwatknp
|
|
29
174
|
|
|
30
|
-
#### `@mui/x-data-grid-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link
|
|
175
|
+
#### `@mui/x-data-grid-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
176
|
|
|
32
177
|
Same changes as in `@mui/x-data-grid@8.11.3`.
|
|
33
178
|
|
|
34
|
-
#### `@mui/x-data-grid-premium@8.11.3` [](https://mui.com/r/x-premium-svg-link
|
|
179
|
+
#### `@mui/x-data-grid-premium@8.11.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
35
180
|
|
|
36
181
|
Same changes as in `@mui/x-data-grid-pro@8.11.3`.
|
|
37
182
|
|
|
@@ -41,7 +186,7 @@ Same changes as in `@mui/x-data-grid-pro@8.11.3`.
|
|
|
41
186
|
|
|
42
187
|
- [pickers] Refactor `slots` and `slotProps` propagation strategy (#18867) @LukasTy
|
|
43
188
|
|
|
44
|
-
#### `@mui/x-date-pickers-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link
|
|
189
|
+
#### `@mui/x-date-pickers-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
45
190
|
|
|
46
191
|
Same changes as in `@mui/x-date-pickers@8.11.3`.
|
|
47
192
|
|
|
@@ -55,7 +200,7 @@ Same changes as in `@mui/x-date-pickers@8.11.3`.
|
|
|
55
200
|
- [charts] Rename `isBandScale` to `isDiscreteScale` (#19514) @bernardobelchior
|
|
56
201
|
- [charts] Fix legend position affecting toolbar's position (#19257) @sai6855
|
|
57
202
|
|
|
58
|
-
#### `@mui/x-charts-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link
|
|
203
|
+
#### `@mui/x-charts-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
59
204
|
|
|
60
205
|
Same changes as in `@mui/x-charts@8.11.3`, plus:
|
|
61
206
|
|
|
@@ -69,7 +214,7 @@ Same changes as in `@mui/x-charts@8.11.3`, plus:
|
|
|
69
214
|
- [tree view] Support flat DOM structure (#19350) @flaviendelangle
|
|
70
215
|
- [tree view] Update cursor styles for disabled TreeItem (#19548) @sai6855
|
|
71
216
|
|
|
72
|
-
#### `@mui/x-tree-view-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link
|
|
217
|
+
#### `@mui/x-tree-view-pro@8.11.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
73
218
|
|
|
74
219
|
Same changes as in `@mui/x-tree-view@8.11.3`.
|
|
75
220
|
|
|
@@ -83,7 +228,7 @@ Internal changes.
|
|
|
83
228
|
|
|
84
229
|
- [docs] Add styling row group recipe (#19349) @siriwatknp
|
|
85
230
|
- [docs] Group demos data into the dataset folder (#19549) @alexfauquette
|
|
86
|
-
- [docs] Add `shiny` bar chart example at the top
|
|
231
|
+
- [docs] Add `shiny` bar chart example at the top (#19416) @JCQuintas
|
|
87
232
|
|
|
88
233
|
### Core
|
|
89
234
|
|
|
@@ -83,6 +83,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
83
83
|
* If true, the voronoi interaction are ignored.
|
|
84
84
|
*/
|
|
85
85
|
disableVoronoi: _propTypes.default.bool,
|
|
86
|
+
enableKeyboardNavigation: _propTypes.default.bool,
|
|
86
87
|
/**
|
|
87
88
|
* Options to enable features planned for the next major.
|
|
88
89
|
*/
|
|
@@ -665,10 +666,11 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
665
666
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
666
667
|
title: _propTypes.default.string,
|
|
667
668
|
/**
|
|
668
|
-
* Defines the
|
|
669
|
+
* Defines the maximum distance between a scatter point and the pointer that triggers the interaction.
|
|
670
|
+
* If set to `'item'`, the radius is the `markerSize`.
|
|
669
671
|
* If `undefined`, the radius is assumed to be infinite.
|
|
670
672
|
*/
|
|
671
|
-
voronoiMaxRadius: _propTypes.default.number,
|
|
673
|
+
voronoiMaxRadius: _propTypes.default.oneOfType([_propTypes.default.oneOf(['item']), _propTypes.default.number]),
|
|
672
674
|
/**
|
|
673
675
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
674
676
|
*/
|
|
@@ -9,7 +9,7 @@ exports.useChartContainerProps = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
12
|
-
const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "highlightedAxis", "onHighlightedAxisChange", "disableVoronoi", "voronoiMaxRadius", "onItemClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "rotationAxis", "radiusAxis", "skipAnimation", "seriesConfig", "plugins", "localeText", "slots", "slotProps", "experimentalFeatures"];
|
|
12
|
+
const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "highlightedAxis", "onHighlightedAxisChange", "disableVoronoi", "voronoiMaxRadius", "onItemClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "rotationAxis", "radiusAxis", "skipAnimation", "seriesConfig", "plugins", "localeText", "slots", "slotProps", "experimentalFeatures", "enableKeyboardNavigation"];
|
|
13
13
|
const useChartContainerProps = (props, ref) => {
|
|
14
14
|
const _ref = props,
|
|
15
15
|
{
|
|
@@ -43,7 +43,8 @@ const useChartContainerProps = (props, ref) => {
|
|
|
43
43
|
localeText,
|
|
44
44
|
slots,
|
|
45
45
|
slotProps,
|
|
46
|
-
experimentalFeatures
|
|
46
|
+
experimentalFeatures,
|
|
47
|
+
enableKeyboardNavigation
|
|
47
48
|
} = _ref,
|
|
48
49
|
other = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
49
50
|
const chartsSurfaceProps = (0, _extends2.default)({
|
|
@@ -77,6 +78,7 @@ const useChartContainerProps = (props, ref) => {
|
|
|
77
78
|
localeText,
|
|
78
79
|
seriesConfig,
|
|
79
80
|
experimentalFeatures,
|
|
81
|
+
enableKeyboardNavigation,
|
|
80
82
|
plugins: plugins ?? _allPlugins.DEFAULT_PLUGINS,
|
|
81
83
|
slots,
|
|
82
84
|
slotProps
|
|
@@ -73,6 +73,7 @@ const RootElement = (0, _styles.styled)('ul', {
|
|
|
73
73
|
paddingInlineStart: 0,
|
|
74
74
|
marginBlock: theme.spacing(1),
|
|
75
75
|
marginInline: theme.spacing(1),
|
|
76
|
+
gridArea: 'legend',
|
|
76
77
|
[`&.${_continuousColorLegendClasses.continuousColorLegendClasses.horizontal}`]: {
|
|
77
78
|
gridTemplateRows: 'min-content min-content',
|
|
78
79
|
gridTemplateColumns: 'min-content auto min-content',
|
|
@@ -18,6 +18,7 @@ var _useSvgRef = require("../hooks/useSvgRef");
|
|
|
18
18
|
var _useSelector = require("../internals/store/useSelector");
|
|
19
19
|
var _useStore = require("../internals/store/useStore");
|
|
20
20
|
var _useChartDimensions = require("../internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors");
|
|
21
|
+
var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
const _excluded = ["children", "className", "title", "desc"];
|
|
23
24
|
const ChartsSurfaceStyles = (0, _styles.styled)('svg', {
|
|
@@ -38,7 +39,21 @@ const ChartsSurfaceStyles = (0, _styles.styled)('svg', {
|
|
|
38
39
|
// For example, prevent page scroll & zoom.
|
|
39
40
|
touchAction: 'pan-y',
|
|
40
41
|
userSelect: 'none',
|
|
41
|
-
gridArea: 'chart'
|
|
42
|
+
gridArea: 'chart',
|
|
43
|
+
'&:focus': {
|
|
44
|
+
outline: 'none' // By default don't show focus on the SVG container
|
|
45
|
+
},
|
|
46
|
+
'&:focus-visible': {
|
|
47
|
+
// Show focus outline on the SVG container only when using keyboard navigation
|
|
48
|
+
outline: 'auto',
|
|
49
|
+
'&[data-has-focused-item=true]': {
|
|
50
|
+
// But not if the chart has a focused children item
|
|
51
|
+
outline: 'none'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
'& [data-focused=true]': {
|
|
55
|
+
outline: 'auto'
|
|
56
|
+
}
|
|
42
57
|
}));
|
|
43
58
|
|
|
44
59
|
/**
|
|
@@ -65,6 +80,8 @@ const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(func
|
|
|
65
80
|
width: propsWidth,
|
|
66
81
|
height: propsHeight
|
|
67
82
|
} = (0, _useSelector.useSelector)(store, _useChartDimensions.selectorChartPropsSize);
|
|
83
|
+
const isKeyboardNavigationEnabled = (0, _useSelector.useSelector)(store, _useChartKeyboardNavigation.selectorChartsIsKeyboardNavigationEnabled);
|
|
84
|
+
const hasFocusedItem = (0, _useSelector.useSelector)(store, _useChartKeyboardNavigation.selectorChartsHasFocusedItem);
|
|
68
85
|
const svgRef = (0, _useSvgRef.useSvgRef)();
|
|
69
86
|
const handleRef = (0, _useForkRef.default)(svgRef, ref);
|
|
70
87
|
const themeProps = (0, _styles.useThemeProps)({
|
|
@@ -85,7 +102,9 @@ const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(func
|
|
|
85
102
|
height: propsHeight
|
|
86
103
|
},
|
|
87
104
|
viewBox: `${0} ${0} ${svgWidth} ${svgHeight}`,
|
|
88
|
-
className: className
|
|
105
|
+
className: className,
|
|
106
|
+
tabIndex: isKeyboardNavigationEnabled ? 0 : undefined,
|
|
107
|
+
"data-has-focused-item": hasFocusedItem || undefined
|
|
89
108
|
}, other, {
|
|
90
109
|
ref: handleRef,
|
|
91
110
|
children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
|
|
@@ -15,8 +15,9 @@ export interface ChartsWrapperProps {
|
|
|
15
15
|
legendDirection?: Direction;
|
|
16
16
|
/**
|
|
17
17
|
* If `true`, the legend is not rendered.
|
|
18
|
+
* @default false
|
|
18
19
|
*/
|
|
19
|
-
hideLegend
|
|
20
|
+
hideLegend?: boolean;
|
|
20
21
|
/**
|
|
21
22
|
* If `true`, the chart wrapper set `height: 100%`.
|
|
22
23
|
* @default `false` if the `height` prop is set. And `true` otherwise.
|
|
@@ -34,10 +34,6 @@ const getAlignItems = position => {
|
|
|
34
34
|
}
|
|
35
35
|
return 'center';
|
|
36
36
|
};
|
|
37
|
-
const addToolbar = template => {
|
|
38
|
-
return `"toolbar"
|
|
39
|
-
${template}`;
|
|
40
|
-
};
|
|
41
37
|
const getGridTemplateAreas = (hideLegend, direction, position) => {
|
|
42
38
|
if (hideLegend) {
|
|
43
39
|
return `"chart"`;
|
|
@@ -55,26 +51,25 @@ const getGridTemplateAreas = (hideLegend, direction, position) => {
|
|
|
55
51
|
return `"legend"
|
|
56
52
|
"chart"`;
|
|
57
53
|
};
|
|
58
|
-
const getTemplateColumns = (hideLegend, direction,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
return `${width ? 'auto' : '1fr'} auto`;
|
|
54
|
+
const getTemplateColumns = (hideLegend = false, direction = 'horizontal', horizontalPosition = 'end', width = undefined) => {
|
|
55
|
+
const drawingAreaColumn = width ? 'auto' : '1fr';
|
|
56
|
+
if (direction === 'horizontal') {
|
|
57
|
+
return drawingAreaColumn;
|
|
58
|
+
}
|
|
59
|
+
if (hideLegend) {
|
|
60
|
+
return drawingAreaColumn;
|
|
67
61
|
}
|
|
68
|
-
return '
|
|
62
|
+
return horizontalPosition === 'start' ? `auto ${drawingAreaColumn}` : `${drawingAreaColumn} auto`;
|
|
69
63
|
};
|
|
70
|
-
const getTemplateRows = (hideLegend, direction) => {
|
|
64
|
+
const getTemplateRows = (hideLegend = false, direction = 'horizontal', verticalPosition = 'top') => {
|
|
65
|
+
const drawingAreaRow = '1fr';
|
|
71
66
|
if (direction === 'vertical') {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return
|
|
67
|
+
return drawingAreaRow;
|
|
68
|
+
}
|
|
69
|
+
if (hideLegend) {
|
|
70
|
+
return drawingAreaRow;
|
|
76
71
|
}
|
|
77
|
-
return 'auto
|
|
72
|
+
return verticalPosition === 'bottom' ? `${drawingAreaRow} auto` : `auto ${drawingAreaRow}`;
|
|
78
73
|
};
|
|
79
74
|
const Root = (0, _styles.styled)('div', {
|
|
80
75
|
name: 'MuiChartsWrapper',
|
|
@@ -83,32 +78,39 @@ const Root = (0, _styles.styled)('div', {
|
|
|
83
78
|
})(({
|
|
84
79
|
ownerState,
|
|
85
80
|
width
|
|
86
|
-
}) =>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
}) => {
|
|
82
|
+
const gridTemplateColumns = getTemplateColumns(ownerState.hideLegend, ownerState.legendDirection, ownerState.legendPosition?.horizontal, width);
|
|
83
|
+
const gridTemplateRows = getTemplateRows(ownerState.hideLegend, ownerState.legendDirection, ownerState.legendPosition?.vertical);
|
|
84
|
+
const gridTemplateAreas = getGridTemplateAreas(ownerState.hideLegend, ownerState.legendDirection, ownerState.legendPosition);
|
|
85
|
+
return {
|
|
86
|
+
variants: [{
|
|
87
|
+
props: {
|
|
88
|
+
extendVertically: true
|
|
89
|
+
},
|
|
90
|
+
style: {
|
|
91
|
+
height: '100%'
|
|
92
|
+
}
|
|
93
|
+
}],
|
|
94
|
+
flex: 1,
|
|
95
|
+
display: 'grid',
|
|
96
|
+
gridTemplateColumns,
|
|
97
|
+
gridTemplateRows,
|
|
98
|
+
gridTemplateAreas,
|
|
99
|
+
[`&:has(.${_Toolbar.chartsToolbarClasses.root})`]: {
|
|
100
|
+
// Add a row for toolbar if there is one.
|
|
101
|
+
gridTemplateRows: `auto ${gridTemplateRows}`,
|
|
102
|
+
gridTemplateAreas: `"${gridTemplateColumns.split(' ').map(() => 'toolbar').join(' ')}"
|
|
103
|
+
${gridTemplateAreas}`
|
|
90
104
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
gridTemplateAreas: addToolbar(getGridTemplateAreas(ownerState.hideLegend, ownerState.legendDirection, ownerState.legendPosition))
|
|
101
|
-
},
|
|
102
|
-
[`&:not(:has(.${_Toolbar.chartsToolbarClasses.root}))`]: {
|
|
103
|
-
gridTemplateAreas: getGridTemplateAreas(ownerState.hideLegend, ownerState.legendDirection, ownerState.legendPosition)
|
|
104
|
-
},
|
|
105
|
-
justifyContent: 'center',
|
|
106
|
-
justifyItems: getJustifyItems(ownerState.legendPosition),
|
|
107
|
-
alignItems: getAlignItems(ownerState.legendPosition),
|
|
108
|
-
[`& > .${_Toolbar.chartsToolbarClasses.root}`]: {
|
|
109
|
-
justifySelf: 'center'
|
|
110
|
-
}
|
|
111
|
-
}));
|
|
105
|
+
[`& .${_Toolbar.chartsToolbarClasses.root}`]: {
|
|
106
|
+
gridArea: 'toolbar',
|
|
107
|
+
justifySelf: 'center'
|
|
108
|
+
},
|
|
109
|
+
justifyContent: 'center',
|
|
110
|
+
justifyItems: getJustifyItems(ownerState.legendPosition),
|
|
111
|
+
alignItems: getAlignItems(ownerState.legendPosition)
|
|
112
|
+
};
|
|
113
|
+
});
|
|
112
114
|
|
|
113
115
|
/**
|
|
114
116
|
* Wrapper for the charts components.
|
|
@@ -148,8 +150,9 @@ process.env.NODE_ENV !== "production" ? ChartsWrapper.propTypes = {
|
|
|
148
150
|
extendVertically: _propTypes.default.bool,
|
|
149
151
|
/**
|
|
150
152
|
* If `true`, the legend is not rendered.
|
|
153
|
+
* @default false
|
|
151
154
|
*/
|
|
152
|
-
hideLegend: _propTypes.default.bool
|
|
155
|
+
hideLegend: _propTypes.default.bool,
|
|
153
156
|
/**
|
|
154
157
|
* The direction of the legend.
|
|
155
158
|
* @default 'horizontal'
|
|
@@ -3685,9 +3685,11 @@ export declare function useAxisTicksProps(inProps: ChartsXAxisProps): {
|
|
|
3685
3685
|
x?: number | string | undefined | undefined;
|
|
3686
3686
|
y?: number | string | undefined | undefined;
|
|
3687
3687
|
radius?: number | string | undefined | undefined;
|
|
3688
|
+
href?: string | undefined | undefined;
|
|
3688
3689
|
media?: string | undefined | undefined;
|
|
3689
|
-
method?: string | undefined | undefined;
|
|
3690
3690
|
target?: string | undefined | undefined;
|
|
3691
|
+
from?: number | string | undefined | undefined;
|
|
3692
|
+
method?: string | undefined | undefined;
|
|
3691
3693
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
3692
3694
|
accentHeight?: number | string | undefined | undefined;
|
|
3693
3695
|
accumulate?: "none" | "sum" | undefined | undefined;
|
|
@@ -3731,7 +3733,6 @@ export declare function useAxisTicksProps(inProps: ChartsXAxisProps): {
|
|
|
3731
3733
|
focusable?: "auto" | (boolean | "true" | "false") | undefined;
|
|
3732
3734
|
format?: number | string | undefined | undefined;
|
|
3733
3735
|
fr?: number | string | undefined | undefined;
|
|
3734
|
-
from?: number | string | undefined | undefined;
|
|
3735
3736
|
fx?: number | string | undefined | undefined;
|
|
3736
3737
|
fy?: number | string | undefined | undefined;
|
|
3737
3738
|
g1?: number | string | undefined | undefined;
|
|
@@ -3744,7 +3745,6 @@ export declare function useAxisTicksProps(inProps: ChartsXAxisProps): {
|
|
|
3744
3745
|
hanging?: number | string | undefined | undefined;
|
|
3745
3746
|
horizAdvX?: number | string | undefined | undefined;
|
|
3746
3747
|
horizOriginX?: number | string | undefined | undefined;
|
|
3747
|
-
href?: string | undefined | undefined;
|
|
3748
3748
|
ideographic?: number | string | undefined | undefined;
|
|
3749
3749
|
in2?: number | string | undefined | undefined;
|
|
3750
3750
|
in?: string | undefined | undefined;
|
|
@@ -3604,9 +3604,11 @@ export declare function useAxisTicksProps(inProps: ChartsYAxisProps): {
|
|
|
3604
3604
|
x?: number | string | undefined | undefined;
|
|
3605
3605
|
y?: number | string | undefined | undefined;
|
|
3606
3606
|
radius?: number | string | undefined | undefined;
|
|
3607
|
+
href?: string | undefined | undefined;
|
|
3607
3608
|
media?: string | undefined | undefined;
|
|
3608
|
-
method?: string | undefined | undefined;
|
|
3609
3609
|
target?: string | undefined | undefined;
|
|
3610
|
+
from?: number | string | undefined | undefined;
|
|
3611
|
+
method?: string | undefined | undefined;
|
|
3610
3612
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
3611
3613
|
accentHeight?: number | string | undefined | undefined;
|
|
3612
3614
|
accumulate?: "none" | "sum" | undefined | undefined;
|
|
@@ -3650,7 +3652,6 @@ export declare function useAxisTicksProps(inProps: ChartsYAxisProps): {
|
|
|
3650
3652
|
focusable?: "auto" | (boolean | "true" | "false") | undefined;
|
|
3651
3653
|
format?: number | string | undefined | undefined;
|
|
3652
3654
|
fr?: number | string | undefined | undefined;
|
|
3653
|
-
from?: number | string | undefined | undefined;
|
|
3654
3655
|
fx?: number | string | undefined | undefined;
|
|
3655
3656
|
fy?: number | string | undefined | undefined;
|
|
3656
3657
|
g1?: number | string | undefined | undefined;
|
|
@@ -3663,7 +3664,6 @@ export declare function useAxisTicksProps(inProps: ChartsYAxisProps): {
|
|
|
3663
3664
|
hanging?: number | string | undefined | undefined;
|
|
3664
3665
|
horizAdvX?: number | string | undefined | undefined;
|
|
3665
3666
|
horizOriginX?: number | string | undefined | undefined;
|
|
3666
|
-
href?: string | undefined | undefined;
|
|
3667
3667
|
ideographic?: number | string | undefined | undefined;
|
|
3668
3668
|
in2?: number | string | undefined | undefined;
|
|
3669
3669
|
in?: string | undefined | undefined;
|