@mui/x-charts-pro 8.0.0-alpha.12 → 8.0.0-alpha.13

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 (51) hide show
  1. package/BarChartPro/BarChartPro.js +25 -30
  2. package/CHANGELOG.md +299 -0
  3. package/ChartContainerPro/ChartContainerPro.d.ts +1 -1
  4. package/ChartContainerPro/ChartContainerPro.js +1 -1
  5. package/ChartContainerPro/useChartContainerProProps.js +3 -1
  6. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  7. package/ChartDataProviderPro/ChartDataProviderPro.js +3 -2
  8. package/Heatmap/Heatmap.d.ts +5 -4
  9. package/Heatmap/Heatmap.js +37 -52
  10. package/LineChartPro/LineChartPro.js +25 -30
  11. package/ScatterChartPro/ScatterChartPro.js +25 -30
  12. package/esm/BarChartPro/BarChartPro.js +25 -30
  13. package/esm/ChartContainerPro/ChartContainerPro.d.ts +1 -1
  14. package/esm/ChartContainerPro/ChartContainerPro.js +1 -1
  15. package/esm/ChartContainerPro/useChartContainerProProps.js +3 -1
  16. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  17. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +3 -2
  18. package/esm/Heatmap/Heatmap.d.ts +5 -4
  19. package/esm/Heatmap/Heatmap.js +37 -52
  20. package/esm/LineChartPro/LineChartPro.js +25 -30
  21. package/esm/ScatterChartPro/ScatterChartPro.js +25 -30
  22. package/esm/index.js +1 -1
  23. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +63 -12
  24. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +26 -24
  25. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +12 -3
  26. package/esm/internals/utils/releaseInfo.js +1 -1
  27. package/esm/models/seriesType/heatmap.d.ts +2 -2
  28. package/index.js +1 -1
  29. package/internals/plugins/useChartProZoom/useChartProZoom.js +63 -12
  30. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +26 -24
  31. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +12 -3
  32. package/internals/utils/releaseInfo.js +1 -1
  33. package/models/seriesType/heatmap.d.ts +2 -2
  34. package/modern/BarChartPro/BarChartPro.js +25 -30
  35. package/modern/ChartContainerPro/ChartContainerPro.d.ts +1 -1
  36. package/modern/ChartContainerPro/ChartContainerPro.js +1 -1
  37. package/modern/ChartContainerPro/useChartContainerProProps.js +3 -1
  38. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  39. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +3 -2
  40. package/modern/Heatmap/Heatmap.d.ts +5 -4
  41. package/modern/Heatmap/Heatmap.js +37 -52
  42. package/modern/LineChartPro/LineChartPro.js +25 -30
  43. package/modern/ScatterChartPro/ScatterChartPro.js +25 -30
  44. package/modern/index.js +1 -1
  45. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +63 -12
  46. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +26 -24
  47. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +12 -3
  48. package/modern/internals/utils/releaseInfo.js +1 -1
  49. package/modern/models/seriesType/heatmap.d.ts +2 -2
  50. package/package.json +5 -5
  51. package/tsconfig.build.tsbuildinfo +1 -1
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", {
9
9
  exports.useChartProZoom = void 0;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
+ var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
12
13
  var _internals = require("@mui/x-charts/internals");
13
14
  var _useChartProZoom = require("./useChartProZoom.utils");
14
15
  // It is helpful to avoid the need to provide the possibly auto-generated id for each axis.
