@mui/x-charts-pro 8.4.0 → 8.5.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 (138) hide show
  1. package/BarChartPro/BarChartPro.d.ts +13 -5
  2. package/BarChartPro/BarChartPro.js +19 -1
  3. package/CHANGELOG.md +103 -0
  4. package/ChartContainerPro/ChartContainerPro.d.ts +0 -1
  5. package/ChartContainerPro/ChartProApi.d.ts +26 -0
  6. package/ChartContainerPro/ChartProApi.js +5 -0
  7. package/ChartContainerPro/index.d.ts +2 -1
  8. package/ChartContainerPro/index.js +11 -0
  9. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +11 -1
  10. package/ChartDataProviderPro/ChartDataProviderPro.js +19 -3
  11. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -0
  12. package/ChartDataProviderPro/useChartDataProviderProProps.js +5 -1
  13. package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -3
  14. package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +25 -315
  15. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +24 -0
  16. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +251 -0
  17. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
  18. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +160 -0
  19. package/ChartZoomSlider/internals/constants.d.ts +5 -0
  20. package/ChartZoomSlider/internals/constants.js +11 -0
  21. package/ChartZoomSlider/internals/zoom-utils.d.ts +4 -0
  22. package/ChartZoomSlider/internals/zoom-utils.js +48 -0
  23. package/ChartsToolbarPro/ChartsToolbarPro.d.ts +8 -1
  24. package/ChartsToolbarPro/ChartsToolbarPro.js +42 -8
  25. package/ChartsToolbarPro/ChartsToolbarZoomInButton.d.ts +16 -0
  26. package/ChartsToolbarPro/ChartsToolbarZoomInButton.js +56 -0
  27. package/ChartsToolbarPro/ChartsToolbarZoomOutButton.d.ts +16 -0
  28. package/ChartsToolbarPro/ChartsToolbarZoomOutButton.js +56 -0
  29. package/ChartsToolbarPro/index.d.ts +3 -1
  30. package/ChartsToolbarPro/index.js +22 -0
  31. package/FunnelChart/FunnelChart.d.ts +2 -1
  32. package/FunnelChart/FunnelChart.js +2 -20
  33. package/FunnelChart/FunnelChart.plugins.d.ts +4 -0
  34. package/FunnelChart/FunnelChart.plugins.js +9 -0
  35. package/FunnelChart/funnelSlots.types.d.ts +4 -3
  36. package/FunnelChart/useFunnelChartProps.d.ts +2 -1
  37. package/FunnelChart/useFunnelChartProps.js +3 -1
  38. package/Heatmap/Heatmap.d.ts +17 -4
  39. package/Heatmap/Heatmap.js +56 -22
  40. package/Heatmap/Heatmap.plugins.d.ts +2 -1
  41. package/Heatmap/Heatmap.plugins.js +2 -1
  42. package/LineChartPro/LineChartPro.d.ts +13 -5
  43. package/LineChartPro/LineChartPro.js +19 -1
  44. package/RadarChartPro/RadarChartPro.d.ts +15 -0
  45. package/RadarChartPro/RadarChartPro.js +202 -0
  46. package/RadarChartPro/RadarChartPro.plugins.d.ts +4 -0
  47. package/RadarChartPro/RadarChartPro.plugins.js +9 -0
  48. package/RadarChartPro/index.d.ts +1 -0
  49. package/RadarChartPro/index.js +16 -0
  50. package/ScatterChartPro/ScatterChartPro.d.ts +13 -5
  51. package/ScatterChartPro/ScatterChartPro.js +19 -1
  52. package/context/index.d.ts +1 -0
  53. package/context/index.js +16 -0
  54. package/context/useChartApiContext.d.ts +9 -0
  55. package/context/useChartApiContext.js +17 -0
  56. package/esm/BarChartPro/BarChartPro.d.ts +13 -5
  57. package/esm/BarChartPro/BarChartPro.js +19 -1
  58. package/esm/ChartContainerPro/ChartContainerPro.d.ts +0 -1
  59. package/esm/ChartContainerPro/ChartProApi.d.ts +26 -0
  60. package/esm/ChartContainerPro/ChartProApi.js +1 -0
  61. package/esm/ChartContainerPro/index.d.ts +2 -1
  62. package/esm/ChartContainerPro/index.js +2 -1
  63. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +11 -1
  64. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +20 -4
  65. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -0
  66. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +5 -1
  67. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -3
  68. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +19 -306
  69. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +24 -0
  70. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +243 -0
  71. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
  72. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +152 -0
  73. package/esm/ChartZoomSlider/internals/constants.d.ts +5 -0
  74. package/esm/ChartZoomSlider/internals/constants.js +5 -0
  75. package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +4 -0
  76. package/esm/ChartZoomSlider/internals/zoom-utils.js +40 -0
  77. package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +8 -1
  78. package/esm/ChartsToolbarPro/ChartsToolbarPro.js +42 -9
  79. package/esm/ChartsToolbarPro/ChartsToolbarZoomInButton.d.ts +16 -0
  80. package/esm/ChartsToolbarPro/ChartsToolbarZoomInButton.js +50 -0
  81. package/esm/ChartsToolbarPro/ChartsToolbarZoomOutButton.d.ts +16 -0
  82. package/esm/ChartsToolbarPro/ChartsToolbarZoomOutButton.js +50 -0
  83. package/esm/ChartsToolbarPro/index.d.ts +3 -1
  84. package/esm/ChartsToolbarPro/index.js +3 -1
  85. package/esm/FunnelChart/FunnelChart.d.ts +2 -1
  86. package/esm/FunnelChart/FunnelChart.js +2 -20
  87. package/esm/FunnelChart/FunnelChart.plugins.d.ts +4 -0
  88. package/esm/FunnelChart/FunnelChart.plugins.js +3 -0
  89. package/esm/FunnelChart/funnelSlots.types.d.ts +4 -3
  90. package/esm/FunnelChart/useFunnelChartProps.d.ts +2 -1
  91. package/esm/FunnelChart/useFunnelChartProps.js +3 -1
  92. package/esm/Heatmap/Heatmap.d.ts +17 -4
  93. package/esm/Heatmap/Heatmap.js +56 -22
  94. package/esm/Heatmap/Heatmap.plugins.d.ts +2 -1
  95. package/esm/Heatmap/Heatmap.plugins.js +2 -1
  96. package/esm/LineChartPro/LineChartPro.d.ts +13 -5
  97. package/esm/LineChartPro/LineChartPro.js +19 -1
  98. package/esm/RadarChartPro/RadarChartPro.d.ts +15 -0
  99. package/esm/RadarChartPro/RadarChartPro.js +195 -0
  100. package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +4 -0
  101. package/esm/RadarChartPro/RadarChartPro.plugins.js +3 -0
  102. package/esm/RadarChartPro/index.d.ts +1 -0
  103. package/esm/RadarChartPro/index.js +1 -0
  104. package/esm/ScatterChartPro/ScatterChartPro.d.ts +13 -5
  105. package/esm/ScatterChartPro/ScatterChartPro.js +19 -1
  106. package/esm/context/index.d.ts +1 -0
  107. package/esm/context/index.js +1 -0
  108. package/esm/context/useChartApiContext.d.ts +9 -0
  109. package/esm/context/useChartApiContext.js +11 -0
  110. package/esm/hooks/index.d.ts +2 -1
  111. package/esm/hooks/index.js +2 -1
  112. package/esm/index.d.ts +2 -1
  113. package/esm/index.js +2 -1
  114. package/esm/internals/material/index.d.ts +1 -0
  115. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +10 -0
  116. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +358 -0
  117. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +15 -1
  118. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +7 -0
  119. package/esm/models/index.d.ts +1 -1
  120. package/hooks/index.d.ts +2 -1
  121. package/hooks/index.js +21 -10
  122. package/index.d.ts +2 -1
  123. package/index.js +12 -1
  124. package/internals/material/index.d.ts +1 -0
  125. package/internals/plugins/useChartProZoom/useChartProZoom.js +10 -0
  126. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +358 -0
  127. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +16 -2
  128. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +7 -0
  129. package/models/index.d.ts +1 -1
  130. package/package.json +5 -5
  131. package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +0 -13
  132. package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +0 -36
  133. package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +0 -13
  134. package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +0 -36
  135. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +0 -13
  136. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +0 -29
  137. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +0 -13
  138. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +0 -29
