@mui/x-charts-pro 8.15.0 → 8.17.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 (204) hide show
  1. package/BarChartPro/BarChartPro.js +12 -2
  2. package/BarChartPro/BarChartPro.plugins.d.ts +1 -1
  3. package/BarChartPro/BarChartPro.plugins.js +1 -1
  4. package/CHANGELOG.md +207 -0
  5. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -2
  6. package/ChartDataProviderPro/ChartDataProviderPro.js +1 -3
  7. package/ChartZoomSlider/ChartZoomSlider.d.ts +1 -2
  8. package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -2
  9. package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
  10. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -2
  11. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -1
  12. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -2
  13. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
  14. package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -2
  15. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
  16. package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
  17. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  18. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
  19. package/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -2
  20. package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -4
  21. package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  22. package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
  23. package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -2
  24. package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
  25. package/ChartsToolbarPro/ChartsToolbarPro.d.ts +1 -2
  26. package/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
  27. package/FunnelChart/FunnelChart.js +1 -1
  28. package/FunnelChart/FunnelPlot.d.ts +1 -1
  29. package/FunnelChart/FunnelPlot.js +3 -23
  30. package/FunnelChart/coordinateMapper.d.ts +3 -0
  31. package/FunnelChart/coordinateMapper.js +18 -0
  32. package/FunnelChart/funnel.types.d.ts +1 -1
  33. package/FunnelChart/funnelAxisPlugin/computeAxisValue.js +1 -2
  34. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +7 -7
  35. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +6 -44
  36. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +3 -2
  37. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +5 -6
  38. package/FunnelChart/seriesConfig/index.d.ts +1 -1
  39. package/FunnelChart/seriesConfig/index.js +4 -2
  40. package/FunnelChart/seriesConfig/tooltipPosition.d.ts +3 -0
  41. package/FunnelChart/seriesConfig/tooltipPosition.js +62 -0
  42. package/Heatmap/Heatmap.js +1 -1
  43. package/Heatmap/Heatmap.plugins.d.ts +1 -1
  44. package/Heatmap/Heatmap.plugins.js +1 -1
  45. package/Heatmap/HeatmapItem.d.ts +1 -1
  46. package/Heatmap/HeatmapPlot.d.ts +1 -2
  47. package/Heatmap/HeatmapPlot.js +0 -2
  48. package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -2
  49. package/Heatmap/HeatmapTooltip/HeatmapTooltip.js +9 -2
  50. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -2
  51. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +0 -2
  52. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +3 -2
  53. package/Heatmap/seriesConfig/index.d.ts +1 -1
  54. package/Heatmap/seriesConfig/index.js +4 -2
  55. package/Heatmap/seriesConfig/tooltipPosition.d.ts +3 -0
  56. package/Heatmap/seriesConfig/tooltipPosition.js +57 -0
  57. package/LineChartPro/LineChartPro.js +11 -2
  58. package/LineChartPro/LineChartPro.plugins.d.ts +1 -1
  59. package/LineChartPro/LineChartPro.plugins.js +1 -1
  60. package/RadarChartPro/RadarChartPro.plugins.d.ts +1 -1
  61. package/RadarChartPro/RadarChartPro.plugins.js +1 -1
  62. package/SankeyChart/SankeyChart.js +1 -1
  63. package/SankeyChart/SankeyLinkElement.js +2 -2
  64. package/SankeyChart/SankeyNodeElement.js +2 -2
  65. package/SankeyChart/SankeyPlot.d.ts +1 -1
  66. package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -2
  67. package/SankeyChart/SankeyTooltip/SankeyTooltip.js +9 -2
  68. package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -2
  69. package/SankeyChart/SankeyTooltip/SankeyTooltipContent.js +0 -2
  70. package/SankeyChart/plugins/useSankeyHighlight.js +8 -12
  71. package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +19 -23
  72. package/SankeyChart/plugins/useSankeyHighlight.selectors.js +3 -3
  73. package/SankeyChart/seriesConfig/index.d.ts +1 -1
  74. package/SankeyChart/seriesConfig/index.js +2 -2
  75. package/ScatterChartPro/ScatterChartPro.js +11 -2
  76. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +1 -1
  77. package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
  78. package/esm/BarChartPro/BarChartPro.js +12 -2
  79. package/esm/BarChartPro/BarChartPro.plugins.d.ts +1 -1
  80. package/esm/BarChartPro/BarChartPro.plugins.js +1 -1
  81. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -2
  82. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -2
  83. package/esm/ChartZoomSlider/ChartZoomSlider.d.ts +1 -2
  84. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -2
  85. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
  86. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -2
  87. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -1
  88. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -2
  89. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
  90. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -2
  91. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
  92. package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
  93. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  94. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
  95. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -2
  96. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -3
  97. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  98. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
  99. package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -2
  100. package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
  101. package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +1 -2
  102. package/esm/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
  103. package/esm/FunnelChart/FunnelChart.js +1 -1
  104. package/esm/FunnelChart/FunnelPlot.d.ts +1 -1
  105. package/esm/FunnelChart/FunnelPlot.js +4 -24
  106. package/esm/FunnelChart/coordinateMapper.d.ts +3 -0
  107. package/esm/FunnelChart/coordinateMapper.js +11 -0
  108. package/esm/FunnelChart/funnel.types.d.ts +1 -1
  109. package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.js +1 -2
  110. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +7 -7
  111. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +6 -44
  112. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +3 -2
  113. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +5 -6
  114. package/esm/FunnelChart/seriesConfig/index.d.ts +1 -1
  115. package/esm/FunnelChart/seriesConfig/index.js +3 -1
  116. package/esm/FunnelChart/seriesConfig/tooltipPosition.d.ts +3 -0
  117. package/esm/FunnelChart/seriesConfig/tooltipPosition.js +56 -0
  118. package/esm/Heatmap/Heatmap.js +1 -1
  119. package/esm/Heatmap/Heatmap.plugins.d.ts +1 -1
  120. package/esm/Heatmap/Heatmap.plugins.js +1 -1
  121. package/esm/Heatmap/HeatmapItem.d.ts +1 -1
  122. package/esm/Heatmap/HeatmapPlot.d.ts +1 -2
  123. package/esm/Heatmap/HeatmapPlot.js +0 -1
  124. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -2
  125. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.js +9 -1
  126. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -2
  127. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +0 -1
  128. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +3 -2
  129. package/esm/Heatmap/seriesConfig/index.d.ts +1 -1
  130. package/esm/Heatmap/seriesConfig/index.js +3 -1
  131. package/esm/Heatmap/seriesConfig/tooltipPosition.d.ts +3 -0
  132. package/esm/Heatmap/seriesConfig/tooltipPosition.js +51 -0
  133. package/esm/LineChartPro/LineChartPro.js +11 -2
  134. package/esm/LineChartPro/LineChartPro.plugins.d.ts +1 -1
  135. package/esm/LineChartPro/LineChartPro.plugins.js +1 -1
  136. package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +1 -1
  137. package/esm/RadarChartPro/RadarChartPro.plugins.js +1 -1
  138. package/esm/SankeyChart/SankeyChart.js +1 -1
  139. package/esm/SankeyChart/SankeyLinkElement.js +2 -2
  140. package/esm/SankeyChart/SankeyNodeElement.js +2 -2
  141. package/esm/SankeyChart/SankeyPlot.d.ts +1 -1
  142. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -2
  143. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.js +9 -1
  144. package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -2
  145. package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.js +0 -1
  146. package/esm/SankeyChart/plugins/useSankeyHighlight.js +8 -12
  147. package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +19 -23
  148. package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.js +3 -3
  149. package/esm/SankeyChart/seriesConfig/index.d.ts +1 -1
  150. package/esm/SankeyChart/seriesConfig/index.js +1 -1
  151. package/esm/ScatterChartPro/ScatterChartPro.js +11 -2
  152. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +1 -1
  153. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
  154. package/esm/index.js +1 -1
  155. package/esm/internals/material/components/BaseMenuItem.d.ts +1 -2
  156. package/esm/internals/material/components/BaseMenuItem.js +0 -1
  157. package/esm/internals/material/components/BasePopper.d.ts +1 -2
  158. package/esm/internals/plugins/allPlugins.d.ts +5 -5
  159. package/esm/internals/plugins/allPlugins.js +3 -3
  160. package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +19 -4
  161. package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.js +4 -3
  162. package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +11 -3
  163. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +23 -15
  164. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +27 -15
  165. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +2 -2
  166. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.js +2 -2
  167. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +8 -0
  168. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +100 -0
  169. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +8 -0
  170. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +57 -0
  171. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +2 -2
  172. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +2 -2
  173. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +2 -2
  174. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +34 -54
  175. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +11 -27
  176. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -1
  177. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
  178. package/esm/models/seriesType/heatmap.d.ts +1 -1
  179. package/index.js +1 -1
  180. package/internals/material/components/BaseMenuItem.d.ts +1 -2
  181. package/internals/material/components/BaseMenuItem.js +0 -2
  182. package/internals/material/components/BasePopper.d.ts +1 -2
  183. package/internals/plugins/allPlugins.d.ts +5 -5
  184. package/internals/plugins/allPlugins.js +2 -2
  185. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +19 -4
  186. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.js +4 -3
  187. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +11 -3
  188. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +23 -15
  189. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +27 -15
  190. package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +2 -2
  191. package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.js +2 -2
  192. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +8 -0
  193. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +107 -0
  194. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +8 -0
  195. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +64 -0
  196. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +2 -2
  197. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +2 -2
  198. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +2 -2
  199. package/internals/plugins/useChartProZoom/useChartProZoom.js +34 -54
  200. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +11 -27
  201. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -1
  202. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
  203. package/models/seriesType/heatmap.d.ts +1 -1
  204. package/package.json +4 -4