@@ -29,15 +30,46 @@ const useChartProZoom = ({
29
30
  svgRef,
30
31
  params
31
32
  }) => {
33
+ const {
34
+ zoomData: paramsZoomData,
35
+ onZoomChange
36
+ } = params;
32
37
  const drawingArea = (0, _internals.useSelector)(store, _internals.selectorChartDrawingArea);
33
38
  const optionsLookup = (0, _internals.useSelector)(store, _internals.selectorChartZoomOptionsLookup);
34
39
  const isZoomEnabled = Object.keys(optionsLookup).length > 0;
35
40
 
36
- // Add events
37
- const panningEventCacheRef = React.useRef([]);
38
- const zoomEventCacheRef = React.useRef([]);
39
- const eventPrevDiff = React.useRef(0);
40
- const interactionTimeoutRef = React.useRef(undefined);
41
+ // Manage controlled state
42
+
43
+ (0, _useEnhancedEffect.default)(() => {
44
+ if (paramsZoomData === undefined) {
45
+ return undefined;
46
+ }
47
+ store.update(prevState => {
48
+ if (process.env.NODE_ENV !== 'production' && !prevState.zoom.isControlled) {
49
+ console.error([`MUI X: A chart component is changing the \`zoomData\` from uncontrolled to controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', 'Decide between using a controlled or uncontrolled for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
50
+ }
51
+ return (0, _extends2.default)({}, prevState, {
52
+ zoom: (0, _extends2.default)({}, prevState.zoom, {
53
+ isInteracting: true,
54
+ zoomData: paramsZoomData
55
+ })
56
+ });
57
+ });
58
+ const timeout = setTimeout(() => {
59
+ store.update(prevState => {
60
+ return (0, _extends2.default)({}, prevState, {
61
+ zoom: (0, _extends2.default)({}, prevState.zoom, {
62
+ isInteracting: false
63
+ })
64
+ });
65
+ });
66
+ }, 166);
67
+ return () => {
68
+ clearTimeout(timeout);
69
+ };
70
+ }, [store, paramsZoomData]);
71
+
72
+ // Add instance methods
41
73
  const setIsInteracting = React.useCallback(isInteracting => {
42
74
  store.update(prev => (0, _extends2.default)({}, prev, {
43
75
  zoom: (0, _extends2.default)({}, prev.zoom, {
@@ -47,15 +79,24 @@ const useChartProZoom = ({
47
79
  }, [store]);
48
80
  const setZoomDataCallback = React.useCallback(zoomData => {
49
81
  store.update(prevState => {
50
- const newZoomData = typeof zoomData === 'function' ? zoomData(prevState.zoom.zoomData) : zoomData;
51
- params.onZoomChange?.(newZoomData);
82
+ const newZoomData = typeof zoomData === 'function' ? zoomData([...prevState.zoom.zoomData]) : zoomData;
83
+ onZoomChange?.(newZoomData);
84
+ if (prevState.zoom.isControlled) {
85
+ return prevState;
86
+ }
52
87
  return (0, _extends2.default)({}, prevState, {
53
88
  zoom: (0, _extends2.default)({}, prevState.zoom, {
54
89
  zoomData: newZoomData
55
90
  })
56
91
  });
57
92
  });
58
- }, [params, store]);
93
+ }, [onZoomChange, store]);
94
+
95
+ // Add events
96
+ const panningEventCacheRef = React.useRef([]);
97
+ const zoomEventCacheRef = React.useRef([]);
98
+ const eventPrevDiff = React.useRef(0);
99
+ const interactionTimeoutRef = React.useRef(undefined);
59
100
 
60
101
  // Add event for chart panning
61
102
  const isPanEnabled = React.useMemo(() => Object.values(optionsLookup).some(v => v.panning) || false, [optionsLookup]);
@@ -288,7 +329,8 @@ const useChartProZoom = ({
288
329
  exports.useChartProZoom = useChartProZoom;
289
330
  useChartProZoom.params = {
290
331
  initialZoom: true,
291
- onZoomChange: true
332
+ onZoomChange: true,
333
+ zoomData: true
292
334
  };
293
335
  useChartProZoom.getDefaultizedParams = ({
294
336
  params
@@ -296,11 +338,20 @@ useChartProZoom.getDefaultizedParams = ({
296
338
  return (0, _extends2.default)({}, params);
297
339
  };
298
340
  useChartProZoom.getInitialState = params => {
299
- const optionsLookup = (0, _extends2.default)({}, (0, _internals.createZoomLookup)('x')(params.defaultizedXAxis), (0, _internals.createZoomLookup)('y')(params.defaultizedYAxis));
341
+ const {
342
+ initialZoom,
343
+ zoomData,
344
+ defaultizedXAxis,
345
+ defaultizedYAxis
346
+ } = params;
347
+ const optionsLookup = (0, _extends2.default)({}, (0, _internals.createZoomLookup)('x')(defaultizedXAxis), (0, _internals.createZoomLookup)('y')(defaultizedYAxis));
300
348
  return {
301
349
  zoom: {
302
- zoomData: params.initialZoom === undefined ? initializeZoomData(optionsLookup) : params.initialZoom,
303
- isInteracting: false
350
+ zoomData:
351
+ // eslint-disable-next-line no-nested-ternary
352
+ zoomData !== undefined ? zoomData : initialZoom !== undefined ? initialZoom : initializeZoomData(optionsLookup),
353
+ isInteracting: false,
354
+ isControlled: zoomData !== undefined
304
355
  }
305
356
  };
306
357
  };
@@ -10,11 +10,13 @@ export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-cha
10
10
  } & {
11
11
  resultFunc: (resultFuncArgs_0: {
12
12
  isInteracting: boolean;
13
- zoomData: import("@mui/x-charts/internals").ZoomData[];
13
+ zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
14
+ isControlled: boolean;
14
15
  }) => boolean;
15
16
  memoizedResultFunc: ((resultFuncArgs_0: {
16
17
  isInteracting: boolean;
17
- zoomData: import("@mui/x-charts/internals").ZoomData[];
18
+ zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
19
+ isControlled: boolean;
18
20
  }) => boolean) & {
19
21
  clearCache: () => void;
20
22
  resultsCount: () => number;
@@ -30,7 +32,7 @@ export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-cha
30
32
  argsMemoize: typeof import("reselect").weakMapMemoize;
31
33
  memoize: typeof import("reselect").weakMapMemoize;
32
34
  };
33
- export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
35
+ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
34
36
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
35
37
  }) => boolean) & {
36
38
  clearCache: () => void;
@@ -50,7 +52,7 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
50
52
  resetResultsCount: () => void;
51
53
  };
52
54
  lastResult: () => boolean;
53
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
55
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
54
56
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
55
57
  }) => {
56
58
  [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
@@ -76,23 +78,23 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
76
78
  [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
77
79
  [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
78
80
  };
79
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
81
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
80
82
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
81
83
  }) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
82
84
  clearCache: () => void;
83
85
  resultsCount: () => number;
84
86
  resetResultsCount: () => void;
85
87
  } & {
86
- resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[]) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
87
- memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[]) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
88
+ resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
89
+ memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
88
90
  clearCache: () => void;
89
91
  resultsCount: () => number;
90
92
  resetResultsCount: () => void;
91
93
  };
92
94
  lastResult: () => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
93
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
95
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
94
96
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
95
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[]) & {
97
+ }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) & {
96
98
  clearCache: () => void;
97
99
  resultsCount: () => number;
98
100
  resetResultsCount: () => void;
@@ -100,20 +102,20 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
100
102
  resultFunc: (resultFuncArgs_0: {
101
103
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
102
104
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
103
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[];
105
+ } | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined;
104
106
  memoizedResultFunc: ((resultFuncArgs_0: {
105
107
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
106
108
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
107
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[]) & {
109
+ } | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) & {
108
110
  clearCache: () => void;
109
111
  resultsCount: () => number;
110
112
  resetResultsCount: () => void;
111
113
  };
112
- lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[];
113
- dependencies: [(state: import("@mui/x-charts/internals").ChartState<[import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
114
+ lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined;
115
+ dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
114
116
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
115
117
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
116
- }];
118
+ } | undefined];
117
119
  recomputations: () => number;
118
120
  resetRecomputations: () => void;
119
121
  dependencyRecomputations: () => number;
@@ -129,23 +131,23 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
129
131
  } & {
130
132
  memoize: typeof import("reselect").weakMapMemoize;
131
133
  argsMemoize: typeof import("reselect").weakMapMemoize;
132
- }, ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
134
+ }, ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
133
135
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
134
136
  }) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
135
137
  clearCache: () => void;
136
138
  resultsCount: () => number;
137
139
  resetResultsCount: () => void;
138
140
  } & {
139
- resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[]) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
140
- memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[]) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
141
+ resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
142
+ memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
141
143
  clearCache: () => void;
142
144
  resultsCount: () => number;
143
145
  resetResultsCount: () => void;
144
146
  };
145
147
  lastResult: () => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
146
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
148
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
147
149
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
148
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[]) & {
150
+ }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) & {
149
151
  clearCache: () => void;
150
152
  resultsCount: () => number;
151
153
  resetResultsCount: () => void;
@@ -153,20 +155,20 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
153
155
  resultFunc: (resultFuncArgs_0: {
154
156
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
155
157
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
156
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[];
158
+ } | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined;
157
159
  memoizedResultFunc: ((resultFuncArgs_0: {
158
160
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
159
161
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
160
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[]) & {
162
+ } | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) & {
161
163
  clearCache: () => void;
162
164
  resultsCount: () => number;
163
165
  resetResultsCount: () => void;
164
166
  };
165
- lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[];
166
- dependencies: [(state: import("@mui/x-charts/internals").ChartState<[import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
167
+ lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined;
168
+ dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
167
169
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
168
170
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
169
- }];
171
+ } | undefined];
170
172
  recomputations: () => number;
171
173
  resetRecomputations: () => void;
172
174
  dependencyRecomputations: () => number;
@@ -2,14 +2,19 @@ import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSig
2
2
  export interface UseChartProZoomParameters {
3
3
  /**
4
4
  * The list of zoom data related to each axis.
5
+ * Used to initialize the zoom in a specific configuration without controlling it.
5
6
  */
6
- initialZoom?: ZoomData[];
7
+ initialZoom?: readonly ZoomData[];
7
8
  /**
8
9
  * Callback fired when the zoom has changed.
9
10
  *
10
11
  * @param {ZoomData[]} zoomData Updated zoom data.
11
12
  */
12
- onZoomChange?: (zoomData: ZoomData[] | ((zoomData: ZoomData[]) => ZoomData[])) => void;
13
+ onZoomChange?: (zoomData: ZoomData[]) => void;
14
+ /**
15
+ * The list of zoom data related to each axis.
16
+ */
17
+ zoomData?: readonly ZoomData[];
13
18
  }
14
19
  export type UseChartProZoomDefaultizedParameters = UseChartProZoomParameters & UseChartCartesianAxisDefaultizedParameters;
15
20
  export interface UseChartProZoomState {
@@ -22,7 +27,11 @@ export interface UseChartProZoomState {
22
27
  /**
23
28
  * Mapping of axis id to the zoom data.
24
29
  */
25
- zoomData: ZoomData[];
30
+ zoomData: readonly ZoomData[];
31
+ /**
32
+ * Internal information to know if the user control the state or not.
33
+ */
34
+ isControlled: boolean;
26
35
  };
27
36
  }
28
37
  export interface UseChartProZoomPublicApi {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getReleaseInfo = void 0;
8
8
  var _ponyfillGlobal = _interopRequireDefault(require("@mui/utils/ponyfillGlobal"));
9
9
  const getReleaseInfo = () => {
10
- const releaseInfo = "MTczOTc0NjgwMDAwMA==";
10
+ const releaseInfo = "MTc0MDY5NzIwMDAwMA==";
11
11
  if (process.env.NODE_ENV !== 'production') {
12
12
  // A simple hack to set the value in the test environment (has no build step).
13
13
  // eslint-disable-next-line no-useless-concat
@@ -1,12 +1,12 @@
1
1
  import { DefaultizedProps } from '@mui/x-internals/types';
2
2
  import { CommonDefaultizedProps, CommonSeriesType, CartesianSeriesType } from '@mui/x-charts/internals';
3
- export type HeatmapValueType = [number, number, number];
3
+ export type HeatmapValueType = readonly [number, number, number];
4
4
  export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType>, 'color'>, CartesianSeriesType {
5
5
  type: 'heatmap';
6
6
  /**
7
7
  * Data associated to each bar.
8
8
  */
9
- data?: HeatmapValueType[];
9
+ data?: readonly HeatmapValueType[];
10
10
  /**
11
11
  * The key used to retrieve data from the dataset.
12
12
  */
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["initialZoom", "onZoomChange", "apiRef"];
5
+ const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { useThemeProps } from '@mui/material/styles';
@@ -84,6 +84,7 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
84
84
  });
85
85
  const {
86
86
  initialZoom,
87
+ zoomData,
87
88
  onZoomChange,
88
89
  apiRef
89
90
  } = props,
@@ -106,6 +107,7 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
106
107
  chartsSurfaceProps
107
108
  } = useChartContainerProProps(_extends({}, chartContainerProps, {
108
109
  initialZoom,
110
+ zoomData,
109
111
  onZoomChange,
110
112
  apiRef,
111
113
  plugins: BAR_CHART_PRO_PLUGINS
@@ -153,12 +155,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
153
155
  * Defines the border radius of the bar element.
154
156
  */
155
157
  borderRadius: PropTypes.number,
156
- /**
157
- * Indicate which axis to display the bottom of the charts.
158
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
159
- * @default xAxisIds[0] The id of the first provided axis
160
- */
161
- bottomAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
162
158
  children: PropTypes.node,
163
159
  className: PropTypes.string,
164
160
  /**
@@ -207,6 +203,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
207
203
  id: PropTypes.string,
208
204
  /**
209
205
  * The list of zoom data related to each axis.
206
+ * Used to initialize the zoom in a specific configuration without controlling it.
210
207
  */
211
208
  initialZoom: PropTypes.arrayOf(PropTypes.shape({
212
209
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
@@ -218,12 +215,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
218
215
  * @default 'vertical'
219
216
  */
220
217
  layout: PropTypes.oneOf(['horizontal', 'vertical']),
221
- /**
222
- * Indicate which axis to display the left of the charts.
223
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
224
- * @default yAxisIds[0] The id of the first provided axis
225
- */
226
- leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
227
218
  /**
228
219
  * If `true`, a loading overlay is displayed.
229
220
  * @default false
@@ -232,14 +223,15 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
232
223
  /**
233
224
  * The margin between the SVG and the drawing area.
234
225
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
235
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
226
+ *
227
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
236
228
  */
237
- margin: PropTypes.shape({
229
+ margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
238
230
  bottom: PropTypes.number,
239
231
  left: PropTypes.number,
240
232
  right: PropTypes.number,
241
233
  top: PropTypes.number
242
- }),
234
+ })]),
243
235
  /**
244
236
  * The function called for onClick events.
245
237
  * The second argument contains information about all line/bar elements at the current mouse position.
@@ -265,12 +257,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
265
257
  * @param {ZoomData[]} zoomData Updated zoom data.
266
258
  */
267
259
  onZoomChange: PropTypes.func,
268
- /**
269
- * Indicate which axis to display the right of the charts.
270
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
271
- * @default null
272
- */
273
- rightAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
274
260
  /**
275
261
  * The series to display in the bar chart.
276
262
  * An array of [[BarSeriesType]] objects.
@@ -294,12 +280,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
294
280
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
295
281
  theme: PropTypes.oneOf(['dark', 'light']),
296
282
  title: PropTypes.string,
297
- /**
298
- * Indicate which axis to display the top of the charts.
299
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
300
- * @default null
301
- */
302
- topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
303
283
  /**
304
284
  * The width of the chart in px. If not defined, it takes the width of the parent element.
305
285
  */
@@ -310,6 +290,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
310
290
  * An array of [[AxisConfig]] objects.
311
291
  */
312
292
  xAxis: PropTypes.arrayOf(PropTypes.shape({
293
+ axis: PropTypes.oneOf(['x']),
313
294
  classes: PropTypes.object,
314
295
  colorMap: PropTypes.oneOfType([PropTypes.shape({
315
296
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
@@ -332,13 +313,15 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
332
313
  disableTicks: PropTypes.bool,
333
314
  domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
334
315
  fill: PropTypes.string,
316
+ height: PropTypes.number,
335
317
  hideTooltip: PropTypes.bool,
336
318
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
337
319
  label: PropTypes.string,
338
320
  labelStyle: PropTypes.object,
339
321
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
340
322
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
341
- position: PropTypes.oneOf(['bottom', 'top']),
323
+ offset: PropTypes.number,
324
+ position: PropTypes.oneOf(['bottom', 'none', 'top']),
342
325
  reverse: PropTypes.bool,
343
326
  scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
344
327
  slotProps: PropTypes.object,
@@ -347,6 +330,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
347
330
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
348
331
  tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
349
332
  tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
333
+ tickLabelMinGap: PropTypes.number,
350
334
  tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
351
335
  tickLabelStyle: PropTypes.object,
352
336
  tickMaxStep: PropTypes.number,
@@ -371,6 +355,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
371
355
  * An array of [[AxisConfig]] objects.
372
356
  */
373
357
  yAxis: PropTypes.arrayOf(PropTypes.shape({
358
+ axis: PropTypes.oneOf(['y']),
374
359
  classes: PropTypes.object,
375
360
  colorMap: PropTypes.oneOfType([PropTypes.shape({
376
361
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
@@ -399,7 +384,8 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
399
384
  labelStyle: PropTypes.object,
400
385
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
401
386
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
402
- position: PropTypes.oneOf(['left', 'right']),
387
+ offset: PropTypes.number,
388
+ position: PropTypes.oneOf(['left', 'none', 'right']),
403
389
  reverse: PropTypes.bool,
404
390
  scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
405
391
  slotProps: PropTypes.object,
@@ -416,6 +402,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
416
402
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
417
403
  tickSize: PropTypes.number,
418
404
  valueFormatter: PropTypes.func,
405
+ width: PropTypes.number,
419
406
  zoom: PropTypes.oneOfType([PropTypes.shape({
420
407
  filterMode: PropTypes.oneOf(['discard', 'keep']),
421
408
  maxEnd: PropTypes.number,
@@ -450,6 +437,14 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
450
437
  id: PropTypes.string,
451
438
  max: PropTypes.number,
452
439
  min: PropTypes.number
440
+ })),
441
+ /**
442
+ * The list of zoom data related to each axis.
443
+ */
444
+ zoomData: PropTypes.arrayOf(PropTypes.shape({
445
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
446
+ end: PropTypes.number.isRequired,
447
+ start: PropTypes.number.isRequired
453
448
  }))
454
449
  } : void 0;
455
450
  export { BarChartPro };
@@ -27,7 +27,7 @@ type ChartContainerProComponent = <TSeries extends ChartSeriesType = ChartSeries
27
27
  * xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
28
28
  * >
29
29
  * <BarPlot />
30
- * <ChartsXAxis position="bottom" axisId="x-axis" />
30
+ * <ChartsXAxis axisId="x-axis" />
31
31
  * </ChartContainerPro>
32
32
  * ```
33
33
  */
@@ -27,7 +27,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
27
27
  * xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
28
28
  * >
29
29
  * <BarPlot />
30
- * <ChartsXAxis position="bottom" axisId="x-axis" />
30
+ * <ChartsXAxis axisId="x-axis" />
31
31
  * </ChartContainerPro>
32
32
  * ```
33
33
  */
@@ -2,13 +2,14 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["initialZoom", "onZoomChange", "plugins", "apiRef"];
5
+ const _excluded = ["initialZoom", "zoomData", "onZoomChange", "plugins", "apiRef"];
6
6
  import { useChartContainerProps } from '@mui/x-charts/internals';
7
7
  import { ALL_PLUGINS } from "../internals/plugins/allPlugins.js";
8
8
  export const useChartContainerProProps = (props, ref) => {
9
9
  const _ref = props,
10
10
  {
11
11
  initialZoom,
12
+ zoomData,
12
13
  onZoomChange,
13
14
  plugins,
14
15
  apiRef
@@ -21,6 +22,7 @@ export const useChartContainerProProps = (props, ref) => {
21
22
  } = useChartContainerProps(baseProps, ref);
22
23
  const chartDataProviderProProps = _extends({}, chartDataProviderProps, {
23
24
  initialZoom,
25
+ zoomData,
24
26
  onZoomChange,
25
27
  apiRef,
26
28
  plugins: plugins ?? ALL_PLUGINS
@@ -24,7 +24,7 @@ export type ChartDataProviderProProps<TSeries extends ChartSeriesType = ChartSer
24
24
  * >
25
25
  * <ChartsSurface>
26
26
  * <BarPlot />
27
- * <ChartsXAxis position="bottom" axisId="x-axis" />
27
+ * <ChartsXAxis axisId="x-axis" />
28
28
  * </ChartsSurface>
29
29
  * {'Custom Legend Component'}
30
30
  * </ChartDataProviderPro>
@@ -32,7 +32,7 @@ const packageIdentifier = 'x-charts-pro';
32
32
  * >
33
33
  * <ChartsSurface>
34
34
  * <BarPlot />
35
- * <ChartsXAxis position="bottom" axisId="x-axis" />
35
+ * <ChartsXAxis axisId="x-axis" />
36
36
  * </ChartsSurface>
37
37
  * {'Custom Legend Component'}
38
38
  * </ChartDataProviderPro>
@@ -82,7 +82,8 @@ process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
82
82
  /**
83
83
  * The margin between the SVG and the drawing area.
84
84
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
85
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
85
+ *
86
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
86
87
  */
87
88
  margin: PropTypes.any,
88
89
  /**
@@ -8,6 +8,7 @@ import { ChartContainerProProps } from "../ChartContainerPro/index.js";
8
8
  import { HeatmapSeriesType } from "../models/seriesType/heatmap.js";
9
9
  import { HeatmapTooltipProps } from "./HeatmapTooltip.js";
10
10
  import { HeatmapItemSlotProps, HeatmapItemSlots } from "./HeatmapItem.js";
11
+ import { HeatmapPluginsSignatures } from "./Heatmap.plugins.js";
11
12
  export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, HeatmapItemSlots {
12
13
  /**
13
14
  * Custom component for the tooltip popper.
@@ -18,24 +19,24 @@ export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, Heatm
18
19
  export interface HeatmapSlotProps extends ChartsAxisSlotProps, ChartsOverlaySlotProps, HeatmapItemSlotProps {
19
20
  tooltip?: Partial<HeatmapTooltipProps>;
20
21
  }
21
- export interface HeatmapProps extends Omit<ChartContainerProProps, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'zoom' | 'onZoomChange' | 'skipAnimation'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
22
+ export interface HeatmapProps extends Omit<ChartContainerProProps<'heatmap', HeatmapPluginsSignatures>, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'skipAnimation'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
22
23
  /**
23
24
  * The configuration of the x-axes.
24
25
  * If not provided, a default axis config is used.
25
26
  * An array of [[AxisConfig]] objects.
26
27
  */
27
- xAxis: MakeOptional<AxisConfig<'band', any, ChartsXAxisProps>, 'id' | 'scaleType'>[];
28
+ xAxis: Readonly<MakeOptional<AxisConfig<'band', any, ChartsXAxisProps>, 'id' | 'scaleType'>[]>;
28
29
  /**
29
30
  * The configuration of the y-axes.
30
31
  * If not provided, a default axis config is used.
31
32
  * An array of [[AxisConfig]] objects.
32
33
  */
33
- yAxis: MakeOptional<AxisConfig<'band', any, ChartsYAxisProps>, 'id' | 'scaleType'>[];
34
+ yAxis: Readonly<MakeOptional<AxisConfig<'band', any, ChartsYAxisProps>, 'id' | 'scaleType'>[]>;
34
35
  /**
35
36
  * The series to display in the bar chart.
36
37
  * An array of [[HeatmapSeriesType]] objects.
37
38
  */
38
- series: MakeOptional<HeatmapSeriesType, 'type'>[];
39
+ series: Readonly<MakeOptional<HeatmapSeriesType, 'type'>[]>;
39
40
  /**
40
41
  * The configuration of the tooltip.
41
42
  * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.