@mui/x-charts-pro 8.23.0 → 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.
Files changed (82) hide show
  1. package/BarChartPro/BarChartPro.js +39 -0
  2. package/BarChartPro/BarChartPro.plugins.d.ts +2 -2
  3. package/BarChartPro/BarChartPro.plugins.js +1 -1
  4. package/CHANGELOG.md +111 -1
  5. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +2 -1
  6. package/ChartDataProviderPro/ChartDataProviderPro.js +5 -1
  7. package/ChartDataProviderPro/index.d.ts +1 -1
  8. package/ChartDataProviderPro/index.js +7 -11
  9. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -0
  10. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +4 -1
  11. package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +4 -1
  12. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +1 -0
  13. package/FunnelChart/FunnelChart.js +30 -0
  14. package/FunnelChart/FunnelChart.plugins.d.ts +2 -2
  15. package/FunnelChart/FunnelChart.plugins.js +1 -1
  16. package/FunnelChart/FunnelSection.d.ts +1 -1
  17. package/FunnelChart/FunnelSection.js +4 -1
  18. package/FunnelChart/seriesConfig/index.d.ts +1 -1
  19. package/FunnelChart/seriesConfig/index.js +3 -1
  20. package/FunnelChart/seriesConfig/legend.js +6 -3
  21. package/Heatmap/seriesConfig/index.js +3 -1
  22. package/LineChartPro/LineChartPro.js +30 -0
  23. package/LineChartPro/LineChartPro.plugins.d.ts +2 -2
  24. package/LineChartPro/LineChartPro.plugins.js +1 -1
  25. package/PieChartPro/PieChartPro.js +35 -5
  26. package/PieChartPro/PieChartPro.plugins.d.ts +2 -2
  27. package/RadarChartPro/RadarChartPro.js +30 -0
  28. package/RadarChartPro/RadarChartPro.plugins.d.ts +2 -2
  29. package/RadarChartPro/RadarChartPro.plugins.js +1 -1
  30. package/SankeyChart/SankeyPlot.js +4 -1
  31. package/SankeyChart/seriesConfig/identifierSerializer.d.ts +3 -0
  32. package/SankeyChart/seriesConfig/identifierSerializer.js +14 -0
  33. package/SankeyChart/seriesConfig/index.js +3 -1
  34. package/ScatterChartPro/ScatterChartPro.js +30 -0
  35. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -2
  36. package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
  37. package/esm/BarChartPro/BarChartPro.js +39 -0
  38. package/esm/BarChartPro/BarChartPro.plugins.d.ts +2 -2
  39. package/esm/BarChartPro/BarChartPro.plugins.js +2 -2
  40. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +2 -1
  41. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +5 -2
  42. package/esm/ChartDataProviderPro/index.d.ts +1 -1
  43. package/esm/ChartDataProviderPro/index.js +1 -1
  44. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -0
  45. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +4 -1
  46. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +4 -1
  47. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +1 -0
  48. package/esm/FunnelChart/FunnelChart.js +30 -0
  49. package/esm/FunnelChart/FunnelChart.plugins.d.ts +2 -2
  50. package/esm/FunnelChart/FunnelChart.plugins.js +2 -2
  51. package/esm/FunnelChart/FunnelSection.d.ts +1 -1
  52. package/esm/FunnelChart/FunnelSection.js +4 -1
  53. package/esm/FunnelChart/seriesConfig/index.d.ts +1 -1
  54. package/esm/FunnelChart/seriesConfig/index.js +3 -1
  55. package/esm/FunnelChart/seriesConfig/legend.js +6 -3
  56. package/esm/Heatmap/seriesConfig/index.js +3 -1
  57. package/esm/LineChartPro/LineChartPro.js +30 -0
  58. package/esm/LineChartPro/LineChartPro.plugins.d.ts +2 -2
  59. package/esm/LineChartPro/LineChartPro.plugins.js +2 -2
  60. package/esm/PieChartPro/PieChartPro.js +35 -5
  61. package/esm/PieChartPro/PieChartPro.plugins.d.ts +2 -2
  62. package/esm/RadarChartPro/RadarChartPro.js +30 -0
  63. package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +2 -2
  64. package/esm/RadarChartPro/RadarChartPro.plugins.js +2 -2
  65. package/esm/SankeyChart/SankeyPlot.js +4 -1
  66. package/esm/SankeyChart/seriesConfig/identifierSerializer.d.ts +3 -0
  67. package/esm/SankeyChart/seriesConfig/identifierSerializer.js +8 -0
  68. package/esm/SankeyChart/seriesConfig/index.js +3 -1
  69. package/esm/ScatterChartPro/ScatterChartPro.js +30 -0
  70. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -2
  71. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
  72. package/esm/index.js +1 -1
  73. package/esm/internals/index.d.ts +2 -1
  74. package/esm/internals/index.js +2 -1
  75. package/esm/internals/plugins/allPlugins.d.ts +5 -5
  76. package/esm/internals/plugins/allPlugins.js +3 -3
  77. package/index.js +1 -1
  78. package/internals/index.d.ts +2 -1
  79. package/internals/index.js +8 -1
  80. package/internals/plugins/allPlugins.d.ts +5 -5
  81. package/internals/plugins/allPlugins.js +2 -2
  82. package/package.json +4 -4