@@ -19,6 +19,8 @@ var _useZoomOnPinch = require("./gestureHooks/useZoomOnPinch");
19
19
  var _usePanOnDrag = require("./gestureHooks/usePanOnDrag");
20
20
  var _useZoomOnTapAndDrag = require("./gestureHooks/useZoomOnTapAndDrag");
21
21
  var _usePanOnPressAndDrag = require("./gestureHooks/usePanOnPressAndDrag");
22
+ var _useZoomOnBrush = require("./gestureHooks/useZoomOnBrush");
23
+ var _useZoomOnDoubleTapReset = require("./gestureHooks/useZoomOnDoubleTapReset");
22
24
  var _initializeZoomInteractionConfig = require("./initializeZoomInteractionConfig");
23
25
  var _initializeZoomData = require("./initializeZoomData");
24
26
  const useChartProZoom = pluginData => {
@@ -34,68 +36,44 @@ const useChartProZoom = pluginData => {
34
36
  const onZoomChange = (0, _utils.useEventCallback)(onZoomChangeProp ?? (() => {}));
35
37
  const optionsLookup = (0, _internals.useSelector)(store, _internals.selectorChartZoomOptionsLookup);
36
38
  (0, _useEffectAfterFirstRender.useEffectAfterFirstRender)(() => {
37
- store.update(prevState => {
38
- return (0, _extends2.default)({}, prevState, {
39
- zoom: (0, _extends2.default)({}, prevState.zoom, {
40
- zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(zoomInteractionConfig)
41
- })
42
- });
43
- });
39
+ store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
40
+ zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(zoomInteractionConfig)
41
+ }));
44
42
  }, [store, zoomInteractionConfig]);
