@mui/x-charts-pro 8.22.1 → 8.23.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 (44) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  3. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +2 -3
  4. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +6 -22
  5. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  6. package/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.d.ts +4 -0
  7. package/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.js +22 -0
  8. package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
  9. package/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +4 -0
  10. package/ChartZoomSlider/internals/seriesPreviewPlotMap.d.ts +3 -0
  11. package/ChartZoomSlider/internals/seriesPreviewPlotMap.js +10 -0
  12. package/Heatmap/Heatmap.d.ts +2 -2
  13. package/Heatmap/Heatmap.js +109 -5
  14. package/Heatmap/Heatmap.plugins.d.ts +3 -2
  15. package/Heatmap/Heatmap.plugins.js +2 -1
  16. package/Heatmap/HeatmapItem.d.ts +10 -1
  17. package/Heatmap/HeatmapItem.js +3 -9
  18. package/Heatmap/HeatmapPlot.js +11 -1
  19. package/Heatmap/index.d.ts +1 -0
  20. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  21. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +2 -3
  22. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +6 -22
  23. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  24. package/esm/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.d.ts +4 -0
  25. package/esm/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.js +15 -0
  26. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
  27. package/esm/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +4 -0
  28. package/esm/ChartZoomSlider/internals/seriesPreviewPlotMap.d.ts +3 -0
  29. package/esm/ChartZoomSlider/internals/seriesPreviewPlotMap.js +4 -0
  30. package/esm/Heatmap/Heatmap.d.ts +2 -2
  31. package/esm/Heatmap/Heatmap.js +109 -5
  32. package/esm/Heatmap/Heatmap.plugins.d.ts +3 -2
  33. package/esm/Heatmap/Heatmap.plugins.js +3 -2
  34. package/esm/Heatmap/HeatmapItem.d.ts +10 -1
  35. package/esm/Heatmap/HeatmapItem.js +3 -9
  36. package/esm/Heatmap/HeatmapPlot.js +11 -1
  37. package/esm/Heatmap/index.d.ts +1 -0
  38. package/esm/index.js +1 -1
  39. package/esm/internals/index.d.ts +3 -1
  40. package/esm/internals/index.js +2 -1
  41. package/index.js +1 -1
  42. package/internals/index.d.ts +3 -1
  43. package/internals/index.js +8 -1
  44. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -5,6 +5,107 @@
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.23.0
9
+
10
+ _Dec 23, 2025_
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
+ - 🧮 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)
15
+ - 🔎 Allow zooming a heatmap
16
+
17
+ Special thanks go out to these community members for their valuable contributions:
18
+ @henkerik, @sai6855
19
+
20
+ The following team members contributed to this release:
21
+ @alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @brijeshb42, @flaviendelangle, @JCQuintas, @mapache-salvaje, @MBilalShafi, @siriwatknp
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@8.23.0`
26
+
27
+ - [DataGrid] Fix columns state and columns prop sync issue (#20703) @arminmeh
28
+ - [DataGrid] Fix filter datetime with seconds (#20557) @siriwatknp
29
+ - [DataGrid] Add new `includeHeaderFilters` flag to include header filters when autosizing columns (#20510) @siriwatknp
30
+ - [DataGrid] Prevent default on `Enter` key down when starting editing (#20751) @siriwatknp
31
+ - [l10n] Improve Portuguese from Portugal (pt-PT) locale (#20722) @Copilot
32
+
33
+ #### `@mui/x-data-grid-pro@8.23.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
34
+
35
+ Same changes as in `@mui/x-data-grid@8.23.0`, plus:
36
+
37
+ - [DataGridPro] Fix crash on rows change in tree data with pagination (#20215) @Copilot
38
+
39
+ #### `@mui/x-data-grid-premium@8.23.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
40
+
41
+ Same changes as in `@mui/x-data-grid-pro@8.23.0`, plus:
42
+
43
+ - [DataGridPremium] Add aggregation for `'boolean'` column type (#20683) @arminmeh
44
+ - [DataGridPremium] Fix strategy value computation with row grouping (#20725) @MBilalShafi
45
+ - [DataGridPremium] Handle `isRowSelectable()` checks for the rows missing due to `keepNonExistentRowsSelected` (#20668) @arminmeh
46
+
47
+ ### Date and Time Pickers
48
+
49
+ #### `@mui/x-date-pickers@8.23.0`
50
+
51
+ Internal changes.
52
+
53
+ #### `@mui/x-date-pickers-pro@8.23.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
54
+
55
+ Same changes as in `@mui/x-date-pickers@8.23.0`.
56
+
57
+ ### Charts
58
+
59
+ #### `@mui/x-charts@8.23.0`
60
+
61
+ - [charts] Custom stack functions implementation (#20679) @JCQuintas
62
+ - [charts] Extract keyboard focus navigation to the series config (#20693) @alexfauquette
63
+ - [charts] Fix demo not wrapping in mobile (#20713) @JCQuintas
64
+ - [charts] Fix missing dependencies in `x-charts-vendor` (#20685) @henkerik
65
+ - [charts] Remove webkit test differences (#20707) @JCQuintas
66
+
67
+ #### `@mui/x-charts-pro@8.23.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
68
+
69
+ Same changes as in `@mui/x-charts@8.23.0`, plus:
70
+
71
+ - [charts-pro] Allow registering preview plots from higher tier packages (#20716) @bernardobelchior
72
+ - [charts-pro] Fix erroneous behavior when adding/removing pointers from zoom&pan gestures (#20698) @JCQuintas
73
+ - [charts-pro] Move heatmap highlight handling to plot component (#20701) @bernardobelchior
74
+ - [charts-pro] Add zoom to heatmap (#20708) @bernardobelchior
75
+
76
+ #### `@mui/x-charts-premium@8.23.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
77
+
78
+ Same changes as in `@mui/x-charts-pro@8.23.0`.
79
+
80
+ ### Tree View
81
+
82
+ #### `@mui/x-tree-view@8.23.0`
83
+
84
+ - [tree view] Add new APIs to disable selection feature for tree view item (#20666) @siriwatknp
85
+
86
+ #### `@mui/x-tree-view-pro@8.23.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
87
+
88
+ Same changes as in `@mui/x-tree-view@8.23.0`.
89
+
90
+ ### Codemod
91
+
92
+ #### `@mui/x-codemod@8.23.0`
93
+
94
+ Internal changes.
95
+
96
+ ### Docs
97
+
98
+ - [docs] Clarify feature availability and relationship between Community and Pro/Premium docs (#20714) @mapache-salvaje
99
+ - [docs] Copyedit Tree View docs and apply new component style rules (DX-19) (#20652) @mapache-salvaje
100
+ - [docs] Fix `ColumnPinningDynamicRowHeight` demo (#20750) @sai6855
101
+ - [docs] Clean up Charts docs sidebar (DX-97) (#20700) @alelthomas
102
+ - [docs] Fix tick labels not being shown on a demo (#20718) @sai6855
103
+
104
+ ### Core
105
+
106
+ - [code-infra] Bump prettier to 3.7.4 (#20709) @JCQuintas
107
+ - [code-infra] Fix contributor generation logic in changelog script (#20705) @brijeshb42
108
+
8
109
  ## 8.22.1
9
110
 
10
111
  _Dec 17, 2025_
@@ -16,7 +16,7 @@ var _material = require("../internals/material");
16
16
  var _allPlugins = require("../internals/plugins/allPlugins");
17
17
  var _useChartDataProviderProProps = require("./useChartDataProviderProProps");
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
- const releaseInfo = "MTc2NjAxNjAwMDAwMA==";
19
+ const releaseInfo = "MTc2NjUzNDQwMDAwMA==";
20
20
  const packageIdentifier = 'x-charts-pro';
21
21
  /**
22
22
  * Orchestrates the data providers for the chart components and hooks.
@@ -1,10 +1,9 @@
1
1
  import { type AxisId } from '@mui/x-charts/internals';
2
- interface ChartAxisZoomSliderPreviewContentProps {
2
+ export interface ChartAxisZoomSliderPreviewContentProps {
3
3
  axisId: AxisId;
4
4
  x: number;
5
5
  y: number;
6
6
  height: number;
7
7
  width: number;
8
8
  }
9
- export declare function ChartAxisZoomSliderPreviewContent(props: ChartAxisZoomSliderPreviewContentProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
9
+ export declare function ChartAxisZoomSliderPreviewContent(props: ChartAxisZoomSliderPreviewContentProps): import("react/jsx-runtime").JSX.Element;
@@ -9,10 +9,7 @@ exports.ChartAxisZoomSliderPreviewContent = ChartAxisZoomSliderPreviewContent;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _internals = require("@mui/x-charts/internals");
12
- var _LinePreviewPlot = require("./previews/LinePreviewPlot");
13
- var _AreaPreviewPlot = require("./previews/AreaPreviewPlot");
14
- var _BarPreviewPlot = require("./previews/BarPreviewPlot");
15
- var _ScatterPreviewPlot = require("./previews/ScatterPreviewPlot");
12
+ var _seriesPreviewPlotMap = require("./seriesPreviewPlotMap");
16
13
  var _jsxRuntime = require("react/jsx-runtime");
17
14
  function ChartAxisZoomSliderPreviewContent(props) {
18
15
  const {
@@ -26,24 +23,11 @@ function ChartAxisZoomSliderPreviewContent(props) {
26
23
  const processedSeries = store.use(_internals.selectorChartSeriesProcessed);
27
24
  const children = [];
28
25
  const clipId = `zoom-preview-mask-${axisId}`;
29
- const hasLineSeries = (processedSeries.line?.seriesOrder?.length ?? 0) > 0;
30
- const hasBarSeries = (processedSeries.bar?.seriesOrder?.length ?? 0) > 0;
31
- const hasScatterSeries = (processedSeries.scatter?.seriesOrder?.length ?? 0) > 0;
32
- if (hasLineSeries) {
33
- children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AreaPreviewPlot.AreaPreviewPlot, {
34
- axisId: axisId
35
- }, "area"));
36
- }
37
- if (hasBarSeries) {
38
- children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_BarPreviewPlot.BarPreviewPlot, (0, _extends2.default)({}, props), "bar"));
39
- }
40
- if (hasLineSeries) {
41
- children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_LinePreviewPlot.LinePreviewPlot, {
42
- axisId: axisId
43
- }, "line"));
44
- }
45
- if (hasScatterSeries) {
46
- children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScatterPreviewPlot.ScatterPreviewPlot, (0, _extends2.default)({}, props), "scatter"));
26
+ for (const [seriesType, Component] of _seriesPreviewPlotMap.seriesPreviewPlotMap) {
27
+ const hasSeries = (processedSeries[seriesType]?.seriesOrder?.length ?? 0) > 0;
28
+ if (hasSeries) {
29
+ children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, (0, _extends2.default)({}, props), seriesType));
30
+ }
47
31
  }
48
32
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
49
33
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("clipPath", {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { type SeriesId } from '@mui/x-charts/internals';
3
3
  import { type PreviewPlotProps } from "./PreviewPlot.types.js";
4
- interface AreaPreviewPlotProps extends PreviewPlotProps {}
4
+ interface AreaPreviewPlotProps extends Pick<PreviewPlotProps, 'axisId'> {}
5
5
  export declare function AreaPreviewPlot({
6
6
  axisId
7
7
  }: AreaPreviewPlotProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { type PreviewPlotProps } from "./PreviewPlot.types.js";
2
+ export declare function LineAreaPreviewPlot({
3
+ axisId
4
+ }: PreviewPlotProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.LineAreaPreviewPlot = LineAreaPreviewPlot;
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _AreaPreviewPlot = require("./AreaPreviewPlot");
10
+ var _LinePreviewPlot = require("./LinePreviewPlot");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function LineAreaPreviewPlot({
13
+ axisId
14
+ }) {
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
16
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AreaPreviewPlot.AreaPreviewPlot, {
17
+ axisId: axisId
18
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinePreviewPlot.LinePreviewPlot, {
19
+ axisId: axisId
20
+ })]
21
+ });
22
+ }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { type SeriesId } from '@mui/x-charts/internals';
3
- import { type PreviewPlotProps } from "./PreviewPlot.types.js";
4
- interface LinePreviewPlotProps extends PreviewPlotProps {}
3
+ import type { PreviewPlotProps } from "./PreviewPlot.types.js";
4
+ interface LinePreviewPlotProps extends Pick<PreviewPlotProps, 'axisId'> {}
5
5
  export declare function LinePreviewPlot({
6
6
  axisId
7
7
  }: LinePreviewPlotProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,8 @@
1
1
  import { type AxisId } from '@mui/x-charts/internals';
2
2
  export interface PreviewPlotProps {
3
3
  axisId: AxisId;
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
4
8
  }
@@ -0,0 +1,3 @@
1
+ import type * as React from 'react';
2
+ import { type PreviewPlotProps } from "./previews/PreviewPlot.types.js";
3
+ export declare const seriesPreviewPlotMap: Map<keyof import("@mui/x-charts/internals").ChartsSeriesConfig, React.ComponentType<PreviewPlotProps>>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.seriesPreviewPlotMap = void 0;
7
+ var _BarPreviewPlot = require("./previews/BarPreviewPlot");
8
+ var _ScatterPreviewPlot = require("./previews/ScatterPreviewPlot");
9
+ var _LineAreaPreviewPlot = require("./previews/LineAreaPreviewPlot");
10
+ const seriesPreviewPlotMap = exports.seriesPreviewPlotMap = new Map([['bar', _BarPreviewPlot.BarPreviewPlot], ['line', _LineAreaPreviewPlot.LineAreaPreviewPlot], ['scatter', _ScatterPreviewPlot.ScatterPreviewPlot]]);
@@ -34,13 +34,13 @@ export interface HeatmapProps extends Omit<ChartContainerProProps<'heatmap', Hea
34
34
  * If not provided, a default axis config is used.
35
35
  * An array of [[AxisConfig]] objects.
36
36
  */
37
- xAxis: Readonly<Omit<MakeOptional<XAxis<'band'>, 'scaleType'>, 'zoom'>[]>;
37
+ xAxis: Readonly<MakeOptional<XAxis<'band'>, 'scaleType'>[]>;
38
38
  /**
39
39
  * The configuration of the y-axes.
40
40
  * If not provided, a default axis config is used.
41
41
  * An array of [[AxisConfig]] objects.
42
42
  */
43
- yAxis: Readonly<Omit<MakeOptional<YAxis<'band'>, 'scaleType'>, 'zoom'>[]>;
43
+ yAxis: Readonly<MakeOptional<YAxis<'band'>, 'scaleType'>[]>;
44
44
  /**
45
45
  * The series to display in the bar chart.
46
46
  * An array of [[HeatmapSeries]] objects.
@@ -20,6 +20,7 @@ var _ChartsClipPath = require("@mui/x-charts/ChartsClipPath");
20
20
  var _ChartsOverlay = require("@mui/x-charts/ChartsOverlay");
21
21
  var _constants = require("@mui/x-charts/constants");
22
22
  var _ChartsLegend = require("@mui/x-charts/ChartsLegend");
23
+ var _ChartsBrushOverlay = require("@mui/x-charts/ChartsBrushOverlay");
23
24
  var _HeatmapPlot = require("./HeatmapPlot");
24
25
  var _seriesConfig = require("./seriesConfig");
25
26
  var _HeatmapTooltip = require("./HeatmapTooltip");
@@ -155,7 +156,7 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
155
156
  slotProps: slotProps
156
157
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, {
157
158
  id: clipPathId
158
- }), children]
159
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsBrushOverlay.ChartsBrushOverlay, {}), children]
159
160
  }), !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, slotProps?.tooltip))]
160
161
  }))
161
162
  });
@@ -169,9 +170,19 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
169
170
  apiRef: _propTypes.default.shape({
170
171
  current: _propTypes.default.shape({
171
172
  exportAsImage: _propTypes.default.func.isRequired,
172
- exportAsPrint: _propTypes.default.func.isRequired
173
+ exportAsPrint: _propTypes.default.func.isRequired,
174
+ setAxisZoomData: _propTypes.default.func.isRequired,
175
+ setZoomData: _propTypes.default.func.isRequired
173
176
  })
174
177
  }),
178
+ /**
179
+ * Configuration for the brush interaction.
180
+ */
181
+ brushConfig: _propTypes.default.shape({
182
+ enabled: _propTypes.default.bool,
183
+ preventHighlight: _propTypes.default.bool,
184
+ preventTooltip: _propTypes.default.bool
185
+ }),
175
186
  className: _propTypes.default.string,
176
187
  /**
177
188
  * Color palette used to colorize multiple series.
@@ -211,6 +222,15 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
211
222
  * If you don't provide this prop. It falls back to a randomly generated id.
212
223
  */
213
224
  id: _propTypes.default.string,
225
+ /**
226
+ * The list of zoom data related to each axis.
227
+ * Used to initialize the zoom in a specific configuration without controlling it.
228
+ */
229
+ initialZoom: _propTypes.default.arrayOf(_propTypes.default.shape({
230
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
231
+ end: _propTypes.default.number.isRequired,
232
+ start: _propTypes.default.number.isRequired
233
+ })),
214
234
  /**
215
235
  * If `true`, a loading overlay is displayed.
216
236
  * @default false
@@ -245,6 +265,12 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
245
265
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
246
266
  */
247
267
  onHighlightChange: _propTypes.default.func,
268
+ /**
269
+ * Callback fired when the zoom has changed.
270
+ *
271
+ * @param {ZoomData[]} zoomData Updated zoom data.
272
+ */
273
+ onZoomChange: _propTypes.default.func,
248
274
  /**
249
275
  * The series to display in the bar chart.
250
276
  * An array of [[HeatmapSeries]] objects.
@@ -346,7 +372,22 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
346
372
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
347
373
  tickSize: _propTypes.default.number,
348
374
  tickSpacing: _propTypes.default.number,
349
- valueFormatter: _propTypes.default.func
375
+ valueFormatter: _propTypes.default.func,
376
+ zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
377
+ filterMode: _propTypes.default.oneOf(['discard', 'keep']),
378
+ maxEnd: _propTypes.default.number,
379
+ maxSpan: _propTypes.default.number,
380
+ minSpan: _propTypes.default.number,
381
+ minStart: _propTypes.default.number,
382
+ panning: _propTypes.default.bool,
383
+ slider: _propTypes.default.shape({
384
+ enabled: _propTypes.default.bool,
385
+ preview: _propTypes.default.bool,
386
+ showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
387
+ size: _propTypes.default.number
388
+ }),
389
+ step: _propTypes.default.number
390
+ }), _propTypes.default.bool])
350
391
  })).isRequired,
351
392
  /**
352
393
  * The configuration of the y-axes.
@@ -411,7 +452,22 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
411
452
  tickSize: _propTypes.default.number,
412
453
  tickSpacing: _propTypes.default.number,
413
454
  valueFormatter: _propTypes.default.func,
414
- width: _propTypes.default.number
455
+ width: _propTypes.default.number,
456
+ zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
457
+ filterMode: _propTypes.default.oneOf(['discard', 'keep']),
458
+ maxEnd: _propTypes.default.number,
459
+ maxSpan: _propTypes.default.number,
460
+ minSpan: _propTypes.default.number,
461
+ minStart: _propTypes.default.number,
462
+ panning: _propTypes.default.bool,
463
+ slider: _propTypes.default.shape({
464
+ enabled: _propTypes.default.bool,
465
+ preview: _propTypes.default.bool,
466
+ showTooltip: _propTypes.default.oneOf(['always', 'hover', 'never']),
467
+ size: _propTypes.default.number
468
+ }),
469
+ step: _propTypes.default.number
470
+ }), _propTypes.default.bool])
415
471
  })).isRequired,
416
472
  /**
417
473
  * The configuration of the z-axes.
@@ -437,5 +493,53 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
437
493
  id: _propTypes.default.string,
438
494
  max: _propTypes.default.number,
439
495
  min: _propTypes.default.number
440
- }))
496
+ })),
497
+ /**
498
+ * The list of zoom data related to each axis.
499
+ */
500
+ zoomData: _propTypes.default.arrayOf(_propTypes.default.shape({
501
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
502
+ end: _propTypes.default.number.isRequired,
503
+ start: _propTypes.default.number.isRequired
504
+ })),
505
+ /**
506
+ * Configuration for zoom interactions.
507
+ */
508
+ zoomInteractionConfig: _propTypes.default.shape({
509
+ pan: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['drag', 'pressAndDrag', 'wheel']), _propTypes.default.shape({
510
+ pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
511
+ requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
512
+ type: _propTypes.default.oneOf(['drag']).isRequired
513
+ }), _propTypes.default.shape({
514
+ pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
515
+ requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
516
+ type: _propTypes.default.oneOf(['pressAndDrag']).isRequired
517
+ }), _propTypes.default.shape({
518
+ allowedDirection: _propTypes.default.oneOf(['x', 'xy', 'y']),
519
+ pointerMode: _propTypes.default.any,
520
+ requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
521
+ type: _propTypes.default.oneOf(['wheel']).isRequired
522
+ })]).isRequired),
523
+ zoom: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), _propTypes.default.shape({
524
+ pointerMode: _propTypes.default.any,
525
+ requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
526
+ type: _propTypes.default.oneOf(['wheel']).isRequired
527
+ }), _propTypes.default.shape({
528
+ pointerMode: _propTypes.default.any,
529
+ requiredKeys: _propTypes.default.array,
530
+ type: _propTypes.default.oneOf(['pinch']).isRequired
531
+ }), _propTypes.default.shape({
532
+ pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
533
+ requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
534
+ type: _propTypes.default.oneOf(['tapAndDrag']).isRequired
535
+ }), _propTypes.default.shape({
536
+ pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
537
+ requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
538
+ type: _propTypes.default.oneOf(['doubleTapReset']).isRequired
539
+ }), _propTypes.default.shape({
540
+ pointerMode: _propTypes.default.any,
541
+ requiredKeys: _propTypes.default.array,
542
+ type: _propTypes.default.oneOf(['brush']).isRequired
543
+ })]).isRequired)
544
+ })
441
545
  } : void 0;
@@ -1,4 +1,5 @@
1
- import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
1
+ import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type ConvertSignaturesIntoPlugins, type UseChartBrushSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
3
- export type HeatmapPluginSignatures = [UseChartZAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartHighlightSignature, UseChartProExportSignature];
3
+ import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
4
+ export type HeatmapPluginSignatures = [UseChartZAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartHighlightSignature, UseChartProExportSignature, UseChartBrushSignature, UseChartProZoomSignature];
4
5
  export declare const HEATMAP_PLUGINS: ConvertSignaturesIntoPlugins<HeatmapPluginSignatures>;
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.HEATMAP_PLUGINS = void 0;
7
7
  var _internals = require("@mui/x-charts/internals");
8
8
  var _useChartProExport = require("../internals/plugins/useChartProExport");
9
- const HEATMAP_PLUGINS = exports.HEATMAP_PLUGINS = [_internals.useChartZAxis, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _useChartProExport.useChartProExport];
9
+ var _useChartProZoom = require("../internals/plugins/useChartProZoom");
10
+ const HEATMAP_PLUGINS = exports.HEATMAP_PLUGINS = [_internals.useChartZAxis, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _useChartProExport.useChartProExport, _internals.useChartBrush, _useChartProZoom.useChartProZoom];
@@ -9,7 +9,7 @@ export interface HeatmapItemSlots {
9
9
  cell?: React.ElementType;
10
10
  }
11
11
  export interface HeatmapItemSlotProps {
12
- cell?: Partial<React.ComponentPropsWithRef<'rect'>>;
12
+ cell?: Partial<HeatmapCellProps>;
13
13
  }
14
14
  export interface HeatmapItemProps {
15
15
  dataIndex: number;
@@ -20,6 +20,8 @@ export interface HeatmapItemProps {
20
20
  x: number;
21
21
  y: number;
22
22
  color: string;
23
+ isHighlighted?: boolean;
24
+ isFaded?: boolean;
23
25
  /**
24
26
  * The props used for each component slot.
25
27
  * @default {}
@@ -39,6 +41,13 @@ export interface HeatmapItemOwnerState {
39
41
  isHighlighted: boolean;
40
42
  classes?: Partial<HeatmapClasses>;
41
43
  }
44
+ export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
45
+ x: number;
46
+ y: number;
47
+ width: number;
48
+ height: number;
49
+ ownerState: HeatmapItemOwnerState;
50
+ }
42
51
  /**
43
52
  * @ignore - internal component.
44
53
  */
@@ -13,11 +13,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _styles = require("@mui/material/styles");
14
14
  var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
15
15
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
16
- var _hooks = require("@mui/x-charts/hooks");
17
16
  var _internals = require("@mui/x-charts/internals");
18
17
  var _heatmapClasses = require("./heatmapClasses");
19
18
  var _jsxRuntime = require("react/jsx-runtime");
20
- const _excluded = ["seriesId", "dataIndex", "color", "value", "slotProps", "slots"];
19
+ const _excluded = ["seriesId", "dataIndex", "color", "value", "isHighlighted", "isFaded", "slotProps", "slots"];
21
20
  const HeatmapCell = (0, _styles.styled)('rect', {
22
21
  name: 'MuiHeatmap',
23
22
  slot: 'Cell',
@@ -51,6 +50,8 @@ function HeatmapItem(props) {
51
50
  dataIndex,
52
51
  color,
53
52
  value,
53
+ isHighlighted = false,
54
+ isFaded = false,
54
55
  slotProps = {},
55
56
  slots = {}
56
57
  } = props,
@@ -60,13 +61,6 @@ function HeatmapItem(props) {
60
61
  seriesId,
61
62
  dataIndex
62
63
  });
63
- const {
64
- isFaded,
65
- isHighlighted
66
- } = (0, _hooks.useItemHighlighted)({
67
- seriesId,
68
- dataIndex
69
- });
70
64
  const ownerState = {
71
65
  seriesId,
72
66
  dataIndex,
@@ -8,14 +8,18 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.HeatmapPlot = HeatmapPlot;
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _hooks = require("@mui/x-charts/hooks");
11
+ var _internals = require("@mui/x-charts/internals");
11
12
  var _useHeatmapSeries = require("../hooks/useHeatmapSeries");
12
13
  var _HeatmapItem = require("./HeatmapItem");
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  function HeatmapPlot(props) {
16
+ const store = (0, _internals.useStore)();
15
17
  const xScale = (0, _hooks.useXScale)();
16
18
  const yScale = (0, _hooks.useYScale)();
17
19
  const colorScale = (0, _hooks.useZColorScale)();
18
20
  const series = (0, _useHeatmapSeries.useHeatmapSeriesContext)();
21
+ const isHighlighted = store.use(_internals.selectorChartsIsHighlightedCallback);
22
+ const isFaded = store.use(_internals.selectorChartsIsFadedCallback);
19
23
  const xDomain = xScale.domain();
20
24
  const yDomain = yScale.domain();
21
25
  if (!series || series.seriesOrder.length === 0) {
@@ -30,6 +34,10 @@ function HeatmapPlot(props) {
30
34
  if (x === undefined || y === undefined || !color) {
31
35
  return null;
32
36
  }
37
+ const item = {
38
+ seriesId: seriesToDisplay.id,
39
+ dataIndex
40
+ };
33
41
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_HeatmapItem.HeatmapItem, {
34
42
  width: xScale.bandwidth(),
35
43
  height: yScale.bandwidth(),
@@ -40,7 +48,9 @@ function HeatmapPlot(props) {
40
48
  seriesId: series.seriesOrder[0],
41
49
  value: value,
42
50
  slots: props.slots,
43
- slotProps: props.slotProps
51
+ slotProps: props.slotProps,
52
+ isHighlighted: isHighlighted(item),
53
+ isFaded: isFaded(item)
44
54
  }, `${xIndex}_${yIndex}`);
45
55
  })
46
56
  });
@@ -1,6 +1,7 @@
1
1
  export { Heatmap } from "./Heatmap.js";
2
2
  export type { HeatmapSeries, HeatmapProps } from "./Heatmap.js";
3
3
  export { HeatmapPlot } from "./HeatmapPlot.js";
4
+ export type { HeatmapCellProps } from "./HeatmapItem.js";
4
5
  export * from "./HeatmapTooltip/index.js";
5
6
  export * from "./Heatmap.plugins.js";
6
7
  export * from "./heatmapClasses.js";
@@ -10,7 +10,7 @@ import { defaultSlotsMaterial } from "../internals/material/index.js";
10
10
  import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
11
11
  import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- const releaseInfo = "MTc2NjAxNjAwMDAwMA==";
13
+ const releaseInfo = "MTc2NjUzNDQwMDAwMA==";
14
14
  const packageIdentifier = 'x-charts-pro';
15
15
  /**
16
16
  * Orchestrates the data providers for the chart components and hooks.
@@ -1,10 +1,9 @@
1
1
  import { type AxisId } from '@mui/x-charts/internals';
2
- interface ChartAxisZoomSliderPreviewContentProps {
2
+ export interface ChartAxisZoomSliderPreviewContentProps {
3
3
  axisId: AxisId;
4
4
  x: number;
5
5
  y: number;
6
6
  height: number;
7
7
  width: number;
8
8
  }
9
- export declare function ChartAxisZoomSliderPreviewContent(props: ChartAxisZoomSliderPreviewContentProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
9
+ export declare function ChartAxisZoomSliderPreviewContent(props: ChartAxisZoomSliderPreviewContentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { selectorChartSeriesProcessed, useStore } from '@mui/x-charts/internals';
4
- import { LinePreviewPlot } from "./previews/LinePreviewPlot.js";
5
- import { AreaPreviewPlot } from "./previews/AreaPreviewPlot.js";
6
- import { BarPreviewPlot } from "./previews/BarPreviewPlot.js";
7
- import { ScatterPreviewPlot } from "./previews/ScatterPreviewPlot.js";
4
+ import { seriesPreviewPlotMap } from "./seriesPreviewPlotMap.js";
8
5
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
6
  export function ChartAxisZoomSliderPreviewContent(props) {
10
7
  const {
@@ -18,24 +15,11 @@ export function ChartAxisZoomSliderPreviewContent(props) {
18
15
  const processedSeries = store.use(selectorChartSeriesProcessed);
19
16
  const children = [];
20
17
  const clipId = `zoom-preview-mask-${axisId}`;
21
- const hasLineSeries = (processedSeries.line?.seriesOrder?.length ?? 0) > 0;
22
- const hasBarSeries = (processedSeries.bar?.seriesOrder?.length ?? 0) > 0;
23
- const hasScatterSeries = (processedSeries.scatter?.seriesOrder?.length ?? 0) > 0;
24
- if (hasLineSeries) {
25
- children.push(/*#__PURE__*/_jsx(AreaPreviewPlot, {
26
- axisId: axisId
27
- }, "area"));
28
- }
29
- if (hasBarSeries) {
30
- children.push(/*#__PURE__*/_jsx(BarPreviewPlot, _extends({}, props), "bar"));
31
- }
32
- if (hasLineSeries) {
33
- children.push(/*#__PURE__*/_jsx(LinePreviewPlot, {
34
- axisId: axisId
35
- }, "line"));
36
- }
37
- if (hasScatterSeries) {
38
- children.push(/*#__PURE__*/_jsx(ScatterPreviewPlot, _extends({}, props), "scatter"));
18
+ for (const [seriesType, Component] of seriesPreviewPlotMap) {
19
+ const hasSeries = (processedSeries[seriesType]?.seriesOrder?.length ?? 0) > 0;
20
+ if (hasSeries) {
21
+ children.push(/*#__PURE__*/_jsx(Component, _extends({}, props), seriesType));
22
+ }
39
23
  }
40
24
  return /*#__PURE__*/_jsxs(React.Fragment, {
41
25
  children: [/*#__PURE__*/_jsx("clipPath", {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { type SeriesId } from '@mui/x-charts/internals';
3
3
  import { type PreviewPlotProps } from "./PreviewPlot.types.js";
4
- interface AreaPreviewPlotProps extends PreviewPlotProps {}
4
+ interface AreaPreviewPlotProps extends Pick<PreviewPlotProps, 'axisId'> {}
5
5
  export declare function AreaPreviewPlot({
6
6
  axisId
7
7
  }: AreaPreviewPlotProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { type PreviewPlotProps } from "./PreviewPlot.types.js";
2
+ export declare function LineAreaPreviewPlot({
3
+ axisId
4
+ }: PreviewPlotProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { AreaPreviewPlot } from "./AreaPreviewPlot.js";
3
+ import { LinePreviewPlot } from "./LinePreviewPlot.js";
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ export function LineAreaPreviewPlot({
6
+ axisId
7
+ }) {
8
+ return /*#__PURE__*/_jsxs(React.Fragment, {
9
+ children: [/*#__PURE__*/_jsx(AreaPreviewPlot, {
10
+ axisId: axisId
11
+ }), /*#__PURE__*/_jsx(LinePreviewPlot, {
12
+ axisId: axisId
13
+ })]
14
+ });
15
+ }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { type SeriesId } from '@mui/x-charts/internals';
3
- import { type PreviewPlotProps } from "./PreviewPlot.types.js";
4
- interface LinePreviewPlotProps extends PreviewPlotProps {}
3
+ import type { PreviewPlotProps } from "./PreviewPlot.types.js";
4
+ interface LinePreviewPlotProps extends Pick<PreviewPlotProps, 'axisId'> {}
5
5
  export declare function LinePreviewPlot({
6
6
  axisId
7
7
  }: LinePreviewPlotProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,8 @@
1
1
  import { type AxisId } from '@mui/x-charts/internals';
2
2
  export interface PreviewPlotProps {
3
3
  axisId: AxisId;
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
4
8
  }
@@ -0,0 +1,3 @@
1
+ import type * as React from 'react';
2
+ import { type PreviewPlotProps } from "./previews/PreviewPlot.types.js";
3
+ export declare const seriesPreviewPlotMap: Map<keyof import("@mui/x-charts/internals").ChartsSeriesConfig, React.ComponentType<PreviewPlotProps>>;
@@ -0,0 +1,4 @@
1
+ import { BarPreviewPlot } from "./previews/BarPreviewPlot.js";
2
+ import { ScatterPreviewPlot } from "./previews/ScatterPreviewPlot.js";
3
+ import { LineAreaPreviewPlot } from "./previews/LineAreaPreviewPlot.js";
4
+ export const seriesPreviewPlotMap = new Map([['bar', BarPreviewPlot], ['line', LineAreaPreviewPlot], ['scatter', ScatterPreviewPlot]]);
@@ -34,13 +34,13 @@ export interface HeatmapProps extends Omit<ChartContainerProProps<'heatmap', Hea
34
34
  * If not provided, a default axis config is used.
35
35
  * An array of [[AxisConfig]] objects.
36
36
  */
37
- xAxis: Readonly<Omit<MakeOptional<XAxis<'band'>, 'scaleType'>, 'zoom'>[]>;
37
+ xAxis: Readonly<MakeOptional<XAxis<'band'>, 'scaleType'>[]>;
38
38
  /**
39
39
  * The configuration of the y-axes.
40
40
  * If not provided, a default axis config is used.
41
41
  * An array of [[AxisConfig]] objects.
42
42
  */
43
- yAxis: Readonly<Omit<MakeOptional<YAxis<'band'>, 'scaleType'>, 'zoom'>[]>;
43
+ yAxis: Readonly<MakeOptional<YAxis<'band'>, 'scaleType'>[]>;
44
44
  /**
45
45
  * The series to display in the bar chart.
46
46
  * An array of [[HeatmapSeries]] objects.
@@ -13,6 +13,7 @@ import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
13
13
  import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
14
14
  import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '@mui/x-charts/constants';
15
15
  import { ChartsLegend, ContinuousColorLegend } from '@mui/x-charts/ChartsLegend';
16
+ import { ChartsBrushOverlay } from '@mui/x-charts/ChartsBrushOverlay';
16
17
  import { HeatmapPlot } from "./HeatmapPlot.js";
17
18
  import { heatmapSeriesConfig } from "./seriesConfig/index.js";
18
19
  import { HeatmapTooltip } from "./HeatmapTooltip/index.js";
@@ -148,7 +149,7 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
148
149
  slotProps: slotProps
149
150
  }), /*#__PURE__*/_jsx(ChartsClipPath, {
150
151
  id: clipPathId
151
- }), children]
152
+ }), /*#__PURE__*/_jsx(ChartsBrushOverlay, {}), children]
152
153
  }), !loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, slotProps?.tooltip))]
153
154
  }))
154
155
  });
@@ -162,9 +163,19 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
162
163
  apiRef: PropTypes.shape({
163
164
  current: PropTypes.shape({
164
165
  exportAsImage: PropTypes.func.isRequired,
165
- exportAsPrint: PropTypes.func.isRequired
166
+ exportAsPrint: PropTypes.func.isRequired,
167
+ setAxisZoomData: PropTypes.func.isRequired,
168
+ setZoomData: PropTypes.func.isRequired
166
169
  })
167
170
  }),
171
+ /**
172
+ * Configuration for the brush interaction.
173
+ */
174
+ brushConfig: PropTypes.shape({
175
+ enabled: PropTypes.bool,
176
+ preventHighlight: PropTypes.bool,
177
+ preventTooltip: PropTypes.bool
178
+ }),
168
179
  className: PropTypes.string,
169
180
  /**
170
181
  * Color palette used to colorize multiple series.
@@ -204,6 +215,15 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
204
215
  * If you don't provide this prop. It falls back to a randomly generated id.
205
216
  */
206
217
  id: PropTypes.string,
218
+ /**
219
+ * The list of zoom data related to each axis.
220
+ * Used to initialize the zoom in a specific configuration without controlling it.
221
+ */
222
+ initialZoom: PropTypes.arrayOf(PropTypes.shape({
223
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
224
+ end: PropTypes.number.isRequired,
225
+ start: PropTypes.number.isRequired
226
+ })),
207
227
  /**
208
228
  * If `true`, a loading overlay is displayed.
209
229
  * @default false
@@ -238,6 +258,12 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
238
258
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
239
259
  */
240
260
  onHighlightChange: PropTypes.func,
261
+ /**
262
+ * Callback fired when the zoom has changed.
263
+ *
264
+ * @param {ZoomData[]} zoomData Updated zoom data.
265
+ */
266
+ onZoomChange: PropTypes.func,
241
267
  /**
242
268
  * The series to display in the bar chart.
243
269
  * An array of [[HeatmapSeries]] objects.
@@ -339,7 +365,22 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
339
365
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
340
366
  tickSize: PropTypes.number,
341
367
  tickSpacing: PropTypes.number,
342
- valueFormatter: PropTypes.func
368
+ valueFormatter: PropTypes.func,
369
+ zoom: PropTypes.oneOfType([PropTypes.shape({
370
+ filterMode: PropTypes.oneOf(['discard', 'keep']),
371
+ maxEnd: PropTypes.number,
372
+ maxSpan: PropTypes.number,
373
+ minSpan: PropTypes.number,
374
+ minStart: PropTypes.number,
375
+ panning: PropTypes.bool,
376
+ slider: PropTypes.shape({
377
+ enabled: PropTypes.bool,
378
+ preview: PropTypes.bool,
379
+ showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
380
+ size: PropTypes.number
381
+ }),
382
+ step: PropTypes.number
383
+ }), PropTypes.bool])
343
384
  })).isRequired,
344
385
  /**
345
386
  * The configuration of the y-axes.
@@ -404,7 +445,22 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
404
445
  tickSize: PropTypes.number,
405
446
  tickSpacing: PropTypes.number,
406
447
  valueFormatter: PropTypes.func,
407
- width: PropTypes.number
448
+ width: PropTypes.number,
449
+ zoom: PropTypes.oneOfType([PropTypes.shape({
450
+ filterMode: PropTypes.oneOf(['discard', 'keep']),
451
+ maxEnd: PropTypes.number,
452
+ maxSpan: PropTypes.number,
453
+ minSpan: PropTypes.number,
454
+ minStart: PropTypes.number,
455
+ panning: PropTypes.bool,
456
+ slider: PropTypes.shape({
457
+ enabled: PropTypes.bool,
458
+ preview: PropTypes.bool,
459
+ showTooltip: PropTypes.oneOf(['always', 'hover', 'never']),
460
+ size: PropTypes.number
461
+ }),
462
+ step: PropTypes.number
463
+ }), PropTypes.bool])
408
464
  })).isRequired,
409
465
  /**
410
466
  * The configuration of the z-axes.
@@ -430,6 +486,54 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
430
486
  id: PropTypes.string,
431
487
  max: PropTypes.number,
432
488
  min: PropTypes.number
433
- }))
489
+ })),
490
+ /**
491
+ * The list of zoom data related to each axis.
492
+ */
493
+ zoomData: PropTypes.arrayOf(PropTypes.shape({
494
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
495
+ end: PropTypes.number.isRequired,
496
+ start: PropTypes.number.isRequired
497
+ })),
498
+ /**
499
+ * Configuration for zoom interactions.
500
+ */
501
+ zoomInteractionConfig: PropTypes.shape({
502
+ pan: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['drag', 'pressAndDrag', 'wheel']), PropTypes.shape({
503
+ pointerMode: PropTypes.oneOf(['mouse', 'touch']),
504
+ requiredKeys: PropTypes.arrayOf(PropTypes.string),
505
+ type: PropTypes.oneOf(['drag']).isRequired
506
+ }), PropTypes.shape({
507
+ pointerMode: PropTypes.oneOf(['mouse', 'touch']),
508
+ requiredKeys: PropTypes.arrayOf(PropTypes.string),
509
+ type: PropTypes.oneOf(['pressAndDrag']).isRequired
510
+ }), PropTypes.shape({
511
+ allowedDirection: PropTypes.oneOf(['x', 'xy', 'y']),
512
+ pointerMode: PropTypes.any,
513
+ requiredKeys: PropTypes.arrayOf(PropTypes.string),
514
+ type: PropTypes.oneOf(['wheel']).isRequired
515
+ })]).isRequired),
516
+ zoom: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), PropTypes.shape({
517
+ pointerMode: PropTypes.any,
518
+ requiredKeys: PropTypes.arrayOf(PropTypes.string),
519
+ type: PropTypes.oneOf(['wheel']).isRequired
520
+ }), PropTypes.shape({
521
+ pointerMode: PropTypes.any,
522
+ requiredKeys: PropTypes.array,
523
+ type: PropTypes.oneOf(['pinch']).isRequired
524
+ }), PropTypes.shape({
525
+ pointerMode: PropTypes.oneOf(['mouse', 'touch']),
526
+ requiredKeys: PropTypes.arrayOf(PropTypes.string),
527
+ type: PropTypes.oneOf(['tapAndDrag']).isRequired
528
+ }), PropTypes.shape({
529
+ pointerMode: PropTypes.oneOf(['mouse', 'touch']),
530
+ requiredKeys: PropTypes.arrayOf(PropTypes.string),
531
+ type: PropTypes.oneOf(['doubleTapReset']).isRequired
532
+ }), PropTypes.shape({
533
+ pointerMode: PropTypes.any,
534
+ requiredKeys: PropTypes.array,
535
+ type: PropTypes.oneOf(['brush']).isRequired
536
+ })]).isRequired)
537
+ })
434
538
  } : void 0;
