@mui/x-charts-pro 9.0.0-alpha.2 → 9.0.0-alpha.4

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 (275) hide show
  1. package/BarChartPro/BarChartPro.d.mts +2 -2
  2. package/BarChartPro/BarChartPro.d.ts +2 -2
  3. package/BarChartPro/BarChartPro.js +43 -10
  4. package/BarChartPro/BarChartPro.mjs +43 -10
  5. package/CHANGELOG.md +246 -1
  6. package/ChartsContainerPro/ChartsContainerPro.d.mts +2 -2
  7. package/ChartsContainerPro/ChartsContainerPro.d.ts +2 -2
  8. package/ChartsContainerPro/ChartsContainerPro.js +2 -2
  9. package/ChartsContainerPro/ChartsContainerPro.mjs +2 -2
  10. package/ChartsContainerPro/useChartsContainerProProps.d.mts +4 -4
  11. package/ChartsContainerPro/useChartsContainerProProps.d.ts +4 -4
  12. package/ChartsContainerPro/useChartsContainerProProps.js +3 -3
  13. package/ChartsContainerPro/useChartsContainerProProps.mjs +3 -3
  14. package/ChartsDataProviderPro/ChartsDataProviderPro.d.mts +2 -2
  15. package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +2 -2
  16. package/ChartsDataProviderPro/ChartsDataProviderPro.js +8 -11
  17. package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +8 -11
  18. package/ChartsDataProviderPro/useChartsDataProviderProProps.d.mts +1 -1
  19. package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +1 -1
  20. package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
  21. package/ChartsToolbarPro/ChartsToolbarPro.mjs +2 -2
  22. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
  23. package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +2 -2
  24. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
  25. package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +2 -2
  26. package/ChartsToolbarPro/index.d.mts +2 -1
  27. package/ChartsToolbarPro/index.d.ts +2 -1
  28. package/ChartsToolbarPro/index.mjs +2 -1
  29. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js +1 -1
  30. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.mjs +2 -2
  31. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js +1 -1
  32. package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.mjs +2 -2
  33. package/FunnelChart/FunnelChart.d.mts +2 -2
  34. package/FunnelChart/FunnelChart.d.ts +2 -2
  35. package/FunnelChart/FunnelChart.js +23 -8
  36. package/FunnelChart/FunnelChart.mjs +23 -8
  37. package/FunnelChart/FunnelPlot.js +8 -3
  38. package/FunnelChart/FunnelPlot.mjs +8 -3
  39. package/FunnelChart/FunnelSection.d.mts +3 -3
  40. package/FunnelChart/FunnelSection.d.ts +3 -3
  41. package/FunnelChart/FunnelSection.js +8 -9
  42. package/FunnelChart/FunnelSection.mjs +8 -9
  43. package/FunnelChart/FunnelSectionLabel.d.mts +9 -3
  44. package/FunnelChart/FunnelSectionLabel.d.ts +9 -3
  45. package/FunnelChart/FunnelSectionLabel.js +15 -6
  46. package/FunnelChart/FunnelSectionLabel.mjs +15 -6
  47. package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.mts +3 -3
  48. package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +3 -3
  49. package/FunnelChart/funnelClasses.d.mts +29 -0
  50. package/FunnelChart/funnelClasses.d.ts +29 -0
  51. package/FunnelChart/funnelClasses.js +29 -0
  52. package/FunnelChart/funnelClasses.mjs +19 -0
  53. package/FunnelChart/index.d.mts +2 -2
  54. package/FunnelChart/index.d.ts +2 -2
  55. package/FunnelChart/index.js +4 -4
  56. package/FunnelChart/index.mjs +1 -1
  57. package/FunnelChart/seriesConfig/legend.js +0 -2
  58. package/FunnelChart/seriesConfig/legend.mjs +0 -2
  59. package/FunnelChart/useFunnelChartProps.d.mts +2 -2
  60. package/FunnelChart/useFunnelChartProps.d.ts +2 -2
  61. package/FunnelChart/useFunnelChartProps.js +2 -2
  62. package/FunnelChart/useFunnelChartProps.mjs +2 -2
  63. package/Heatmap/Heatmap.d.mts +2 -11
  64. package/Heatmap/Heatmap.d.ts +2 -11
  65. package/Heatmap/Heatmap.js +25 -19
  66. package/Heatmap/Heatmap.mjs +25 -19
  67. package/Heatmap/HeatmapCell.d.mts +33 -0
  68. package/Heatmap/HeatmapCell.d.ts +33 -0
  69. package/Heatmap/HeatmapCell.js +62 -0
  70. package/Heatmap/HeatmapCell.mjs +55 -0
  71. package/Heatmap/HeatmapItem.d.mts +1 -9
  72. package/Heatmap/HeatmapItem.d.ts +1 -9
  73. package/Heatmap/HeatmapItem.js +5 -23
  74. package/Heatmap/HeatmapItem.mjs +5 -23
  75. package/Heatmap/HeatmapSVGPlot.js +14 -7
  76. package/Heatmap/HeatmapSVGPlot.mjs +15 -8
  77. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +2 -2
  78. package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.mjs +1 -1
  79. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +16 -13
  80. package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.mjs +16 -13
  81. package/Heatmap/heatmapClasses.d.mts +6 -1
  82. package/Heatmap/heatmapClasses.d.ts +6 -1
  83. package/Heatmap/heatmapClasses.js +18 -3
  84. package/Heatmap/heatmapClasses.mjs +16 -2
  85. package/Heatmap/index.d.mts +4 -2
  86. package/Heatmap/index.d.ts +4 -2
  87. package/Heatmap/index.js +17 -13
  88. package/Heatmap/index.mjs +2 -1
  89. package/Heatmap/seriesConfig/getColor.js +5 -3
  90. package/Heatmap/seriesConfig/getColor.mjs +5 -3
  91. package/Heatmap/seriesConfig/getItemAtPosition.d.mts +2 -2
  92. package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
  93. package/Heatmap/seriesConfig/getItemAtPosition.js +3 -11
  94. package/Heatmap/seriesConfig/getItemAtPosition.mjs +3 -11
  95. package/Heatmap/seriesConfig/identifierCleaner.d.mts +3 -0
  96. package/Heatmap/seriesConfig/identifierCleaner.d.ts +3 -0
  97. package/Heatmap/seriesConfig/identifierCleaner.js +15 -0
  98. package/Heatmap/seriesConfig/identifierCleaner.mjs +9 -0
  99. package/Heatmap/seriesConfig/identifierSerializer.d.mts +3 -0
  100. package/Heatmap/seriesConfig/identifierSerializer.d.ts +3 -0
  101. package/Heatmap/seriesConfig/identifierSerializer.js +11 -0
  102. package/Heatmap/seriesConfig/identifierSerializer.mjs +5 -0
  103. package/Heatmap/seriesConfig/index.js +4 -2
  104. package/Heatmap/seriesConfig/index.mjs +5 -3
  105. package/Heatmap/seriesConfig/keyboardFocusHandler.js +6 -19
  106. package/Heatmap/seriesConfig/keyboardFocusHandler.mjs +6 -19
  107. package/Heatmap/seriesConfig/seriesProcessor.js +8 -3
  108. package/Heatmap/seriesConfig/seriesProcessor.mjs +8 -3
  109. package/Heatmap/seriesConfig/tooltip.js +7 -6
  110. package/Heatmap/seriesConfig/tooltip.mjs +7 -6
  111. package/Heatmap/seriesConfig/tooltipPosition.js +3 -4
  112. package/Heatmap/seriesConfig/tooltipPosition.mjs +3 -4
  113. package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
  114. package/Heatmap/shouldRegisterPointerInteractionsGlobally.mjs +1 -1
  115. package/Heatmap/useHeatmapProps.d.mts +2 -2
  116. package/Heatmap/useHeatmapProps.d.ts +2 -2
  117. package/Heatmap/useHeatmapProps.js +4 -6
  118. package/Heatmap/useHeatmapProps.mjs +4 -6
  119. package/LineChartPro/LineChartPro.d.mts +2 -2
  120. package/LineChartPro/LineChartPro.d.ts +2 -2
  121. package/LineChartPro/LineChartPro.js +40 -13
  122. package/LineChartPro/LineChartPro.mjs +40 -13
  123. package/PieChartPro/PieChartPro.d.mts +2 -2
  124. package/PieChartPro/PieChartPro.d.ts +2 -2
  125. package/PieChartPro/PieChartPro.js +22 -7
  126. package/PieChartPro/PieChartPro.mjs +22 -7
  127. package/RadarChartPro/RadarChartPro.d.mts +1 -1
  128. package/RadarChartPro/RadarChartPro.d.ts +1 -1
  129. package/RadarChartPro/RadarChartPro.js +20 -2
  130. package/RadarChartPro/RadarChartPro.mjs +20 -2
  131. package/SankeyChart/SankeyChart.d.mts +2 -2
  132. package/SankeyChart/SankeyChart.d.ts +2 -2
  133. package/SankeyChart/SankeyChart.js +21 -12
  134. package/SankeyChart/SankeyChart.mjs +21 -12
  135. package/SankeyChart/SankeyDataProvider.d.mts +2 -2
  136. package/SankeyChart/SankeyDataProvider.d.ts +2 -2
  137. package/SankeyChart/SankeyDataProvider.js +2 -2
  138. package/SankeyChart/SankeyDataProvider.mjs +2 -2
  139. package/SankeyChart/SankeyLinkElement.js +7 -3
  140. package/SankeyChart/SankeyLinkElement.mjs +8 -4
  141. package/SankeyChart/SankeyLinkLabel.js +3 -0
  142. package/SankeyChart/SankeyLinkLabel.mjs +3 -0
  143. package/SankeyChart/SankeyLinkLabelPlot.d.mts +2 -2
  144. package/SankeyChart/SankeyLinkLabelPlot.d.ts +2 -2
  145. package/SankeyChart/SankeyLinkLabelPlot.js +1 -1
  146. package/SankeyChart/SankeyLinkLabelPlot.mjs +1 -1
  147. package/SankeyChart/SankeyLinkPlot.d.mts +2 -2
  148. package/SankeyChart/SankeyLinkPlot.d.ts +2 -2
  149. package/SankeyChart/SankeyLinkPlot.js +1 -1
  150. package/SankeyChart/SankeyLinkPlot.mjs +1 -1
  151. package/SankeyChart/SankeyNodeElement.d.mts +1 -1
  152. package/SankeyChart/SankeyNodeElement.d.ts +1 -1
  153. package/SankeyChart/SankeyNodeElement.js +20 -18
  154. package/SankeyChart/SankeyNodeElement.mjs +21 -19
  155. package/SankeyChart/SankeyNodeLabel.js +3 -0
  156. package/SankeyChart/SankeyNodeLabel.mjs +3 -0
  157. package/SankeyChart/SankeyNodeLabelPlot.d.mts +2 -2
  158. package/SankeyChart/SankeyNodeLabelPlot.d.ts +2 -2
  159. package/SankeyChart/SankeyNodeLabelPlot.js +1 -1
  160. package/SankeyChart/SankeyNodeLabelPlot.mjs +1 -1
  161. package/SankeyChart/SankeyNodePlot.d.mts +2 -2
  162. package/SankeyChart/SankeyNodePlot.d.ts +2 -2
  163. package/SankeyChart/SankeyNodePlot.js +1 -1
  164. package/SankeyChart/SankeyNodePlot.mjs +1 -1
  165. package/SankeyChart/SankeyPlot.d.mts +2 -2
  166. package/SankeyChart/SankeyPlot.d.ts +2 -2
  167. package/SankeyChart/SankeyPlot.js +3 -3
  168. package/SankeyChart/SankeyPlot.mjs +3 -3
  169. package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.js +2 -2
  170. package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.mjs +1 -1
  171. package/SankeyChart/index.d.mts +2 -1
  172. package/SankeyChart/index.d.ts +2 -1
  173. package/SankeyChart/index.js +3 -3
  174. package/SankeyChart/index.mjs +1 -1
  175. package/SankeyChart/sankeyClasses.d.mts +15 -6
  176. package/SankeyChart/sankeyClasses.d.ts +15 -6
  177. package/SankeyChart/sankeyClasses.js +12 -8
  178. package/SankeyChart/sankeyClasses.mjs +10 -6
  179. package/SankeyChart/sankeyHighlightHooks.d.mts +2 -2
  180. package/SankeyChart/sankeyHighlightHooks.d.ts +2 -2
  181. package/SankeyChart/sankeyHighlightHooks.js +2 -10
  182. package/SankeyChart/sankeyHighlightHooks.mjs +3 -11
  183. package/SankeyChart/useSankeyChartProps.d.mts +2 -2
  184. package/SankeyChart/useSankeyChartProps.d.ts +2 -2
  185. package/SankeyChart/useSankeyChartProps.js +2 -2
  186. package/SankeyChart/useSankeyChartProps.mjs +2 -2
  187. package/ScatterChartPro/ScatterChartPro.d.mts +2 -2
  188. package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
  189. package/ScatterChartPro/ScatterChartPro.js +62 -17
  190. package/ScatterChartPro/ScatterChartPro.mjs +62 -17
  191. package/context/useChartProApiContext.d.mts +1 -1
  192. package/context/useChartProApiContext.d.ts +1 -1
  193. package/context/useChartProApiContext.js +1 -1
  194. package/context/useChartProApiContext.mjs +1 -1
  195. package/index.d.mts +0 -4
  196. package/index.d.ts +0 -4
  197. package/index.js +2 -34
  198. package/index.mjs +1 -4
  199. package/internals/ChartsWatermark.d.mts +2 -2
  200. package/internals/ChartsWatermark.d.ts +2 -2
  201. package/internals/ChartsWatermark.js +5 -8
  202. package/internals/ChartsWatermark.mjs +3 -6
  203. package/internals/index.d.mts +0 -1
  204. package/internals/index.d.ts +0 -1
  205. package/internals/index.js +0 -8
  206. package/internals/index.mjs +0 -1
  207. package/internals/plugins/allPlugins.d.mts +4 -4
  208. package/internals/plugins/allPlugins.d.ts +4 -4
  209. package/internals/plugins/useChartProExport/common.js +4 -8
  210. package/internals/plugins/useChartProExport/common.mjs +4 -8
  211. package/internals/plugins/useChartProExport/exportImage.js +1 -1
  212. package/internals/plugins/useChartProExport/exportImage.mjs +1 -1
  213. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.mts +1 -1
  214. package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
  215. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +16 -1
  216. package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.mjs +16 -1
  217. package/models/seriesType/heatmap.d.mts +36 -9
  218. package/models/seriesType/heatmap.d.ts +36 -9
  219. package/models/seriesType/heatmap.js +28 -1
  220. package/models/seriesType/heatmap.mjs +25 -1
  221. package/package.json +5 -61
  222. package/plugins/selectors/useChartHeatmapPosition.selectors.d.mts +2 -2
  223. package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +2 -2
  224. package/plugins/selectors/useChartHeatmapPosition.selectors.js +4 -4
  225. package/plugins/selectors/useChartHeatmapPosition.selectors.mjs +4 -4
  226. package/themeAugmentation/components.d.mts +19 -1
  227. package/themeAugmentation/components.d.ts +19 -1
  228. package/themeAugmentation/overrides.d.mts +5 -2
  229. package/themeAugmentation/overrides.d.ts +5 -2
  230. package/themeAugmentation/props.d.mts +8 -0
  231. package/themeAugmentation/props.d.ts +8 -0
  232. package/typeOverloads/modules.d.mts +2 -2
  233. package/typeOverloads/modules.d.ts +2 -2
  234. package/ChartContainer/index.d.mts +0 -1
  235. package/ChartContainer/index.d.ts +0 -1
  236. package/ChartContainer/index.js +0 -16
  237. package/ChartContainer/index.mjs +0 -2
  238. package/ChartContainerPro/ChartContainerPro.d.mts +0 -21
  239. package/ChartContainerPro/ChartContainerPro.d.ts +0 -21
  240. package/ChartContainerPro/ChartContainerPro.js +0 -24
  241. package/ChartContainerPro/ChartContainerPro.mjs +0 -20
  242. package/ChartContainerPro/index.d.mts +0 -9
  243. package/ChartContainerPro/index.d.ts +0 -9
  244. package/ChartContainerPro/index.js +0 -17
  245. package/ChartContainerPro/index.mjs +0 -6
  246. package/ChartContainerPro/useChartContainerProProps.d.mts +0 -12
  247. package/ChartContainerPro/useChartContainerProProps.d.ts +0 -12
  248. package/ChartContainerPro/useChartContainerProProps.js +0 -19
  249. package/ChartContainerPro/useChartContainerProProps.mjs +0 -14
  250. package/ChartDataProvider/index.d.mts +0 -1
  251. package/ChartDataProvider/index.d.ts +0 -1
  252. package/ChartDataProvider/index.js +0 -16
  253. package/ChartDataProvider/index.mjs +0 -2
  254. package/ChartDataProviderPro/ChartDataProviderPro.d.mts +0 -20
  255. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -20
  256. package/ChartDataProviderPro/ChartDataProviderPro.js +0 -30
  257. package/ChartDataProviderPro/ChartDataProviderPro.mjs +0 -21
  258. package/ChartDataProviderPro/index.d.mts +0 -2
  259. package/ChartDataProviderPro/index.d.ts +0 -2
  260. package/ChartDataProviderPro/index.js +0 -13
  261. package/ChartDataProviderPro/index.mjs +0 -2
  262. package/ChartDataProviderPro/useChartDataProviderProProps.d.mts +0 -10
  263. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -10
  264. package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -12
  265. package/ChartDataProviderPro/useChartDataProviderProProps.mjs +0 -8
  266. package/FunnelChart/funnelSectionClasses.d.mts +0 -30
  267. package/FunnelChart/funnelSectionClasses.d.ts +0 -30
  268. package/FunnelChart/funnelSectionClasses.js +0 -44
  269. package/FunnelChart/funnelSectionClasses.mjs +0 -35
  270. package/Heatmap/internals/HeatmapCell.d.mts +0 -21
  271. package/Heatmap/internals/HeatmapCell.d.ts +0 -21
  272. package/Heatmap/internals/HeatmapCell.js +0 -18
  273. package/Heatmap/internals/HeatmapCell.mjs +0 -12
  274. package/tests/constants.js +0 -7
  275. package/tests/constants.mjs +0 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v9.0.0-alpha.2
