@mui/x-charts-pro 8.3.1 → 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 (206) hide show
  1. package/BarChartPro/BarChartPro.d.ts +13 -5
  2. package/BarChartPro/BarChartPro.js +56 -21
  3. package/CHANGELOG.md +213 -0
  4. package/ChartContainerPro/ChartContainerPro.d.ts +0 -1
  5. package/ChartContainerPro/ChartContainerPro.js +1 -0
  6. package/ChartContainerPro/ChartProApi.d.ts +26 -0
  7. package/ChartContainerPro/ChartProApi.js +5 -0
  8. package/ChartContainerPro/index.d.ts +2 -1
  9. package/ChartContainerPro/index.js +11 -0
  10. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +11 -1
  11. package/ChartDataProviderPro/ChartDataProviderPro.js +19 -3
  12. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -0
  13. package/ChartDataProviderPro/useChartDataProviderProProps.js +5 -1
  14. package/ChartZoomSlider/index.d.ts +1 -1
  15. package/ChartZoomSlider/index.js +4 -4
  16. package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -3
  17. package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +31 -287
  18. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +24 -0
  19. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +251 -0
  20. package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +12 -0
  21. package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +92 -0
  22. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
  23. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +160 -0
  24. package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +11 -0
  25. package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.js +58 -0
  26. package/ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.d.ts +17 -0
  27. package/ChartZoomSlider/internals/{chartAxisZoomSliderHandleClasses.js → chartAxisZoomSliderThumbClasses.js} +6 -6
  28. package/ChartZoomSlider/internals/constants.d.ts +5 -0
  29. package/ChartZoomSlider/internals/constants.js +11 -0
  30. package/ChartZoomSlider/internals/zoom-utils.d.ts +4 -0
  31. package/ChartZoomSlider/internals/zoom-utils.js +48 -0
  32. package/ChartsToolbarPro/ChartsToolbarPro.d.ts +8 -1
  33. package/ChartsToolbarPro/ChartsToolbarPro.js +42 -8
  34. package/ChartsToolbarPro/ChartsToolbarZoomInButton.d.ts +16 -0
  35. package/ChartsToolbarPro/ChartsToolbarZoomInButton.js +56 -0
  36. package/ChartsToolbarPro/ChartsToolbarZoomOutButton.d.ts +16 -0
  37. package/ChartsToolbarPro/ChartsToolbarZoomOutButton.js +56 -0
  38. package/ChartsToolbarPro/index.d.ts +3 -1
  39. package/ChartsToolbarPro/index.js +22 -0
  40. package/FunnelChart/FunnelChart.d.ts +2 -1
  41. package/FunnelChart/FunnelChart.js +6 -23
  42. package/FunnelChart/FunnelChart.plugins.d.ts +4 -0
  43. package/FunnelChart/FunnelChart.plugins.js +9 -0
  44. package/FunnelChart/FunnelPlot.js +2 -0
  45. package/FunnelChart/FunnelSection.js +2 -1
  46. package/FunnelChart/curves/curve.types.d.ts +4 -0
  47. package/FunnelChart/curves/pyramid.d.ts +3 -1
  48. package/FunnelChart/curves/pyramid.js +37 -10
  49. package/FunnelChart/curves/step-pyramid.d.ts +10 -2
  50. package/FunnelChart/curves/step-pyramid.js +96 -20
  51. package/FunnelChart/curves/step.d.ts +5 -1
  52. package/FunnelChart/curves/step.js +20 -2
  53. package/FunnelChart/funnel.types.d.ts +7 -0
  54. package/FunnelChart/funnelSlots.types.d.ts +4 -3
  55. package/FunnelChart/seriesConfig/seriesProcessor.js +47 -1
  56. package/FunnelChart/useFunnelChartProps.d.ts +2 -1
  57. package/FunnelChart/useFunnelChartProps.js +3 -1
  58. package/Heatmap/Heatmap.d.ts +18 -5
  59. package/Heatmap/Heatmap.js +64 -26
  60. package/Heatmap/Heatmap.plugins.d.ts +2 -1
  61. package/Heatmap/Heatmap.plugins.js +2 -1
  62. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +2 -0
  63. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +27 -0
  64. package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -10
  65. package/Heatmap/HeatmapTooltip/HeatmapTooltip.js +4 -102
  66. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +10 -0
  67. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.js +5 -0
  68. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +7 -0
  69. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +96 -0
  70. package/Heatmap/HeatmapTooltip/index.d.ts +3 -1
  71. package/Heatmap/HeatmapTooltip/index.js +11 -0
  72. package/LineChartPro/LineChartPro.d.ts +13 -5
  73. package/LineChartPro/LineChartPro.js +56 -21
  74. package/RadarChartPro/RadarChartPro.d.ts +15 -0
  75. package/RadarChartPro/RadarChartPro.js +202 -0
  76. package/RadarChartPro/RadarChartPro.plugins.d.ts +4 -0
  77. package/RadarChartPro/RadarChartPro.plugins.js +9 -0
  78. package/RadarChartPro/index.d.ts +1 -0
  79. package/RadarChartPro/index.js +16 -0
  80. package/ScatterChartPro/ScatterChartPro.d.ts +13 -5
  81. package/ScatterChartPro/ScatterChartPro.js +57 -22
  82. package/context/index.d.ts +1 -0
  83. package/context/index.js +16 -0
  84. package/context/useChartApiContext.d.ts +9 -0
  85. package/context/useChartApiContext.js +17 -0
  86. package/esm/BarChartPro/BarChartPro.d.ts +13 -5
  87. package/esm/BarChartPro/BarChartPro.js +54 -19
  88. package/esm/ChartContainerPro/ChartContainerPro.d.ts +0 -1
  89. package/esm/ChartContainerPro/ChartContainerPro.js +1 -0
  90. package/esm/ChartContainerPro/ChartProApi.d.ts +26 -0
  91. package/esm/ChartContainerPro/ChartProApi.js +1 -0
  92. package/esm/ChartContainerPro/index.d.ts +2 -1
  93. package/esm/ChartContainerPro/index.js +2 -1
  94. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +11 -1
  95. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +20 -4
  96. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -0
  97. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +5 -1
  98. package/esm/ChartZoomSlider/index.d.ts +1 -1
  99. package/esm/ChartZoomSlider/index.js +1 -1
  100. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -3
  101. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +30 -283
  102. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +24 -0
  103. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +243 -0
  104. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +12 -0
  105. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +85 -0
  106. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
  107. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +152 -0
  108. package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +11 -0
  109. package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.js +52 -0
  110. package/esm/ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.d.ts +17 -0
  111. package/esm/ChartZoomSlider/internals/{chartAxisZoomSliderHandleClasses.js → chartAxisZoomSliderThumbClasses.js} +4 -4
  112. package/esm/ChartZoomSlider/internals/constants.d.ts +5 -0
  113. package/esm/ChartZoomSlider/internals/constants.js +5 -0
  114. package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +4 -0
  115. package/esm/ChartZoomSlider/internals/zoom-utils.js +40 -0
  116. package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +8 -1
  117. package/esm/ChartsToolbarPro/ChartsToolbarPro.js +42 -9
  118. package/esm/ChartsToolbarPro/ChartsToolbarZoomInButton.d.ts +16 -0
  119. package/esm/ChartsToolbarPro/ChartsToolbarZoomInButton.js +50 -0
  120. package/esm/ChartsToolbarPro/ChartsToolbarZoomOutButton.d.ts +16 -0
  121. package/esm/ChartsToolbarPro/ChartsToolbarZoomOutButton.js +50 -0
  122. package/esm/ChartsToolbarPro/index.d.ts +3 -1
  123. package/esm/ChartsToolbarPro/index.js +3 -1
  124. package/esm/FunnelChart/FunnelChart.d.ts +2 -1
  125. package/esm/FunnelChart/FunnelChart.js +6 -23
  126. package/esm/FunnelChart/FunnelChart.plugins.d.ts +4 -0
  127. package/esm/FunnelChart/FunnelChart.plugins.js +3 -0
  128. package/esm/FunnelChart/FunnelPlot.js +2 -0
  129. package/esm/FunnelChart/FunnelSection.js +1 -0
  130. package/esm/FunnelChart/curves/curve.types.d.ts +4 -0
  131. package/esm/FunnelChart/curves/pyramid.d.ts +3 -1
  132. package/esm/FunnelChart/curves/pyramid.js +37 -10
  133. package/esm/FunnelChart/curves/step-pyramid.d.ts +10 -2
  134. package/esm/FunnelChart/curves/step-pyramid.js +96 -20
  135. package/esm/FunnelChart/curves/step.d.ts +5 -1
  136. package/esm/FunnelChart/curves/step.js +20 -2
  137. package/esm/FunnelChart/funnel.types.d.ts +7 -0
  138. package/esm/FunnelChart/funnelSlots.types.d.ts +4 -3
  139. package/esm/FunnelChart/seriesConfig/seriesProcessor.js +47 -1
  140. package/esm/FunnelChart/useFunnelChartProps.d.ts +2 -1
  141. package/esm/FunnelChart/useFunnelChartProps.js +3 -1
  142. package/esm/Heatmap/Heatmap.d.ts +18 -5
  143. package/esm/Heatmap/Heatmap.js +62 -24
  144. package/esm/Heatmap/Heatmap.plugins.d.ts +2 -1
  145. package/esm/Heatmap/Heatmap.plugins.js +2 -1
  146. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +2 -0
  147. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +19 -0
  148. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -10
  149. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.js +5 -103
  150. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +10 -0
  151. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.js +1 -0
  152. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +7 -0
  153. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +89 -0
  154. package/esm/Heatmap/HeatmapTooltip/index.d.ts +3 -1
  155. package/esm/Heatmap/HeatmapTooltip/index.js +3 -1
  156. package/esm/LineChartPro/LineChartPro.d.ts +13 -5
  157. package/esm/LineChartPro/LineChartPro.js +54 -19
  158. package/esm/RadarChartPro/RadarChartPro.d.ts +15 -0
  159. package/esm/RadarChartPro/RadarChartPro.js +195 -0
  160. package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +4 -0
  161. package/esm/RadarChartPro/RadarChartPro.plugins.js +3 -0
  162. package/esm/RadarChartPro/index.d.ts +1 -0
  163. package/esm/RadarChartPro/index.js +1 -0
  164. package/esm/ScatterChartPro/ScatterChartPro.d.ts +13 -5
  165. package/esm/ScatterChartPro/ScatterChartPro.js +55 -20
  166. package/esm/context/index.d.ts +1 -0
  167. package/esm/context/index.js +1 -0
  168. package/esm/context/useChartApiContext.d.ts +9 -0
  169. package/esm/context/useChartApiContext.js +11 -0
  170. package/esm/hooks/index.d.ts +2 -1
  171. package/esm/hooks/index.js +2 -1
  172. package/esm/index.d.ts +2 -1
  173. package/esm/index.js +2 -1
  174. package/esm/internals/material/index.d.ts +1 -0
  175. package/esm/internals/plugins/useChartProExport/exportImage.js +1 -1
  176. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +12 -2
  177. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +358 -0
  178. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +15 -1
  179. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +7 -0
  180. package/esm/models/index.d.ts +1 -1
  181. package/hooks/index.d.ts +2 -1
  182. package/hooks/index.js +21 -10
  183. package/index.d.ts +2 -1
  184. package/index.js +12 -1
  185. package/internals/material/index.d.ts +1 -0
  186. package/internals/plugins/useChartProExport/exportImage.js +1 -1
  187. package/internals/plugins/useChartProZoom/useChartProZoom.js +12 -2
  188. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +358 -0
  189. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +16 -2
  190. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +7 -0
  191. package/models/index.d.ts +1 -1
  192. package/package.json +5 -5
  193. package/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.d.ts +0 -12
  194. package/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.js +0 -92
  195. package/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.d.ts +0 -17
  196. package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +0 -13
  197. package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +0 -36
  198. package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +0 -13
  199. package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +0 -36
  200. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.d.ts +0 -12
  201. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.js +0 -85
  202. package/esm/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.d.ts +0 -17
  203. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +0 -13
  204. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +0 -29
  205. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +0 -13
  206. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +0 -29