@@ -41,6 +41,13 @@ export interface UseChartProZoomPublicApi {
41
41
  * @returns {void}
42
42
  */
43
43
  setZoomData: (value: ZoomData[] | ((prev: ZoomData[]) => ZoomData[])) => void;
44
+ /**
45
+ * Set the zoom data for an axis.
46
+ * @param {AxisId} axisId The id of the axis to set the zoom data for.
47
+ * @param {ZoomData | ((prev: ZoomData) => ZoomData)} value The new value. Can either be the new zoom data, or an updater function.
48
+ * @returns {void}
49
+ */
50
+ setAxisZoomData: (axisId: AxisId, value: ZoomData | ((prev: ZoomData) => ZoomData)) => void;
44
51
  }
45
52
  export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {
46
53
  /**
@@ -1,2 +1,2 @@
1
- export type { ZoomData } from '@mui/x-charts/internals';
1
+ export type { ZoomData, ZoomFilterMode, ZoomOptions, ZoomSliderOptions, ZoomSliderShowTooltip } from '@mui/x-charts/internals';
2
2
  export * from "./seriesType/index.js";
package/hooks/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { useHeatmapSeries } from "./useHeatmapSeries.js";
1
+ export * from "./useHeatmapSeries.js";
2
+ export * from "./useFunnelSeries.js";
2
3
  export * from "./zoom/index.js";
package/hooks/index.js CHANGED
@@ -3,20 +3,31 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {
7
- useHeatmapSeries: true
8
- };
9
- Object.defineProperty(exports, "useHeatmapSeries", {
10
- enumerable: true,
11
- get: function () {
12
- return _useHeatmapSeries.useHeatmapSeries;
13
- }
14
- });
15
6
  var _useHeatmapSeries = require("./useHeatmapSeries");
7
+ Object.keys(_useHeatmapSeries).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _useHeatmapSeries[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _useHeatmapSeries[key];
14
+ }
15
+ });
16
+ });
17
+ var _useFunnelSeries = require("./useFunnelSeries");
18
+ Object.keys(_useFunnelSeries).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _useFunnelSeries[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _useFunnelSeries[key];
25
+ }
26
+ });
27
+ });
16
28
  var _zoom = require("./zoom");
17
29
  Object.keys(_zoom).forEach(function (key) {
18
30
  if (key === "default" || key === "__esModule") return;
19
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
20
31
  if (key in exports && exports[key] === _zoom[key]) return;
21
32
  Object.defineProperty(exports, key, {
22
33
  enumerable: true,
package/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export * from '@mui/x-charts/RadarChart';
25
25
  export * from '@mui/x-charts/ChartsSurface';
26
26
  export * from '@mui/x-charts/ChartDataProvider';
27
27
  export * from '@mui/x-charts/ChartsLabel';
28
- export type { ZoomData, ZoomFilterMode, ZoomOptions, ZoomSliderOptions } from '@mui/x-charts/internals';
28
+ export type { ZoomData, ZoomFilterMode, ZoomSliderShowTooltip, ZoomOptions, ZoomSliderOptions } from '@mui/x-charts/internals';
29
29
  export * from "./hooks/index.js";
30
30
  export * from "./Heatmap/index.js";
31
31
  export * from "./ChartContainerPro/index.js";
@@ -34,5 +34,6 @@ export * from "./ScatterChartPro/index.js";
34
34
  export * from "./BarChartPro/index.js";
35
35
  export * from "./LineChartPro/index.js";
36
36
  export * from "./FunnelChart/index.js";
37
+ export * from "./RadarChartPro/index.js";
37
38
  export * from "./ChartZoomSlider/index.js";
38
39
  export * from "./ChartsToolbarPro/index.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.4.0
2
+ * @mui/x-charts-pro v8.5.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -385,6 +385,17 @@ Object.keys(_FunnelChart).forEach(function (key) {
385
385
  }
386
386
  });
387
387
  });
388
+ var _RadarChartPro = require("./RadarChartPro");
389
+ Object.keys(_RadarChartPro).forEach(function (key) {
390
+ if (key === "default" || key === "__esModule") return;
391
+ if (key in exports && exports[key] === _RadarChartPro[key]) return;
392
+ Object.defineProperty(exports, key, {
393
+ enumerable: true,
394
+ get: function () {
395
+ return _RadarChartPro[key];
396
+ }
397
+ });
398
+ });
388
399
  var _ChartZoomSlider = require("./ChartZoomSlider");
389
400
  Object.keys(_ChartZoomSlider).forEach(function (key) {
390
401
  if (key === "default" || key === "__esModule") return;
@@ -1,4 +1,5 @@
1
1
  import { ChartsBaseSlotsPro } from "../slots/chartsBaseSlots.js";
2
2
  import { ChartsIconSlotsPro } from "../slots/chartsIconSlots.js";
3
3
  export type ChartsSlotsPro = ChartsBaseSlotsPro & ChartsIconSlotsPro;
4
+ export type ChartsSlotPropsPro = { [key in keyof ChartsSlotsPro]: React.ComponentProps<ChartsSlotsPro[key]> };
4
5
  export declare const defaultSlotsMaterial: ChartsSlotsPro;
@@ -109,6 +109,14 @@ const useChartProZoom = ({
109
109
  });
110
110
  });
111
111
  }, [onZoomChange, store, removeIsInteracting]);
112
+ const setAxisZoomData = React.useCallback((axisId, zoomData) => {
113
+ setZoomDataCallback(prev => prev.map(prevZoom => {
114
+ if (prevZoom.axisId !== axisId) {
115
+ return prevZoom;
116
+ }
117
+ return typeof zoomData === 'function' ? zoomData(prevZoom) : zoomData;
118
+ }));
119
+ }, [setZoomDataCallback]);
112
120
  const moveZoomRange = React.useCallback((axisId, by) => {
113
121
  setZoomDataCallback(prevZoomData => {
114
122
  return prevZoomData.map(zoom => {
@@ -374,11 +382,13 @@ const useChartProZoom = ({
374
382
  return {
375
383
  publicAPI: {
376
384
  setZoomData: setZoomDataCallback,
385
+ setAxisZoomData,
377
386
  zoomIn,
378
387
  zoomOut
379
388
  },
380
389
  instance: {
381
390
  setZoomData: setZoomDataCallback,
391
+ setAxisZoomData,
382
392
  moveZoomRange,
383
393
  zoomIn,
384
394
  zoomOut
@@ -252,4 +252,362 @@ export declare const selectorChartAxisZoomData: ((state: any, axisId: AxisId) =>
252
252
  } & {
253
253
  argsMemoize: typeof import("reselect").weakMapMemoize;
254
254
  memoize: typeof import("reselect").weakMapMemoize;
255
+ };
256
+ export declare const selectorChartCanZoomOut: ((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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
257
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
258
+ } & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
259
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
260
+ }) => boolean) & {
261
+ clearCache: () => void;
262
+ resultsCount: () => number;
263
+ resetResultsCount: () => void;
264
+ } & {
265
+ resultFunc: (resultFuncArgs_0: {
266
+ isInteracting: boolean;
267
+ zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
268
+ isControlled: boolean;
269
+ }, resultFuncArgs_1: {
270
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
271
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
272
+ }) => boolean;
273
+ memoizedResultFunc: ((resultFuncArgs_0: {
274
+ isInteracting: boolean;
275
+ zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
276
+ isControlled: boolean;
277
+ }, resultFuncArgs_1: {
278
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
279
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
280
+ }) => boolean) & {
281
+ clearCache: () => void;
282
+ resultsCount: () => number;
283
+ resetResultsCount: () => void;
284
+ };
285
+ lastResult: () => boolean;
286
+ dependencies: [ChartRootSelector<UseChartProZoomSignature>, ((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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
287
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
288
+ }) => {
289
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
290
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
291
+ }) & {
292
+ clearCache: () => void;
293
+ resultsCount: () => number;
294
+ resetResultsCount: () => void;
295
+ } & {
296
+ resultFunc: (resultFuncArgs_0: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>, resultFuncArgs_1: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) => {
297
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
298
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
299
+ };
300
+ memoizedResultFunc: ((resultFuncArgs_0: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>, resultFuncArgs_1: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) => {
301
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
302
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
303
+ }) & {
304
+ clearCache: () => void;
305
+ resultsCount: () => number;
306
+ resetResultsCount: () => void;
307
+ };
308
+ lastResult: () => {
309
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
310
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
311
+ };
312
+ 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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
313
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
314
+ }) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
315
+ clearCache: () => void;
316
+ resultsCount: () => number;
317
+ resetResultsCount: () => void;
318
+ } & {
319
+ resultFunc: (resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
320
+ memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
321
+ clearCache: () => void;
322
+ resultsCount: () => number;
323
+ resetResultsCount: () => void;
324
+ };
325
+ lastResult: () => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
326
+ 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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
327
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
328
+ }) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) & {
329
+ clearCache: () => void;
330
+ resultsCount: () => number;
331
+ resetResultsCount: () => void;
332
+ } & {
333
+ resultFunc: (resultFuncArgs_0: {
334
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
335
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
336
+ } | undefined) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined;
337
+ memoizedResultFunc: ((resultFuncArgs_0: {
338
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
339
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
340
+ } | undefined) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) & {
341
+ clearCache: () => void;
342
+ resultsCount: () => number;
343
+ resetResultsCount: () => void;
344
+ };
345
+ lastResult: () => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined;
346
+ dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
347
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
348
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
349
+ } | undefined];
350
+ recomputations: () => number;
351
+ resetRecomputations: () => void;
352
+ dependencyRecomputations: () => number;
353
+ resetDependencyRecomputations: () => void;
354
+ } & {
355
+ memoize: typeof import("reselect").weakMapMemoize;
356
+ argsMemoize: typeof import("reselect").weakMapMemoize;
357
+ }];
358
+ recomputations: () => number;
359
+ resetRecomputations: () => void;
360
+ dependencyRecomputations: () => number;
361
+ resetDependencyRecomputations: () => void;
362
+ } & {
363
+ memoize: typeof import("reselect").weakMapMemoize;
364
+ argsMemoize: typeof import("reselect").weakMapMemoize;
365
+ }, ((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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
366
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
367
+ }) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
368
+ clearCache: () => void;
369
+ resultsCount: () => number;
370
+ resetResultsCount: () => void;
371
+ } & {
372
+ resultFunc: (resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
373
+ memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
374
+ clearCache: () => void;
375
+ resultsCount: () => number;
376
+ resetResultsCount: () => void;
377
+ };
378
+ lastResult: () => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
379
+ 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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
380
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
381
+ }) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) & {
382
+ clearCache: () => void;
383
+ resultsCount: () => number;
384
+ resetResultsCount: () => void;
385
+ } & {
386
+ resultFunc: (resultFuncArgs_0: {
387
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
388
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
389
+ } | undefined) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined;
390
+ memoizedResultFunc: ((resultFuncArgs_0: {
391
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
392
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
393
+ } | undefined) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) & {
394
+ clearCache: () => void;
395
+ resultsCount: () => number;
396
+ resetResultsCount: () => void;
397
+ };
398
+ lastResult: () => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined;
399
+ dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
400
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
401
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
402
+ } | undefined];
403
+ recomputations: () => number;
404
+ resetRecomputations: () => void;
405
+ dependencyRecomputations: () => number;
406
+ resetDependencyRecomputations: () => void;
407
+ } & {
408
+ memoize: typeof import("reselect").weakMapMemoize;
409
+ argsMemoize: typeof import("reselect").weakMapMemoize;
410
+ }];
411
+ recomputations: () => number;
412
+ resetRecomputations: () => void;
413
+ dependencyRecomputations: () => number;
414
+ resetDependencyRecomputations: () => void;
415
+ } & {
416
+ memoize: typeof import("reselect").weakMapMemoize;
417
+ argsMemoize: typeof import("reselect").weakMapMemoize;
418
+ }];
419
+ recomputations: () => number;
420
+ resetRecomputations: () => void;
421
+ dependencyRecomputations: () => number;
422
+ resetDependencyRecomputations: () => void;
423
+ } & {
424
+ memoize: typeof import("reselect").weakMapMemoize;
425
+ argsMemoize: typeof import("reselect").weakMapMemoize;
426
+ }];
427
+ recomputations: () => number;
428
+ resetRecomputations: () => void;
429
+ dependencyRecomputations: () => number;
430
+ resetDependencyRecomputations: () => void;
431
+ } & {
432
+ argsMemoize: typeof import("reselect").weakMapMemoize;
433
+ memoize: typeof import("reselect").weakMapMemoize;
434
+ };
435
+ export declare const selectorChartCanZoomIn: ((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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
436
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
437
+ } & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
438
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
439
+ }) => boolean) & {
440
+ clearCache: () => void;
441
+ resultsCount: () => number;
442
+ resetResultsCount: () => void;
443
+ } & {
444
+ resultFunc: (resultFuncArgs_0: {
445
+ isInteracting: boolean;
446
+ zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
447
+ isControlled: boolean;
448
+ }, resultFuncArgs_1: {
449
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
450
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
451
+ }) => boolean;
452
+ memoizedResultFunc: ((resultFuncArgs_0: {
453
+ isInteracting: boolean;
454
+ zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
455
+ isControlled: boolean;
456
+ }, resultFuncArgs_1: {
457
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
458
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
459
+ }) => boolean) & {
460
+ clearCache: () => void;
461
+ resultsCount: () => number;
462
+ resetResultsCount: () => void;
463
+ };
464
+ lastResult: () => boolean;
465
+ dependencies: [ChartRootSelector<UseChartProZoomSignature>, ((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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
466
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
467
+ }) => {
468
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
469
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
470
+ }) & {
471
+ clearCache: () => void;
472
+ resultsCount: () => number;
473
+ resetResultsCount: () => void;
474
+ } & {
475
+ resultFunc: (resultFuncArgs_0: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>, resultFuncArgs_1: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) => {
476
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
477
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
478
+ };
479
+ memoizedResultFunc: ((resultFuncArgs_0: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>, resultFuncArgs_1: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) => {
480
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
481
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
482
+ }) & {
483
+ clearCache: () => void;
484
+ resultsCount: () => number;
485
+ resetResultsCount: () => void;
486
+ };
487
+ lastResult: () => {
488
+ [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
489
+ [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
490
+ };
491
+ 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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
492
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
493
+ }) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
494
+ clearCache: () => void;
495
+ resultsCount: () => number;
496
+ resetResultsCount: () => void;
497
+ } & {
498
+ resultFunc: (resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
499
+ memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
500
+ clearCache: () => void;
501
+ resultsCount: () => number;
502
+ resetResultsCount: () => void;
503
+ };
504
+ lastResult: () => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
505
+ 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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
506
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
507
+ }) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) & {
508
+ clearCache: () => void;
509
+ resultsCount: () => number;
510
+ resetResultsCount: () => void;
511
+ } & {
512
+ resultFunc: (resultFuncArgs_0: {
513
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
514
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
515
+ } | undefined) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined;
516
+ memoizedResultFunc: ((resultFuncArgs_0: {
517
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
518
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
519
+ } | undefined) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) & {
520
+ clearCache: () => void;
521
+ resultsCount: () => number;
522
+ resetResultsCount: () => void;
523
+ };
524
+ lastResult: () => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined;
525
+ dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
526
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
527
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
528
+ } | undefined];
529
+ recomputations: () => number;
530
+ resetRecomputations: () => void;
531
+ dependencyRecomputations: () => number;
532
+ resetDependencyRecomputations: () => void;
533
+ } & {
534
+ memoize: typeof import("reselect").weakMapMemoize;
535
+ argsMemoize: typeof import("reselect").weakMapMemoize;
536
+ }];
537
+ recomputations: () => number;
538
+ resetRecomputations: () => void;
539
+ dependencyRecomputations: () => number;
540
+ resetDependencyRecomputations: () => void;
541
+ } & {
542
+ memoize: typeof import("reselect").weakMapMemoize;
543
+ argsMemoize: typeof import("reselect").weakMapMemoize;
544
+ }, ((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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
545
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
546
+ }) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
547
+ clearCache: () => void;
548
+ resultsCount: () => number;
549
+ resetResultsCount: () => void;
550
+ } & {
551
+ resultFunc: (resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
552
+ memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
553
+ clearCache: () => void;
554
+ resultsCount: () => number;
555
+ resetResultsCount: () => void;
556
+ };
557
+ lastResult: () => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
558
+ 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/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
559
+ cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
560
+ }) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) & {
561
+ clearCache: () => void;
562
+ resultsCount: () => number;
563
+ resetResultsCount: () => void;
564
+ } & {
565
+ resultFunc: (resultFuncArgs_0: {
566
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
567
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
568
+ } | undefined) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined;
569
+ memoizedResultFunc: ((resultFuncArgs_0: {
570
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
571
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
572
+ } | undefined) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) & {
573
+ clearCache: () => void;
574
+ resultsCount: () => number;
575
+ resetResultsCount: () => void;
576
+ };
577
+ lastResult: () => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined;
578
+ dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
579
+ x: import("@mui/x-charts/internals").DefaultedXAxis[];
580
+ y: import("@mui/x-charts/internals").DefaultedYAxis[];
581
+ } | undefined];
582
+ recomputations: () => number;
583
+ resetRecomputations: () => void;
584
+ dependencyRecomputations: () => number;
585
+ resetDependencyRecomputations: () => void;
586
+ } & {
587
+ memoize: typeof import("reselect").weakMapMemoize;
588
+ argsMemoize: typeof import("reselect").weakMapMemoize;
589
+ }];
590
+ recomputations: () => number;
591
+ resetRecomputations: () => void;
592
+ dependencyRecomputations: () => number;
593
+ resetDependencyRecomputations: () => void;
594
+ } & {
595
+ memoize: typeof import("reselect").weakMapMemoize;
596
+ argsMemoize: typeof import("reselect").weakMapMemoize;
597
+ }];
598
+ recomputations: () => number;
599
+ resetRecomputations: () => void;
600
+ dependencyRecomputations: () => number;
601
+ resetDependencyRecomputations: () => void;
602
+ } & {
603
+ memoize: typeof import("reselect").weakMapMemoize;
604
+ argsMemoize: typeof import("reselect").weakMapMemoize;
605
+ }];
606
+ recomputations: () => number;
607
+ resetRecomputations: () => void;
608
+ dependencyRecomputations: () => number;
609
+ resetDependencyRecomputations: () => void;
610
+ } & {
611
+ argsMemoize: typeof import("reselect").weakMapMemoize;
612
+ memoize: typeof import("reselect").weakMapMemoize;
255
613
  };
@@ -3,10 +3,24 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.selectorChartZoomState = exports.selectorChartZoomIsInteracting = exports.selectorChartZoomIsEnabled = exports.selectorChartAxisZoomData = void 0;
6
+ exports.selectorChartZoomState = exports.selectorChartZoomIsInteracting = exports.selectorChartZoomIsEnabled = exports.selectorChartCanZoomOut = exports.selectorChartCanZoomIn = exports.selectorChartAxisZoomData = void 0;
7
7
  var _internals = require("@mui/x-charts/internals");
8
8
  const selectorChartZoomState = state => state.zoom;
9
9
  exports.selectorChartZoomState = selectorChartZoomState;
10
10
  const selectorChartZoomIsInteracting = exports.selectorChartZoomIsInteracting = (0, _internals.createSelector)(selectorChartZoomState, zoom => zoom.isInteracting);
11
11
  const selectorChartZoomIsEnabled = exports.selectorChartZoomIsEnabled = (0, _internals.createSelector)(_internals.selectorChartZoomOptionsLookup, optionsLookup => Object.keys(optionsLookup).length > 0);
12
- const selectorChartAxisZoomData = exports.selectorChartAxisZoomData = (0, _internals.createSelector)([_internals.selectorChartZoomMap, (state, axisId) => axisId], (zoomMap, axisId) => zoomMap?.get(axisId));
12
+ const selectorChartAxisZoomData = exports.selectorChartAxisZoomData = (0, _internals.createSelector)([_internals.selectorChartZoomMap, (state, axisId) => axisId], (zoomMap, axisId) => zoomMap?.get(axisId));
13
+ const selectorChartCanZoomOut = exports.selectorChartCanZoomOut = (0, _internals.createSelector)([selectorChartZoomState, _internals.selectorChartZoomOptionsLookup], (zoomState, zoomOptions) => {
14
+ return zoomState.zoomData.every(zoomData => {
15
+ const span = zoomData.end - zoomData.start;
16
+ const options = zoomOptions[zoomData.axisId];
17
+ return zoomData.start === options.minStart && zoomData.end === options.maxEnd || span === options.maxSpan;
18
+ });
19
+ });
20
+ const selectorChartCanZoomIn = exports.selectorChartCanZoomIn = (0, _internals.createSelector)([selectorChartZoomState, _internals.selectorChartZoomOptionsLookup], (zoomState, zoomOptions) => {
21
+ return zoomState.zoomData.every(zoomData => {
22
+ const span = zoomData.end - zoomData.start;
23
+ const options = zoomOptions[zoomData.axisId];
24
+ return span === options.minSpan;
25
+ });
26
+ });
@@ -41,6 +41,13 @@ export interface UseChartProZoomPublicApi {
41
41
  * @returns {void}
42
42
  */
43
43
  setZoomData: (value: ZoomData[] | ((prev: ZoomData[]) => ZoomData[])) => void;
44
+ /**
45
+ * Set the zoom data for an axis.
46
+ * @param {AxisId} axisId The id of the axis to set the zoom data for.
47
+ * @param {ZoomData | ((prev: ZoomData) => ZoomData)} value The new value. Can either be the new zoom data, or an updater function.
48
+ * @returns {void}
49
+ */
50
+ setAxisZoomData: (axisId: AxisId, value: ZoomData | ((prev: ZoomData) => ZoomData)) => void;
44
51
  }