@@ -165,6 +165,31 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
165
165
  * The height of the chart in px. If not defined, it takes the height of the parent element.
166
166
  */
167
167
  height: _propTypes.default.number,
168
+ /**
169
+ * List of hidden series and/or items.
170
+ *
171
+ * Different chart types use different keys.
172
+ *
173
+ * @example
174
+ * ```ts
175
+ * [
176
+ * {
177
+ * type: 'pie',
178
+ * seriesId: 'series-1',
179
+ * dataIndex: 3,
180
+ * },
181
+ * {
182
+ * type: 'line',
183
+ * seriesId: 'series-2',
184
+ * }
185
+ * ]
186
+ * ```
187
+ */
188
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
189
+ dataIndex: _propTypes.default.number,
190
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
191
+ type: _propTypes.default.oneOf(['bar']).isRequired
192
+ })),
168
193
  /**
169
194
  * If `true`, the legend is not rendered.
170
195
  */
@@ -232,6 +257,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
232
257
  * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
233
258
  */
234
259
  onAxisClick: _propTypes.default.func,
260
+ /**
261
+ * Callback fired when any hidden identifiers change.
262
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
263
+ */
264
+ onHiddenItemsChange: _propTypes.default.func,
235
265
  /**
236
266
  * The callback fired when the highlighted item changes.
237
267
  *
@@ -258,6 +288,15 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
258
288
  * @param {ZoomData[]} zoomData Updated zoom data.
259
289
  */
260
290
  onZoomChange: _propTypes.default.func,
