@mui/x-charts-pro 9.0.0-alpha.0 → 9.0.0-alpha.1

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 (62) hide show
  1. package/BarChartPro/BarChartPro.d.ts +1 -1
  2. package/BarChartPro/BarChartPro.js +23 -6
  3. package/CHANGELOG.md +118 -0
  4. package/ChartContainerPro/useChartContainerProProps.d.ts +1 -2
  5. package/ChartContainerPro/useChartContainerProProps.js +2 -2
  6. package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  7. package/ChartsContainerPro/ChartsContainerPro.js +2 -1
  8. package/ChartsContainerPro/useChartsContainerProProps.d.ts +1 -2
  9. package/ChartsContainerPro/useChartsContainerProProps.js +2 -2
  10. package/FunnelChart/FunnelChart.d.ts +1 -1
  11. package/FunnelChart/FunnelChart.js +7 -6
  12. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
  13. package/FunnelChart/funnelSlots.types.d.ts +3 -9
  14. package/FunnelChart/index.d.ts +1 -1
  15. package/FunnelChart/seriesConfig/keyboardFocusHandler.js +1 -14
  16. package/Heatmap/Heatmap.d.ts +1 -1
  17. package/Heatmap/Heatmap.js +19 -3
  18. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +16 -4
  19. package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  20. package/LineChartPro/LineChartPro.d.ts +1 -1
  21. package/LineChartPro/LineChartPro.js +23 -6
  22. package/PieChartPro/PieChartPro.d.ts +1 -1
  23. package/PieChartPro/PieChartPro.js +7 -6
  24. package/RadarChartPro/RadarChartPro.d.ts +1 -1
  25. package/RadarChartPro/RadarChartPro.js +6 -6
  26. package/SankeyChart/SankeyChart.d.ts +1 -1
  27. package/SankeyChart/SankeyChart.js +6 -20
  28. package/SankeyChart/sankeySlots.types.d.ts +3 -9
  29. package/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  30. package/ScatterChartPro/ScatterChartPro.js +23 -6
  31. package/esm/BarChartPro/BarChartPro.d.ts +1 -1
  32. package/esm/BarChartPro/BarChartPro.js +23 -6
  33. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +1 -2
  34. package/esm/ChartContainerPro/useChartContainerProProps.js +2 -2
  35. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  36. package/esm/ChartsContainerPro/ChartsContainerPro.js +2 -1
  37. package/esm/ChartsContainerPro/useChartsContainerProProps.d.ts +1 -2
  38. package/esm/ChartsContainerPro/useChartsContainerProProps.js +2 -2
  39. package/esm/FunnelChart/FunnelChart.d.ts +1 -1
  40. package/esm/FunnelChart/FunnelChart.js +7 -6
  41. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
  42. package/esm/FunnelChart/funnelSlots.types.d.ts +3 -9
  43. package/esm/FunnelChart/index.d.ts +1 -1
  44. package/esm/FunnelChart/seriesConfig/keyboardFocusHandler.js +2 -15
  45. package/esm/Heatmap/Heatmap.d.ts +1 -1
  46. package/esm/Heatmap/Heatmap.js +19 -3
  47. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +16 -4
  48. package/esm/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  49. package/esm/LineChartPro/LineChartPro.d.ts +1 -1
  50. package/esm/LineChartPro/LineChartPro.js +23 -6
  51. package/esm/PieChartPro/PieChartPro.d.ts +1 -1
  52. package/esm/PieChartPro/PieChartPro.js +7 -6
  53. package/esm/RadarChartPro/RadarChartPro.d.ts +1 -1
  54. package/esm/RadarChartPro/RadarChartPro.js +6 -6
  55. package/esm/SankeyChart/SankeyChart.d.ts +1 -1
  56. package/esm/SankeyChart/SankeyChart.js +6 -20
  57. package/esm/SankeyChart/sankeySlots.types.d.ts +3 -9
  58. package/esm/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  59. package/esm/ScatterChartPro/ScatterChartPro.js +23 -6
  60. package/esm/index.js +1 -1
  61. package/index.js +1 -1
  62. package/package.json +14 -6
@@ -29,5 +29,5 @@ export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots'
29
29
  *
