@mui/x-charts-pro 8.27.2 → 9.0.0-alpha.1

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 (222) hide show
  1. package/BarChartPro/BarChartPro.d.ts +1 -1
  2. package/BarChartPro/BarChartPro.js +30 -8
  3. package/CHANGELOG.md +279 -34
  4. package/ChartContainerPro/ChartContainerPro.d.ts +17 -31
  5. package/ChartContainerPro/ChartContainerPro.js +14 -287
  6. package/ChartContainerPro/useChartContainerProProps.d.ts +10 -7
  7. package/ChartContainerPro/useChartContainerProProps.js +10 -35
  8. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
  9. package/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
  10. package/ChartDataProviderPro/index.d.ts +1 -1
  11. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
  12. package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +8 -6
  13. package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +6 -4
  14. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  15. package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
  16. package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
  17. package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  18. package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
  19. package/ChartsContainer/index.d.ts +1 -0
  20. package/ChartsContainer/index.js +16 -0
  21. package/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
  22. package/ChartsContainerPro/ChartsContainerPro.js +188 -0
  23. package/ChartsContainerPro/index.d.ts +9 -0
  24. package/ChartsContainerPro/index.js +17 -0
  25. package/ChartsContainerPro/useChartsContainerProProps.d.ts +8 -0
  26. package/ChartsContainerPro/useChartsContainerProProps.js +44 -0
  27. package/FunnelChart/FunnelChart.d.ts +1 -1
  28. package/FunnelChart/FunnelChart.js +9 -8
  29. package/FunnelChart/FunnelSection.d.ts +1 -1
  30. package/FunnelChart/funnel.types.d.ts +1 -1
  31. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +12 -9
  32. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
  33. package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
  34. package/FunnelChart/funnelSlots.types.d.ts +3 -9
  35. package/FunnelChart/index.d.ts +2 -1
  36. package/FunnelChart/index.js +12 -0
  37. package/FunnelChart/seriesConfig/index.js +2 -1
  38. package/FunnelChart/seriesConfig/keyboardFocusHandler.js +1 -14
  39. package/FunnelChart/seriesConfig/legend.js +0 -1
  40. package/Heatmap/Heatmap.d.ts +6 -3
  41. package/Heatmap/Heatmap.js +46 -135
  42. package/Heatmap/Heatmap.types.d.ts +19 -0
  43. package/Heatmap/Heatmap.types.js +5 -0
  44. package/Heatmap/HeatmapItem.d.ts +6 -0
  45. package/Heatmap/HeatmapItem.js +11 -3
  46. package/Heatmap/HeatmapPlot.d.ts +7 -3
  47. package/Heatmap/HeatmapPlot.js +16 -54
  48. package/Heatmap/HeatmapSVGPlot.d.ts +2 -0
  49. package/Heatmap/HeatmapSVGPlot.js +70 -0
  50. package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +18 -2
  51. package/Heatmap/HeatmapTooltip/index.d.ts +1 -1
  52. package/Heatmap/index.d.ts +3 -2
  53. package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  54. package/Heatmap/seriesConfig/getItemAtPosition.js +6 -2
  55. package/Heatmap/seriesConfig/index.js +1 -0
  56. package/Heatmap/useHeatmapProps.d.ts +24 -0
  57. package/Heatmap/useHeatmapProps.js +159 -0
  58. package/LineChartPro/LineChartPro.d.ts +1 -1
  59. package/LineChartPro/LineChartPro.js +30 -8
  60. package/PieChartPro/PieChartPro.d.ts +1 -1
  61. package/PieChartPro/PieChartPro.js +9 -8
  62. package/RadarChartPro/RadarChartPro.d.ts +1 -1
  63. package/RadarChartPro/RadarChartPro.js +8 -8
  64. package/SankeyChart/SankeyChart.d.ts +1 -1
  65. package/SankeyChart/SankeyChart.js +9 -23
  66. package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
  67. package/SankeyChart/SankeyTooltip/index.d.ts +1 -1
  68. package/SankeyChart/index.d.ts +1 -1
  69. package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
  70. package/SankeyChart/sankey.highlight.types.d.ts +4 -0
  71. package/SankeyChart/sankey.types.d.ts +6 -3
  72. package/SankeyChart/sankeySlots.types.d.ts +3 -9
  73. package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
  74. package/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
  75. package/SankeyChart/seriesConfig/identifierCleaner.js +24 -0
  76. package/SankeyChart/seriesConfig/index.js +3 -1
  77. package/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  78. package/ScatterChartPro/ScatterChartPro.js +30 -8
  79. package/esm/BarChartPro/BarChartPro.d.ts +1 -1
  80. package/esm/BarChartPro/BarChartPro.js +30 -8
  81. package/esm/ChartContainerPro/ChartContainerPro.d.ts +17 -31
  82. package/esm/ChartContainerPro/ChartContainerPro.js +15 -286
  83. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +10 -7
  84. package/esm/ChartContainerPro/useChartContainerProProps.js +11 -34
  85. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
  86. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
  87. package/esm/ChartDataProviderPro/index.d.ts +1 -1
  88. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
  89. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +9 -7
  90. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +7 -5
  91. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
  92. package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
  93. package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
  94. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
  95. package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
  96. package/esm/ChartsContainer/index.d.ts +1 -0
  97. package/esm/ChartsContainer/index.js +2 -0
  98. package/esm/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
  99. package/esm/ChartsContainerPro/ChartsContainerPro.js +182 -0
  100. package/esm/ChartsContainerPro/index.d.ts +9 -0
  101. package/esm/ChartsContainerPro/index.js +6 -0
  102. package/esm/ChartsContainerPro/useChartsContainerProProps.d.ts +8 -0
  103. package/esm/ChartsContainerPro/useChartsContainerProProps.js +37 -0
  104. package/esm/FunnelChart/FunnelChart.d.ts +1 -1
  105. package/esm/FunnelChart/FunnelChart.js +9 -8
  106. package/esm/FunnelChart/FunnelSection.d.ts +1 -1
  107. package/esm/FunnelChart/funnel.types.d.ts +1 -1
  108. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +13 -10
  109. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
  110. package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
  111. package/esm/FunnelChart/funnelSlots.types.d.ts +3 -9
  112. package/esm/FunnelChart/index.d.ts +2 -1
  113. package/esm/FunnelChart/index.js +1 -0
  114. package/esm/FunnelChart/seriesConfig/index.js +3 -2
  115. package/esm/FunnelChart/seriesConfig/keyboardFocusHandler.js +2 -15
  116. package/esm/FunnelChart/seriesConfig/legend.js +0 -1
  117. package/esm/Heatmap/Heatmap.d.ts +6 -3
  118. package/esm/Heatmap/Heatmap.js +47 -136
  119. package/esm/Heatmap/Heatmap.types.d.ts +19 -0
  120. package/esm/Heatmap/Heatmap.types.js +1 -0
  121. package/esm/Heatmap/HeatmapItem.d.ts +6 -0
  122. package/esm/Heatmap/HeatmapItem.js +11 -3
  123. package/esm/Heatmap/HeatmapPlot.d.ts +7 -3
  124. package/esm/Heatmap/HeatmapPlot.js +17 -56
  125. package/esm/Heatmap/HeatmapSVGPlot.d.ts +2 -0
  126. package/esm/Heatmap/HeatmapSVGPlot.js +64 -0
  127. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +18 -2
  128. package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -1
  129. package/esm/Heatmap/index.d.ts +3 -2
  130. package/esm/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  131. package/esm/Heatmap/seriesConfig/getItemAtPosition.js +6 -2
  132. package/esm/Heatmap/seriesConfig/index.js +2 -1
  133. package/esm/Heatmap/useHeatmapProps.d.ts +24 -0
  134. package/esm/Heatmap/useHeatmapProps.js +151 -0
  135. package/esm/LineChartPro/LineChartPro.d.ts +1 -1
  136. package/esm/LineChartPro/LineChartPro.js +30 -8
  137. package/esm/PieChartPro/PieChartPro.d.ts +1 -1
  138. package/esm/PieChartPro/PieChartPro.js +9 -8
  139. package/esm/RadarChartPro/RadarChartPro.d.ts +1 -1
  140. package/esm/RadarChartPro/RadarChartPro.js +8 -8
  141. package/esm/SankeyChart/SankeyChart.d.ts +1 -1
  142. package/esm/SankeyChart/SankeyChart.js +9 -23
  143. package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
  144. package/esm/SankeyChart/SankeyTooltip/index.d.ts +1 -1
  145. package/esm/SankeyChart/index.d.ts +1 -1
  146. package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
  147. package/esm/SankeyChart/sankey.highlight.types.d.ts +4 -0
  148. package/esm/SankeyChart/sankey.types.d.ts +6 -3
  149. package/esm/SankeyChart/sankeySlots.types.d.ts +3 -9
  150. package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
  151. package/esm/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
  152. package/esm/SankeyChart/seriesConfig/identifierCleaner.js +18 -0
  153. package/esm/SankeyChart/seriesConfig/index.js +3 -1
  154. package/esm/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  155. package/esm/ScatterChartPro/ScatterChartPro.js +30 -8
  156. package/esm/index.d.ts +3 -1
  157. package/esm/index.js +2 -1
  158. package/esm/internals/index.d.ts +7 -1
  159. package/esm/internals/index.js +5 -1
  160. package/esm/internals/plugins/useChartProExport/common.d.ts +5 -1
  161. package/esm/internals/plugins/useChartProExport/common.js +36 -0
  162. package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  163. package/esm/internals/plugins/useChartProExport/exportImage.js +2 -1
  164. package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
  165. package/esm/internals/plugins/useChartProExport/print.js +2 -1
  166. package/esm/internals/plugins/useChartProExport/useChartProExport.js +4 -2
  167. package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
  168. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
  169. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
  170. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
  171. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
  172. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
  173. package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +6 -4
  174. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
  175. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +7 -5
  176. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
  177. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
  178. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
  179. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +6 -4
  180. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
  181. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +6 -4
  182. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
  183. package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +6 -4
  184. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
  185. package/esm/models/seriesType/heatmap.d.ts +3 -3
  186. package/esm/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
  187. package/esm/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
  188. package/esm/typeOverloads/modules.d.ts +9 -5
  189. package/index.d.ts +3 -1
  190. package/index.js +9 -1
  191. package/internals/index.d.ts +7 -1
  192. package/internals/index.js +43 -1
  193. package/internals/plugins/useChartProExport/common.d.ts +5 -1
  194. package/internals/plugins/useChartProExport/common.js +37 -0
  195. package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
  196. package/internals/plugins/useChartProExport/exportImage.js +1 -0
  197. package/internals/plugins/useChartProExport/print.d.ts +1 -1
  198. package/internals/plugins/useChartProExport/print.js +1 -0
  199. package/internals/plugins/useChartProExport/useChartProExport.js +4 -2
  200. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
  201. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
  202. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
  203. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
  204. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
  205. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
  206. package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +5 -3
  207. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
  208. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +6 -4
  209. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
  210. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
  211. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
  212. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +5 -3
  213. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
  214. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +5 -3
  215. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
  216. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +5 -3
  217. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
  218. package/models/seriesType/heatmap.d.ts +3 -3
  219. package/package.json +19 -11
  220. package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
  221. package/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
  222. package/typeOverloads/modules.d.ts +9 -5