291
+ /**
292
+ * The type of renderer to use for the bar plot.
293
+ * - `svg-single`: Renders every bar in a `<rect />` element.
294
+ * - `svg-batch`: Batch renders bars in `<path />` elements for better performance with large datasets, at the cost of some limitations.
295
+ * Read more: https://mui.com/x/react-charts/bars/#performance
296
+ *
297
+ * @default 'svg-single'
298
+ */
299
+ renderer: _propTypes.default.oneOf(['svg-batch', 'svg-single']),
261
300
  /**
262
301
  * The series to display in the bar chart.
263
302
  * An array of [[BarSeries]] objects.
@@ -1,5 +1,5 @@
1
- import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
1
+ import { type ConvertSignaturesIntoPlugins, type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
3
3
  import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
4
- export type BarChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'bar'>, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
4
+ export type BarChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'bar'>, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'bar'>, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
5
5
  export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginSignatures>;
@@ -7,4 +7,4 @@ exports.BAR_CHART_PRO_PLUGINS = void 0;
7
7
  var _internals = require("@mui/x-charts/internals");
8
8
  var _useChartProExport = require("../internals/plugins/useChartProExport");
9
9
  var _useChartProZoom = require("../internals/plugins/useChartProZoom");
10
- const BAR_CHART_PRO_PLUGINS = exports.BAR_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
10
+ const BAR_CHART_PRO_PLUGINS = exports.BAR_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartVisibilityManager, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
package/CHANGELOG.md CHANGED
@@ -5,9 +5,119 @@
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
+ ![image](https://github.com/user-attachments/assets/4112c09b-d841-42f7-a0c8-d23b61c23ca0)
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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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
+
8
118
  ## 8.23.0
9
119
 
10
- _Dec 23, 2025_
120
+ _Dec 24, 2025_
11
121
 
12
122
  We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
13
123
 
@@ -1,4 +1,4 @@
1
- import { type ChartSeriesType, type ChartAnyPluginSignature, type ChartProviderProps } from '@mui/x-charts/internals';
1
+ import { type ChartSeriesType, type ChartAnyPluginSignature, type ChartProviderProps, type ChartSeriesConfig } from '@mui/x-charts/internals';
2
2
  import { type ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
3
3
  import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
4
4
  import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
@@ -12,6 +12,7 @@ export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSer
12
12
  */
13
13
  slotProps?: Partial<ChartsSlotPropsPro>;
14
14
  };