30
30
  * - [BarChart API](https://mui.com/x/api/charts/bar-chart/)
31
31
  */
32
- declare const BarChartPro: React.ForwardRefExoticComponent<BarChartProProps & React.RefAttributes<SVGSVGElement>>;
32
+ declare const BarChartPro: React.ForwardRefExoticComponent<BarChartProProps & React.RefAttributes<HTMLDivElement>>;
33
33
  export { BarChartPro };
@@ -77,11 +77,12 @@ const BarChartPro = exports.BarChartPro = /*#__PURE__*/React.forwardRef(function
77
77
  onZoomChange,
78
78
  apiRef,
79
79
  plugins: _BarChartPro2.BAR_CHART_PRO_PLUGINS
80
- }), ref);
80
+ }));
81
81
  const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
82
82
  const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
83
83
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
84
84
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
85
+ ref: ref,
85
86
  children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
86
87
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
87
88
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_BarChart.BarPlot, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
@@ -192,8 +193,8 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
192
193
  */
193
194
  hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
194
195
  dataIndex: _propTypes.default.number,
195
- seriesId: _propTypes.default.string,
196
- type: _propTypes.default.oneOf(['bar']).isRequired
196
+ seriesId: _propTypes.default.string.isRequired,
197
+ type: _propTypes.default.oneOf(['bar'])
197
198
  })),
198
199
  /**
199
200
  * If `true`, the legend is not rendered.
@@ -243,8 +244,8 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
243
244
  */
244
245
  initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
245
246
  dataIndex: _propTypes.default.number,
246
- seriesId: _propTypes.default.string,
247
- type: _propTypes.default.oneOf(['bar']).isRequired
247
+ seriesId: _propTypes.default.string.isRequired,
248
+ type: _propTypes.default.oneOf(['bar'])
248
249
  })),
249
250
  /**
250
251
  * The list of zoom data related to each axis.
@@ -313,6 +314,14 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
313
314
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
314
315
  */
315
316
  onItemClick: _propTypes.default.func,