@@ -1,15 +1,17 @@
1
1
  'use client';
2
2
 
3
3
  import * as React from 'react';
4
- import { getSVGPoint, selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
4
+ import { getChartPoint, selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
5
5
  import { rafThrottle } from '@mui/x-internals/rafThrottle';
6
6
  import { getHorizontalCenterRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, zoomAtPoint } from "./useZoom.utils.js";
7
7
  import { selectorZoomInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
8
8
  export const useZoomOnWheel = ({
9
9
  store,
10
- instance,
11
- svgRef
10
+ instance
12
11
  }, setZoomDataCallback) => {
12
+ const {
13
+ svgRef
14
+ } = instance;
13
15
  const drawingArea = store.use(selectorChartDrawingArea);
14
16
  const optionsLookup = store.use(selectorChartZoomOptionsLookup);
15
17
  const startedOutsideRef = React.useRef(false);
@@ -33,7 +35,7 @@ export const useZoomOnWheel = ({
33
35
  }
34
36
  const rafThrottledSetZoomData = rafThrottle(setZoomDataCallback);
35
37
  const zoomOnWheelHandler = instance.addInteractionListener('zoomTurnWheel', event => {
36
- const point = getSVGPoint(element, {
38
+ const point = getChartPoint(element, {
37
39
  clientX: event.detail.centroid.x,
38
40
  clientY: event.detail.centroid.y
39
41
  });
@@ -1,18 +1,18 @@
1
1
  import { type AxisId, type ChartRootSelector } from '@mui/x-charts/internals';
2
2
  import { type UseChartProZoomSignature } from "./useChartProZoom.types.js";
3
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<{}> & {
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/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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
+ export declare const selectorChartZoomIsEnabled: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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> & {
8
8
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
9
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
+ export declare const selectorChartAxisZoomData: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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> & {
11
11
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
12
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<{}> & {
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/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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
14
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
15
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<{}> & {
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/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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<{}> & {
17
17
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
18
18
  }) => boolean;
@@ -1,7 +1,7 @@
1
1
  import { type DefaultizedProps } from '@mui/x-internals/types';
2
2
  import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType } from '@mui/x-charts/internals';
3
3
  export type HeatmapValueType = readonly [number, number, number];
4
- export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType>, 'color' | 'colorGetter'>, CartesianSeriesType {
4
+ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter'>, CartesianSeriesType {
5
5
  type: 'heatmap';
6
6
  /**
7
7
  * Data associated to each bar.
@@ -34,10 +34,10 @@ export type HeatmapItemIdentifier = {
34
34
  /**
35
35
  * The x index of the cell. Useful to identify the cell position in the heatmap even if there is no data.
36
36
  */
37
- xIndex?: number;
37
+ xIndex: number;
38
38
  /**
39
39
  * The y index of the cell. Useful to identify the cell position in the heatmap even if there is no data.
40
40
  */
41
- yIndex?: number;
41
+ yIndex: number;
42
42
  };
43
43
  export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {}
@@ -1,4 +1,4 @@
1
1
  import { type HeatmapItemIdentifier } from "../../models/index.js";
2
- export declare const selectorHeatmapItemAtPosition: (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<{}> & {
2
+ export declare const selectorHeatmapItemAtPosition: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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<{}> & {
3
3
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
4
4
  }, svgPoint: Pick<DOMPoint, "x" | "y">) => HeatmapItemIdentifier | undefined;
@@ -31,7 +31,9 @@ export const selectorHeatmapItemAtPosition = createSelector(selectorChartXAxis,
31
31
  return {
32
32
  type: 'heatmap',
33
33
  seriesId,
34
- dataIndex
34
+ dataIndex,
35
+ xIndex,
36
+ yIndex
35
37
  };
36
38
  }
37
39
  }
@@ -1,8 +1,9 @@
1
- import { type DefaultizedProps, type MakeRequired } from '@mui/x-internals/types';
2
- import { type AxisId, type ZoomOptions } from '@mui/x-charts/internals';
3
- import { type DefaultizedFunnelSeriesType, type FunnelItemIdentifier, type FunnelSeriesType, type FunnelValueType } from "../FunnelChart/funnel.types.js";
4
- import { type HeatmapItemIdentifier, type HeatmapSeriesType, type DefaultizedHeatmapSeriesType, type HeatmapValueType } from "../models/seriesType/heatmap.js";
5
- import { type SankeyLayout, type SankeySeriesType, type DefaultizedSankeySeriesType, type SankeyItemIdentifier, type SankeyItemIdentifierWithData } from "../SankeyChart/sankey.types.js";
1
+ import type { DefaultizedProps, MakeRequired } from '@mui/x-internals/types';
2
+ import type { AxisId, CommonHighlightScope, ZoomOptions } from '@mui/x-charts/internals';
3
+ import type { DefaultizedFunnelSeriesType, FunnelItemIdentifier, FunnelSeriesType, FunnelValueType } from "../FunnelChart/funnel.types.js";
4
+ import type { HeatmapItemIdentifier, HeatmapSeriesType, DefaultizedHeatmapSeriesType, HeatmapValueType } from "../models/seriesType/heatmap.js";
5
+ import type { SankeyLayout, SankeySeriesType, DefaultizedSankeySeriesType, SankeyItemIdentifier, SankeyItemIdentifierWithData } from "../SankeyChart/sankey.types.js";
6
+ import type { SankeyHighlightScope } from "../SankeyChart/sankey.highlight.types.js";
6
7
  declare module '@mui/x-charts/internals' {
7
8
  interface ChartsSeriesConfig {
8
9
  heatmap: {
@@ -14,6 +15,7 @@ declare module '@mui/x-charts/internals' {
14
15
  itemIdentifierWithData: HeatmapItemIdentifier;
15
16
  valueType: HeatmapValueType;
16
17
  axisType: 'cartesian';
18
+ highlightScope: CommonHighlightScope;
17
19
  };
18
20
  funnel: {
19
21
  seriesInput: Omit<DefaultizedProps<FunnelSeriesType, 'id'>, 'data'> & {
@@ -26,6 +28,7 @@ declare module '@mui/x-charts/internals' {
26
28
  itemIdentifierWithData: FunnelItemIdentifier;
27
29
  valueType: MakeRequired<FunnelValueType, 'id' | 'color'>;
28
30
  axisType: 'cartesian';
31
+ highlightScope: CommonHighlightScope;
29
32
  };
30
33
  sankey: {
31
34
  seriesInput: DefaultizedSankeySeriesType;
@@ -37,6 +40,7 @@ declare module '@mui/x-charts/internals' {
37
40
  itemIdentifier: SankeyItemIdentifier;
38
41
  itemIdentifierWithData: SankeyItemIdentifierWithData<true>;
39
42
  valueType: number;
43
+ highlightScope: SankeyHighlightScope;
40
44
  };
41
45
  }
42
46
  interface DefaultizedZoomOptions extends Required<ZoomOptions> {
package/index.d.ts CHANGED
@@ -29,8 +29,10 @@ export * from "./models/index.js";
29
29
  export * from "./plugins/index.js";
30
30
  export * from "./colorPalettes/index.js";
31
31
  export * from "./Heatmap/index.js";
32
+ export { ChartsContainerPro } from "./ChartsContainerPro/index.js";
33
+ export type { ChartsContainerProProps, ChartsContainerProSlots, ChartsContainerProSlotProps } from "./ChartsContainerPro/index.js";
32
34
  export { ChartContainerPro } from "./ChartContainerPro/index.js";
33
- export type { ChartContainerProProps } from "./ChartContainerPro/index.js";
35
+ export type { ChartContainerProProps, ChartContainerProSlots, ChartContainerProSlotProps } from "./ChartContainerPro/index.js";
34
36
  export * from "./ChartDataProviderPro/index.js";
35
37
  export * from "./ScatterChartPro/index.js";
36
38
  export * from "./SankeyChart/index.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.27.2
2
+ * @mui/x-charts-pro v9.0.0-alpha.1
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "__esModule", {
11
11
  value: true
12
12
  });
13
13
  var _exportNames = {
14
+ ChartsContainerPro: true,
14
15
  ChartContainerPro: true
15
16
  };
16
17
  Object.defineProperty(exports, "ChartContainerPro", {
@@ -19,6 +20,12 @@ Object.defineProperty(exports, "ChartContainerPro", {
19
20
  return _ChartContainerPro.ChartContainerPro;
20
21
  }
21
22
  });
23
+ Object.defineProperty(exports, "ChartsContainerPro", {
24
+ enumerable: true,
25
+ get: function () {
26
+ return _ChartsContainerPro.ChartsContainerPro;
27
+ }
28
+ });
22
29
  require("./typeOverloads/modules");
23
30
  var _ChartsClipPath = require("@mui/x-charts/ChartsClipPath");
24
31
  Object.keys(_ChartsClipPath).forEach(function (key) {
@@ -380,6 +387,7 @@ Object.keys(_Heatmap).forEach(function (key) {
380
387
  }
381
388
  });
382
389
  });
390
+ var _ChartsContainerPro = require("./ChartsContainerPro");
383
391
  var _ChartContainerPro = require("./ChartContainerPro");
384
392
  var _ChartDataProviderPro = require("./ChartDataProviderPro");
385
393
  Object.keys(_ChartDataProviderPro).forEach(function (key) {
@@ -1,7 +1,13 @@
1
+ export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.js";
2
+ export type { UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.js";
1
3
  export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
2
4
  export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
3
5
  export { seriesPreviewPlotMap } from "../ChartZoomSlider/internals/seriesPreviewPlotMap.js";
4
6
  export type { PreviewPlotProps } from "../ChartZoomSlider/internals/previews/PreviewPlot.types.js";
5
7
  export { defaultSeriesConfigPro } from "../ChartDataProviderPro/ChartDataProviderPro.js";
6
8
  export type { ProPluginsPerSeriesType } from "../context/ChartProApi.js";
7
- export { defaultSlotsMaterial } from "./material/index.js";
9
+ export { useHeatmapProps } from "../Heatmap/useHeatmapProps.js";
10
+ export { defaultSlotsMaterial } from "./material/index.js";
11
+ export * from "../Heatmap/HeatmapSVGPlot.js";
12
+ export type * from "../Heatmap/Heatmap.types.js";
13
+ export { selectorHeatmapItemAtPosition } from "../plugins/selectors/useChartHeatmapPosition.selectors.js";
@@ -3,6 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _exportNames = {
7
+ useChartsContainerProProps: true,
8
+ useChartContainerProProps: true,
9
+ seriesPreviewPlotMap: true,
10
+ defaultSeriesConfigPro: true,
11
+ useHeatmapProps: true,
12
+ defaultSlotsMaterial: true,
13
+ selectorHeatmapItemAtPosition: true
14
+ };
6
15
  Object.defineProperty(exports, "defaultSeriesConfigPro", {
7
16
  enumerable: true,
8
17
  get: function () {
@@ -15,6 +24,12 @@ Object.defineProperty(exports, "defaultSlotsMaterial", {
15
24
  return _material.defaultSlotsMaterial;
16
25
  }
17
26
  });
27
+ Object.defineProperty(exports, "selectorHeatmapItemAtPosition", {
28
+ enumerable: true,
29
+ get: function () {
30
+ return _useChartHeatmapPosition.selectorHeatmapItemAtPosition;
31
+ }
32
+ });
18
33
  Object.defineProperty(exports, "seriesPreviewPlotMap", {
19
34
  enumerable: true,
20
35
  get: function () {
@@ -27,7 +42,34 @@ Object.defineProperty(exports, "useChartContainerProProps", {
27
42
  return _useChartContainerProProps.useChartContainerProProps;
28
43
  }
29
44
  });
45
+ Object.defineProperty(exports, "useChartsContainerProProps", {
46
+ enumerable: true,
47
+ get: function () {
48
+ return _useChartsContainerProProps.useChartsContainerProProps;
49
+ }
50
+ });
51
+ Object.defineProperty(exports, "useHeatmapProps", {
52
+ enumerable: true,
53
+ get: function () {
54
+ return _useHeatmapProps.useHeatmapProps;
55
+ }
56
+ });
57
+ var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContainerProProps");
30
58
  var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
31
59
  var _seriesPreviewPlotMap = require("../ChartZoomSlider/internals/seriesPreviewPlotMap");
32
60
  var _ChartDataProviderPro = require("../ChartDataProviderPro/ChartDataProviderPro");
33
- var _material = require("./material");
61
+ var _useHeatmapProps = require("../Heatmap/useHeatmapProps");
62
+ var _material = require("./material");
63
+ var _HeatmapSVGPlot = require("../Heatmap/HeatmapSVGPlot");
64
+ Object.keys(_HeatmapSVGPlot).forEach(function (key) {
65
+ if (key === "default" || key === "__esModule") return;
66
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
67
+ if (key in exports && exports[key] === _HeatmapSVGPlot[key]) return;
68
+ Object.defineProperty(exports, key, {
69
+ enumerable: true,
70
+ get: function () {
71
+ return _HeatmapSVGPlot[key];
72
+ }
73
+ });
74
+ });
75
+ var _useChartHeatmapPosition = require("../plugins/selectors/useChartHeatmapPosition.selectors");
@@ -2,4 +2,8 @@ export declare function createExportIframe(title?: string): HTMLIFrameElement;
2
2
  /**
3
3
  * Applies styles to an element and returns the previous styles.
4
4
  */
5
- export declare function applyStyles(element: HTMLElement | SVGElement, styles: Record<string, string | null>): Record<string, string | null>;
5
+ export declare function applyStyles(element: HTMLElement | SVGElement, styles: Record<string, string | null>): Record<string, string | null>;
6
+ /**
7
+ * Copies the content of all canvases from the original element to the cloned element.
8
+ */
9
+ export declare function copyCanvasesContent(original: Element, clone: Element): Promise<void[]>;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.applyStyles = applyStyles;
7
+ exports.copyCanvasesContent = copyCanvasesContent;
7
8
  exports.createExportIframe = createExportIframe;
8
9
  function createExportIframe(title) {
9
10
  const iframeEl = document.createElement('iframe');
@@ -25,4 +26,40 @@ function applyStyles(element, styles) {
25
26
  element.style.setProperty(key, value);
26
27
  });
27
28
  return previousStyles;
29
+ }
30
+
31
+ /**
32
+ * Copies the content of all canvases from the original element to the cloned element.
33
+ */
34
+ function copyCanvasesContent(original, clone) {
35
+ const originalCanvases = original.querySelectorAll('canvas');
36
+ const cloneCanvases = clone.querySelectorAll('canvas');
37
+ const promises = Array.from(originalCanvases).map(async (originalCanvas, index) => {
38
+ return new Promise((resolve, reject) => {
39
+ const cloneCanvas = cloneCanvases[index];
40
+ if (cloneCanvas) {
41
+ const dataURL = originalCanvas.toDataURL();
42
+ const img = cloneCanvas.ownerDocument.createElement('img');
43
+ img.src = dataURL;
44
+ img.width = cloneCanvas.width;
45
+ img.height = cloneCanvas.height;
46
+ for (const styleKey in cloneCanvas.style) {
47
+ if (!Object.hasOwn(img.style, styleKey) || !Object.hasOwn(cloneCanvas.style, styleKey)) {
48
+ continue;
49
+ }
50
+ img.style[styleKey] = cloneCanvas.style[styleKey];
51
+ }
52
+ cloneCanvas.replaceWith(img);
53
+ img.onload = () => {
54
+ resolve();
55
+ };
56
+ img.onerror = event => {
57
+ reject(event);
58
+ };
59
+ } else {
60
+ resolve();
61
+ }
62
+ });
63
+ });
64
+ return Promise.all(promises);
28
65
  }
@@ -1,3 +1,3 @@
1
1
  import { type ChartImageExportOptions } from "./useChartProExport.types.js";
2
2
  export declare const getDrawDocument: () => Promise<typeof import("rasterizehtml").drawDocument>;
3
- export declare function exportImage(element: HTMLElement | SVGElement, svg: SVGElement, params?: ChartImageExportOptions): Promise<void>;
3
+ export declare function exportImage(element: Element, svg: SVGElement, params?: ChartImageExportOptions): Promise<void>;
@@ -62,6 +62,7 @@ async function exportImage(element, svg, params) {
62
62
  if (copyStyles) {
63
63
  await Promise.all((0, _export.loadStyleSheets)(exportDoc, root, nonce));
64
64
  }
65
+ await (0, _common.copyCanvasesContent)(element, elementClone);
65
66
  resolve();
66
67
  };
67
68
  doc.body.appendChild(iframe);
@@ -1,5 +1,5 @@
1
1
  import { type ChartPrintExportOptions } from "./useChartProExport.types.js";
2
- export declare function printChart(element: HTMLElement | SVGElement, {
2
+ export declare function printChart(element: Element, {
3
3
  fileName,
4
4
  onBeforeExport,
5
5
  copyStyles,
@@ -27,6 +27,7 @@ function printChart(element, {
27
27
  if (copyStyles) {
28
28
  await Promise.all((0, _export.loadStyleSheets)(printDoc, root, nonce));
29
29
  }
30
+ await (0, _common.copyCanvasesContent)(element, elementClone);
30
31
  const mediaQueryList = printWindow.contentWindow.matchMedia('print');
31
32
  mediaQueryList.addEventListener('change', mql => {
32
33
  const isAfterPrint = mql.matches === false;
@@ -19,10 +19,12 @@ function waitForAnimationFrame() {
19
19
  return promise;
20
20
  }
21
21
  const useChartProExport = ({
22
- chartRootRef,
23
- svgRef,
24
22
  instance
25
23
  }) => {
24
+ const {
25
+ chartRootRef,
26
+ svgRef
27
+ } = instance;
26
28
  const exportAsPrint = async options => {
27
29
  const chartRoot = chartRootRef.current;
28
30
  if (chartRoot) {
@@ -1,4 +1,4 @@
1
- export declare const selectorZoomInteractionConfig: (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<{}> & {
1
+ export declare const selectorZoomInteractionConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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<{}> & {
2
2
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
3
3
  }, interactionName: "wheel" | "pinch" | "tapAndDrag" | "doubleTapReset" | "brush") => (Omit<import("./ZoomInteractionConfig.types.js").ZoomInteraction, "pointerMode"> & {
4
4
  mouse: {
@@ -10,7 +10,7 @@ export declare const selectorZoomInteractionConfig: (args_0: import("@mui/x-char
10
10
  pointerMode?: import("@mui/x-internal-gestures/core").PointerMode[];
11
11
  allowedDirection?: "x" | "y" | "xy";
12
12
  }) | null;
13
- export declare const selectorPanInteractionConfig: (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<{}> & {
13
+ export declare const selectorPanInteractionConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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
14
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
15
15
  }, interactionName: "wheel" | "drag" | "pressAndDrag") => (Omit<import("./ZoomInteractionConfig.types.js").PanInteraction, "pointerMode"> & {
16
16
  mouse: {
@@ -3,6 +3,5 @@ import { type ChartPlugin, type ZoomData } from '@mui/x-charts/internals';
3
3
  import { type UseChartProZoomSignature } from "../useChartProZoom.types.js";
4
4
  export declare const usePanOnDrag: ({
5
5
  store,
6
- instance,
7
- svgRef
8
- }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance" | "svgRef">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
6
+ instance
7
+ }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
@@ -13,9 +13,11 @@ var _useZoom = require("./useZoom.utils");
13
13
  var _ZoomInteractionConfig = require("../ZoomInteractionConfig.selectors");
14
14
  const usePanOnDrag = ({
15
15
  store,
16
- instance,
17
- svgRef
16
+ instance
18
17
  }, setZoomDataCallback) => {
18
+ const {
19
+ svgRef
20
+ } = instance;
19
21
  const drawingArea = store.use(_internals.selectorChartDrawingArea);
20
22
  const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
21
23
  const config = store.use(_ZoomInteractionConfig.selectorPanInteractionConfig, 'drag');
@@ -3,6 +3,5 @@ import { type ChartPlugin, type ZoomData } from '@mui/x-charts/internals';
3
3
  import { type UseChartProZoomSignature } from "../useChartProZoom.types.js";
4
4
  export declare const usePanOnPressAndDrag: ({
5
5
  store,
6
- instance,
7
- svgRef
8
- }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance" | "svgRef">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
6
+ instance
7
+ }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
@@ -13,9 +13,11 @@ var _useZoom = require("./useZoom.utils");
13
13
  var _ZoomInteractionConfig = require("../ZoomInteractionConfig.selectors");
14
14
  const usePanOnPressAndDrag = ({
15
15
  store,
16
- instance,
17
- svgRef
16
+ instance
18
17
  }, setZoomDataCallback) => {
18
+ const {
19
+ svgRef
20
+ } = instance;
19
21
  const drawingArea = store.use(_internals.selectorChartDrawingArea);
20
22
  const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
21
23
  const isInteracting = React.useRef(false);
@@ -3,6 +3,5 @@ import { type ChartPlugin, type ZoomData } from '@mui/x-charts/internals';
3
3
  import { type UseChartProZoomSignature } from "../useChartProZoom.types.js";
4
4
  export declare const usePanOnWheel: ({
5
5
  store,
6
- instance,
7
- svgRef
8
- }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance" | "svgRef">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
6
+ instance
7
+ }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
@@ -13,9 +13,11 @@ var _useZoom = require("./useZoom.utils");
13
13
  var _ZoomInteractionConfig = require("../ZoomInteractionConfig.selectors");
14
14
  const usePanOnWheel = ({
15
15
  store,
16
- instance,
17
- svgRef
16
+ instance
18
17
  }, setZoomDataCallback) => {
18
+ const {
19
+ svgRef
20
+ } = instance;
19
21
  const drawingArea = store.use(_internals.selectorChartDrawingArea);
20
22
  const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
21
23
  const startedOutsideRef = React.useRef(false);
@@ -43,7 +45,7 @@ const usePanOnWheel = ({
43
45
  }
44
46
  const rafThrottledSetZoomData = (0, _rafThrottle.rafThrottle)(setZoomDataCallback);
45
47
  const wheelHandler = instance.addInteractionListener('panTurnWheel', event => {
46
- const point = (0, _internals.getSVGPoint)(element, {
48
+ const point = (0, _internals.getChartPoint)(element, {
47
49
  clientX: event.detail.centroid.x,
48
50
  clientY: event.detail.centroid.y
49
51
  });
@@ -3,6 +3,5 @@ import { type ChartPlugin, type ZoomData } from '@mui/x-charts/internals';
3
3
  import { type UseChartProZoomSignature } from "../useChartProZoom.types.js";
4
4
  export declare const useZoomOnBrush: ({
5
5
  store,
6
- instance,
7
- svgRef
8
- }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance" | "svgRef">, setZoomDataCallback: React.Dispatch<(prev: ZoomData[]) => ZoomData[]>) => void;
6
+ instance
7
+ }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance">, setZoomDataCallback: React.Dispatch<(prev: ZoomData[]) => ZoomData[]>) => void;
@@ -12,9 +12,11 @@ var _useZoom = require("./useZoom.utils");
12
12
  var _ZoomInteractionConfig = require("../ZoomInteractionConfig.selectors");
13
13
  const useZoomOnBrush = ({
14
14
  store,
15
- instance,
16
- svgRef
15
+ instance
17
16
  }, setZoomDataCallback) => {
17
+ const {
18
+ svgRef
19
+ } = instance;
18
20
  const drawingArea = store.use(_internals.selectorChartDrawingArea);
19
21
  const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
20
22
  const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'brush');
@@ -32,11 +34,11 @@ const useZoomOnBrush = ({
32
34
  const handleBrushEnd = event => {
33
35
  // Convert the brush rectangle to zoom percentages for each axis
34
36
  setZoomDataCallback(prev => {
35
- const startPoint = (0, _internals.getSVGPoint)(element, {
37
+ const startPoint = (0, _internals.getChartPoint)(element, {
36
38
  clientX: event.detail.initialCentroid.x,
37
39
  clientY: event.detail.initialCentroid.y
38
40
  });
39
- const endPoint = (0, _internals.getSVGPoint)(element, {
41
+ const endPoint = (0, _internals.getChartPoint)(element, {
40
42
  clientX: event.detail.centroid.x,
41
43
  clientY: event.detail.centroid.y
42
44
  });
@@ -3,6 +3,5 @@ import { type ChartPlugin, type ZoomData } from '@mui/x-charts/internals';
3
3
  import { type UseChartProZoomSignature } from "../useChartProZoom.types.js";
4
4
  export declare const useZoomOnDoubleTapReset: ({
5
5
  store,
6
- instance,
7
- svgRef
8
- }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance" | "svgRef">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
6
+ instance
7
+ }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
@@ -11,9 +11,11 @@ var _internals = require("@mui/x-charts/internals");
11
11
  var _ZoomInteractionConfig = require("../ZoomInteractionConfig.selectors");
12
12
  const useZoomOnDoubleTapReset = ({
13
13
  store,
14
- instance,
15
- svgRef
14
+ instance
16
15
  }, setZoomDataCallback) => {
16
+ const {
17
+ svgRef
18
+ } = instance;
17
19
  const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
18
20
  const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'doubleTapReset');
19
21
  const isZoomOnDoubleTapResetEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
@@ -3,6 +3,5 @@ import { type ChartPlugin, type ZoomData } from '@mui/x-charts/internals';
3
3
  import { type UseChartProZoomSignature } from "../useChartProZoom.types.js";
4
4
  export declare const useZoomOnPinch: ({
5
5
  store,
6
- instance,
7
- svgRef
8
- }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance" | "svgRef">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
6
+ instance
7
+ }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
@@ -13,9 +13,11 @@ var _useZoom = require("./useZoom.utils");
13
13
  var _ZoomInteractionConfig = require("../ZoomInteractionConfig.selectors");
14
14
  const useZoomOnPinch = ({
15
15
  store,
16
- instance,
17
- svgRef
16
+ instance
18
17
  }, setZoomDataCallback) => {
18
+ const {
19
+ svgRef
20
+ } = instance;
19
21
  const drawingArea = store.use(_internals.selectorChartDrawingArea);
20
22
  const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
21
23
  const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'pinch');
@@ -48,7 +50,7 @@ const useZoomOnPinch = ({
48
50
  }
49
51
  const isZoomIn = event.detail.direction > 0;
50
52
  const scaleRatio = 1 + event.detail.deltaScale;
51
- const point = (0, _internals.getSVGPoint)(element, {
53
+ const point = (0, _internals.getChartPoint)(element, {
52
54
  clientX: event.detail.centroid.x,
53
55
  clientY: event.detail.centroid.y
54
56
  });
@@ -3,6 +3,5 @@ import { type ChartPlugin, type ZoomData } from '@mui/x-charts/internals';
3
3
  import { type UseChartProZoomSignature } from "../useChartProZoom.types.js";
4
4
  export declare const useZoomOnTapAndDrag: ({
5
5
  store,
6
- instance,
7
- svgRef
8
- }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance" | "svgRef">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;
6
+ instance
7
+ }: Pick<Parameters<ChartPlugin<UseChartProZoomSignature>>[0], "store" | "instance">, setZoomDataCallback: React.Dispatch<ZoomData[] | ((prev: ZoomData[]) => ZoomData[])>) => void;