15
+ export declare const defaultSeriesConfigPro: ChartSeriesConfig<'bar' | 'scatter' | 'line' | 'pie'>;
15
16
  /**
16
17
  * Orchestrates the data providers for the chart components and hooks.
17
18
  *
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.ChartDataProviderPro = ChartDataProviderPro;
9
+ exports.defaultSeriesConfigPro = void 0;
9
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
12
  var _Watermark = require("@mui/x-license/Watermark");
@@ -16,8 +17,10 @@ var _material = require("../internals/material");
16
17
  var _allPlugins = require("../internals/plugins/allPlugins");
17
18
  var _useChartDataProviderProProps = require("./useChartDataProviderProProps");
18
19
  var _jsxRuntime = require("react/jsx-runtime");
19
- const releaseInfo = "MTc2NjUzNDQwMDAwMA==";
20
+ const releaseInfo = "MTc2NzgzMDQwMDAwMA==";
20
21
  const packageIdentifier = 'x-charts-pro';
22
+ const defaultSeriesConfigPro = exports.defaultSeriesConfigPro = _internals.defaultSeriesConfig;
23
+
21
24
  /**
22
25
  * Orchestrates the data providers for the chart components and hooks.
23
26
  *
@@ -53,6 +56,7 @@ function ChartDataProviderPro(props) {
53
56
  slots,
54
57
  slotProps
55
58
  } = (0, _useChartDataProviderProProps.useChartDataProviderProProps)((0, _extends2.default)({}, props, {
59
+ seriesConfig: props.seriesConfig ?? defaultSeriesConfigPro,
56
60
  plugins: props.plugins ?? _allPlugins.DEFAULT_PLUGINS
57
61
  }));
58
62
  (0, _useLicenseVerifier.useLicenseVerifier)(packageIdentifier, releaseInfo);
@@ -1,2 +1,2 @@
1
1
  import "../typeOverloads/index.js";
2
- export * from "./ChartDataProviderPro.js";
2
+ export { ChartDataProviderPro, type ChartDataProviderProProps } from "./ChartDataProviderPro.js";
@@ -3,15 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "ChartDataProviderPro", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _ChartDataProviderPro.ChartDataProviderPro;
10
+ }
11
+ });
6
12
  require("../typeOverloads");
7
- var _ChartDataProviderPro = require("./ChartDataProviderPro");
8
- Object.keys(_ChartDataProviderPro).forEach(function (key) {
9
- if (key === "default" || key === "__esModule") return;
10
- if (key in exports && exports[key] === _ChartDataProviderPro[key]) return;
11
- Object.defineProperty(exports, key, {
12
- enumerable: true,
13
- get: function () {
14
- return _ChartDataProviderPro[key];
15
- }
16
- });
17
- });
13
+ var _ChartDataProviderPro = require("./ChartDataProviderPro");
@@ -21,6 +21,7 @@ var _constants = require("./constants");
21
21
  var _chartAxisZoomSliderTrackClasses = require("./chartAxisZoomSliderTrackClasses");
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
23
  const ZoomSliderActiveTrackRect = (0, _styles.styled)('rect', {
24
+ slot: 'internal',
24
25
  shouldForwardProp: prop => (0, _system.shouldForwardProp)(prop) && prop !== 'preview'
25
26
  })(({
26
27
  theme
@@ -17,7 +17,10 @@ var _useChartProZoom = require("../../internals/plugins/useChartProZoom");
17
17
  var _ChartAxisZoomSliderPreviewContent = require("./ChartAxisZoomSliderPreviewContent");
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
19
  const _excluded = ["axisId", "axisDirection", "reverse"];
20
- const PreviewBackgroundRect = (0, _styles.styled)('rect')(({
20
+ const PreviewBackgroundRect = (0, _styles.styled)('rect', {
21
+ slot: 'internal',
22
+ shouldForwardProp: undefined
23
+ })(({
21
24
  theme
22
25
  }) => ({
23
26
  rx: 4,
@@ -18,7 +18,10 @@ var _clsx = _interopRequireDefault(require("clsx"));
18
18
  var _chartAxisZoomSliderThumbClasses = require("./chartAxisZoomSliderThumbClasses");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
20
  const _excluded = ["className", "onMove", "orientation", "placement", "rx", "ry"];
21
- const Rect = (0, _styles.styled)('rect')(({
21
+ const Rect = (0, _styles.styled)('rect', {
22
+ slot: 'internal',
23
+ shouldForwardProp: undefined
24
+ })(({
22
25
  theme
23
26
  }) => ({
24
27
  [`&.${_chartAxisZoomSliderThumbClasses.chartAxisZoomSliderThumbClasses.root}`]: (0, _extends2.default)({
@@ -20,6 +20,7 @@ var _chartAxisZoomSliderTrackClasses = require("./chartAxisZoomSliderTrackClasse
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
21
  const _excluded = ["axisId", "axisDirection", "reverse", "onSelectStart", "onSelectEnd"];
22
22
  const ZoomSliderTrack = (0, _styles.styled)('rect', {
23
+ slot: 'internal',
23
24
  shouldForwardProp: prop => (0, _system.shouldForwardProp)(prop) && prop !== 'axisDirection' && prop !== 'isSelecting'
24
25
  })(({
25
26
  theme
@@ -191,6 +191,31 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
191
191
  * The height of the chart in px. If not defined, it takes the height of the parent element.
192
192
  */
193
193
  height: _propTypes.default.number,
194
+ /**
195
+ * List of hidden series and/or items.
196
+ *
197
+ * Different chart types use different keys.
198
+ *
199
+ * @example
200
+ * ```ts
201
+ * [
202
+ * {
203
+ * type: 'pie',
204
+ * seriesId: 'series-1',
205
+ * dataIndex: 3,
206
+ * },
207
+ * {
208
+ * type: 'line',
209
+ * seriesId: 'series-2',
210
+ * }
211
+ * ]
212
+ * ```
213
+ */
214
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
215
+ dataIndex: _propTypes.default.number,
216
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
217
+ type: _propTypes.default.oneOf(['funnel']).isRequired
218
+ })),
194
219
  /**
195
220
  * If `true`, the legend is not rendered.
196
221
  * @default false
@@ -237,6 +262,11 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
237
262
  * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
238
263
  */
239
264
  onAxisClick: _propTypes.default.func,