2
+ * @mui/x-charts-pro v9.0.0-alpha.4
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,15 +11,8 @@ Object.defineProperty(exports, "__esModule", {
11
11
  value: true
12
12
  });
13
13
  var _exportNames = {
14
- ChartsContainerPro: true,
15
- ChartContainerPro: true
14
+ ChartsContainerPro: true
16
15
  };
17
- Object.defineProperty(exports, "ChartContainerPro", {
18
- enumerable: true,
19
- get: function () {
20
- return _ChartContainerPro.ChartContainerPro;
21
- }
22
- });
23
16
  Object.defineProperty(exports, "ChartsContainerPro", {
24
17
  enumerable: true,
25
18
  get: function () {
@@ -267,18 +260,6 @@ Object.keys(_ChartsDataProvider).forEach(function (key) {
267
260
  }
268
261
  });
269
262
  });
270
- var _ChartDataProvider = require("@mui/x-charts/ChartDataProvider");
271
- Object.keys(_ChartDataProvider).forEach(function (key) {
272
- if (key === "default" || key === "__esModule") return;
273
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
274
- if (key in exports && exports[key] === _ChartDataProvider[key]) return;
275
- Object.defineProperty(exports, key, {
276
- enumerable: true,
277
- get: function () {
278
- return _ChartDataProvider[key];
279
- }
280
- });
281
- });
282
263
  var _ChartsLabel = require("@mui/x-charts/ChartsLabel");