317
+ /**
318
+ * The function called when the pointer position corresponds to a new axis data item.
319
+ * This update can either be caused by a pointer movement, or an axis update.
320
+ * In case of multiple axes, the function is called if at least one axis is updated.
321
+ * The argument contains the identifier for all axes with a `data` property.
322
+ * @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
323
+ */
324
+ onTooltipAxisChange: _propTypes.default.func,
316
325
  /**
317
326
  * The callback fired when the tooltip item changes.
318
327
  *
@@ -362,6 +371,14 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
362
371
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
363
372
  theme: _propTypes.default.oneOf(['dark', 'light']),
364
373
  title: _propTypes.default.string,
374
+ /**
375
+ * The controlled axis tooltip.
376
+ * Identified by the axis id, and data index.
377
+ */
378
+ tooltipAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
379
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
380
+ dataIndex: _propTypes.default.number.isRequired
381
+ })),
365
382
  /**
366
383
  * The tooltip item.
367
384
  * Used when the tooltip is controlled.
@@ -369,7 +386,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
369
386
  tooltipItem: _propTypes.default.shape({
370
387
  dataIndex: _propTypes.default.number.isRequired,
371
388
  seriesId: _propTypes.default.string.isRequired,
372
- type: _propTypes.default.oneOf(['bar']).isRequired
389
+ type: _propTypes.default.oneOf(['bar'])
373
390
  }),
374
391
  /**
375
392
  * The width of the chart in px. If not defined, it takes the width of the parent element.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,123 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.0.0-alpha.1
4
+
5
+ _Feb 26, 2026_
6
+
7
+ We'd like to extend a big thank you to the 18 contributors who made this release possible. Here are some highlights ✨:
8
+
9
+ - ⚡️ Improved dynamic data support and cache invalidation in lazy loading for Data Grid Pro
10
+ - ⌨️ Keyboard support for selecting day, month, and year in Date Pickers
11
+ - 📊 Axis tooltip sorting and control improvements in Charts
12
+ - 🐞 Bugfixes and internal improvements
13
+
14
+ Special thanks go out to these community members for their valuable contributions:
15
+ @EllGree, @lion1963
16
+
17
+ The following team members contributed to this release:
18
+ @alexfauquette, @arminmeh, @brijeshb42, @cherniavskii, @dav-is, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes, @sai6855, @siriwatknp, @ZeeshanTamboli
19
+
20
+ ### Data Grid
21
+
22
+ #### `@mui/x-data-grid@9.0.0-alpha.1`
23
+
24
+ - [DataGrid] Forward rest props in `GridFilterInputMultipleValue` (#21407) @siriwatknp
25
+ - [DataGrid] Preserve key input during row edit when using `rowModesModel` (#20759) @michelengelen
26
+ - [DataGrid] Remove double rtl inversion logic for columns pinning (#21371) @siriwatknp
27
+
28
+ #### `@mui/x-data-grid-pro@9.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
29
+
30
+ Same changes as in `@mui/x-data-grid@9.0.0-alpha.1`, plus:
31
+
32
+ - [DataGridPro] Fix number input visibility in header filters (#21328) @michelengelen
33
+ - [DataGridPro] Improve dynamic data support and cache invalidation in lazy loading (#21282) @MBilalShafi
34
+
35
+ #### `@mui/x-data-grid-premium@9.0.0-alpha.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
36
+
37
+ Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.1`.
38
+
39
+ ### Date and Time Pickers
40
+
41
+ #### `@mui/x-date-pickers@9.0.0-alpha.1`
42
+
43
+ - [DatePicker] Add keyboard support for selecting day, month, and year (#20859) @michelengelen
44
+
45
+ #### `@mui/x-date-pickers-pro@9.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
46
+
47
+ Same changes as in `@mui/x-date-pickers@9.0.0-alpha.1`, plus:
48
+
49
+ - [DateRangePicker] Fix timezone update issue leading to `invalidRange` error (#20863) @michelengelen
50
+
51
+ ### Charts
52
+
53
+ #### `@mui/x-charts@9.0.0-alpha.1`
54
+
55
+ - [charts] Add `sort` props to the axis tooltip (#21293) @alexfauquette
56
+ - [charts] Controll axis tooltip (#21351) @alexfauquette
57
+ - [charts] De duplicate keyboard focus handler function (#21267) @sai6855
58
+ - [charts] Make `type` optional in identifiers (#21311) @alexfauquette
59
+ - [charts] Move ref to the root component (#21396) @alexfauquette
60
+ - [charts] Refactor loading and no data overlays to use a shared OverlayText component (#21414) @sai6855
61
+ - [charts] Require series ids to be unique (#21330) @alexfauquette
62
+ - [charts] Set `showMark` as `false` by default (#21373) @alexfauquette
63
+ - [charts] Use `createGetNextIndexFocusedItem()` util in Funnel and RangeBar charts (#21390) @sai6855
64
+ - [charts] Remove unnecessary string concatenation (#21418) @sai6855
65
+
66
+ #### `@mui/x-charts-pro@9.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
67
+
68
+ Same changes as in `@mui/x-charts@9.0.0-alpha.1`.
69
+
70
+ #### `@mui/x-charts-premium@9.0.0-alpha.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
71
+
72
+ Same changes as in `@mui/x-charts-pro@9.0.0-alpha.1`.
73
+
74
+ ### Tree View
75
+
76
+ #### `@mui/x-tree-view@9.0.0-alpha.1`
77
+
78
+ - [tree view] Focus item sibling on unmount instead of the 1st item (#21254) @flaviendelangle
79
+
80
+ #### `@mui/x-tree-view-pro@9.0.0-alpha.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
81
+
82
+ Same changes as in `@mui/x-tree-view@9.0.0-alpha.1`.
83
+
84
+ ### Codemod
85
+
86
+ #### `@mui/x-codemod@9.0.0-alpha.1`
87
+
88
+ Internal changes.
89
+
90
+ ### Docs
91
+
92
+ - [docs] Fix external 301s (#21377) @Janpot
93
+ - [docs] Show premium in the overview (#21343) @alexfauquette
94
+ - [docs][charts] Revise the useLegend hook doc (#21352) @mapache-salvaje
95
+ - [docs][charts] Revise the axis hooks doc (#21317) @mapache-salvaje
96
+ - [docs][charts] Revise the scale hooks doc (#21316) @mapache-salvaje
97
+ - [docs][charts] Revise the series hooks doc (#21353) @mapache-salvaje
98
+ - [docs][charts] Revise the useDataset doc (#21336) @mapache-salvaje
99
+ - [docs][charts] Revise the useDrawingArea doc (#21333) @mapache-salvaje
100
+
101
+ ### Core
102
+
103
+ - [core] Update docs deploy script to the `docs-next` branch (#21341) @siriwatknp
104
+ - [code-infra] Cleanup unused babel plugins (#21453) @brijeshb42
105
+ - [code-infra] Do not append `x` to the last version for the compare API (#21408) @arminmeh
106
+ - [code-infra] Upgrade react-docgen to v8 X (#21155) @JCQuintas
107
+ - [code-infra] Modernize codemod (#21096) @JCQuintas
108
+ - [docs-infra] Fix current version detection logic (#21417) @cherniavskii
109
+ - [docs-infra] Reapply Cookie Banner (#21281) @dav-is
110
+ - [internal] Headless filtering plugin (#21302) @arminmeh
111
+ - [internal] Headless pagination plugin (#21183) @arminmeh
112
+ - [internal] Headless virtualization followups (#21327) @cherniavskii
113
+ - [internal] Keep cached data for disabled pipe processors (#21348) @arminmeh
114
+ - [internal] Remove autoprefixer package (#21440) @ZeeshanTamboli
115
+
116
+ ### Miscellaneous
117
+
118
+ - [l10n] Fix Czech (csCZ) locale: sort/filter labels are swapped (#21400) @EllGree
119
+ - [l10n] Improve Ukrainian (uk-UA) locale (#21366) @lion1963
120
+
3
121
  ## 9.0.0-alpha.0
4
122
 
5
123
  _Feb 16, 2026_
@@ -1,4 +1,3 @@
1
- import type * as React from 'react';
2
1
  import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
3
2
  import { type UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.js";
4
3
  import type { ChartContainerProProps } from "./ChartContainerPro.js";
@@ -10,4 +9,4 @@ export type UseChartContainerProPropsReturnValue<TSeries extends ChartSeriesType
10
9
  /**
11
10
  * @deprecated Use `useChartsContainerProProps` instead.
12
11
  */