265
+ /**
266
+ * Callback fired when any hidden identifiers change.
267
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
268
+ */
269
+ onHiddenItemsChange: _propTypes.default.func,
240
270
  /**
241
271
  * The callback fired when the highlighted item changes.
242
272
  *
@@ -1,5 +1,5 @@
1
- import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature } from '@mui/x-charts/internals';
1
+ import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
3
3
  import { type UseChartFunnelAxisSignature } from "./funnelAxisPlugin/useChartFunnelAxis.types.js";
4
- export type FunnelChartPluginSignatures = [UseChartFunnelAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProExportSignature];
4
+ export type FunnelChartPluginSignatures = [UseChartFunnelAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'funnel'>, UseChartProExportSignature];
5
5
  export declare const FUNNEL_CHART_PLUGINS: ConvertSignaturesIntoPlugins<FunnelChartPluginSignatures>;
@@ -7,4 +7,4 @@ exports.FUNNEL_CHART_PLUGINS = void 0;
7
7
  var _internals = require("@mui/x-charts/internals");
8
8
  var _useChartProExport = require("../internals/plugins/useChartProExport");
9
9
  var _useChartFunnelAxis = require("./funnelAxisPlugin/useChartFunnelAxis");
10
- const FUNNEL_CHART_PLUGINS = exports.FUNNEL_CHART_PLUGINS = [_useChartFunnelAxis.useChartFunnelAxis, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartHighlight, _useChartProExport.useChartProExport];
10
+ const FUNNEL_CHART_PLUGINS = exports.FUNNEL_CHART_PLUGINS = [_useChartFunnelAxis.useChartFunnelAxis, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartHighlight, _internals.useChartVisibilityManager, _useChartProExport.useChartProExport];
@@ -8,7 +8,7 @@ export interface FunnelSectionProps extends Omit<React.SVGProps<SVGPathElement>,
8
8
  classes?: Partial<FunnelSectionClasses>;
9
9
  variant?: 'filled' | 'outlined';
10
10
  }
11
- export declare const FunnelSectionPath: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.SVGProps<SVGPathElement>, {}>;
11
+ export declare const FunnelSectionPath: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGProps<SVGPathElement>, keyof React.SVGProps<SVGPathElement>>, {}>;
12
12
  /**
13
13
  * @ignore - internal component.
14
14
  */
@@ -17,7 +17,10 @@ var _clsx = _interopRequireDefault(require("clsx"));
17
17
  var _funnelSectionClasses = require("./funnelSectionClasses");
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
19
  const _excluded = ["seriesId", "dataIndex", "classes", "color", "onClick", "className", "variant"];