283
264
  Object.keys(_ChartsLabel).forEach(function (key) {
284
265
  if (key === "default" || key === "__esModule") return;
@@ -400,7 +381,6 @@ Object.keys(_Heatmap).forEach(function (key) {
400
381
  });
401
382
  });
402
383
  var _ChartsContainerPro = require("./ChartsContainerPro");
403
- var _ChartContainerPro = require("./ChartContainerPro");
404
384
  var _ChartsDataProviderPro = require("./ChartsDataProviderPro");
405
385
  Object.keys(_ChartsDataProviderPro).forEach(function (key) {
406
386
  if (key === "default" || key === "__esModule") return;
@@ -413,18 +393,6 @@ Object.keys(_ChartsDataProviderPro).forEach(function (key) {
413
393
  }
414
394
  });
415
395
  });
416
- var _ChartDataProviderPro = require("./ChartDataProviderPro");
417
- Object.keys(_ChartDataProviderPro).forEach(function (key) {
418
- if (key === "default" || key === "__esModule") return;
419
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
420
- if (key in exports && exports[key] === _ChartDataProviderPro[key]) return;
421
- Object.defineProperty(exports, key, {
422
- enumerable: true,
423
- get: function () {
424
- return _ChartDataProviderPro[key];
425
- }
426
- });
427
- });
428
396
  var _ScatterChartPro = require("./ScatterChartPro");
