@mui/x-charts 8.22.1 → 8.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.js +39 -0
- package/BarChart/BarChart.plugins.d.ts +2 -1
- package/BarChart/BarChart.plugins.js +2 -1
- package/BarChart/BarElement.js +1 -1
- package/BarChart/BarLabel/BarLabel.d.ts +2 -0
- package/BarChart/BarLabel/BarLabel.js +8 -3
- package/BarChart/BarLabel/BarLabelItem.d.ts +2 -0
- package/BarChart/BarLabel/BarLabelItem.js +4 -2
- package/BarChart/BarPlot.d.ts +12 -2
- package/BarChart/BarPlot.js +29 -86
- package/BarChart/BatchBarPlot/BarGroup.d.ts +15 -0
- package/BarChart/BatchBarPlot/BarGroup.js +142 -0
- package/BarChart/BatchBarPlot/BatchBarPlot.d.ts +12 -0
- package/BarChart/BatchBarPlot/BatchBarPlot.js +140 -0
- package/BarChart/BatchBarPlot/index.d.ts +1 -0
- package/BarChart/BatchBarPlot/index.js +12 -0
- package/BarChart/BatchBarPlot/useCreateBarPaths.d.ts +8 -0
- package/BarChart/BatchBarPlot/useCreateBarPaths.js +53 -0
- package/BarChart/FocusedBar.js +6 -2
- package/BarChart/IndividualBarPlot.d.ts +21 -0
- package/BarChart/IndividualBarPlot.js +106 -0
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +1 -1
- package/BarChart/seriesConfig/bar/keyboardFocusHandler.d.ts +3 -0
- package/BarChart/seriesConfig/bar/keyboardFocusHandler.js +23 -0
- package/BarChart/seriesConfig/bar/legend.js +1 -0
- package/BarChart/seriesConfig/bar/seriesProcessor.js +2 -2
- package/BarChart/seriesConfig/index.js +5 -1
- package/BarChart/types.d.ts +2 -0
- package/BarChart/useBarChartProps.d.ts +6 -2
- package/BarChart/useBarChartProps.js +4 -2
- package/BarChart/useBarPlotData.d.ts +1 -1
- package/BarChart/useBarPlotData.js +23 -4
- package/BarChart/useRegisterItemClickHandlers.d.ts +6 -0
- package/BarChart/useRegisterItemClickHandlers.js +72 -0
- package/CHANGELOG.md +211 -0
- package/ChartContainer/ChartContainer.js +34 -0
- package/ChartContainer/useChartContainerProps.js +6 -2
- package/ChartsLegend/ChartsLegend.js +2 -2
- package/ChartsLegend/legendContext.types.d.ts +12 -0
- package/ChartsLegend/onClickContextBuilder.js +2 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +4 -1
- package/ChartsOverlay/ChartsNoDataOverlay.js +4 -1
- package/ChartsReferenceLine/common.d.ts +1 -1
- package/ChartsReferenceLine/common.js +4 -1
- package/ChartsTooltip/ChartsTooltipContainer.js +25 -21
- package/Gauge/GaugeContainer.js +4 -1
- package/LineChart/AnimatedLine.js +7 -3
- package/LineChart/AppearingMask.js +4 -1
- package/LineChart/CircleMarkElement.d.ts +5 -0
- package/LineChart/CircleMarkElement.js +13 -5
- package/LineChart/FocusedLineMark.js +6 -2
- package/LineChart/LineChart.js +30 -0
- package/LineChart/LineChart.plugins.d.ts +2 -1
- package/LineChart/LineChart.plugins.js +2 -1
- package/LineChart/LineElement.d.ts +4 -0
- package/LineChart/LineElement.js +7 -3
- package/LineChart/MarkElement.d.ts +5 -0
- package/LineChart/MarkElement.js +17 -10
- package/LineChart/markElementClasses.d.ts +0 -1
- package/LineChart/seriesConfig/index.js +5 -1
- package/LineChart/seriesConfig/keyboardFocusHandler.d.ts +3 -0
- package/LineChart/seriesConfig/keyboardFocusHandler.js +23 -0
- package/LineChart/seriesConfig/legend.js +1 -0
- package/LineChart/seriesConfig/seriesProcessor.js +2 -2
- package/PieChart/FocusedPieArc.js +6 -3
- package/PieChart/PieArcLabel.d.ts +2 -0
- package/PieChart/PieArcLabel.js +5 -2
- package/PieChart/PieChart.js +35 -5
- package/PieChart/PieChart.plugins.d.ts +2 -1
- package/PieChart/PieChart.plugins.js +2 -1
- package/PieChart/dataTransform/useTransformData.js +1 -1
- package/PieChart/seriesConfig/index.js +5 -1
- package/PieChart/seriesConfig/keyboardFocusHandler.d.ts +3 -0
- package/PieChart/seriesConfig/keyboardFocusHandler.js +23 -0
- package/PieChart/seriesConfig/legend.js +6 -3
- package/RadarChart/RadarChart.js +30 -0
- package/RadarChart/RadarChart.plugins.d.ts +3 -2
- package/RadarChart/RadarChart.plugins.js +2 -1
- package/RadarChart/seriesConfig/index.js +3 -1
- package/RadarChart/seriesConfig/legend.js +1 -0
- package/ScatterChart/BatchScatter.js +8 -14
- package/ScatterChart/FocusedScatterMark.js +1 -1
- package/ScatterChart/ScatterChart.js +30 -0
- package/ScatterChart/ScatterChart.plugins.d.ts +2 -1
- package/ScatterChart/ScatterChart.plugins.js +2 -1
- package/ScatterChart/seriesConfig/index.js +5 -1
- package/ScatterChart/seriesConfig/keyboardFocusHandler.d.ts +3 -0
- package/ScatterChart/seriesConfig/keyboardFocusHandler.js +23 -0
- package/ScatterChart/seriesConfig/legend.js +1 -0
- package/SparkLineChart/SparkLineChart.js +46 -0
- package/esm/BarChart/BarChart.js +39 -0
- package/esm/BarChart/BarChart.plugins.d.ts +2 -1
- package/esm/BarChart/BarChart.plugins.js +2 -1
- package/esm/BarChart/BarElement.js +1 -1
- package/esm/BarChart/BarLabel/BarLabel.d.ts +2 -0
- package/esm/BarChart/BarLabel/BarLabel.js +8 -3
- package/esm/BarChart/BarLabel/BarLabelItem.d.ts +2 -0
- package/esm/BarChart/BarLabel/BarLabelItem.js +4 -2
- package/esm/BarChart/BarPlot.d.ts +12 -2
- package/esm/BarChart/BarPlot.js +29 -86
- package/esm/BarChart/BatchBarPlot/BarGroup.d.ts +15 -0
- package/esm/BarChart/BatchBarPlot/BarGroup.js +134 -0
- package/esm/BarChart/BatchBarPlot/BatchBarPlot.d.ts +12 -0
- package/esm/BarChart/BatchBarPlot/BatchBarPlot.js +133 -0
- package/esm/BarChart/BatchBarPlot/index.d.ts +1 -0
- package/esm/BarChart/BatchBarPlot/index.js +1 -0
- package/esm/BarChart/BatchBarPlot/useCreateBarPaths.d.ts +8 -0
- package/esm/BarChart/BatchBarPlot/useCreateBarPaths.js +46 -0
- package/esm/BarChart/FocusedBar.js +6 -2
- package/esm/BarChart/IndividualBarPlot.d.ts +21 -0
- package/esm/BarChart/IndividualBarPlot.js +98 -0
- package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/keyboardFocusHandler.d.ts +3 -0
- package/esm/BarChart/seriesConfig/bar/keyboardFocusHandler.js +17 -0
- package/esm/BarChart/seriesConfig/bar/legend.js +1 -0
- package/esm/BarChart/seriesConfig/bar/seriesProcessor.js +1 -1
- package/esm/BarChart/seriesConfig/index.js +5 -1
- package/esm/BarChart/types.d.ts +2 -0
- package/esm/BarChart/useBarChartProps.d.ts +6 -2
- package/esm/BarChart/useBarChartProps.js +4 -3
- package/esm/BarChart/useBarPlotData.d.ts +1 -1
- package/esm/BarChart/useBarPlotData.js +20 -1
- package/esm/BarChart/useRegisterItemClickHandlers.d.ts +6 -0
- package/esm/BarChart/useRegisterItemClickHandlers.js +67 -0
- package/esm/ChartContainer/ChartContainer.js +34 -0
- package/esm/ChartContainer/useChartContainerProps.js +6 -2
- package/esm/ChartsLegend/ChartsLegend.js +2 -2
- package/esm/ChartsLegend/legendContext.types.d.ts +12 -0
- package/esm/ChartsLegend/onClickContextBuilder.js +2 -1
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +4 -1
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +4 -1
- package/esm/ChartsReferenceLine/common.d.ts +1 -1
- package/esm/ChartsReferenceLine/common.js +4 -1
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +26 -22
- package/esm/Gauge/GaugeContainer.js +4 -1
- package/esm/LineChart/AnimatedLine.js +7 -3
- package/esm/LineChart/AppearingMask.js +4 -1
- package/esm/LineChart/CircleMarkElement.d.ts +5 -0
- package/esm/LineChart/CircleMarkElement.js +13 -5
- package/esm/LineChart/FocusedLineMark.js +6 -2
- package/esm/LineChart/LineChart.js +30 -0
- package/esm/LineChart/LineChart.plugins.d.ts +2 -1
- package/esm/LineChart/LineChart.plugins.js +2 -1
- package/esm/LineChart/LineElement.d.ts +4 -0
- package/esm/LineChart/LineElement.js +7 -3
- package/esm/LineChart/MarkElement.d.ts +5 -0
- package/esm/LineChart/MarkElement.js +17 -10
- package/esm/LineChart/markElementClasses.d.ts +0 -1
- package/esm/LineChart/seriesConfig/index.js +5 -1
- package/esm/LineChart/seriesConfig/keyboardFocusHandler.d.ts +3 -0
- package/esm/LineChart/seriesConfig/keyboardFocusHandler.js +17 -0
- package/esm/LineChart/seriesConfig/legend.js +1 -0
- package/esm/LineChart/seriesConfig/seriesProcessor.js +1 -1
- package/esm/PieChart/FocusedPieArc.js +5 -2
- package/esm/PieChart/PieArcLabel.d.ts +2 -0
- package/esm/PieChart/PieArcLabel.js +5 -2
- package/esm/PieChart/PieChart.js +35 -5
- package/esm/PieChart/PieChart.plugins.d.ts +2 -1
- package/esm/PieChart/PieChart.plugins.js +2 -1
- package/esm/PieChart/dataTransform/useTransformData.js +1 -1
- package/esm/PieChart/seriesConfig/index.js +5 -1
- package/esm/PieChart/seriesConfig/keyboardFocusHandler.d.ts +3 -0
- package/esm/PieChart/seriesConfig/keyboardFocusHandler.js +17 -0
- package/esm/PieChart/seriesConfig/legend.js +6 -3
- package/esm/RadarChart/RadarChart.js +30 -0
- package/esm/RadarChart/RadarChart.plugins.d.ts +3 -2
- package/esm/RadarChart/RadarChart.plugins.js +2 -1
- package/esm/RadarChart/seriesConfig/index.js +3 -1
- package/esm/RadarChart/seriesConfig/legend.js +1 -0
- package/esm/ScatterChart/BatchScatter.js +5 -11
- package/esm/ScatterChart/FocusedScatterMark.js +1 -1
- package/esm/ScatterChart/ScatterChart.js +30 -0
- package/esm/ScatterChart/ScatterChart.plugins.d.ts +2 -1
- package/esm/ScatterChart/ScatterChart.plugins.js +2 -1
- package/esm/ScatterChart/seriesConfig/index.js +5 -1
- package/esm/ScatterChart/seriesConfig/keyboardFocusHandler.d.ts +3 -0
- package/esm/ScatterChart/seriesConfig/keyboardFocusHandler.js +17 -0
- package/esm/ScatterChart/seriesConfig/legend.js +1 -0
- package/esm/SparkLineChart/SparkLineChart.js +46 -0
- package/esm/hooks/useFocusedItem.d.ts +1 -12
- package/esm/hooks/useFocusedItem.js +3 -10
- package/esm/hooks/useIsItemFocused.d.ts +4 -3
- package/esm/hooks/useIsItemFocused.js +1 -1
- package/esm/hooks/useIsItemFocusedGetter.d.ts +3 -2
- package/esm/hooks/useIsItemFocusedGetter.js +2 -1
- package/esm/index.js +1 -1
- package/esm/internals/appendAtKey.d.ts +8 -0
- package/esm/internals/appendAtKey.js +17 -0
- package/esm/internals/commonNextFocusItem.d.ts +14 -0
- package/esm/internals/commonNextFocusItem.js +88 -0
- package/esm/internals/getBarDimensions.d.ts +1 -2
- package/esm/internals/identifierSerializer.d.ts +9 -0
- package/esm/internals/identifierSerializer.js +6 -0
- package/esm/internals/index.d.ts +7 -3
- package/esm/internals/index.js +7 -3
- package/esm/internals/invertScale.d.ts +6 -2
- package/esm/internals/invertScale.js +9 -1
- package/esm/internals/plugins/allPlugins.d.ts +4 -3
- package/esm/internals/plugins/allPlugins.js +2 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.d.ts +14 -0
- package/esm/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.js +18 -0
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +8 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +12 -1
- package/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +11 -0
- package/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +74 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +20 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +10 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +4 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +83 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +13 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.js +1 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +12 -105
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +5 -31
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +9 -15
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +6 -21
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.js +6 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.d.ts +15 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.js +18 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.d.ts +7 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.js +9 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.d.ts +11 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.js +18 -0
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +2 -10
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/index.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/index.js +3 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.d.ts +4 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js +5 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +78 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +16 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +19 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +90 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.js +1 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +4 -0
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js +11 -0
- package/esm/internals/plugins/models/seriesConfig/identifierSerializer.types.d.ts +2 -0
- package/esm/internals/plugins/models/seriesConfig/identifierSerializer.types.js +1 -0
- package/esm/internals/plugins/models/seriesConfig/index.d.ts +2 -1
- package/esm/internals/plugins/models/seriesConfig/index.js +2 -1
- package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +9 -0
- package/esm/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/esm/internals/seriesHasData.d.ts +4 -0
- package/esm/internals/seriesHasData.js +8 -0
- package/esm/internals/stacking/index.d.ts +1 -0
- package/esm/internals/stacking/index.js +1 -0
- package/esm/internals/stacking/offset/index.d.ts +1 -0
- package/esm/internals/stacking/offset/index.js +1 -0
- package/esm/internals/stacking/offset/offsetDiverging.d.ts +8 -0
- package/esm/internals/stacking/offset/offsetDiverging.js +47 -0
- package/esm/internals/{stackSeries.d.ts → stacking/stackSeries.d.ts} +8 -8
- package/esm/internals/{stackSeries.js → stacking/stackSeries.js} +8 -6
- package/esm/models/axis.d.ts +5 -4
- package/esm/models/featureFlags.d.ts +1 -0
- package/esm/models/featureFlags.js +1 -0
- package/esm/models/index.d.ts +1 -0
- package/esm/models/index.js +1 -0
- package/esm/models/seriesType/index.d.ts +3 -1
- package/esm/moduleAugmentation/barChartBatchRendererOnItemClick.d.ts +13 -0
- package/esm/moduleAugmentation/barChartBatchRendererOnItemClick.js +1 -0
- package/hooks/useFocusedItem.d.ts +1 -12
- package/hooks/useFocusedItem.js +1 -10
- package/hooks/useIsItemFocused.d.ts +4 -3
- package/hooks/useIsItemFocused.js +1 -1
- package/hooks/useIsItemFocusedGetter.d.ts +3 -2
- package/hooks/useIsItemFocusedGetter.js +2 -1
- package/index.js +1 -1
- package/internals/appendAtKey.d.ts +8 -0
- package/internals/appendAtKey.js +23 -0
- package/internals/commonNextFocusItem.d.ts +14 -0
- package/internals/commonNextFocusItem.js +97 -0
- package/internals/getBarDimensions.d.ts +1 -2
- package/internals/identifierSerializer.d.ts +9 -0
- package/internals/identifierSerializer.js +16 -0
- package/internals/index.d.ts +7 -3
- package/internals/index.js +55 -11
- package/internals/invertScale.d.ts +6 -2
- package/internals/invertScale.js +10 -1
- package/internals/plugins/allPlugins.d.ts +4 -3
- package/internals/plugins/allPlugins.js +2 -1
- package/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.d.ts +14 -0
- package/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.js +25 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +8 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +12 -1
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +11 -0
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +81 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +20 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +10 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +4 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +89 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +13 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.js +5 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +11 -104
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +5 -31
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +10 -16
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +6 -21
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.js +12 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.d.ts +15 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.js +23 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.d.ts +7 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.js +15 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.d.ts +11 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.js +23 -0
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +2 -10
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartVisibilityManager/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/index.js +39 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.d.ts +4 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js +12 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +85 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +16 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +25 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +90 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.js +5 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +4 -0
- package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js +18 -0
- package/internals/plugins/models/seriesConfig/identifierSerializer.types.d.ts +2 -0
- package/internals/plugins/models/seriesConfig/identifierSerializer.types.js +5 -0
- package/internals/plugins/models/seriesConfig/index.d.ts +2 -1
- package/internals/plugins/models/seriesConfig/index.js +11 -0
- package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +9 -0
- package/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/internals/seriesHasData.d.ts +4 -0
- package/internals/seriesHasData.js +14 -0
- package/internals/stacking/index.d.ts +1 -0
- package/internals/stacking/index.js +16 -0
- package/internals/stacking/offset/index.d.ts +1 -0
- package/internals/stacking/offset/index.js +16 -0
- package/internals/stacking/offset/offsetDiverging.d.ts +8 -0
- package/internals/stacking/offset/offsetDiverging.js +53 -0
- package/internals/{stackSeries.d.ts → stacking/stackSeries.d.ts} +8 -8
- package/internals/{stackSeries.js → stacking/stackSeries.js} +3 -1
- package/models/axis.d.ts +5 -4
- package/models/featureFlags.d.ts +1 -0
- package/models/featureFlags.js +5 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +11 -0
- package/models/seriesType/index.d.ts +3 -1
- package/moduleAugmentation/barChartBatchRendererOnItemClick.d.ts +13 -0
- package/moduleAugmentation/barChartBatchRendererOnItemClick.js +5 -0
- package/package.json +14 -4
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/isFocusableSeriesType.d.ts +0 -3
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/isFocusableSeriesType.js +0 -4
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.d.ts +0 -21
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.js +0 -92
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/isFocusableSeriesType.d.ts +0 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/isFocusableSeriesType.js +0 -10
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.d.ts +0 -21
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.js +0 -99
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useRegisterItemClickHandlers = useRegisterItemClickHandlers;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _useSvgRef = require("../hooks/useSvgRef");
|
|
11
|
+
var _ChartProvider = require("../context/ChartProvider");
|
|
12
|
+
var _getSVGPoint = require("../internals/getSVGPoint");
|
|
13
|
+
var _useStore = require("../internals/store/useStore");
|
|
14
|
+
var _useChartCartesianAxisPosition = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors");
|
|
15
|
+
/**
|
|
16
|
+
* Hook that registers pointer event handlers for chart item clicking.
|
|
17
|
+
* @param onItemClick Callback for item click events.
|
|
18
|
+
*/
|
|
19
|
+
function useRegisterItemClickHandlers(onItemClick) {
|
|
20
|
+
const {
|
|
21
|
+
instance
|
|
22
|
+
} = (0, _ChartProvider.useChartContext)();
|
|
23
|
+
const svgRef = (0, _useSvgRef.useSvgRef)();
|
|
24
|
+
const store = (0, _useStore.useStore)();
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
const element = svgRef.current;
|
|
27
|
+
if (!element || !onItemClick) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
let lastPointerUp = null;
|
|
31
|
+
const onClick = function onClick(event) {
|
|
32
|
+
let point = event;
|
|
33
|
+
|
|
34
|
+
/* The click event doesn't contain decimal values in clientX/Y, but the pointermove does.
|
|
35
|
+
* This caused a problem when rendering many bars that were thinner than a pixel where the tooltip or the highlight
|
|
36
|
+
* would refer to a different bar than the click since those rely on the pointermove event.
|
|
37
|
+
* As a fix, we use the pointerup event to get the decimal values and check if the pointer up event was close enough
|
|
38
|
+
* to the click event (1px difference in each direction); if so, then we can use the pointerup's clientX/Y; if not,
|
|
39
|
+
* we default to the click event's clientX/Y. */
|
|
40
|
+
if (lastPointerUp) {
|
|
41
|
+
if (Math.abs(event.clientX - lastPointerUp.clientX) <= 1 && Math.abs(event.clientY - lastPointerUp.clientY) <= 1) {
|
|
42
|
+
point = {
|
|
43
|
+
clientX: lastPointerUp.clientX,
|
|
44
|
+
clientY: lastPointerUp.clientY
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
lastPointerUp = null;
|
|
49
|
+
const svgPoint = (0, _getSVGPoint.getSVGPoint)(element, point);
|
|
50
|
+
if (!instance.isPointInside(svgPoint.x, svgPoint.y)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const item = (0, _useChartCartesianAxisPosition.selectorBarItemAtPosition)(store.state, svgPoint);
|
|
54
|
+
if (item) {
|
|
55
|
+
onItemClick(event, {
|
|
56
|
+
type: 'bar',
|
|
57
|
+
seriesId: item.seriesId,
|
|
58
|
+
dataIndex: item.dataIndex
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const onPointerUp = function onPointerUp(event) {
|
|
63
|
+
lastPointerUp = event;
|
|
64
|
+
};
|
|
65
|
+
element.addEventListener('click', onClick);
|
|
66
|
+
element.addEventListener('pointerup', onPointerUp);
|
|
67
|
+
return () => {
|
|
68
|
+
element.removeEventListener('click', onClick);
|
|
69
|
+
element.removeEventListener('pointerup', onPointerUp);
|
|
70
|
+
};
|
|
71
|
+
}, [instance, onItemClick, store, svgRef]);
|
|
72
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,217 @@
|
|
|
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.24.0
|
|
9
|
+
|
|
10
|
+
_Jan 8, 2026_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- ⚡️Add bar [batch renderer](https://mui.com/x/react-charts/bars/#performance), result in a significant performance improvement when rendering thousands of bars
|
|
15
|
+
- 📊 Add [range bar chart](https://mui.com/x/react-charts/range-bar/) to render
|
|
16
|
+

|
|
17
|
+
- 🌎 Improved Danish (da-DK) and Japanese (ja-JP) locales on the Data Grid
|
|
18
|
+
|
|
19
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
20
|
+
@anders-noerrelykke, @auloin, @sai6855, @yuito-it
|
|
21
|
+
|
|
22
|
+
The following team members contributed to this release:
|
|
23
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @JCQuintas, @mapache-salvaje, @siriwatknp
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### `@mui/x-data-grid@8.24.0`
|
|
28
|
+
|
|
29
|
+
- [l10n] Improve Danish (da-DK) locale (#20828) @anders-noerrelykke
|
|
30
|
+
- [l10n] Improve Japanese (ja-JP) locale (#20251) @yuito-it
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@8.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@8.24.0`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Fix header filter height for `density="compact"` (#20834) @arminmeh
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-premium@8.24.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid-pro@8.24.0`.
|
|
41
|
+
|
|
42
|
+
### Date and Time Pickers
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-date-pickers@8.24.0`
|
|
45
|
+
|
|
46
|
+
- [pickers] Fix Styles applied to PickersDay when MuiPickersDay-dayOutsideMonth is used (#20719) @sai6855
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers-pro@8.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-date-pickers@8.24.0`.
|
|
51
|
+
|
|
52
|
+
### Charts
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-charts@8.24.0`
|
|
55
|
+
|
|
56
|
+
- [charts] Add `VisibilityManager` logic to allow managing series/items (#20571) @JCQuintas
|
|
57
|
+
- [charts] Add `identifierSerializer` configuration (#20775) @JCQuintas
|
|
58
|
+
- [charts] Add `serializeIdentifier` instance function (#20791) @JCQuintas
|
|
59
|
+
- [charts] Add bar batch renderer (#20457) @bernardobelchior
|
|
60
|
+
- [charts] Allow animating bar, line, and pie elements to hidden state (#20798) @JCQuintas
|
|
61
|
+
- [charts] Fix failing lint step (#20813) @bernardobelchior
|
|
62
|
+
- [charts] Fix tooltip anchored to item (#20783) @alexfauquette
|
|
63
|
+
- [charts] Fix type casting in getCategoryAxisConfig and applySeriesLayout functions (#20797) @sai6855
|
|
64
|
+
- [charts] Let keyboard navigation avoid overflow and handle nullish values (#20757) @alexfauquette
|
|
65
|
+
- [charts] Refactor `PieChart` and `PieChartPro` to use `slots` and `slotProps` directly (#20795) @sai6855
|
|
66
|
+
- [charts] Refactor `useRegisterPointerEventHandlers` (#20824) @bernardobelchior
|
|
67
|
+
- [charts] Update legend types to allow hiding/showing items (#20784) @JCQuintas
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-charts-pro@8.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
70
|
+
|
|
71
|
+
Same changes as in `@mui/x-charts@8.24.0`, plus:
|
|
72
|
+
|
|
73
|
+
- [charts-pro] Pass `slotProps.toolbar` to `Toolbar` in `PieChartPro` (#20796) @sai6855
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-charts-premium@8.24.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
76
|
+
|
|
77
|
+
Same changes as in `@mui/x-charts-pro@8.24.0`, plus:
|
|
78
|
+
|
|
79
|
+
- [charts-premium] Add range bar chart (#20275) @bernardobelchior
|
|
80
|
+
|
|
81
|
+
### Tree View
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-tree-view@8.24.0`
|
|
84
|
+
|
|
85
|
+
- [tree view] Introduce a Tree View Store to clean the internals (#20051) @flaviendelangle
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view-pro@8.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
88
|
+
|
|
89
|
+
Same changes as in `@mui/x-tree-view@8.24.0`.
|
|
90
|
+
|
|
91
|
+
### Codemod
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-codemod@8.24.0`
|
|
94
|
+
|
|
95
|
+
Internal changes.
|
|
96
|
+
|
|
97
|
+
### Docs
|
|
98
|
+
|
|
99
|
+
- [docs] Fix axis size default values (#20799) @bernardobelchior
|
|
100
|
+
- [docs] Update What's New in MUI X page with post v8 features (DX-118) (#20787) @alelthomas
|
|
101
|
+
- [docs] Fix `onAccept`'s `context.source` documentation to use 'view' instead of 'picker' (#20465) @auloin
|
|
102
|
+
- [docs] Revise the Charts Brush doc (#20792) @mapache-salvaje
|
|
103
|
+
- [docs] Revise the Charts Highlighting doc (#20788) @mapache-salvaje
|
|
104
|
+
- [docs] Revise the Charts Label doc (#20794) @mapache-salvaje
|
|
105
|
+
- [docs] Revise the Charts Export doc (#20779) @mapache-salvaje
|
|
106
|
+
|
|
107
|
+
### Core
|
|
108
|
+
|
|
109
|
+
- [code-infra] Fix v8.23.0 release date (#20767) @bernardobelchior
|
|
110
|
+
- [code-infra] Remove `glob-gitignore` (#20801) @bernardobelchior
|
|
111
|
+
- [code-infra] Remove `nyc` (#20804) @bernardobelchior
|
|
112
|
+
- [code-infra] Remove `stream-browserify` and `null-loader` (#20805) @bernardobelchior
|
|
113
|
+
- [code-infra] Remove `stylelint-config-tailwindcss` (#20807) @bernardobelchior
|
|
114
|
+
- [code-infra] Remove unused `path` package (#20802) @bernardobelchior
|
|
115
|
+
- [code-infra] Retry flaky e2e test on webkit (#20806) @JCQuintas
|
|
116
|
+
- [internal] Add `internal` slot to properly generate components CSS layer (#20763) @siriwatknp
|
|
117
|
+
|
|
118
|
+
## 8.23.0
|
|
119
|
+
|
|
120
|
+
_Dec 24, 2025_
|
|
121
|
+
|
|
122
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
123
|
+
|
|
124
|
+
- 🧮 Support Data Grid `size`, `size(true)`, and `size(false)` [aggregations for `'boolean'` column type](https://mui.com/x/react-data-grid/aggregation/#usage-with-row-grouping)
|
|
125
|
+
- 🔎 Allow zooming a heatmap
|
|
126
|
+
|
|
127
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
128
|
+
@henkerik, @sai6855
|
|
129
|
+
|
|
130
|
+
The following team members contributed to this release:
|
|
131
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @brijeshb42, @flaviendelangle, @JCQuintas, @mapache-salvaje, @MBilalShafi, @siriwatknp
|
|
132
|
+
|
|
133
|
+
### Data Grid
|
|
134
|
+
|
|
135
|
+
#### `@mui/x-data-grid@8.23.0`
|
|
136
|
+
|
|
137
|
+
- [DataGrid] Fix columns state and columns prop sync issue (#20703) @arminmeh
|
|
138
|
+
- [DataGrid] Fix filter datetime with seconds (#20557) @siriwatknp
|
|
139
|
+
- [DataGrid] Add new `includeHeaderFilters` flag to include header filters when autosizing columns (#20510) @siriwatknp
|
|
140
|
+
- [DataGrid] Prevent default on `Enter` key down when starting editing (#20751) @siriwatknp
|
|
141
|
+
- [l10n] Improve Portuguese from Portugal (pt-PT) locale (#20722) @Copilot
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-data-grid-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-data-grid@8.23.0`, plus:
|
|
146
|
+
|
|
147
|
+
- [DataGridPro] Fix crash on rows change in tree data with pagination (#20215) @Copilot
|
|
148
|
+
|
|
149
|
+
#### `@mui/x-data-grid-premium@8.23.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
150
|
+
|
|
151
|
+
Same changes as in `@mui/x-data-grid-pro@8.23.0`, plus:
|
|
152
|
+
|
|
153
|
+
- [DataGridPremium] Add aggregation for `'boolean'` column type (#20683) @arminmeh
|
|
154
|
+
- [DataGridPremium] Fix strategy value computation with row grouping (#20725) @MBilalShafi
|
|
155
|
+
- [DataGridPremium] Handle `isRowSelectable()` checks for the rows missing due to `keepNonExistentRowsSelected` (#20668) @arminmeh
|
|
156
|
+
|
|
157
|
+
### Date and Time Pickers
|
|
158
|
+
|
|
159
|
+
#### `@mui/x-date-pickers@8.23.0`
|
|
160
|
+
|
|
161
|
+
Internal changes.
|
|
162
|
+
|
|
163
|
+
#### `@mui/x-date-pickers-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
164
|
+
|
|
165
|
+
Same changes as in `@mui/x-date-pickers@8.23.0`.
|
|
166
|
+
|
|
167
|
+
### Charts
|
|
168
|
+
|
|
169
|
+
#### `@mui/x-charts@8.23.0`
|
|
170
|
+
|
|
171
|
+
- [charts] Custom stack functions implementation (#20679) @JCQuintas
|
|
172
|
+
- [charts] Extract keyboard focus navigation to the series config (#20693) @alexfauquette
|
|
173
|
+
- [charts] Fix demo not wrapping in mobile (#20713) @JCQuintas
|
|
174
|
+
- [charts] Fix missing dependencies in `x-charts-vendor` (#20685) @henkerik
|
|
175
|
+
- [charts] Remove webkit test differences (#20707) @JCQuintas
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-charts-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
178
|
+
|
|
179
|
+
Same changes as in `@mui/x-charts@8.23.0`, plus:
|
|
180
|
+
|
|
181
|
+
- [charts-pro] Allow registering preview plots from higher tier packages (#20716) @bernardobelchior
|
|
182
|
+
- [charts-pro] Fix erroneous behavior when adding/removing pointers from zoom&pan gestures (#20698) @JCQuintas
|
|
183
|
+
- [charts-pro] Move heatmap highlight handling to plot component (#20701) @bernardobelchior
|
|
184
|
+
- [charts-pro] Add zoom to heatmap (#20708) @bernardobelchior
|
|
185
|
+
|
|
186
|
+
#### `@mui/x-charts-premium@8.23.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
187
|
+
|
|
188
|
+
Same changes as in `@mui/x-charts-pro@8.23.0`.
|
|
189
|
+
|
|
190
|
+
### Tree View
|
|
191
|
+
|
|
192
|
+
#### `@mui/x-tree-view@8.23.0`
|
|
193
|
+
|
|
194
|
+
- [tree view] Add new APIs to disable selection feature for tree view item (#20666) @siriwatknp
|
|
195
|
+
|
|
196
|
+
#### `@mui/x-tree-view-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
197
|
+
|
|
198
|
+
Same changes as in `@mui/x-tree-view@8.23.0`.
|
|
199
|
+
|
|
200
|
+
### Codemod
|
|
201
|
+
|
|
202
|
+
#### `@mui/x-codemod@8.23.0`
|
|
203
|
+
|
|
204
|
+
Internal changes.
|
|
205
|
+
|
|
206
|
+
### Docs
|
|
207
|
+
|
|
208
|
+
- [docs] Clarify feature availability and relationship between Community and Pro/Premium docs (#20714) @mapache-salvaje
|
|
209
|
+
- [docs] Copyedit Tree View docs and apply new component style rules (DX-19) (#20652) @mapache-salvaje
|
|
210
|
+
- [docs] Fix `ColumnPinningDynamicRowHeight` demo (#20750) @sai6855
|
|
211
|
+
- [docs] Clean up Charts docs sidebar (DX-97) (#20700) @alelthomas
|
|
212
|
+
- [docs] Fix tick labels not being shown on a demo (#20718) @sai6855
|
|
213
|
+
|
|
214
|
+
### Core
|
|
215
|
+
|
|
216
|
+
- [code-infra] Bump prettier to 3.7.4 (#20709) @JCQuintas
|
|
217
|
+
- [code-infra] Fix contributor generation logic in changelog script (#20705) @brijeshb42
|
|
218
|
+
|
|
8
219
|
## 8.22.1
|
|
9
220
|
|
|
10
221
|
_Dec 17, 2025_
|
|
@@ -102,6 +102,35 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
102
102
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
103
103
|
*/
|
|
104
104
|
height: _propTypes.default.number,
|
|
105
|
+
/**
|
|
106
|
+
* List of hidden series and/or items.
|
|
107
|
+
*
|
|
108
|
+
* Different chart types use different keys.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* [
|
|
113
|
+
* {
|
|
114
|
+
* type: 'pie',
|
|
115
|
+
* seriesId: 'series-1',
|
|
116
|
+
* dataIndex: 3,
|
|
117
|
+
* },
|
|
118
|
+
* {
|
|
119
|
+
* type: 'line',
|
|
120
|
+
* seriesId: 'series-2',
|
|
121
|
+
* }
|
|
122
|
+
* ]
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
126
|
+
dataIndex: _propTypes.default.any,
|
|
127
|
+
seriesId: _propTypes.default.shape({
|
|
128
|
+
toLocaleString: _propTypes.default.func.isRequired,
|
|
129
|
+
toString: _propTypes.default.func.isRequired,
|
|
130
|
+
valueOf: _propTypes.default.func.isRequired
|
|
131
|
+
}),
|
|
132
|
+
type: _propTypes.default.object.isRequired
|
|
133
|
+
})),
|
|
105
134
|
/**
|
|
106
135
|
* The controlled axis highlight.
|
|
107
136
|
* Identified by the axis id, and data index.
|
|
@@ -146,6 +175,11 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
146
175
|
* @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
|
|
147
176
|
*/
|
|
148
177
|
onAxisClick: _propTypes.default.func,
|
|
178
|
+
/**
|
|
179
|
+
* Callback fired when any hidden identifiers change.
|
|
180
|
+
* @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
|
|
181
|
+
*/
|
|
182
|
+
onHiddenItemsChange: _propTypes.default.func,
|
|
149
183
|
/**
|
|
150
184
|
* The callback fired when the highlighted item changes.
|
|
151
185
|
*
|
|
@@ -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", "enableKeyboardNavigation", "brushConfig"];
|
|
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", "brushConfig", "onHiddenItemsChange", "hiddenItems"];
|
|
13
13
|
const useChartContainerProps = (props, ref) => {
|
|
14
14
|
const _ref = props,
|
|
15
15
|
{
|
|
@@ -45,7 +45,9 @@ const useChartContainerProps = (props, ref) => {
|
|
|
45
45
|
slotProps,
|
|
46
46
|
experimentalFeatures,
|
|
47
47
|
enableKeyboardNavigation,
|
|
48
|
-
brushConfig
|
|
48
|
+
brushConfig,
|
|
49
|
+
onHiddenItemsChange,
|
|
50
|
+
hiddenItems
|
|
49
51
|
} = _ref,
|
|
50
52
|
other = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
51
53
|
const chartsSurfaceProps = (0, _extends2.default)({
|
|
@@ -81,6 +83,8 @@ const useChartContainerProps = (props, ref) => {
|
|
|
81
83
|
experimentalFeatures,
|
|
82
84
|
enableKeyboardNavigation,
|
|
83
85
|
brushConfig,
|
|
86
|
+
onHiddenItemsChange,
|
|
87
|
+
hiddenItems,
|
|
84
88
|
plugins: plugins ?? _allPlugins.DEFAULT_PLUGINS,
|
|
85
89
|
slots,
|
|
86
90
|
slotProps
|
|
@@ -89,7 +89,7 @@ const ChartsLegend = exports.ChartsLegend = (0, _consumeSlots.consumeSlots)('Mui
|
|
|
89
89
|
children: data.items.map((item, i) => {
|
|
90
90
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
91
91
|
className: classes?.item,
|
|
92
|
-
"data-series": item.
|
|
92
|
+
"data-series": item.seriesId,
|
|
93
93
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Element, {
|
|
94
94
|
className: classes?.series,
|
|
95
95
|
role: onItemClick ? 'button' : undefined,
|
|
@@ -106,7 +106,7 @@ const ChartsLegend = exports.ChartsLegend = (0, _consumeSlots.consumeSlots)('Mui
|
|
|
106
106
|
children: item.label
|
|
107
107
|
})]
|
|
108
108
|
})
|
|
109
|
-
}, item.
|
|
109
|
+
}, `${item.seriesId}-${item.dataIndex}`);
|
|
110
110
|
})
|
|
111
111
|
}));
|
|
112
112
|
}));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ChartsLabelMarkProps } from "../ChartsLabel/ChartsLabelMark.js";
|
|
2
2
|
import { type PieItemId } from "../models/index.js";
|
|
3
3
|
import { type SeriesId } from "../models/seriesType/common.js";
|
|
4
|
+
import type { ChartSeriesType } from "../models/seriesType/config.js";
|
|
4
5
|
interface LegendItemContextBase {
|
|
5
6
|
/**
|
|
6
7
|
* The color used in the legend
|
|
@@ -15,8 +16,14 @@ export interface LegendItemParams extends Partial<Omit<SeriesLegendItemContext,
|
|
|
15
16
|
/**
|
|
16
17
|
* The identifier of the legend element.
|
|
17
18
|
* Used for internal purpose such as `key` props
|
|
19
|
+
* @deprecated use `seriesId` and `dataIndex` instead
|
|
18
20
|
*/
|
|
19
21
|
id: number | string;
|
|
22
|
+
/**
|
|
23
|
+
* The type of the series
|
|
24
|
+
* This property is always defined, but marked as optional to avoid breaking changes. It will become required in a future major version.
|
|
25
|
+
*/
|
|
26
|
+
type?: ChartSeriesType;
|
|
20
27
|
markType: ChartsLabelMarkProps['type'];
|
|
21
28
|
}
|
|
22
29
|
export interface SeriesLegendItemContext extends LegendItemContextBase {
|
|
@@ -32,8 +39,13 @@ export interface SeriesLegendItemContext extends LegendItemContextBase {
|
|
|
32
39
|
seriesId: SeriesId;
|
|
33
40
|
/**
|
|
34
41
|
* The identifier of the pie item
|
|
42
|
+
* @deprecated use `dataIndex` instead
|
|
35
43
|
*/
|
|
36
44
|
itemId?: PieItemId;
|
|
45
|
+
/**
|
|
46
|
+
* The data index of the item in the series data array
|
|
47
|
+
*/
|
|
48
|
+
dataIndex?: number;
|
|
37
49
|
}
|
|
38
50
|
export interface PiecewiseColorLegendItemContext extends LegendItemContextBase {
|
|
39
51
|
/**
|
|
@@ -9,6 +9,7 @@ const seriesContextBuilder = context => ({
|
|
|
9
9
|
color: context.color,
|
|
10
10
|
label: context.label,
|
|
11
11
|
seriesId: context.seriesId,
|
|
12
|
-
itemId: context.itemId
|
|
12
|
+
itemId: context.itemId,
|
|
13
|
+
dataIndex: context.dataIndex
|
|
13
14
|
});
|
|
14
15
|
exports.seriesContextBuilder = seriesContextBuilder;
|
|
@@ -13,7 +13,10 @@ var _useDrawingArea = require("../hooks/useDrawingArea");
|
|
|
13
13
|
var _useChartsLocalization = require("../hooks/useChartsLocalization");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
const _excluded = ["message"];
|
|
16
|
-
const StyledText = (0, _styles.styled)('text'
|
|
16
|
+
const StyledText = (0, _styles.styled)('text', {
|
|
17
|
+
slot: 'internal',
|
|
18
|
+
shouldForwardProp: undefined
|
|
19
|
+
})(({
|
|
17
20
|
theme
|
|
18
21
|
}) => (0, _extends2.default)({}, theme.typography.body2, {
|
|
19
22
|
stroke: 'none',
|
|
@@ -13,7 +13,10 @@ var _useDrawingArea = require("../hooks/useDrawingArea");
|
|
|
13
13
|
var _useChartsLocalization = require("../hooks/useChartsLocalization");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
const _excluded = ["message"];
|
|
16
|
-
const StyledText = (0, _styles.styled)('text'
|
|
16
|
+
const StyledText = (0, _styles.styled)('text', {
|
|
17
|
+
slot: 'internal',
|
|
18
|
+
shouldForwardProp: undefined
|
|
19
|
+
})(({
|
|
17
20
|
theme
|
|
18
21
|
}) => (0, _extends2.default)({}, theme.typography.body2, {
|
|
19
22
|
stroke: 'none',
|
|
@@ -40,4 +40,4 @@ export type CommonChartsReferenceLineProps = {
|
|
|
40
40
|
*/
|
|
41
41
|
classes?: Partial<ChartsReferenceLineClasses>;
|
|
42
42
|
};
|
|
43
|
-
export declare const ReferenceLineRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").SVGProps<SVGGElement>, {}>;
|
|
43
|
+
export declare const ReferenceLineRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<import("react").SVGProps<SVGGElement>, keyof import("react").SVGProps<SVGGElement>>, {}>;
|
|
@@ -10,7 +10,10 @@ var _styles = require("@mui/material/styles");
|
|
|
10
10
|
var _chartsReferenceLineClasses = require("./chartsReferenceLineClasses");
|
|
11
11
|
const DEFAULT_SPACING = exports.DEFAULT_SPACING = 5;
|
|
12
12
|
const DEFAULT_SPACING_MIDDLE_OTHER_AXIS = exports.DEFAULT_SPACING_MIDDLE_OTHER_AXIS = 0;
|
|
13
|
-
const ReferenceLineRoot = exports.ReferenceLineRoot = (0, _styles.styled)('g'
|
|
13
|
+
const ReferenceLineRoot = exports.ReferenceLineRoot = (0, _styles.styled)('g', {
|
|
14
|
+
slot: 'internal',
|
|
15
|
+
shouldForwardProp: undefined
|
|
16
|
+
})(({
|
|
14
17
|
theme
|
|
15
18
|
}) => ({
|
|
16
19
|
[`& .${_chartsReferenceLineClasses.referenceLineClasses.line}`]: {
|
|
@@ -10,6 +10,7 @@ exports.ChartsTooltipContainer = ChartsTooltipContainer;
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
+
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
13
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
15
|
var _HTMLElementType = _interopRequireDefault(require("@mui/utils/HTMLElementType"));
|
|
15
16
|
var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
|
|
@@ -79,6 +80,7 @@ function ChartsTooltipContainer(inProps) {
|
|
|
79
80
|
} = props,
|
|
80
81
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
81
82
|
const svgRef = (0, _hooks.useSvgRef)();
|
|
83
|
+
const anchorRef = React.useRef(null);
|
|
82
84
|
const classes = (0, _chartsTooltipClasses.useUtilityClasses)(propClasses);
|
|
83
85
|
const pointerType = (0, _utils.usePointerType)();
|
|
84
86
|
const isFineMainPointer = (0, _utils.useIsFineMainPointer)();
|
|
@@ -100,18 +102,11 @@ function ChartsTooltipContainer(inProps) {
|
|
|
100
102
|
return () => {};
|
|
101
103
|
}
|
|
102
104
|
if (itemPosition !== null) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
positionRef.current = {
|
|
106
|
-
x: svgElement.getBoundingClientRect().left + (itemPosition?.x ?? 0),
|
|
107
|
-
y: svgElement.getBoundingClientRect().top + (itemPosition?.y ?? 0)
|
|
108
|
-
};
|
|
109
|
-
popperRef.current?.update();
|
|
110
|
-
});
|
|
111
|
-
positionUpdate();
|
|
112
|
-
return () => positionUpdate.clear();
|
|
105
|
+
// Tooltip position is already handled by the anchor element
|
|
106
|
+
return undefined;
|
|
113
107
|
}
|
|
114
108
|
const pointerUpdate = (0, _rafThrottle.rafThrottle)((x, y) => {
|
|
109
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
115
110
|
positionRef.current = {
|
|
116
111
|
x,
|
|
117
112
|
y
|
|
@@ -131,7 +126,7 @@ function ChartsTooltipContainer(inProps) {
|
|
|
131
126
|
pointerUpdate.clear();
|
|
132
127
|
};
|
|
133
128
|
}, [svgRef, positionRef, itemPosition]);
|
|
134
|
-
const
|
|
129
|
+
const pointerAnchorEl = React.useMemo(() => ({
|
|
135
130
|
getBoundingClientRect: () => ({
|
|
136
131
|
x: positionRef.current.x,
|
|
137
132
|
y: positionRef.current.y,
|
|
@@ -173,16 +168,25 @@ function ChartsTooltipContainer(inProps) {
|
|
|
173
168
|
if (trigger === 'none') {
|
|
174
169
|
return null;
|
|
175
170
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
171
|
+
if (itemPosition !== null && anchorRef.current) {
|
|
172
|
+
anchorRef.current.setAttribute('x', String(itemPosition.x));
|
|
173
|
+
anchorRef.current.setAttribute('y', String(itemPosition.y));
|
|
174
|
+
}
|
|
175
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
176
|
+
children: [svgRef.current && /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
177
|
+
ref: anchorRef,
|
|
178
|
+
display: "hidden"
|
|
179
|
+
}), svgRef.current), /*#__PURE__*/(0, _jsxRuntime.jsx)(_NoSsr.default, {
|
|
180
|
+
children: isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(ChartsTooltipRoot, (0, _extends2.default)({}, other, {
|
|
181
|
+
className: classes?.root,
|
|
182
|
+
open: isOpen,
|
|
183
|
+
placement: other.placement ?? position ?? (pointerType !== null && isMouse ? 'right-start' : 'top'),
|
|
184
|
+
popperRef: popperRef,
|
|
185
|
+
anchorEl: itemPosition ? anchorRef.current : pointerAnchorEl,
|
|
186
|
+
modifiers: modifiers,
|
|
187
|
+
children: children
|
|
188
|
+
}))
|
|
189
|
+
})]
|
|
186
190
|
});
|
|
187
191
|
}
|
|
188
192
|
process.env.NODE_ENV !== "production" ? ChartsTooltipContainer.propTypes = {
|
package/Gauge/GaugeContainer.js
CHANGED
|
@@ -18,7 +18,10 @@ var _ChartProvider = require("../context/ChartProvider");
|
|
|
18
18
|
var _defaultizeMargin = require("../internals/defaultizeMargin");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
const _excluded = ["width", "height", "margin", "title", "desc", "value", "valueMin", "valueMax", "startAngle", "endAngle", "outerRadius", "innerRadius", "cornerRadius", "cx", "cy", "children"];
|
|
21
|
-
const GStyled = (0, _styles.styled)('g'
|
|
21
|
+
const GStyled = (0, _styles.styled)('g', {
|
|
22
|
+
slot: 'internal',
|
|
23
|
+
shouldForwardProp: undefined
|
|
24
|
+
})(({
|
|
22
25
|
theme
|
|
23
26
|
}) => ({
|
|
24
27
|
'& text': {
|
|
@@ -31,9 +31,12 @@ const AnimatedLine = exports.AnimatedLine = /*#__PURE__*/React.forwardRef(functi
|
|
|
31
31
|
ownerState
|
|
32
32
|
} = props,
|
|
33
33
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
34
|
-
const animateProps = (0, _hooks.useAnimateLine)(
|
|
34
|
+
const animateProps = (0, _hooks.useAnimateLine)({
|
|
35
|
+
d: props.d,
|
|
36
|
+
skipAnimation,
|
|
35
37
|
ref
|
|
36
|
-
})
|
|
38
|
+
});
|
|
39
|
+
const fadedOpacity = ownerState.isFaded ? 0.3 : 1;
|
|
37
40
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppearingMask.AppearingMask, {
|
|
38
41
|
skipAnimation: skipAnimation,
|
|
39
42
|
id: `${ownerState.id}-line-clip`,
|
|
@@ -43,7 +46,7 @@ const AnimatedLine = exports.AnimatedLine = /*#__PURE__*/React.forwardRef(functi
|
|
|
43
46
|
strokeLinejoin: "round",
|
|
44
47
|
fill: "none",
|
|
45
48
|
filter: ownerState.isHighlighted ? 'brightness(120%)' : undefined,
|
|
46
|
-
opacity: ownerState.
|
|
49
|
+
opacity: ownerState.hidden ? 0 : fadedOpacity,
|
|
47
50
|
"data-series": ownerState.id,
|
|
48
51
|
"data-highlighted": ownerState.isHighlighted || undefined,
|
|
49
52
|
"data-faded": ownerState.isFaded || undefined
|
|
@@ -61,6 +64,7 @@ process.env.NODE_ENV !== "production" ? AnimatedLine.propTypes = {
|
|
|
61
64
|
classes: _propTypes.default.object,
|
|
62
65
|
color: _propTypes.default.string.isRequired,
|
|
63
66
|
gradientId: _propTypes.default.string,
|
|
67
|
+
hidden: _propTypes.default.bool,
|
|
64
68
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
65
69
|
isFaded: _propTypes.default.bool.isRequired,
|
|
66
70
|
isHighlighted: _propTypes.default.bool.isRequired
|
|
@@ -16,7 +16,10 @@ var _cleanId = require("../internals/cleanId");
|
|
|
16
16
|
var _hooks = require("../hooks");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
const appearingMaskClasses = exports.appearingMaskClasses = (0, _generateUtilityClasses.default)('MuiAppearingMask', ['animate']);
|
|
19
|
-
const AnimatedRect = (0, _styles.styled)('rect'
|
|
19
|
+
const AnimatedRect = (0, _styles.styled)('rect', {
|
|
20
|
+
slot: 'internal',
|
|
21
|
+
shouldForwardProp: undefined
|
|
22
|
+
})({
|
|
20
23
|
animationName: 'animate-width',
|
|
21
24
|
animationTimingFunction: _animation.ANIMATION_TIMING_FUNCTION,
|
|
22
25
|
animationDuration: '0s',
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type MarkElementOwnerState } from "./markElementClasses.js";
|
|
3
3
|
export type CircleMarkElementProps = Omit<MarkElementOwnerState, 'isFaded' | 'isHighlighted'> & Omit<React.SVGProps<SVGPathElement>, 'ref' | 'id'> & {
|
|
4
|
+
/**
|
|
5
|
+
* If `true`, the marker is hidden.
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
hidden?: boolean;
|
|
4
9
|
/**
|
|
5
10
|
* If `true`, animations are skipped.
|
|
6
11
|
* @default false
|