20
- const FunnelSectionPath = exports.FunnelSectionPath = (0, _styles.styled)('path')(() => ({
20
+ const FunnelSectionPath = exports.FunnelSectionPath = (0, _styles.styled)('path', {
21
+ slot: 'internal',
22
+ shouldForwardProp: undefined
23
+ })(() => ({
21
24
  transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, fill-opacity 0.2s ease-in, filter 0.2s ease-in'
22
25
  }));
23
26
 
@@ -1,2 +1,2 @@
1
- import type { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
1
+ import { type ChartSeriesTypeConfig } from '@mui/x-charts/internals';
2
2
  export declare const funnelSeriesConfig: ChartSeriesTypeConfig<'funnel'>;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.funnelSeriesConfig = void 0;
8
+ var _internals = require("@mui/x-charts/internals");
8
9
  var _extremums = require("./extremums");
9
10
  var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
10
11
  var _getColor = _interopRequireDefault(require("./getColor"));
@@ -20,5 +21,6 @@ const funnelSeriesConfig = exports.funnelSeriesConfig = {
20
21
  tooltipItemPositionGetter: _tooltipPosition.default,
21
22
  xExtremumGetter: _extremums.getExtremumX,
22
23
  yExtremumGetter: _extremums.getExtremumY,
23
- getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default
24
+ getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
25
+ identifierSerializer: _internals.identifierSerializerSeriesIdDataIndex
24
26
  };
@@ -11,16 +11,19 @@ const legendGetter = params => {
11
11
  series
12
12
  } = params;
13
13
  return seriesOrder.reduce((acc, seriesId) => {
14
- series[seriesId].data.forEach(item => {
14
+ series[seriesId].data.forEach((item, dataIndex) => {
15
15
  const formattedLabel = (0, _internals.getLabel)(item.label, 'legend');
16
16
  if (formattedLabel === undefined) {
17
17
  return;
18
18
  }
19
+ const id = item.id ?? dataIndex;
19
20
  acc.push({
21
+ type: 'funnel',
20
22
  markType: item.labelMarkType ?? series[seriesId].labelMarkType,
21
23
  seriesId,
22
- id: item.id,
23
- itemId: item.id,
24
+ id,
25
+ itemId: id,
26
+ dataIndex,
24
27
  color: item.color,
25
28
  label: formattedLabel
26
29
  });
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.heatmapSeriesConfig = void 0;
8
+ var _internals = require("@mui/x-charts/internals");
8
9
  var _extremums = require("./extremums");
9
10
  var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
10
11
  var _getColor = _interopRequireDefault(require("./getColor"));
@@ -19,5 +20,6 @@ const heatmapSeriesConfig = exports.heatmapSeriesConfig = {
19
20
  tooltipItemPositionGetter: _tooltipPosition.default,
20
21
  xExtremumGetter: _extremums.getBaseExtremum,
21
22
  yExtremumGetter: _extremums.getBaseExtremum,
22
- getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default
23
+ getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
24
+ identifierSerializer: _internals.identifierSerializerSeriesIdDataIndex
23
25
  };
@@ -166,6 +166,31 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
166
166
  * The height of the chart in px. If not defined, it takes the height of the parent element.
167
167
  */
168
168
  height: _propTypes.default.number,
169
+ /**
170
+ * List of hidden series and/or items.
171
+ *
172
+ * Different chart types use different keys.
173
+ *
174
+ * @example
175
+ * ```ts
176
+ * [
177
+ * {
178
+ * type: 'pie',
179
+ * seriesId: 'series-1',
180
+ * dataIndex: 3,
181
+ * },
182
+ * {
183
+ * type: 'line',
184
+ * seriesId: 'series-2',
185
+ * }
186
+ * ]
187
+ * ```
188
+ */
189
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
190
+ dataIndex: _propTypes.default.number,
191
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
192
+ type: _propTypes.default.oneOf(['line']).isRequired
193
+ })),
169
194
  /**
170
195
  * If `true`, the legend is not rendered.
171
196
  */
@@ -232,6 +257,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
232
257
  * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
233
258
  */
234
259
  onAxisClick: _propTypes.default.func,
260
+ /**
261
+ * Callback fired when any hidden identifiers change.
262
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
263
+ */
264
+ onHiddenItemsChange: _propTypes.default.func,
235
265
  /**
236
266
  * The callback fired when the highlighted item changes.
237
267
  *
@@ -1,5 +1,5 @@
1
- import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
1
+ import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type ConvertSignaturesIntoPlugins, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
3
3
  import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
4
- export type LineChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'line'>, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
4
+ export type LineChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'line'>, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'line'>, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
5
5
  export declare const LINE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<LineChartProPluginSignatures>;
@@ -7,4 +7,4 @@ exports.LINE_CHART_PRO_PLUGINS = void 0;
7
7
  var _internals = require("@mui/x-charts/internals");
8
8
  var _useChartProExport = require("../internals/plugins/useChartProExport");
9
9
  var _useChartProZoom = require("../internals/plugins/useChartProZoom");
10
- const LINE_CHART_PRO_PLUGINS = exports.LINE_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
10
+ const LINE_CHART_PRO_PLUGINS = exports.LINE_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartVisibilityManager, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
@@ -68,15 +68,15 @@ const PieChartPro = exports.PieChartPro = /*#__PURE__*/React.forwardRef(function
68
68
  plugins: _PieChartPro2.PIE_CHART_PRO_PLUGINS
69
69
  }), ref);
70
70
  const Tooltip = slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
71
- const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
71
+ const Toolbar = slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
72
72
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
73
73
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, {
74
- legendPosition: props.slotProps?.legend?.position,
75
- legendDirection: props.slotProps?.legend?.direction ?? 'vertical',
74
+ legendPosition: slotProps?.legend?.position,
75
+ legendDirection: slotProps?.legend?.direction ?? 'vertical',
76
76
  sx: sx,
77
77
  hideLegend: hideLegend ?? false,
78
- children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, {}) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
79
- direction: props.slotProps?.legend?.direction ?? 'vertical',
78
+ children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
79
+ direction: slotProps?.legend?.direction ?? 'vertical',
80
80
  slots: slots,
81
81
  slotProps: slotProps
82
82
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
@@ -124,6 +124,31 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
124
124
  * The height of the chart in px. If not defined, it takes the height of the parent element.
125
125
  */
126
126
  height: _propTypes.default.number,
127
+ /**
128
+ * List of hidden series and/or items.
129
+ *
130
+ * Different chart types use different keys.
131
+ *
132
+ * @example
133
+ * ```ts
134
+ * [
135
+ * {
136
+ * type: 'pie',
137
+ * seriesId: 'series-1',
138
+ * dataIndex: 3,
139
+ * },
140
+ * {
141
+ * type: 'line',
142
+ * seriesId: 'series-2',
143
+ * }
144
+ * ]
145
+ * ```
146
+ */
147
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
148
+ dataIndex: _propTypes.default.number,
149
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
150
+ type: _propTypes.default.oneOf(['pie']).isRequired
151
+ })),
127
152
  /**
128
153
  * If `true`, the legend is not rendered.
129
154
  */
@@ -162,6 +187,11 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
162
187
  right: _propTypes.default.number,
163
188
  top: _propTypes.default.number
164
189
  })]),