429
397
  Object.keys(_ScatterChartPro).forEach(function (key) {
430
398
  if (key === "default" || key === "__esModule") return;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v9.0.0-alpha.2
2
+ * @mui/x-charts-pro v9.0.0-alpha.4
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
@@ -28,7 +28,6 @@ export * from '@mui/x-charts/Gauge';
28
28
  export * from '@mui/x-charts/RadarChart';
29
29
  export * from '@mui/x-charts/ChartsSurface';
30
30
  export * from '@mui/x-charts/ChartsDataProvider';
31
- export * from '@mui/x-charts/ChartDataProvider';
32
31
  export * from '@mui/x-charts/ChartsLabel';
33
32
  export * from '@mui/x-charts/ChartsOverlay';
34
33
  export * from '@mui/x-charts/ChartsWrapper';
@@ -46,9 +45,7 @@ export * from "./colorPalettes/index.mjs";
46
45
  // Pro components
47
46
  export * from "./Heatmap/index.mjs";
48
47
  export { ChartsContainerPro } from "./ChartsContainerPro/index.mjs";
49
- export { ChartContainerPro } from "./ChartContainerPro/index.mjs";
50
48
  export * from "./ChartsDataProviderPro/index.mjs";
51
- export * from "./ChartDataProviderPro/index.mjs";
52
49
  export * from "./ScatterChartPro/index.mjs";
53
50
  export * from "./SankeyChart/index.mjs";
54
51
  export * from "./BarChartPro/index.mjs";
@@ -1,6 +1,6 @@
1
- import type { MuiCommercialPackageName } from '@mui/x-license/utils';
1
+ import { type CommercialPackageInfo } from '@mui/x-license/internals';
2
2
  interface ChartsWatermarkProps {
3
- packageName: MuiCommercialPackageName;
3
+ packageInfo: CommercialPackageInfo;
4
4
  }
5
5
  export declare function ChartsWatermark(props: ChartsWatermarkProps): import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,6 +1,6 @@
1
- import type { MuiCommercialPackageName } from '@mui/x-license/utils';
1
+ import { type CommercialPackageInfo } from '@mui/x-license/internals';
2
2
  interface ChartsWatermarkProps {
3
- packageName: MuiCommercialPackageName;
3
+ packageInfo: CommercialPackageInfo;
4
4
  }
5
5
  export declare function ChartsWatermark(props: ChartsWatermarkProps): import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -8,20 +8,17 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.ChartsWatermark = ChartsWatermark;
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var ReactDOM = _interopRequireWildcard(require("react-dom"));
11
- var _Watermark = require("@mui/x-license/Watermark");
11
+ var _internals = require("@mui/x-license/internals");
12
12
  var _hooks = require("../hooks");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
- const releaseInfo = "MTc3MjY2ODgwMDAwMA==";
15
14
  function ChartsWatermark(props) {
16
15
  const layerContainerRef = (0, _hooks.useChartsLayerContainerRef)();
17
16
  if (!layerContainerRef.current) {
18
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Watermark.Watermark, {
19
- packageName: props.packageName,
20
- releaseInfo: releaseInfo
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.Watermark, {
18
+ packageInfo: props.packageInfo
21
19
  });
22
20
  }
23
- return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Watermark.Watermark, {
24
- packageName: props.packageName,
25
- releaseInfo: releaseInfo
21
+ return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.Watermark, {
22
+ packageInfo: props.packageInfo
26
23
  }), layerContainerRef.current);
27
24
  }
@@ -2,20 +2,17 @@
2
2
 
3
3
  import * as React from 'react';
4
4
  import * as ReactDOM from 'react-dom';
5
- import { Watermark } from '@mui/x-license/Watermark';
5
+ import { Watermark } from '@mui/x-license/internals';
6
6
  import { useChartsLayerContainerRef } from "../hooks/index.mjs";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
- const releaseInfo = "MTc3MjY2ODgwMDAwMA==";
9
8
  export function ChartsWatermark(props) {
10
9
  const layerContainerRef = useChartsLayerContainerRef();
11
10
  if (!layerContainerRef.current) {
12
11
  return /*#__PURE__*/_jsx(Watermark, {
13
- packageName: props.packageName,
14
- releaseInfo: releaseInfo
12
+ packageInfo: props.packageInfo
15
13
  });
16
14
  }
17
15
  return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/_jsx(Watermark, {
18
- packageName: props.packageName,
19
- releaseInfo: releaseInfo
16
+ packageInfo: props.packageInfo
20
17
  }), layerContainerRef.current);
21
18
  }