45
43
 
44
+ // This is debounced. We want to run it only once after the interaction ends.
45
+ const removeIsInteracting = React.useMemo(() => (0, _debounce.default)(() => store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
46
+ isInteracting: false
47
+ })), 166), [store]);
48
+
46
49
  // Manage controlled state
47
50
  React.useEffect(() => {
48
51
  if (paramsZoomData === undefined) {
49
- return undefined;
52
+ return;
50
53
  }
51
- store.update(prevState => {
52
- if (process.env.NODE_ENV !== 'production' && !prevState.zoom.isControlled) {
53
- console.error([`MUI X Charts: A chart component is changing the \`zoomData\` from uncontrolled to controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', 'Decide between using a controlled or uncontrolled for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
54
- }
55
- return (0, _extends2.default)({}, prevState, {
56
- zoom: (0, _extends2.default)({}, prevState.zoom, {
57
- isInteracting: true,
58
- zoomData: paramsZoomData
59
- })
60
- });
61
- });
62
- const timeout = setTimeout(() => {
63
- store.update(prevState => {
64
- return (0, _extends2.default)({}, prevState, {
65
- zoom: (0, _extends2.default)({}, prevState.zoom, {
66
- isInteracting: false
67
- })
68
- });
69
- });
70
- }, 166);
71
- return () => {
72
- clearTimeout(timeout);
73
- };
74
- }, [store, paramsZoomData]);
75
-
76
- // This is debounced. We want to run it only once after the interaction ends.
77
- const removeIsInteracting = React.useMemo(() => (0, _debounce.default)(() => store.update(prevState => {
78
- return (0, _extends2.default)({}, prevState, {
79
- zoom: (0, _extends2.default)({}, prevState.zoom, {
80
- isInteracting: false
81
- })
82
- });
83
- }), 166), [store]);
54
+ if (process.env.NODE_ENV !== 'production' && !store.state.zoom.isControlled) {
55
+ console.error([`MUI X Charts: A chart component is changing the \`zoomData\` from uncontrolled to controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', 'Decide between using a controlled or uncontrolled for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
56
+ }
57
+ store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
58
+ isInteracting: true,
59
+ zoomData: paramsZoomData
60
+ }));
61
+ removeIsInteracting();
62
+ }, [store, paramsZoomData, removeIsInteracting]);
84
63
  const setZoomDataCallback = React.useCallback(zoomData => {
85
- store.update(prevState => {
86
- const newZoomData = typeof zoomData === 'function' ? zoomData([...prevState.zoom.zoomData]) : zoomData;
87
- onZoomChange?.(newZoomData);
88
- if (prevState.zoom.isControlled) {
89
- return prevState;
90
- }
64
+ const newZoomData = typeof zoomData === 'function' ? zoomData([...store.state.zoom.zoomData]) : zoomData;
65
+ onZoomChange(newZoomData);
66
+ if (store.state.zoom.isControlled) {
67
+ store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
68
+ isInteracting: true
69
+ }));
70
+ } else {
71
+ store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
72
+ isInteracting: true,
73
+ zoomData: newZoomData
74
+ }));
91
75
  removeIsInteracting();
92
- return (0, _extends2.default)({}, prevState, {
93
- zoom: (0, _extends2.default)({}, prevState.zoom, {
94
- isInteracting: true,
95
- zoomData: newZoomData
96
- })
97
- });
98
- });
76
+ }
99
77
  }, [onZoomChange, store, removeIsInteracting]);
100
78
  const setAxisZoomData = React.useCallback((axisId, zoomData) => {
101
79
  setZoomDataCallback(prev => prev.map(prevZoom => {
@@ -145,6 +123,8 @@ const useChartProZoom = pluginData => {
145
123
  (0, _useZoomOnWheel.useZoomOnWheel)(pluginData, setZoomDataCallback);
146
124
  (0, _useZoomOnPinch.useZoomOnPinch)(pluginData, setZoomDataCallback);
147
125
  (0, _useZoomOnTapAndDrag.useZoomOnTapAndDrag)(pluginData, setZoomDataCallback);
126
+ (0, _useZoomOnBrush.useZoomOnBrush)(pluginData, setZoomDataCallback);
127
+ (0, _useZoomOnDoubleTapReset.useZoomOnDoubleTapReset)(pluginData, setZoomDataCallback);
148
128
  const zoom = React.useCallback(step => {
149
129
  setZoomDataCallback(prev => prev.map(zoomData => {
150
130
  const zoomOptions = (0, _internals.selectorChartAxisZoomOptionsLookup)(store.getSnapshot(), zoomData.axisId);
@@ -1,34 +1,18 @@
1
1
  import { AxisId, ChartRootSelector } from '@mui/x-charts/internals';
2
2
  import { UseChartProZoomSignature } from "./useChartProZoom.types.js";
3
- export declare const selectorChartZoomState: ChartRootSelector<UseChartProZoomSignature>;
4
- export declare const selectorChartZoomIsInteracting: import("reselect").Selector<import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
3
+ export declare const selectorChartZoomState: ChartRootSelector<UseChartProZoomSignature, 'zoom'>;
4
+ export declare const selectorChartZoomIsInteracting: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
5
5
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
6
- } & {
6
+ }) => boolean;
7
+ export declare const selectorChartZoomIsEnabled: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
7
8
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
8
- }, boolean, any[]>;
9
- export declare const selectorChartZoomIsEnabled: import("reselect").Selector<import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
9
+ }) => boolean;
10
+ export declare const selectorChartAxisZoomData: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
10
11
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
11
- } & {
12
+ }, axisId: AxisId) => import("@mui/x-charts/internals").ZoomData | undefined;
13
+ export declare const selectorChartCanZoomOut: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
12
14
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
13
- } & {
15
+ }) => boolean;
16
+ export declare const selectorChartCanZoomIn: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
14
17
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
15
- }, boolean, []>;
16
- export declare const selectorChartAxisZoomData: import("reselect").Selector<any, import("@mui/x-charts/internals").ZoomData | undefined, [axisId: AxisId]>;
17
- export declare const selectorChartCanZoomOut: import("reselect").Selector<import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
18
- cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
19
- } & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
20
- cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
21
- } & {
22
- cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
23
- } & {
24
- cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
25
- }, boolean, any[]>;
26
- export declare const selectorChartCanZoomIn: import("reselect").Selector<import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & 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("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
27
- cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
28
- } & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
29
- cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
30
- } & {
31
- cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
32
- } & {
33
- cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
34
- }, boolean, any[]>;
18
+ }) => boolean;
@@ -9,7 +9,7 @@ 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], (zoomMap, axisId) => zoomMap?.get(axisId));
13
13
  const selectorChartCanZoomOut = exports.selectorChartCanZoomOut = (0, _internals.createSelector)([selectorChartZoomState, _internals.selectorChartZoomOptionsLookup], (zoomState, zoomOptions) => {
14
14
  return zoomState.zoomData.every(zoomData => {
15
15
  const span = zoomData.end - zoomData.start;
@@ -1,4 +1,4 @@
1
- import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature, UseChartCartesianAxisDefaultizedParameters, ZoomData, AxisId } from '@mui/x-charts/internals';
1
+ import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature, UseChartCartesianAxisDefaultizedParameters, ZoomData, AxisId, type UseChartBrushSignature } from '@mui/x-charts/internals';
2
2
  import { ZoomInteractionConfig, DefaultizedZoomInteractionConfig } from "./ZoomInteractionConfig.types.js";
3
3
  export interface UseChartProZoomParameters {
4
4
  /**
@@ -80,5 +80,5 @@ export type UseChartProZoomSignature = ChartPluginSignature<{
80
80
  state: UseChartProZoomState;
81
81
  publicAPI: UseChartProZoomPublicApi;
82
82
  instance: UseChartProZoomInstance;
83
- dependencies: [UseChartSeriesSignature, UseChartCartesianAxisSignature];
83
+ dependencies: [UseChartSeriesSignature, UseChartCartesianAxisSignature, UseChartBrushSignature];
84
84
  }>;
@@ -1,7 +1,7 @@
1
1
  import { DefaultizedProps } from '@mui/x-internals/types';
2
2
  import { CommonDefaultizedProps, CommonSeriesType, CartesianSeriesType } from '@mui/x-charts/internals';
3
3
  export type HeatmapValueType = readonly [number, number, number];
4
- export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType>, 'color'>, CartesianSeriesType {
4
+ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType>, 'color' | 'colorGetter'>, CartesianSeriesType {
5
5
  type: 'heatmap';
6
6
  /**
7
7
  * Data associated to each bar.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-pro",
3
- "version": "8.15.0",
3
+ "version": "8.17.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Pro plan edition of the MUI X Charts components.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -31,11 +31,11 @@
31
31
  "@mui/utils": "^7.3.3",
32
32
  "clsx": "^2.1.1",
33
33
  "prop-types": "^15.8.1",
34
+ "@mui/x-charts": "8.17.0",
34
35
  "@mui/x-charts-vendor": "8.15.0",
35
- "@mui/x-charts": "8.15.0",
36
36
  "@mui/x-internal-gestures": "0.3.4",
37
- "@mui/x-internals": "8.14.0",
38
- "@mui/x-license": "8.15.0"
37
+ "@mui/x-license": "8.17.0",
38
+ "@mui/x-internals": "8.17.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@emotion/react": "^11.9.0",