13
- export declare const useChartContainerProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures>, ref: React.Ref<SVGSVGElement>) => UseChartContainerProPropsReturnValue<TSeries, TSignatures>;
12
+ export declare const useChartContainerProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartContainerProProps<TSeries, TSignatures>) => UseChartContainerProPropsReturnValue<TSeries, TSignatures>;
@@ -13,7 +13,7 @@ var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContai
13
13
  /**
14
14
  * @deprecated Use `useChartsContainerProProps` instead.
15
15
  */
16
- const useChartContainerProProps = (props, ref) => {
17
- return (0, _useChartsContainerProProps.useChartsContainerProProps)(props, ref);
16
+ const useChartContainerProProps = props => {
17
+ return (0, _useChartsContainerProProps.useChartsContainerProProps)(props);
18
18
  };
19
19
  exports.useChartContainerProProps = useChartContainerProProps;
@@ -17,7 +17,7 @@ var _material = require("../internals/material");
17
17
  var _allPlugins = require("../internals/plugins/allPlugins");
18
18
  var _useChartDataProviderProProps = require("./useChartDataProviderProProps");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
- const releaseInfo = "MTc3MTIwMDAwMDAwMA==";
20
+ const releaseInfo = "MTc3MjA2NDAwMDAwMA==";
21
21
  const packageIdentifier = 'x-charts-pro';
22
22
  const defaultSeriesConfigPro = exports.defaultSeriesConfigPro = _internals.defaultSeriesConfig;
23
23
 
@@ -43,9 +43,10 @@ const ChartsContainerPro = exports.ChartsContainerPro = /*#__PURE__*/React.forwa
43
43
  chartDataProviderProProps,
44
44
  children,
45
45
  chartsSurfaceProps
46
- } = (0, _useChartsContainerProProps.useChartsContainerProProps)(props, ref);
46
+ } = (0, _useChartsContainerProProps.useChartsContainerProProps)(props);
47
47
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
48
48
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
49
+ ref: ref,
49
50
  children: children
50
51
  }))
51
52
  }));
@@ -1,9 +1,8 @@
1
1
  import { type ChartAnyPluginSignature, type ChartSeriesType, type UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
2
- import type * as React from 'react';
3
2
  import type { ChartDataProviderProProps } from "../ChartDataProviderPro/index.js";
4
3
  import type { ChartsContainerProProps } from "./ChartsContainerPro.js";
5
4
  import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
6
5
  export type UseChartsContainerProPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartsContainerPropsReturnValue<TSeries, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
7
6
  chartDataProviderProProps: ChartDataProviderProProps<TSeries, TSignatures>;
8
7
  };
9
- export declare const useChartsContainerProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerProProps<TSeries, TSignatures>, ref: React.Ref<SVGSVGElement>) => UseChartsContainerProPropsReturnValue<TSeries, TSignatures>;
8
+ export declare const useChartsContainerProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerProProps<TSeries, TSignatures>) => UseChartsContainerProPropsReturnValue<TSeries, TSignatures>;
@@ -11,7 +11,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
11
11
  var _internals = require("@mui/x-charts/internals");