@@ -1,6 +1,5 @@
1
1
  export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
2
2
  export type { UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
3
- export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.mjs";
4
3
  export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.mjs";
5
4
  export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.mjs";
6
5
  export type { PreviewPlotProps } from "../ChartsZoomSlider/internals/previews/PreviewPlot.types.mjs";
@@ -1,6 +1,5 @@
1
1
  export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.js";
2
2
  export type { UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.js";
3
- export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
4
3
  export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
5
4
  export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.js";
6
5
  export type { PreviewPlotProps } from "../ChartsZoomSlider/internals/previews/PreviewPlot.types.js";
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  var _exportNames = {
7
7
  useChartsContainerProProps: true,
8
- useChartContainerProProps: true,
9
8
  seriesPreviewPlotMap: true,
10
9
  defaultSeriesConfigPro: true,
11
10
  useHeatmapProps: true,
@@ -36,12 +35,6 @@ Object.defineProperty(exports, "seriesPreviewPlotMap", {
36
35
  return _seriesPreviewPlotMap.seriesPreviewPlotMap;
37
36
  }
38
37
  });
39
- Object.defineProperty(exports, "useChartContainerProProps", {
40
- enumerable: true,
41
- get: function () {
42
- return _useChartContainerProProps.useChartContainerProProps;
43
- }
44
- });
45
38
  Object.defineProperty(exports, "useChartsContainerProProps", {
46
39
  enumerable: true,
47
40
  get: function () {
@@ -55,7 +48,6 @@ Object.defineProperty(exports, "useHeatmapProps", {
55
48
  }
56
49
  });
57
50
  var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContainerProProps");
58
- var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
59
51
  var _seriesPreviewPlotMap = require("../ChartsZoomSlider/internals/seriesPreviewPlotMap");
60
52
  var _ChartsDataProviderPro = require("../ChartsDataProviderPro/ChartsDataProviderPro");
61
53
  var _useHeatmapProps = require("../Heatmap/useHeatmapProps");
@@ -1,5 +1,4 @@
1
1
  export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
2
- export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.mjs";
3
2
  export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.mjs";
4
3
  export { defaultSeriesConfigPro } from "../ChartsDataProviderPro/ChartsDataProviderPro.mjs";
5
4
  export { useHeatmapProps } from "../Heatmap/useHeatmapProps.mjs";
@@ -1,9 +1,9 @@
1
1
  import { type ChartSeriesType, type ConvertSignaturesIntoPlugins, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartZAxisSignature, type UseChartHighlightSignature, type UseChartPolarAxisSignature, type UseChartBrushSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "./useChartProExport/index.mjs";
3
3
  import { type UseChartProZoomSignature } from "./useChartProZoom/index.mjs";
4
- export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<TSeries>, UseChartInteractionSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartHighlightSignature<TSeries>, UseChartVisibilityManagerSignature<TSeries>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<TSeries>];
5
- export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
4
+ export type AllPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<SeriesType>];
5
+ export type AllPluginsType<SeriesType extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<SeriesType>>;
6
6
  export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartBrushSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>)[];
7
- export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<TSeries>, UseChartInteractionSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartHighlightSignature<TSeries>, UseChartVisibilityManagerSignature<TSeries>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<TSeries>];
8
- export type DefaultPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<TSeries>>;
7
+ export type DefaultPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<SeriesType>];
8
+ export type DefaultPluginsType<SeriesType extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<SeriesType>>;
9
9
  export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartBrushSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>)[];