190
+ /**
191
+ * Callback fired when any hidden identifiers change.
192
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
193
+ */
194
+ onHiddenItemsChange: _propTypes.default.func,
165
195
  /**
166
196
  * The callback fired when the highlighted item changes.
167
197
  *
@@ -1,4 +1,4 @@
1
- import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartKeyboardNavigationSignature } from '@mui/x-charts/internals';
1
+ import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartKeyboardNavigationSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
3
- export type PieChartProPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProExportSignature];
3
+ export type PieChartProPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'pie'>, UseChartKeyboardNavigationSignature, UseChartProExportSignature];
4
4
  export declare const PIE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<PieChartProPluginSignatures>;
@@ -93,6 +93,31 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
93
93
  * The height of the chart in px. If not defined, it takes the height of the parent element.
94
94
  */
95
95
  height: _propTypes.default.number,
96
+ /**
97
+ * List of hidden series and/or items.
98
+ *
99
+ * Different chart types use different keys.
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * [
104
+ * {
105
+ * type: 'pie',
106
+ * seriesId: 'series-1',
107
+ * dataIndex: 3,
108
+ * },
109
+ * {
110
+ * type: 'line',
111
+ * seriesId: 'series-2',
112
+ * }
113
+ * ]
114
+ * ```
115
+ */
116
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
117
+ dataIndex: _propTypes.default.number,
118
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
119
+ type: _propTypes.default.oneOf(['radar']).isRequired
120
+ })),
96
121
  /**
97
122
  * If `true`, the legend is not rendered.
98
123
  */
@@ -149,6 +174,11 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
149
174
  * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
150
175
  */
151
176
  onAxisClick: _propTypes.default.func,
177
+ /**
178
+ * Callback fired when any hidden identifiers change.
179
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
180
+ */
181
+ onHiddenItemsChange: _propTypes.default.func,
152
182
  /**
153
183
  * The callback fired when the highlighted item changes.
154
184
  *