12
12
  var _allPlugins = require("../internals/plugins/allPlugins");
13
13
  const _excluded = ["initialZoom", "zoomData", "onZoomChange", "zoomInteractionConfig", "plugins", "apiRef"];
14
- const useChartsContainerProProps = (props, ref) => {
14
+ const useChartsContainerProProps = props => {
15
15
  const _ref = props,
16
16
  {
17
17
  initialZoom,
@@ -26,7 +26,7 @@ const useChartsContainerProProps = (props, ref) => {
26
26
  chartDataProviderProps,
27
27
  chartsSurfaceProps,
28
28
  children
29
- } = (0, _internals.useChartsContainerProps)(baseProps, ref);
29
+ } = (0, _internals.useChartsContainerProps)(baseProps);
30
30
  const chartDataProviderProProps = (0, _extends2.default)({}, chartDataProviderProps, {
31
31
  initialZoom,
32
32
  zoomData,
@@ -35,5 +35,5 @@ export interface FunnelChartProps extends Omit<ChartContainerProProps<'funnel',
35
35
  */
36
36
  axisHighlight?: ChartsAxisHighlightProps;
37
37
  }
38
- declare const FunnelChart: React.ForwardRefExoticComponent<FunnelChartProps & React.RefAttributes<SVGSVGElement>>;
38
+ declare const FunnelChart: React.ForwardRefExoticComponent<FunnelChartProps & React.RefAttributes<HTMLDivElement>>;
39
39
  export { FunnelChart };
@@ -47,13 +47,14 @@ const FunnelChart = exports.FunnelChart = /*#__PURE__*/React.forwardRef(function
47
47
  const {
48
48
  chartDataProviderProProps,
49
49
  chartsSurfaceProps
50
- } = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps, ref);
50
+ } = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps);
51
51
  const Tooltip = themedProps.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
52
52
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
53
53
  gap: themedProps.gap,
54
54
  seriesConfig: seriesConfig,
55
55
  plugins: _FunnelChart2.FUNNEL_CHART_PLUGINS,
56
56
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
57
+ ref: ref,
57
58
  children: [!themedProps.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
58
59
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FunnelPlot.FunnelPlot, (0, _extends2.default)({}, funnelPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusedFunnelSection.FocusedFunnelSection, {}), children]
59
60
  })), !themedProps.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({
@@ -215,8 +216,8 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
215
216
  */
216
217
  hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
217
218
  dataIndex: _propTypes.default.number,
218
- seriesId: _propTypes.default.string,
219
- type: _propTypes.default.oneOf(['funnel']).isRequired
219
+ seriesId: _propTypes.default.string.isRequired,
220
+ type: _propTypes.default.oneOf(['funnel'])
220
221
  })),
221
222
  /**
222
223
  * If `true`, the legend is not rendered.
@@ -259,8 +260,8 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
259
260
  */
260
261
  initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
261
262
  dataIndex: _propTypes.default.number,
262
- seriesId: _propTypes.default.string,
263
- type: _propTypes.default.oneOf(['funnel']).isRequired
263
+ seriesId: _propTypes.default.string.isRequired,
264
+ type: _propTypes.default.oneOf(['funnel'])
264
265
  })),