@@ -1,9 +1,9 @@
1
1
  import { type ChartSeriesType, type ConvertSignaturesIntoPlugins, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartZAxisSignature, type UseChartHighlightSignature, type UseChartPolarAxisSignature, type UseChartBrushSignature, type UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
2
2
  import { type UseChartProExportSignature } from "./useChartProExport/index.js";
3
3
  import { type UseChartProZoomSignature } from "./useChartProZoom/index.js";
4
- export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<TSeries>, UseChartInteractionSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartHighlightSignature<TSeries>, UseChartVisibilityManagerSignature<TSeries>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<TSeries>];
5
- export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
4
+ export type AllPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<SeriesType>];
5
+ export type AllPluginsType<SeriesType extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<SeriesType>>;
6
6
  export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartBrushSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>)[];
7
- export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<TSeries>, UseChartInteractionSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartHighlightSignature<TSeries>, UseChartVisibilityManagerSignature<TSeries>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<TSeries>];
8
- export type DefaultPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<TSeries>>;
7
+ export type DefaultPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartProZoomSignature, UseChartProExportSignature, UseChartVisibilityManagerSignature<SeriesType>];
8
+ export type DefaultPluginsType<SeriesType extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<SeriesType>>;
9
9
  export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartBrushSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>)[];
@@ -41,14 +41,10 @@ function copyCanvasesContent(original, clone) {
41
41
  const dataURL = originalCanvas.toDataURL();
42
42
  const img = cloneCanvas.ownerDocument.createElement('img');
43
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
- }
44
+ // Use the CSS dimensions (not canvas.width/height which are in device pixels)
45
+ img.width = originalCanvas.clientWidth;
46
+ img.height = originalCanvas.clientHeight;
47
+ img.style.cssText = cloneCanvas.style.cssText;
52
48
  cloneCanvas.replaceWith(img);