45
52
  export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {
46
53
  /**
package/models/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export type { ZoomData } from '@mui/x-charts/internals';
1
+ export type { ZoomData, ZoomFilterMode, ZoomOptions, ZoomSliderOptions, ZoomSliderShowTooltip } from '@mui/x-charts/internals';
2
2
  export * from "./seriesType/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-pro",
3
- "version": "8.4.0",
3
+ "version": "8.5.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Pro plan edition of the MUI X Charts components.",
6
6
  "main": "./index.js",
@@ -33,10 +33,10 @@
33
33
  "@mui/utils": "^7.0.2",
34
34
  "clsx": "^2.1.1",
35
35
  "prop-types": "^15.8.1",
36
- "@mui/x-internals": "8.4.0",
37
- "@mui/x-license": "8.4.0",
38
- "@mui/x-charts": "8.4.0",
39
- "@mui/x-charts-vendor": "8.4.0"
36
+ "@mui/x-charts": "8.5.0",
37
+ "@mui/x-charts-vendor": "8.4.0",
38
+ "@mui/x-internals": "8.5.0",
39
+ "@mui/x-license": "8.5.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@emotion/react": "^11.9.0",
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import { ChartsSlotsPro } from "../../internals/material/index.js";
3
- type ChartsToolbarZoomInButtonSlots = Partial<Pick<ChartsSlotsPro, 'baseTooltip' | 'zoomInIcon'>>;
4
- type ChartsToolbarZoomInButtonSlotProps = { [K in keyof Required<ChartsToolbarZoomInButtonSlots>]: React.ComponentProps<Required<ChartsToolbarZoomInButtonSlots>[K]> };
5
- interface ChartsToolbarZoomInButtonProps {
6
- slots?: ChartsToolbarZoomInButtonSlots;
7
- slotProps?: ChartsToolbarZoomInButtonSlotProps;
8
- }
9
- export declare function ChartsToolbarZoomInButton({
10
- slots,
11
- slotProps
12
- }: ChartsToolbarZoomInButtonProps): React.JSX.Element;
13
- export {};
@@ -1,36 +0,0 @@
1
- "use strict";
2
- 'use client';
3
-
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
- Object.defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- exports.ChartsToolbarZoomInButton = ChartsToolbarZoomInButton;
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
- var React = _interopRequireWildcard(require("react"));
12
- var _Toolbar = require("@mui/x-charts/Toolbar");
13
- var _internals = require("@mui/x-charts/internals");
14
- var _hooks = require("@mui/x-charts/hooks");
15
- var _material = require("../../internals/material");
16
- var _jsxRuntime = require("react/jsx-runtime");
17
- function ChartsToolbarZoomInButton({
18
- slots,
19
- slotProps
20
- }) {
21
- const {
22
- instance
23
- } = (0, _internals.useChartContext)();
24
- const ZoomInIcon = slots?.zoomInIcon ?? _material.defaultSlotsMaterial.zoomInIcon;
25
- const Tooltip = slots?.baseTooltip ?? _material.defaultSlotsMaterial.baseTooltip;
26
- const {
27
- localeText
28
- } = (0, _hooks.useChartsLocalization)();
29
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, {
30
- title: localeText.zoomIn,
31
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toolbar.ToolbarButton, {
32
- onClick: () => instance.zoomIn(),
33
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ZoomInIcon, (0, _extends2.default)({}, slotProps?.zoomInIcon))
34
- })
35
- });
36
- }