265
266
  /**
266
267
  * If `true`, a loading overlay is displayed.
@@ -343,7 +344,7 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
343
344
  tooltipItem: _propTypes.default.shape({
344
345
  dataIndex: _propTypes.default.number.isRequired,
345
346
  seriesId: _propTypes.default.string.isRequired,
346
- type: _propTypes.default.oneOf(['funnel']).isRequired
347
+ type: _propTypes.default.oneOf(['funnel'])
347
348
  }),
348
349
  /**
349
350
  * The width of the chart in px. If not defined, it takes the width of the parent element.
@@ -1,6 +1,6 @@
1
1
  import { type ChartPluginSignature, type UseChartCartesianAxisDefaultizedParameters, type UseChartCartesianAxisParameters, type UseChartCartesianAxisState, type UseChartInteractionSignature, type UseChartSeriesSignature, type ChartsAxisData } from '@mui/x-charts/internals';
2
2
  export type UseChartFunnelAxisSignature = ChartPluginSignature<{
3
- params: Omit<UseChartCartesianAxisParameters, 'onAxisClick' | 'onHighlightedAxisChange' | 'highlightedAxis' | 'axesGap'> & {
3
+ params: Omit<UseChartCartesianAxisParameters, 'onAxisClick' | 'onHighlightedAxisChange' | 'highlightedAxis' | 'onTooltipAxisChange' | 'tooltipAxis' | 'axesGap'> & {
4
4
  /**
5
5
  * The gap, in pixels, between funnel sections.
6
6
  * @default 0
@@ -1,17 +1,11 @@
1
1
  import { type ChartsOverlaySlotProps, type ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
2
- import { type ChartsTooltipProps, type ChartsTooltipSlotProps, type ChartsTooltipSlots } from '@mui/x-charts/ChartsTooltip';
2
+ import { type ChartsTooltipSlotProps, type ChartsTooltipSlots } from '@mui/x-charts/ChartsTooltip';
3
3
  import { type ChartsAxisSlotProps, type ChartsAxisSlots, type ChartsSlotProps, type ChartsSlots } from '@mui/x-charts/internals';
4
4
  import { type ChartsLegendSlotProps, type ChartsLegendSlots } from '@mui/x-charts/ChartsLegend';
5
5
  import { type ChartsToolbarSlotProps, type ChartsToolbarSlots } from '@mui/x-charts/Toolbar';
6
6
  import { type FunnelPlotSlotProps, type FunnelPlotSlots } from "./funnelPlotSlots.types.js";
7
- export interface FunnelChartSlots extends ChartsAxisSlots, FunnelPlotSlots, ChartsLegendSlots, ChartsTooltipSlots, ChartsOverlaySlots, ChartsAxisSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
8
- export interface FunnelChartSlotProps extends ChartsAxisSlotProps, FunnelPlotSlotProps, ChartsLegendSlotProps, Omit<ChartsTooltipSlotProps, 'tooltip'>, ChartsOverlaySlotProps, ChartsAxisSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {
9
- /**
10
- * Slot props for the tooltip component.
11
- * @default {}
12
- */
13
- tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
14
- }
7
+ export interface FunnelChartSlots extends ChartsAxisSlots, FunnelPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsAxisSlots, ChartsToolbarSlots, ChartsTooltipSlots<'item' | 'none'>, Partial<ChartsSlots> {}
8
+ export interface FunnelChartSlotProps extends ChartsAxisSlotProps, FunnelPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsAxisSlotProps, ChartsToolbarSlotProps, ChartsTooltipSlotProps<'item' | 'none'>, Partial<ChartsSlotProps> {}
15
9
  export interface FunnelChartSlotExtension {
16
10
  /**
17
11
  * Overridable component slots.
@@ -2,7 +2,7 @@ export { FunnelChart } from "./FunnelChart.js";
2
2
  /**
3
3
  * @deprecated funnel chart is now stable, import `FunnelChart` instead
4
4
  */
5
- export declare const Unstable_FunnelChart: import("react").ForwardRefExoticComponent<import("./FunnelChart.js").FunnelChartProps & import("react").RefAttributes<SVGSVGElement>>;
5
+ export declare const Unstable_FunnelChart: import("react").ForwardRefExoticComponent<import("./FunnelChart.js").FunnelChartProps & import("react").RefAttributes<HTMLDivElement>>;
6
6
  export type { FunnelChartProps, FunnelSeries } from "./FunnelChart.js";
7
7
  export * from "./FunnelPlot.js";
8
8
  export * from "./funnelPlotSlots.types.js";
@@ -6,18 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _internals = require("@mui/x-charts/internals");
8
8
  const outSeriesTypes = new Set(['funnel']);
9
- const keyboardFocusHandler = event => {
10
- switch (event.key) {
11
- case 'ArrowRight':
12
- return (0, _internals.createGetNextIndexFocusedItem)(outSeriesTypes);
13
- case 'ArrowLeft':
14
- return (0, _internals.createGetPreviousIndexFocusedItem)(outSeriesTypes);
15
- case 'ArrowDown':
16
- return (0, _internals.createGetPreviousSeriesFocusedItem)(outSeriesTypes);
17
- case 'ArrowUp':
18
- return (0, _internals.createGetNextSeriesFocusedItem)(outSeriesTypes);
19
- default:
20
- return null;
21
- }
22
- };
9
+ const keyboardFocusHandler = (0, _internals.createCommonKeyboardFocusHandler)(outSeriesTypes);
23
10
  var _default = exports.default = keyboardFocusHandler;
@@ -84,5 +84,5 @@ export interface HeatmapProps extends Omit<ChartContainerProProps<'heatmap', Hea
84
84
  */
85
85
  slotProps?: HeatmapSlotProps;
86
86
  }