53
49
  img.onload = () => {
54
50
  resolve();
@@ -33,14 +33,10 @@ export function copyCanvasesContent(original, clone) {
33
33
  const dataURL = originalCanvas.toDataURL();
34
34
  const img = cloneCanvas.ownerDocument.createElement('img');
35
35
  img.src = dataURL;
36
- img.width = cloneCanvas.width;
37
- img.height = cloneCanvas.height;
38
- for (const styleKey in cloneCanvas.style) {
39
- if (!Object.hasOwn(img.style, styleKey) || !Object.hasOwn(cloneCanvas.style, styleKey)) {
40
- continue;
41
- }
42
- img.style[styleKey] = cloneCanvas.style[styleKey];
43
- }
36
+ // Use the CSS dimensions (not canvas.width/height which are in device pixels)
37
+ img.width = originalCanvas.clientWidth;
38
+ img.height = originalCanvas.clientHeight;
39
+ img.style.cssText = cloneCanvas.style.cssText;
44
40
  cloneCanvas.replaceWith(img);
45
41
  img.onload = () => {
46
42
  resolve();
@@ -34,6 +34,7 @@ async function exportImage(element, svg, params) {
34
34
  } = params ?? {};
35
35
  const drawDocumentPromise = getDrawDocument();
36
36
  const doc = (0, _ownerDocument.default)(element);
37
+ const ratio = Math.max(window.devicePixelRatio || 1, 1);
37
38
  const iframe = (0, _common.createExportIframe)(fileName);
38
39
  /* We apply the min/max width and height to ensure the SVG doesn't resize in the export.
39
40
  * We apply to the original SVG so that the cloned tree will contain the styles and revert these
@@ -74,7 +75,6 @@ async function exportImage(element, svg, params) {
74
75
  /* Use the size from the export body in case `onBeforeExport` adds some elements that should be in the export. */
75
76
  const exportDocBodySize = iframe.contentDocument.body.getBoundingClientRect();
76
77
  const canvas = document.createElement('canvas');
77
- const ratio = window.devicePixelRatio || 1;
78
78
  canvas.width = exportDocBodySize.width * ratio;
79
79
  canvas.height = exportDocBodySize.height * ratio;
80
80
  canvas.style.width = `${exportDocBodySize.width}px`;
@@ -24,6 +24,7 @@ export async function exportImage(element, svg, params) {
24
24
  } = params ?? {};
25
25
  const drawDocumentPromise = getDrawDocument();
26
26
  const doc = ownerDocument(element);
27
+ const ratio = Math.max(window.devicePixelRatio || 1, 1);
27
28
  const iframe = createExportIframe(fileName);
28
29
  /* We apply the min/max width and height to ensure the SVG doesn't resize in the export.
29
30
  * We apply to the original SVG so that the cloned tree will contain the styles and revert these
@@ -64,7 +65,6 @@ export async function exportImage(element, svg, params) {
64
65
  /* Use the size from the export body in case `onBeforeExport` adds some elements that should be in the export. */
65
66
  const exportDocBodySize = iframe.contentDocument.body.getBoundingClientRect();
66
67
  const canvas = document.createElement('canvas');
67
- const ratio = window.devicePixelRatio || 1;
68
68
  canvas.width = exportDocBodySize.width * ratio;
69
69
  canvas.height = exportDocBodySize.height * ratio;
70
70
  canvas.style.width = `${exportDocBodySize.width}px`;
@@ -99,7 +99,7 @@ export type DoubleTapResetInteraction = Unpack<{
99
99
  } & AllModeProp & AllKeysProp>;
100
100
  export type BrushInteraction = Unpack<{
101
101
  type: 'brush';
102
- } & NoModeProp & NoKeysProp>;
102
+ } & AllModeProp & AllKeysProp>;
103
103
  export type AnyInteraction = {
104
104
  type: string;
105
105
  pointerMode?: InteractionMode;
@@ -99,7 +99,7 @@ export type DoubleTapResetInteraction = Unpack<{
99
99
  } & AllModeProp & AllKeysProp>;
100
100
  export type BrushInteraction = Unpack<{
101
101
  type: 'brush';
102
- } & NoModeProp & NoKeysProp>;
102
+ } & AllModeProp & AllKeysProp>;
103
103
  export type AnyInteraction = {
104
104
  type: string;
105
105
  pointerMode?: InteractionMode;
@@ -22,8 +22,23 @@ const useZoomOnBrush = ({
22
22
  const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'brush');
23
23
  const isZoomOnBrushEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
24
24
  React.useEffect(() => {
25
- instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
25
+ if ('setZoomBrushEnabled' in instance) {
26
+ instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
27
+ }
26
28
  }, [isZoomOnBrushEnabled, instance]);
29
+ React.useEffect(() => {
30
+ if (!isZoomOnBrushEnabled) {
31
+ return;
32
+ }
33
+ instance.updateZoomInteractionListeners('brush', {
34
+ requiredKeys: config.requiredKeys,
35
+ pointerMode: config.pointerMode,
36
+ pointerOptions: {
37
+ mouse: config.mouse,
38
+ touch: config.touch
39
+ }
40
+ });
41
+ }, [isZoomOnBrushEnabled, config, instance]);
27
42
 
28
43
  // Zoom on brush
29
44
  React.useEffect(() => {
@@ -16,8 +16,23 @@ export const useZoomOnBrush = ({
16
16
  const config = store.use(selectorZoomInteractionConfig, 'brush');
17
17
  const isZoomOnBrushEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
18
18
  React.useEffect(() => {
19
- instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
19
+ if ('setZoomBrushEnabled' in instance) {
20
+ instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
21
+ }
20
22
  }, [isZoomOnBrushEnabled, instance]);
23
+ React.useEffect(() => {
24
+ if (!isZoomOnBrushEnabled) {
25
+ return;
26
+ }
27
+ instance.updateZoomInteractionListeners('brush', {
28
+ requiredKeys: config.requiredKeys,
29
+ pointerMode: config.pointerMode,
30
+ pointerOptions: {
31
+ mouse: config.mouse,
32
+ touch: config.touch
33
+ }
34
+ });
35
+ }, [isZoomOnBrushEnabled, config, instance]);
21
36
 
22
37
  // Zoom on brush
23
38
  React.useEffect(() => {
@@ -1,10 +1,11 @@
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, 'heatmap'>, 'color' | 'colorGetter'>, CartesianSeriesType {
4
+ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter' | 'valueFormatter'>, CartesianSeriesType {
5
5
  type: 'heatmap';
6
6
  /**
7
- * Data associated to each bar.
7
+ * Data associated to each cell in the heatmap.
8
+ * Each entry is a tuple [xIndex, yIndex, value].
8
9
  */
9
10
  data?: readonly HeatmapValueType[];
10
11
  /**
@@ -15,9 +16,21 @@ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueTyp
15
16
  * The label to display on the tooltip or the legend. It can be a string or a function.
16
17
  */
17
18
  label?: string | ((location: 'tooltip' | 'legend') => string);
19
+ /**
20
+ * Function that formats values to be displayed in a tooltip.
21
+ * @param {number | null} value The series' value to render. Can be `null` if the cell doesn't contain any value.
22
+ * @param {{ xIndex: number; yIndex: number}} context The rendering context of the value.
23
+ * @param {number} context.xIndex The x index of the cell the value belongs to.
24
+ * @param {number} context.yIndex The y index of the cell the value belongs to.
25
+ * @returns {string | null} The string to display or null if the value should not be shown.
26
+ */
27
+ valueFormatter?: (value: number | null, context: {
28
+ xIndex: number;
29
+ yIndex: number;
30
+ }) => string | null;
18
31
  }
19
32
  /**
20
- * An object that allows to identify a single bar.
33
+ * An object that allows to identify a single cell.
21
34
  * Used for item interaction
22
35
  */
23
36
  export type HeatmapItemIdentifier = {
@@ -26,11 +39,6 @@ export type HeatmapItemIdentifier = {
26
39
  * The id of the series the cell belongs to.
27
40
  */
28
41
  seriesId: DefaultizedHeatmapSeriesType['id'];
29
- /**
30
- * The data index of the cell.
31
- * Is defined only if some data is associated to the cell.
32
- */
33
- dataIndex?: number;
34
42
  /**
35
43
  * The x index of the cell. Useful to identify the cell position in the heatmap even if there is no data.
36
44
  */
@@ -40,4 +48,23 @@ export type HeatmapItemIdentifier = {
40
48
  */
41
49
  yIndex: number;
42
50
  };
43
- export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {}
51
+ /**
52
+ * The cell identifier with the associated data value.
53
+ */
54
+ export type HeatmapItemIdentifierWithData = HeatmapItemIdentifier & {
55
+ /**
56
+ * The value of the cell. Null if there is no data associated.
57
+ */
58
+ value: number | null;
59
+ };
60
+ export declare class HeatmapData {
61
+ private valueLookup;
62
+ constructor(data: readonly HeatmapValueType[]);
63
+ getValue(xIndex: number, yIndex: number): number | null;
64
+ }
65
+ export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {
66
+ /**
67
+ * Maps the `xIndex` and `yIndex` to the corresponding value of the cell.
68
+ */
69
+ heatmapData: HeatmapData;
70
+ }
@@ -1,10 +1,11 @@
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, 'heatmap'>, 'color' | 'colorGetter'>, CartesianSeriesType {
4
+ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter' | 'valueFormatter'>, CartesianSeriesType {
5
5
  type: 'heatmap';
6
6
  /**
7
- * Data associated to each bar.
7
+ * Data associated to each cell in the heatmap.
8
+ * Each entry is a tuple [xIndex, yIndex, value].
8
9
  */
9
10
  data?: readonly HeatmapValueType[];
10
11
  /**
@@ -15,9 +16,21 @@ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueTyp
15
16
  * The label to display on the tooltip or the legend. It can be a string or a function.
16
17
  */
17
18
  label?: string | ((location: 'tooltip' | 'legend') => string);
19
+ /**
20
+ * Function that formats values to be displayed in a tooltip.
21
+ * @param {number | null} value The series' value to render. Can be `null` if the cell doesn't contain any value.
22
+ * @param {{ xIndex: number; yIndex: number}} context The rendering context of the value.
23
+ * @param {number} context.xIndex The x index of the cell the value belongs to.
24
+ * @param {number} context.yIndex The y index of the cell the value belongs to.
25
+ * @returns {string | null} The string to display or null if the value should not be shown.
26
+ */
27
+ valueFormatter?: (value: number | null, context: {
28
+ xIndex: number;
29
+ yIndex: number;
30
+ }) => string | null;
18
31
  }
19
32
  /**
20
- * An object that allows to identify a single bar.
33
+ * An object that allows to identify a single cell.
21
34
  * Used for item interaction
22
35
  */
23
36
  export type HeatmapItemIdentifier = {
@@ -26,11 +39,6 @@ export type HeatmapItemIdentifier = {
26
39
  * The id of the series the cell belongs to.
27
40
  */
28
41
  seriesId: DefaultizedHeatmapSeriesType['id'];
29
- /**
30
- * The data index of the cell.
31
- * Is defined only if some data is associated to the cell.
32
- */
33
- dataIndex?: number;
34
42
  /**
35
43
  * The x index of the cell. Useful to identify the cell position in the heatmap even if there is no data.
36
44
  */
@@ -40,4 +48,23 @@ export type HeatmapItemIdentifier = {
40
48
  */
41
49
  yIndex: number;
42
50
  };
43
- export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {}
51
+ /**
52
+ * The cell identifier with the associated data value.
53
+ */
54
+ export type HeatmapItemIdentifierWithData = HeatmapItemIdentifier & {
55
+ /**
56
+ * The value of the cell. Null if there is no data associated.
57
+ */
58
+ value: number | null;
59
+ };
60
+ export declare class HeatmapData {
61
+ private valueLookup;
62
+ constructor(data: readonly HeatmapValueType[]);
63
+ getValue(xIndex: number, yIndex: number): number | null;
64
+ }
65
+ export interface DefaultizedHeatmapSeriesType extends DefaultizedProps<HeatmapSeriesType, CommonDefaultizedProps> {
66
+ /**
67
+ * Maps the `xIndex` and `yIndex` to the corresponding value of the cell.
68
+ */
69
+ heatmapData: HeatmapData;
70
+ }
@@ -2,4 +2,31 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
- });
5
+ });
6
+ exports.HeatmapData = void 0;
7
+ /**
8
+ * An object that allows to identify a single cell.
9
+ * Used for item interaction
10
+ */
11
+
12
+ /**
13
+ * The cell identifier with the associated data value.
14
+ */
15
+
16
+ class HeatmapData {
17
+ constructor(data) {
18
+ this.valueLookup = new Map();
19
+ for (const [xIndex, yIndex, value] of data) {
20
+ let column = this.valueLookup.get(xIndex);
21
+ if (!column) {
22
+ column = new Map();
23
+ this.valueLookup.set(xIndex, column);
24
+ }
25
+ column.set(yIndex, value);
26
+ }
27
+ }
28
+ getValue(xIndex, yIndex) {
29
+ return this.valueLookup.get(xIndex)?.get(yIndex) ?? null;
30
+ }
31
+ }
32
+ exports.HeatmapData = HeatmapData;
@@ -1 +1,25 @@
1
- export {};
1
+ /**
2
+ * An object that allows to identify a single cell.
3
+ * Used for item interaction
4
+ */
5
+
6
+ /**
7
+ * The cell identifier with the associated data value.
8
+ */
9
+
10
+ export class HeatmapData {
11
+ constructor(data) {
12
+ this.valueLookup = new Map();
13
+ for (const [xIndex, yIndex, value] of data) {
14
+ let column = this.valueLookup.get(xIndex);
15
+ if (!column) {
16
+ column = new Map();
17
+ this.valueLookup.set(xIndex, column);
18
+ }
19
+ column.set(yIndex, value);
20
+ }
21
+ }
22
+ getValue(xIndex, yIndex) {
23
+ return this.valueLookup.get(xIndex)?.get(yIndex) ?? null;
24
+ }
25
+ }