435
539
  export { Heatmap };
@@ -1,4 +1,5 @@
1
- import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
1
+ import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type ConvertSignaturesIntoPlugins, type UseChartBrushSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
3
- export type HeatmapPluginSignatures = [UseChartZAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartHighlightSignature, UseChartProExportSignature];
3
+ import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
4
+ export type HeatmapPluginSignatures = [UseChartZAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartHighlightSignature, UseChartProExportSignature, UseChartBrushSignature, UseChartProZoomSignature];
4
5
  export declare const HEATMAP_PLUGINS: ConvertSignaturesIntoPlugins<HeatmapPluginSignatures>;
@@ -1,3 +1,4 @@
1
- import { useChartZAxis, useChartCartesianAxis, useChartTooltip, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
1
+ import { useChartZAxis, useChartCartesianAxis, useChartTooltip, useChartInteraction, useChartHighlight, useChartBrush } from '@mui/x-charts/internals';
2
2
  import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
3
- export const HEATMAP_PLUGINS = [useChartZAxis, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartProExport];
3
+ import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
4
+ export const HEATMAP_PLUGINS = [useChartZAxis, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartProExport, useChartBrush, useChartProZoom];
@@ -9,7 +9,7 @@ export interface HeatmapItemSlots {
9
9
  cell?: React.ElementType;
10
10
  }
11
11
  export interface HeatmapItemSlotProps {
12
- cell?: Partial<React.ComponentPropsWithRef<'rect'>>;
12
+ cell?: Partial<HeatmapCellProps>;
13
13
  }
14
14
  export interface HeatmapItemProps {
15
15
  dataIndex: number;
@@ -20,6 +20,8 @@ export interface HeatmapItemProps {
20
20
  x: number;
21
21
  y: number;
22
22
  color: string;
23
+ isHighlighted?: boolean;
24
+ isFaded?: boolean;
23
25
  /**
24
26
  * The props used for each component slot.
25
27
  * @default {}
@@ -39,6 +41,13 @@ export interface HeatmapItemOwnerState {
39
41
  isHighlighted: boolean;
40
42
  classes?: Partial<HeatmapClasses>;
41
43
  }
44
+ export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
45
+ x: number;
46
+ y: number;
47
+ width: number;
48
+ height: number;
49
+ ownerState: HeatmapItemOwnerState;
50
+ }
42
51
  /**
43
52
  * @ignore - internal component.
44
53
  */
@@ -1,12 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["seriesId", "dataIndex", "color", "value", "slotProps", "slots"];
3
+ const _excluded = ["seriesId", "dataIndex", "color", "value", "isHighlighted", "isFaded", "slotProps", "slots"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { styled } from '@mui/material/styles';
7
7
  import useSlotProps from '@mui/utils/useSlotProps';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
- import { useItemHighlighted } from '@mui/x-charts/hooks';
10
9
  import { useInteractionItemProps } from '@mui/x-charts/internals';
11
10
  import { getHeatmapUtilityClass } from "./heatmapClasses.js";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -43,6 +42,8 @@ function HeatmapItem(props) {
43
42
  dataIndex,
44
43
  color,
45
44
  value,
45
+ isHighlighted = false,
46
+ isFaded = false,
46
47
  slotProps = {},
47
48
  slots = {}
48
49
  } = props,
@@ -52,13 +53,6 @@ function HeatmapItem(props) {
52
53
  seriesId,
53
54
  dataIndex
54
55
  });
55
- const {
56
- isFaded,
57
- isHighlighted
58
- } = useItemHighlighted({
59
- seriesId,
60
- dataIndex
61
- });
62
56
  const ownerState = {
63
57
  seriesId,
64
58
  dataIndex,
@@ -2,14 +2,18 @@
2
2
 
3
3
  import PropTypes from 'prop-types';
4
4
  import { useXScale, useYScale, useZColorScale } from '@mui/x-charts/hooks';
5
+ import { selectorChartsIsFadedCallback, selectorChartsIsHighlightedCallback, useStore } from '@mui/x-charts/internals';
5
6
  import { useHeatmapSeriesContext } from "../hooks/useHeatmapSeries.js";
6
7
  import { HeatmapItem } from "./HeatmapItem.js";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  function HeatmapPlot(props) {
10
+ const store = useStore();
9
11
  const xScale = useXScale();
10
12
  const yScale = useYScale();
11
13
  const colorScale = useZColorScale();
12
14
  const series = useHeatmapSeriesContext();
15
+ const isHighlighted = store.use(selectorChartsIsHighlightedCallback);
16
+ const isFaded = store.use(selectorChartsIsFadedCallback);
13
17
  const xDomain = xScale.domain();
14
18
  const yDomain = yScale.domain();
15
19
  if (!series || series.seriesOrder.length === 0) {
@@ -24,6 +28,10 @@ function HeatmapPlot(props) {
24
28
  if (x === undefined || y === undefined || !color) {
25
29
  return null;
26
30
  }
31
+ const item = {
32
+ seriesId: seriesToDisplay.id,
33
+ dataIndex
34
+ };
27
35
  return /*#__PURE__*/_jsx(HeatmapItem, {
28
36
  width: xScale.bandwidth(),
29
37
  height: yScale.bandwidth(),
@@ -34,7 +42,9 @@ function HeatmapPlot(props) {
34
42
  seriesId: series.seriesOrder[0],
35
43
  value: value,
36
44
  slots: props.slots,
37
- slotProps: props.slotProps
45
+ slotProps: props.slotProps,
46
+ isHighlighted: isHighlighted(item),
47
+ isFaded: isFaded(item)
38
48
  }, `${xIndex}_${yIndex}`);
39
49
  })
40
50
  });
@@ -1,6 +1,7 @@
1
1
  export { Heatmap } from "./Heatmap.js";
2
2
  export type { HeatmapSeries, HeatmapProps } from "./Heatmap.js";
3
3
  export { HeatmapPlot } from "./HeatmapPlot.js";
4
+ export type { HeatmapCellProps } from "./HeatmapItem.js";
4
5
  export * from "./HeatmapTooltip/index.js";
5
6
  export * from "./Heatmap.plugins.js";
6
7
  export * from "./heatmapClasses.js";
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.22.1
2
+ * @mui/x-charts-pro v8.23.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -1,2 +1,4 @@
1
1
  export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
2
- export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
2
+ export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
3
+ export { seriesPreviewPlotMap } from "../ChartZoomSlider/internals/seriesPreviewPlotMap.js";
4
+ export type { PreviewPlotProps } from "../ChartZoomSlider/internals/previews/PreviewPlot.types.js";
@@ -1 +1,2 @@
1
- export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
1
+ export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
2
+ export { seriesPreviewPlotMap } from "../ChartZoomSlider/internals/seriesPreviewPlotMap.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.22.1
2
+ * @mui/x-charts-pro v8.23.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -1,2 +1,4 @@
1
1
  export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
2
- export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
2
+ export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
3
+ export { seriesPreviewPlotMap } from "../ChartZoomSlider/internals/seriesPreviewPlotMap.js";
4
+ export type { PreviewPlotProps } from "../ChartZoomSlider/internals/previews/PreviewPlot.types.js";
@@ -3,10 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "seriesPreviewPlotMap", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _seriesPreviewPlotMap.seriesPreviewPlotMap;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "useChartContainerProProps", {
7
13
  enumerable: true,
8
14
  get: function () {
9
15
  return _useChartContainerProProps.useChartContainerProProps;
10
16
  }
11
17
  });
12
- var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
18
+ var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
19
+ var _seriesPreviewPlotMap = require("../ChartZoomSlider/internals/seriesPreviewPlotMap");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-pro",
3
- "version": "8.22.1",
3
+ "version": "8.23.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Pro plan edition of the MUI X Charts components.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -31,11 +31,11 @@
31
31
  "@mui/utils": "^7.3.5",
32
32
  "clsx": "^2.1.1",
33
33
  "prop-types": "^15.8.1",
34
- "@mui/x-charts": "8.22.1",
35
- "@mui/x-internal-gestures": "0.3.6",
36
- "@mui/x-internals": "8.22.0",
37
- "@mui/x-charts-vendor": "8.22.0",
38
- "@mui/x-license": "8.22.0"
34
+ "@mui/x-charts-vendor": "8.23.0",
35
+ "@mui/x-charts": "8.23.0",
36
+ "@mui/x-internal-gestures": "0.4.0",
37
+ "@mui/x-internals": "8.23.0",
38
+ "@mui/x-license": "8.23.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@emotion/react": "^11.9.0",