87
- declare const Heatmap: React.ForwardRefExoticComponent<HeatmapProps & React.RefAttributes<SVGSVGElement>>;
87
+ declare const Heatmap: React.ForwardRefExoticComponent<HeatmapProps & React.RefAttributes<HTMLDivElement>>;
88
88
  export { Heatmap };
@@ -53,8 +53,8 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
53
53
  const Toolbar = slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
54
54
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
55
55
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
56
+ ref: ref,
56
57
  children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, {
57
- ref: ref,
58
58
  sx: sx,
59
59
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
60
60
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeatmapPlot.HeatmapPlot, (0, _extends2.default)({}, heatmapPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusedHeatmapCell.FocusedHeatmapCell, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps))]
@@ -177,9 +177,17 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
177
177
  * The callback fired when an item is clicked.
178
178
  *
179
179
  * @param {React.MouseEvent<SVGSVGElement, MouseEvent>} event The click event.
180
- * @param {SeriesItemIdentifier<SeriesType>} item The clicked item.
180
+ * @param {SeriesItemIdentifierWithType<SeriesType>} item The clicked item.
181
181
  */
182
182
  onItemClick: _propTypes.default.func,
183
+ /**
184
+ * The function called when the pointer position corresponds to a new axis data item.
185
+ * This update can either be caused by a pointer movement, or an axis update.
186
+ * In case of multiple axes, the function is called if at least one axis is updated.
187
+ * The argument contains the identifier for all axes with a `data` property.
188
+ * @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
189
+ */
190
+ onTooltipAxisChange: _propTypes.default.func,
183
191
  /**
184
192
  * The callback fired when the tooltip item changes.
185
193
  *
@@ -220,6 +228,14 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
220
228
  * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
221
229
  */
222
230
  tooltip: _propTypes.default.object,
231
+ /**
232
+ * The controlled axis tooltip.
233
+ * Identified by the axis id, and data index.
234
+ */
235
+ tooltipAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
236
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
237
+ dataIndex: _propTypes.default.number.isRequired
238
+ })),
223
239
  /**
224
240
  * The tooltip item.
225
241
  * Used when the tooltip is controlled.
@@ -227,7 +243,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
227
243
  tooltipItem: _propTypes.default.shape({
228
244
  dataIndex: _propTypes.default.number,
229
245
  seriesId: _propTypes.default.string.isRequired,
230
- type: _propTypes.default.oneOf(['heatmap']).isRequired,
246
+ type: _propTypes.default.oneOf(['heatmap']),
231
247
  xIndex: _propTypes.default.number.isRequired,
232
248
  yIndex: _propTypes.default.number.isRequired
233
249
  }),
@@ -1,9 +1,21 @@
1
- import { type ChartsTooltipContainerProps, type ChartsTooltipClasses, type ChartsTooltipSlots, type ChartsTooltipSlotProps } from '@mui/x-charts/ChartsTooltip';
2
- export interface HeatmapTooltipSlots extends ChartsTooltipSlots {}
3
- export interface HeatmapTooltipSlotProps extends ChartsTooltipSlotProps {}
1
+ import { type ChartsTooltipContainerProps, type ChartsTooltipClasses } from '@mui/x-charts/ChartsTooltip';
2
+ export interface HeatmapTooltipSlots {
3
+ /**
4
+ * Custom component for the tooltip popper.
5
+ * @default ChartsTooltipRoot
6
+ */
7
+ tooltip?: React.ElementType<HeatmapTooltipProps>;
8
+ }
9
+ export interface HeatmapTooltipSlotProps {
10
+ /**
11
+ * Custom component for the tooltip popper.
12
+ * @default ChartsTooltipRoot
13
+ */
14
+ tooltip?: Partial<HeatmapTooltipProps>;
15
+ }
4
16
  export interface HeatmapTooltipClasses extends ChartsTooltipClasses {}
5
17
  export interface HeatmapTooltipContentClasses extends ChartsTooltipClasses {}