@@ -13,7 +13,7 @@ var _common = require("./common");
13
13
  const getDrawDocument = async () => {
14
14
  try {
15
15
  const module = await Promise.resolve().then(() => (0, _interopRequireWildcard2.default)(require('rasterizehtml')));
16
- return module.drawDocument;
16
+ return (module.default || module).drawDocument;
17
17
  } catch (error) {
18
18
  throw new Error(`MUI X Charts: Failed to import 'rasterizehtml' module. This dependency is mandatory when exporting a chart as an image. Make sure you have it installed as a dependency.`, {
19
19
  cause: error
@@ -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 => {
@@ -206,7 +214,7 @@ const useChartProZoom = ({
206
214
  const handleDown = event => {
207
215
  panningEventCacheRef.current.push(event);
208
216
  const point = (0, _internals.getSVGPoint)(element, event);
209
- if (!instance.isPointInside(point)) {
217
+ if (!instance.isPointInside(point.x, point.y)) {
210
218
  return;
211
219
  }
212
220
  // If there is only one pointer, prevent selecting text
@@ -252,7 +260,7 @@ const useChartProZoom = ({
252
260
  return;
253
261
  }
254
262
  const point = (0, _internals.getSVGPoint)(element, event);
255
- if (!instance.isPointInside(point)) {
263
+ if (!instance.isPointInside(point.x, point.y)) {
256
264
  return;
257
265
  }
258
266
  event.preventDefault();
@@ -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.3.1",
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.3.1",
37
- "@mui/x-charts-vendor": "8.3.1",
38
- "@mui/x-license": "8.3.1",
39
- "@mui/x-charts": "8.3.1"
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,12 +0,0 @@
1
- import * as React from 'react';
2
- export interface ChartZoomSliderHandleOwnerState {
3
- onResize: (event: PointerEvent) => void;
4
- orientation: 'horizontal' | 'vertical';
5
- placement: 'start' | 'end';
6
- }
7
- export interface ChartZoomSliderHandleProps extends Pick<React.ComponentProps<'rect'>, 'x' | 'y' | 'width' | 'height' | 'rx' | 'ry'>, ChartZoomSliderHandleOwnerState {}
8
- /**
9
- * Renders the zoom slider handle, which is responsible for resizing the zoom range.
10
- * @internal
11
- */
12
- export declare const ChartAxisZoomSliderHandle: React.ForwardRefExoticComponent<ChartZoomSliderHandleProps & React.RefAttributes<SVGRectElement>>;
@@ -1,92 +0,0 @@
1
- "use strict";
2
- 'use client';
3
-
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
- Object.defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- exports.ChartAxisZoomSliderHandle = void 0;
10
- var React = _interopRequireWildcard(require("react"));
11
- var _styles = require("@mui/material/styles");
12
- var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
13
- var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
14
- var _rafThrottle = require("@mui/x-internals/rafThrottle");
15
- var _chartAxisZoomSliderHandleClasses = require("./chartAxisZoomSliderHandleClasses");
16
- var _jsxRuntime = require("react/jsx-runtime");
17
- const Rect = (0, _styles.styled)('rect')(({
18
- theme
19
- }) => ({
20
- [`&.${_chartAxisZoomSliderHandleClasses.chartAxisZoomSliderHandleClasses.root}`]: {
21
- fill: theme.palette.mode === 'dark' ? (theme.vars || theme).palette.grey[300] : (theme.vars || theme).palette.common.white,
22
- stroke: theme.palette.mode === 'dark' ? (theme.vars || theme).palette.grey[600] : (theme.vars || theme).palette.grey[500]
23
- },
24
- [`&.${_chartAxisZoomSliderHandleClasses.chartAxisZoomSliderHandleClasses.horizontal}`]: {
25
- cursor: 'ew-resize'
26
- },
27
- [`&.${_chartAxisZoomSliderHandleClasses.chartAxisZoomSliderHandleClasses.vertical}`]: {
28
- cursor: 'ns-resize'
29
- }
30
- }));
31
- /**
32
- * Renders the zoom slider handle, which is responsible for resizing the zoom range.
33
- * @internal
34
- */
35
- const ChartAxisZoomSliderHandle = exports.ChartAxisZoomSliderHandle = /*#__PURE__*/React.forwardRef(function ChartPreviewHandle({
36
- x,
37
- y,
38
- width,
39
- height,
40
- onResize,
41
- orientation,
42
- placement,
43
- rx = 4,
44
- ry = 4
45
- }, forwardedRef) {
46
- const classes = (0, _chartAxisZoomSliderHandleClasses.useUtilityClasses)({
47
- onResize,
48
- orientation,
49
- placement
50
- });
51
- const handleRef = React.useRef(null);
52
- const ref = (0, _useForkRef.default)(handleRef, forwardedRef);
53
- const onResizeEvent = (0, _useEventCallback.default)(onResize);
54
- React.useEffect(() => {
55
- const handle = handleRef.current;
56
- if (!handle) {
57
- return;
58
- }
59
- const onPointerMove = (0, _rafThrottle.rafThrottle)(event => {
60
- onResizeEvent(event);
61
- });
62
- const onPointerUp = () => {
63
- handle.removeEventListener('pointermove', onPointerMove);
64
- handle.removeEventListener('pointerup', onPointerUp);
65
- };
66
- const onPointerDown = event => {
67
- // Prevent text selection when dragging the handle
68
- event.preventDefault();
69
- event.stopPropagation();
70
- handle.setPointerCapture(event.pointerId);
71
- handle.addEventListener('pointerup', onPointerUp);
72
- handle.addEventListener('pointermove', onPointerMove);
73
- };
74
- handle.addEventListener('pointerdown', onPointerDown);
75
-
76
- // eslint-disable-next-line consistent-return
77
- return () => {
78
- handle.removeEventListener('pointerdown', onPointerDown);
79
- onPointerMove.clear();
80
- };
81
- }, [onResizeEvent, orientation]);
82
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Rect, {
83
- className: classes.root,
84
- ref: ref,
85
- x: x,
86
- y: y,
87
- width: width,
88
- height: height,
89
- rx: rx,
90
- ry: ry
91
- });
92
- });
@@ -1,17 +0,0 @@
1
- import type { ChartZoomSliderHandleOwnerState } from "./ChartAxisZoomSliderHandle.js";
2
- export interface ChartAxisZoomSliderHandleClasses {
3
- /** Styles applied to the root element. */
4
- root: string;
5
- /** Styles applied to the root element when it is horizontal. */
6
- horizontal: string;
7
- /** Styles applied to the root element when it is vertical. */
8
- vertical: string;
9
- /** Styles applied to the root element when it is a start handle. */
10
- start: string;
11
- /** Styles applied to the root element when it is an end handle. */
12
- end: string;
13
- }
14
- export type ChartAxisZoomSliderHandleClassKey = keyof ChartAxisZoomSliderHandleClasses;
15
- export declare const chartAxisZoomSliderHandleClasses: ChartAxisZoomSliderHandleClasses;
16
- export declare function getAxisZoomSliderHandleUtilityClass(slot: string): string;
17
- export declare const useUtilityClasses: (ownerState: ChartZoomSliderHandleOwnerState) => Record<"root", string>;
@@ -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 {};