6
- export interface HeatmapTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {
18
+ export interface HeatmapTooltipProps extends Omit<ChartsTooltipContainerProps<'item' | 'none'>, 'trigger' | 'children'> {
7
19
  /**
8
20
  * Select the kind of tooltip to display
9
21
  * - 'item': Shows data about the item below the mouse.
@@ -1,6 +1,6 @@
1
1
  import type { ChartState, UseChartCartesianAxisSignature } from '@mui/x-charts/internals';
2
- import type { SeriesItemIdentifier } from '@mui/x-charts/models';
2
+ import type { SeriesItemIdentifierWithType } from '@mui/x-charts/models';
3
3
  export default function getItemAtPosition(state: ChartState<[UseChartCartesianAxisSignature]>, point: {
4
4
  x: number;
5
5
  y: number;
6
- }): SeriesItemIdentifier<'heatmap'> | undefined;
6
+ }): SeriesItemIdentifierWithType<'heatmap'> | undefined;
@@ -28,5 +28,5 @@ export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slot
28
28
  *
29
29
  * - [LineChart API](https://mui.com/x/api/charts/line-chart/)
30
30
  */
31
- declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<SVGSVGElement>>;
31
+ declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<HTMLDivElement>>;
32
32
  export { LineChartPro };
@@ -79,11 +79,12 @@ const LineChartPro = exports.LineChartPro = /*#__PURE__*/React.forwardRef(functi
79
79
  onZoomChange,
80
80
  apiRef,
81
81
  plugins: _LineChartPro2.LINE_CHART_PRO_PLUGINS
82
- }), ref);
82
+ }));
83
83
  const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
84
84
  const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
85
85
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
86
86
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
87
+ ref: ref,
87
88
  children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
88
89
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
89
90
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.AreaPlot, (0, _extends2.default)({}, areaPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LinePlot, (0, _extends2.default)({}, linePlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
@@ -193,8 +194,8 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
193
194
  */
194
195
  hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
195
196
  dataIndex: _propTypes.default.number,
196
- seriesId: _propTypes.default.string,
197
- type: _propTypes.default.oneOf(['line']).isRequired
197
+ seriesId: _propTypes.default.string.isRequired,
198
+ type: _propTypes.default.oneOf(['line'])
198
199
  })),
199
200
  /**
200
201
  * If `true`, the legend is not rendered.
@@ -244,8 +245,8 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
244
245
  */
245
246
  initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
246
247
  dataIndex: _propTypes.default.number,
247
- seriesId: _propTypes.default.string,
248
- type: _propTypes.default.oneOf(['line']).isRequired
248
+ seriesId: _propTypes.default.string.isRequired,
249
+ type: _propTypes.default.oneOf(['line'])
249
250
  })),
250
251
  /**
251
252
  * The list of zoom data related to each axis.
@@ -315,6 +316,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
315
316
  * Callback fired when a mark element is clicked.
316
317
  */
317
318
  onMarkClick: _propTypes.default.func,
319
+ /**
320
+ * The function called when the pointer position corresponds to a new axis data item.
321
+ * This update can either be caused by a pointer movement, or an axis update.
322
+ * In case of multiple axes, the function is called if at least one axis is updated.
323
+ * The argument contains the identifier for all axes with a `data` property.
324
+ * @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
325
+ */
326
+ onTooltipAxisChange: _propTypes.default.func,
318
327
  /**
319
328
  * The callback fired when the tooltip item changes.
320
329
  *
@@ -355,6 +364,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
355
364
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
356
365
  theme: _propTypes.default.oneOf(['dark', 'light']),
357
366
  title: _propTypes.default.string,
367
+ /**
368
+ * The controlled axis tooltip.
369
+ * Identified by the axis id, and data index.
370
+ */
371
+ tooltipAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
372
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
373
+ dataIndex: _propTypes.default.number.isRequired
374
+ })),
358
375
  /**
359
376
  * The tooltip item.
360
377
  * Used when the tooltip is controlled.
@@ -362,7 +379,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
362
379
  tooltipItem: _propTypes.default.shape({
363
380
  dataIndex: _propTypes.default.number,
364
381
  seriesId: _propTypes.default.string.isRequired,
365
- type: _propTypes.default.oneOf(['line']).isRequired
382
+ type: _propTypes.default.oneOf(['line'])
366
383
  }),
367
384
  /**
368
385
  * The width of the chart in px. If not defined, it takes the width of the parent element.
@@ -18,5 +18,5 @@ export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots'
18
18
  */
19
19
  slotProps?: PieChartProSlotProps;
20
20
  }
21
- declare const PieChartPro: React.ForwardRefExoticComponent<PieChartProProps & React.RefAttributes<SVGSVGElement>>;
21
+ declare const PieChartPro: React.ForwardRefExoticComponent<PieChartProProps & React.RefAttributes<HTMLDivElement>>;
22
22
  export { PieChartPro };