@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
@@ -13,7 +13,7 @@ import { ChartsBrushOverlay } from '@mui/x-charts/ChartsBrushOverlay';
13
13
  import { ChartsLayerContainer } from '@mui/x-charts/ChartsLayerContainer';
14
14
  import { HeatmapPlot } from "./HeatmapPlot.mjs";
15
15
  import { HeatmapTooltip } from "./HeatmapTooltip/index.mjs";
16
- import { ChartDataProviderPro } from "../ChartDataProviderPro/index.mjs";
16
+ import { ChartsDataProviderPro } from "../ChartsDataProviderPro/index.mjs";
17
17
  import { ChartsToolbarPro } from "../ChartsToolbarPro/index.mjs";
18
18
  import { FocusedHeatmapCell } from "./FocusedHeatmapCell.mjs";
19
19
  import { useHeatmapProps } from "./useHeatmapProps.mjs";
@@ -33,7 +33,7 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
33
33
  showToolbar = false
34
34
  } = props;
35
35
  const {
36
- chartDataProviderProProps,
36
+ chartsDataProviderProProps,
37
37
  chartsWrapperProps,
38
38
  chartsAxisProps,
39
39
  clipPathProps,
@@ -45,7 +45,7 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
45
45
  } = useHeatmapProps(props);
46
46
  const Tooltip = slots?.tooltip ?? HeatmapTooltip;
47
47
  const Toolbar = slots?.toolbar ?? ChartsToolbarPro;
48
- return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
48
+ return /*#__PURE__*/_jsx(ChartsDataProviderPro, _extends({}, chartsDataProviderProProps, {
49
49
  children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
50
50
  ref: ref,
51
51
  children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsLayerContainer, {
@@ -95,6 +95,10 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
95
95
  * An array of objects that can be used to populate series and axes data using their `dataKey` property.
96
96
  */
97
97
  dataset: PropTypes.arrayOf(PropTypes.object),
98
+ /**
99
+ * The description of the chart.
100
+ * Used to provide an accessible description for the chart.
101
+ */
98
102
  desc: PropTypes.string,
99
103
  /**
100
104
  * If `true`, the charts will not listen to the mouse move event.
@@ -102,7 +106,14 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
102
106
  * @default false
103
107
  */
104
108
  disableAxisListener: PropTypes.bool,
105
- enableKeyboardNavigation: PropTypes.bool,
109
+ /**
110
+ * If `true`, disables keyboard navigation for the chart.
111
+ */
112
+ disableKeyboardNavigation: PropTypes.bool,
113
+ /**
114
+ * Options to enable features planned for the next major.
115
+ */
116
+ experimentalFeatures: PropTypes.object,
106
117
  /**
107
118
  * The height of the chart in px. If not defined, it takes the height of the parent element.
108
119
  */
@@ -160,15 +171,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
160
171
  right: PropTypes.number,
161
172
  top: PropTypes.number
162
173
  })]),
163
- /**
164
- * The function called for onClick events.
165
- * The second argument contains information about all line/bar elements at the current mouse position.
166
- * @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
167
- * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
168
- *
169
- * @deprecated Use `onItemClick` instead to get access to both x- and y-axis values.
170
- */
171
- onAxisClick: PropTypes.func,
172
174
  /**
173
175
  * The callback fired when the highlighted item changes.
174
176
  *
@@ -178,7 +180,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
178
180
  /**
179
181
  * The callback fired when an item is clicked.
180
182
  *
181
- * @param {React.MouseEvent<SVGSVGElement, MouseEvent>} event The click event.
183
+ * @param {React.MouseEvent<HTMLDivElement, MouseEvent>} event The click event.
182
184
  * @param {SeriesItemIdentifierWithType<SeriesType>} item The clicked item.
183
185
  */
184
186
  onItemClick: PropTypes.func,
@@ -193,7 +195,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
193
195
  /**
194
196
  * The callback fired when the tooltip item changes.
195
197
  *
196
- * @param {SeriesItemIdentifier<TSeries> | null} tooltipItem The newly highlighted item.
198
+ * @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
197
199
  */
198
200
  onTooltipItemChange: PropTypes.func,
199
201
  /**
@@ -224,6 +226,10 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
224
226
  slots: PropTypes.object,
225
227
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
226
228
  theme: PropTypes.oneOf(['dark', 'light']),
229
+ /**
230
+ * The title of the chart.
231
+ * Used to provide an accessible label for the chart.
232
+ */
227
233
  title: PropTypes.string,
228
234
  /**
229
235
  * The configuration of the tooltip.
@@ -243,13 +249,11 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
243
249
  * Used when the tooltip is controlled.
244
250
  */
245
251
  tooltipItem: PropTypes.oneOfType([PropTypes.shape({
246
- dataIndex: PropTypes.number,
247
252
  seriesId: PropTypes.string.isRequired,
248
253
  type: PropTypes.oneOf(['heatmap']).isRequired,
249
254
  xIndex: PropTypes.number.isRequired,
250
255
  yIndex: PropTypes.number.isRequired
251
256
  }), PropTypes.shape({
252
- dataIndex: PropTypes.number,
253
257
  seriesId: PropTypes.string.isRequired,
254
258
  xIndex: PropTypes.number.isRequired,
255
259
  yIndex: PropTypes.number.isRequired
@@ -268,6 +272,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
268
272
  barGapRatio: PropTypes.number,
269
273
  categoryGapRatio: PropTypes.number,
270
274
  classes: PropTypes.object,
275
+ className: PropTypes.string,
271
276
  colorMap: PropTypes.oneOfType([PropTypes.shape({
272
277
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
273
278
  type: PropTypes.oneOf(['ordinal']).isRequired,
@@ -349,6 +354,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
349
354
  barGapRatio: PropTypes.number,
350
355
  categoryGapRatio: PropTypes.number,
351
356
  classes: PropTypes.object,
357
+ className: PropTypes.string,
352
358
  colorMap: PropTypes.oneOfType([PropTypes.shape({
353
359
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
354
360
  type: PropTypes.oneOf(['ordinal']).isRequired,
@@ -487,8 +493,8 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
487
493
  requiredKeys: PropTypes.arrayOf(PropTypes.string),
488
494
  type: PropTypes.oneOf(['doubleTapReset']).isRequired
489
495
  }), PropTypes.shape({
490
- pointerMode: PropTypes.any,
491
- requiredKeys: PropTypes.array,
496
+ pointerMode: PropTypes.oneOf(['mouse', 'touch']),
497
+ requiredKeys: PropTypes.arrayOf(PropTypes.string),
492
498
  type: PropTypes.oneOf(['brush']).isRequired
493
499
  })]).isRequired)
494
500
  })
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+ import type { SeriesId } from "../models/index.mjs";
3
+ import type { HeatmapClasses } from "./heatmapClasses.mjs";
4
+ export interface HeatmapCellOwnerState {
5
+ seriesId: SeriesId;
6
+ color: string;
7
+ isFaded: boolean;
8
+ isHighlighted: boolean;
9
+ classes?: Partial<HeatmapClasses>;
10
+ value: number;
11
+ }
12
+ /**
13
+ * @deprecated Use `HeatmapCellOwnerState` instead.
14
+ */
15
+ export type HeatmapItemOwnerState = HeatmapCellOwnerState;
16
+ export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ ownerState: HeatmapCellOwnerState;
22
+ }
23
+ /**
24
+ * Demos:
25
+ *
26
+ * - [Heatmap](https://mui.com/x/react-charts/heatmap/)
27
+ *
28
+ * API:
29
+ *
30
+ * - [HeatmapCell API](https://mui.com/x/api/charts/heatmap-cell/)
31
+ */
32
+ declare const HeatmapCell: React.ForwardRefExoticComponent<Omit<HeatmapCellProps, "ref"> & React.RefAttributes<SVGRectElement>>;
33
+ export { HeatmapCell };
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+ import type { SeriesId } from "../models/index.js";
3
+ import type { HeatmapClasses } from "./heatmapClasses.js";
4
+ export interface HeatmapCellOwnerState {
5
+ seriesId: SeriesId;
6
+ color: string;
7
+ isFaded: boolean;
8
+ isHighlighted: boolean;
9
+ classes?: Partial<HeatmapClasses>;
10
+ value: number;
11
+ }
12
+ /**
13
+ * @deprecated Use `HeatmapCellOwnerState` instead.
14
+ */
15
+ export type HeatmapItemOwnerState = HeatmapCellOwnerState;
16
+ export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ ownerState: HeatmapCellOwnerState;
22
+ }
23
+ /**
24
+ * Demos:
25
+ *
26
+ * - [Heatmap](https://mui.com/x/react-charts/heatmap/)
27
+ *
28
+ * API:
29
+ *
30
+ * - [HeatmapCell API](https://mui.com/x/api/charts/heatmap-cell/)
31
+ */
32
+ declare const HeatmapCell: React.ForwardRefExoticComponent<Omit<HeatmapCellProps, "ref"> & React.RefAttributes<SVGRectElement>>;
33
+ export { HeatmapCell };
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.HeatmapCell = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _styles = require("@mui/material/styles");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ /**
15
+ * @deprecated Use `HeatmapCellOwnerState` instead.
16
+ */
17
+
18
+ const HeatmapCellRoot = (0, _styles.styled)('rect', {
19
+ name: 'MuiHeatmap',
20
+ slot: 'Cell',
21
+ overridesResolver: (_, styles) => styles.cell
22
+ })(({
23
+ ownerState
24
+ }) => ({
25
+ filter: ownerState.isHighlighted && 'saturate(120%)' || ownerState.isFaded && 'saturate(80%)' || undefined,
26
+ fill: ownerState.color,
27
+ shapeRendering: 'crispEdges'
28
+ }));
29
+
30
+ /**
31
+ * Demos:
32
+ *
33
+ * - [Heatmap](https://mui.com/x/react-charts/heatmap/)
34
+ *
35
+ * API:
36
+ *
37
+ * - [HeatmapCell API](https://mui.com/x/api/charts/heatmap-cell/)
38
+ */
39
+ const HeatmapCell = exports.HeatmapCell = /*#__PURE__*/React.forwardRef(function HeatmapCell(props, ref) {
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(HeatmapCellRoot, (0, _extends2.default)({
41
+ ref: ref
42
+ }, props));
43
+ });
44
+ if (process.env.NODE_ENV !== "production") HeatmapCell.displayName = "HeatmapCell";
45
+ process.env.NODE_ENV !== "production" ? HeatmapCell.propTypes = {
46
+ // ----------------------------- Warning --------------------------------
47
+ // | These PropTypes are generated from the TypeScript type definitions |
48
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
49
+ // ----------------------------------------------------------------------
50
+ height: _propTypes.default.number.isRequired,
51
+ ownerState: _propTypes.default.shape({
52
+ classes: _propTypes.default.object,
53
+ color: _propTypes.default.string.isRequired,
54
+ isFaded: _propTypes.default.bool.isRequired,
55
+ isHighlighted: _propTypes.default.bool.isRequired,
56
+ seriesId: _propTypes.default.string.isRequired,
57
+ value: _propTypes.default.number.isRequired
58
+ }).isRequired,
59
+ width: _propTypes.default.number.isRequired,
60
+ x: _propTypes.default.number.isRequired,
61
+ y: _propTypes.default.number.isRequired
62
+ } : void 0;
@@ -0,0 +1,55 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import * as React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { styled } from '@mui/material/styles';
5
+
6
+ /**
7
+ * @deprecated Use `HeatmapCellOwnerState` instead.
8
+ */
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ const HeatmapCellRoot = styled('rect', {
11
+ name: 'MuiHeatmap',
12
+ slot: 'Cell',
13
+ overridesResolver: (_, styles) => styles.cell
14
+ })(({
15
+ ownerState
16
+ }) => ({
17
+ filter: ownerState.isHighlighted && 'saturate(120%)' || ownerState.isFaded && 'saturate(80%)' || undefined,
18
+ fill: ownerState.color,
19
+ shapeRendering: 'crispEdges'
20
+ }));
21
+
22
+ /**
23
+ * Demos:
24
+ *
25
+ * - [Heatmap](https://mui.com/x/react-charts/heatmap/)
26
+ *
27
+ * API:
28
+ *
29
+ * - [HeatmapCell API](https://mui.com/x/api/charts/heatmap-cell/)
30
+ */
31
+ const HeatmapCell = /*#__PURE__*/React.forwardRef(function HeatmapCell(props, ref) {
32
+ return /*#__PURE__*/_jsx(HeatmapCellRoot, _extends({
33
+ ref: ref
34
+ }, props));
35
+ });
36
+ if (process.env.NODE_ENV !== "production") HeatmapCell.displayName = "HeatmapCell";
37
+ process.env.NODE_ENV !== "production" ? HeatmapCell.propTypes = {
38
+ // ----------------------------- Warning --------------------------------
39
+ // | These PropTypes are generated from the TypeScript type definitions |
40
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
41
+ // ----------------------------------------------------------------------
42
+ height: PropTypes.number.isRequired,
43
+ ownerState: PropTypes.shape({
44
+ classes: PropTypes.object,
45
+ color: PropTypes.string.isRequired,
46
+ isFaded: PropTypes.bool.isRequired,
47
+ isHighlighted: PropTypes.bool.isRequired,
48
+ seriesId: PropTypes.string.isRequired,
49
+ value: PropTypes.number.isRequired
50
+ }).isRequired,
51
+ width: PropTypes.number.isRequired,
52
+ x: PropTypes.number.isRequired,
53
+ y: PropTypes.number.isRequired
54
+ } : void 0;
55
+ export { HeatmapCell };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { type SeriesId } from '@mui/x-charts/internals';
3
- import { type HeatmapItemOwnerState } from "./internals/HeatmapCell.mjs";
3
+ import { type HeatmapCellProps } from "./HeatmapCell.mjs";
4
4
  export interface HeatmapItemSlots {
5
5
  /**
6
6
  * The component that renders the heatmap cell.
@@ -12,7 +12,6 @@ export interface HeatmapItemSlotProps {
12
12
  cell?: Partial<HeatmapCellProps>;
13
13
  }
14
14
  export interface HeatmapItemProps {
15
- dataIndex: number;
16
15
  seriesId: SeriesId;
17
16
  value: number;
18
17
  width: number;
@@ -39,13 +38,6 @@ export interface HeatmapItemProps {
39
38
  */
40
39
  slots?: HeatmapItemSlots;
41
40
  }
42
- export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
43
- x: number;
44
- y: number;
45
- width: number;
46
- height: number;
47
- ownerState: HeatmapItemOwnerState;
48
- }
49
41
  /**
50
42
  * @ignore - internal component.
51
43
  */
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { type SeriesId } from '@mui/x-charts/internals';
3
- import { type HeatmapItemOwnerState } from "./internals/HeatmapCell.js";
3
+ import { type HeatmapCellProps } from "./HeatmapCell.js";
4
4
  export interface HeatmapItemSlots {
5
5
  /**
6
6
  * The component that renders the heatmap cell.
@@ -12,7 +12,6 @@ export interface HeatmapItemSlotProps {
12
12
  cell?: Partial<HeatmapCellProps>;
13
13
  }
14
14
  export interface HeatmapItemProps {
15
- dataIndex: number;
16
15
  seriesId: SeriesId;
17
16
  value: number;
18
17
  width: number;
@@ -39,13 +38,6 @@ export interface HeatmapItemProps {
39
38
  */
40
39
  slots?: HeatmapItemSlots;
41
40
  }
42
- export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
43
- x: number;
44
- y: number;
45
- width: number;
46
- height: number;
47
- ownerState: HeatmapItemOwnerState;
48
- }
49
41
  /**
50
42
  * @ignore - internal component.
51
43
  */
@@ -11,33 +11,18 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
14
- var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
14
  var _internals = require("@mui/x-charts/internals");
16
15
  var _heatmapClasses = require("./heatmapClasses");
17
- var _HeatmapCell = require("./internals/HeatmapCell");
16
+ var _HeatmapCell = require("./HeatmapCell");
18
17
  var _shouldRegisterPointerInteractionsGlobally = require("./shouldRegisterPointerInteractionsGlobally");
19
18
  var _jsxRuntime = require("react/jsx-runtime");
20
- const _excluded = ["seriesId", "dataIndex", "color", "value", "isHighlighted", "isFaded", "borderRadius", "xIndex", "yIndex", "slotProps", "slots"];
21
- const useUtilityClasses = ownerState => {
22
- const {
23
- classes,
24
- seriesId,
25
- isFaded,
26
- isHighlighted
27
- } = ownerState;
28
- const slots = {
29
- cell: ['cell', `series-${seriesId}`, isFaded && 'faded', isHighlighted && 'highlighted']
30
- };
31
- return (0, _composeClasses.default)(slots, _heatmapClasses.getHeatmapUtilityClass, classes);
32
- };
33
-
19
+ const _excluded = ["seriesId", "color", "value", "isHighlighted", "isFaded", "borderRadius", "xIndex", "yIndex", "slotProps", "slots"];
34
20
  /**
35
21
  * @ignore - internal component.
36
22
  */
37
23
  function HeatmapItem(props) {
38
24
  const {
39
25
  seriesId,
40
- dataIndex,
41
26
  color,
42
27
  value,
43
28
  isHighlighted = false,
@@ -56,19 +41,17 @@ function HeatmapItem(props) {
56
41
  const interactionProps = (0, _internals.useInteractionItemProps)({
57
42
  type: 'heatmap',
58
43
  seriesId,
59
- dataIndex,
60
44
  xIndex,
61
45
  yIndex
62
46
  }, skipInteractionItemProps);
63
47
  const ownerState = {
64
48
  seriesId,
65
- dataIndex,
66
49
  color,
67
- value,
68
50
  isFaded,
69
- isHighlighted
51
+ isHighlighted,
52
+ value
70
53
  };
71
- const classes = useUtilityClasses(ownerState);
54
+ const classes = (0, _heatmapClasses.useUtilityClasses)(ownerState);
72
55
  const Cell = slots?.cell ?? _HeatmapCell.HeatmapCell;
73
56
  const cellProps = (0, _useSlotProps.default)({
74
57
  elementType: Cell,
@@ -91,7 +74,6 @@ process.env.NODE_ENV !== "production" ? HeatmapItem.propTypes = {
91
74
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
92
75
  // ----------------------------------------------------------------------
93
76
  color: _propTypes.default.string.isRequired,
94
- dataIndex: _propTypes.default.number.isRequired,
95
77
  height: _propTypes.default.number.isRequired,
96
78
  seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
97
79
  /**
@@ -1,35 +1,20 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["seriesId", "dataIndex", "color", "value", "isHighlighted", "isFaded", "borderRadius", "xIndex", "yIndex", "slotProps", "slots"];
3
+ const _excluded = ["seriesId", "color", "value", "isHighlighted", "isFaded", "borderRadius", "xIndex", "yIndex", "slotProps", "slots"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import useSlotProps from '@mui/utils/useSlotProps';
7
- import composeClasses from '@mui/utils/composeClasses';
8
7
  import { useInteractionItemProps } from '@mui/x-charts/internals';
9
- import { getHeatmapUtilityClass } from "./heatmapClasses.mjs";
10
- import { HeatmapCell } from "./internals/HeatmapCell.mjs";
8
+ import { useUtilityClasses } from "./heatmapClasses.mjs";
9
+ import { HeatmapCell } from "./HeatmapCell.mjs";
11
10
  import { shouldRegisterPointerInteractionsGlobally } from "./shouldRegisterPointerInteractionsGlobally.mjs";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
13
- const useUtilityClasses = ownerState => {
14
- const {
15
- classes,
16
- seriesId,
17
- isFaded,
18
- isHighlighted
19
- } = ownerState;
20
- const slots = {
21
- cell: ['cell', `series-${seriesId}`, isFaded && 'faded', isHighlighted && 'highlighted']
22
- };
23
- return composeClasses(slots, getHeatmapUtilityClass, classes);
24
- };
25
-
26
12
  /**
27
13
  * @ignore - internal component.
28
14
  */
29
15
  function HeatmapItem(props) {
30
16
  const {
31
17
  seriesId,
32
- dataIndex,
33
18
  color,
34
19
  value,
35
20
  isHighlighted = false,
@@ -48,17 +33,15 @@ function HeatmapItem(props) {
48
33
  const interactionProps = useInteractionItemProps({
49
34
  type: 'heatmap',
50
35
  seriesId,
51
- dataIndex,
52
36
  xIndex,
53
37
  yIndex
54
38
  }, skipInteractionItemProps);
55
39
  const ownerState = {
56
40
  seriesId,
57
- dataIndex,
58
41
  color,
59
- value,
60
42
  isFaded,
61
- isHighlighted
43
+ isHighlighted,
44
+ value
62
45
  };
63
46
  const classes = useUtilityClasses(ownerState);
64
47
  const Cell = slots?.cell ?? HeatmapCell;
@@ -83,7 +66,6 @@ process.env.NODE_ENV !== "production" ? HeatmapItem.propTypes = {
83
66
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
84
67
  // ----------------------------------------------------------------------
85
68
  color: PropTypes.string.isRequired,
86
- dataIndex: PropTypes.number.isRequired,
87
69
  height: PropTypes.number.isRequired,
88
70
  seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
89
71
  /**
@@ -7,23 +7,28 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.HeatmapSVGPlot = HeatmapSVGPlot;
9
9
  var React = _interopRequireWildcard(require("react"));
10
+ var _styles = require("@mui/material/styles");
10
11
  var _hooks = require("@mui/x-charts/hooks");
11
12
  var _internals = require("@mui/x-charts/internals");
12
13
  var _hooks2 = require("../hooks");
13
14
  var _HeatmapItem = require("./HeatmapItem");
14
15
  var _useChartHeatmapPosition = require("../plugins/selectors/useChartHeatmapPosition.selectors");
15
16
  var _shouldRegisterPointerInteractionsGlobally = require("./shouldRegisterPointerInteractionsGlobally");
17
+ var _heatmapClasses = require("./heatmapClasses");
16
18
  var _jsxRuntime = require("react/jsx-runtime");
17
19
  const MemoHeatmapItem = /*#__PURE__*/React.memo(_HeatmapItem.HeatmapItem);
18
20
  if (process.env.NODE_ENV !== "production") MemoHeatmapItem.displayName = "MemoHeatmapItem";
21
+ const HeatmapPlotRoot = (0, _styles.styled)('g', {
22
+ name: 'MuiHeatmapPlot',
23
+ slot: 'Root'
24
+ })();
19
25
  function HeatmapSVGPlot(props) {
20
26
  const store = (0, _internals.useStore)();
21
27
  const xScale = (0, _hooks.useXScale)();
22
28
  const yScale = (0, _hooks.useYScale)();
23
29
  const colorScale = (0, _hooks.useZColorScale)();
24
30
  const series = (0, _hooks2.useHeatmapSeriesContext)();
25
- const isHighlighted = store.use(_internals.selectorChartsIsHighlightedCallback);
26
- const isFaded = store.use(_internals.selectorChartsIsFadedCallback);
31
+ const getHighlightState = store.use(_internals.selectorChartsHighlightStateCallback);
27
32
  const xDomain = xScale.domain();
28
33
  const yDomain = yScale.domain();
29
34
  if (!series || series.seriesOrder.length === 0) {
@@ -31,8 +36,10 @@ function HeatmapSVGPlot(props) {
31
36
  }
32
37
  const seriesToDisplay = series.series[series.seriesOrder[0]];
33
38
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
34
- children: [(0, _shouldRegisterPointerInteractionsGlobally.shouldRegisterPointerInteractionsGlobally)(props.slots, props.slotProps) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(RegisterHeatmapPointerInteractions, {}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
35
- children: seriesToDisplay.data.map(([xIndex, yIndex, value], dataIndex) => {
39
+ children: [(0, _shouldRegisterPointerInteractionsGlobally.shouldRegisterPointerInteractionsGlobally)(props.slots, props.slotProps) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(RegisterHeatmapPointerInteractions, {}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(HeatmapPlotRoot, {
40
+ className: _heatmapClasses.heatmapClasses.root,
41
+ "data-series": seriesToDisplay.id,
42
+ children: seriesToDisplay.data.map(([xIndex, yIndex, value]) => {
36
43
  const x = xScale(xDomain[xIndex]);
37
44
  const y = yScale(yDomain[yIndex]);
38
45
  const color = colorScale?.(value);
@@ -45,6 +52,7 @@ function HeatmapSVGPlot(props) {
45
52
  xIndex,
46
53
  yIndex
47
54
  };
55
+ const highlightState = getHighlightState(item);
48
56
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(MemoHeatmapItem, {
49
57
  width: xScale.bandwidth(),
50
58
  height: yScale.bandwidth(),
@@ -53,13 +61,12 @@ function HeatmapSVGPlot(props) {
53
61
  xIndex: xIndex,
54
62
  yIndex: yIndex,
55
63
  color: color,
56
- dataIndex: dataIndex,
57
64
  seriesId: series.seriesOrder[0],
58
65
  value: value,
59
66
  slots: props.slots,
60
67
  slotProps: props.slotProps,
61
- isHighlighted: isHighlighted(item),
62
- isFaded: isFaded(item),
68
+ isHighlighted: highlightState === 'highlighted',
69
+ isFaded: highlightState === 'faded',
63
70
  borderRadius: props.borderRadius
64
71
  }, `${xIndex}_${yIndex}`);
65
72
  })
@@ -1,23 +1,28 @@
1
1
  'use client';
2
2
 
3
3
  import * as React from 'react';
4
+ import { styled } from '@mui/material/styles';
4
5
  import { useXScale, useYScale, useZColorScale } from '@mui/x-charts/hooks';
5
- import { selectorChartsIsFadedCallback, selectorChartsIsHighlightedCallback, useStore, useRegisterPointerInteractions } from '@mui/x-charts/internals';
6
+ import { selectorChartsHighlightStateCallback, useStore, useRegisterPointerInteractions } from '@mui/x-charts/internals';
6
7
  import { useHeatmapSeriesContext } from "../hooks/index.mjs";
7
8
  import { HeatmapItem } from "./HeatmapItem.mjs";
8
9
  import { selectorHeatmapItemAtPosition } from "../plugins/selectors/useChartHeatmapPosition.selectors.mjs";
9
10
  import { shouldRegisterPointerInteractionsGlobally } from "./shouldRegisterPointerInteractionsGlobally.mjs";
11
+ import { heatmapClasses } from "./heatmapClasses.mjs";
10
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
13
  const MemoHeatmapItem = /*#__PURE__*/React.memo(HeatmapItem);
12
14
  if (process.env.NODE_ENV !== "production") MemoHeatmapItem.displayName = "MemoHeatmapItem";
15
+ const HeatmapPlotRoot = styled('g', {
16
+ name: 'MuiHeatmapPlot',
17
+ slot: 'Root'
18
+ })();
13
19
  export function HeatmapSVGPlot(props) {
14
20
  const store = useStore();
15
21
  const xScale = useXScale();
16
22
  const yScale = useYScale();
17
23
  const colorScale = useZColorScale();
18
24
  const series = useHeatmapSeriesContext();
19
- const isHighlighted = store.use(selectorChartsIsHighlightedCallback);
20
- const isFaded = store.use(selectorChartsIsFadedCallback);
25
+ const getHighlightState = store.use(selectorChartsHighlightStateCallback);
21
26
  const xDomain = xScale.domain();
22
27
  const yDomain = yScale.domain();
23
28
  if (!series || series.seriesOrder.length === 0) {
@@ -25,8 +30,10 @@ export function HeatmapSVGPlot(props) {
25
30
  }
26
31
  const seriesToDisplay = series.series[series.seriesOrder[0]];
27
32
  return /*#__PURE__*/_jsxs(React.Fragment, {
28
- children: [shouldRegisterPointerInteractionsGlobally(props.slots, props.slotProps) ? /*#__PURE__*/_jsx(RegisterHeatmapPointerInteractions, {}) : null, /*#__PURE__*/_jsx("g", {
29
- children: seriesToDisplay.data.map(([xIndex, yIndex, value], dataIndex) => {
33
+ children: [shouldRegisterPointerInteractionsGlobally(props.slots, props.slotProps) ? /*#__PURE__*/_jsx(RegisterHeatmapPointerInteractions, {}) : null, /*#__PURE__*/_jsx(HeatmapPlotRoot, {
34
+ className: heatmapClasses.root,
35
+ "data-series": seriesToDisplay.id,
36
+ children: seriesToDisplay.data.map(([xIndex, yIndex, value]) => {
30
37
  const x = xScale(xDomain[xIndex]);
31
38
  const y = yScale(yDomain[yIndex]);
32
39
  const color = colorScale?.(value);
@@ -39,6 +46,7 @@ export function HeatmapSVGPlot(props) {
39
46
  xIndex,
40
47
  yIndex
41
48
  };
49
+ const highlightState = getHighlightState(item);
42
50
  return /*#__PURE__*/_jsx(MemoHeatmapItem, {
43
51
  width: xScale.bandwidth(),
44
52
  height: yScale.bandwidth(),
@@ -47,13 +55,12 @@ export function HeatmapSVGPlot(props) {
47
55
  xIndex: xIndex,
48
56
  yIndex: yIndex,
49
57
  color: color,
50
- dataIndex: dataIndex,
51
58
  seriesId: series.seriesOrder[0],
52
59
  value: value,
53
60
  slots: props.slots,
54
61
  slotProps: props.slotProps,
55
- isHighlighted: isHighlighted(item),
56
- isFaded: isFaded(item),
62
+ isHighlighted: highlightState === 'highlighted',
63
+ isFaded: highlightState === 'faded',
57
64
  borderRadius: props.borderRadius
58
65
  }, `${xIndex}_${yIndex}`);
59
66
  })
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.useUtilityClasses = void 0;
8
8
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
9
- var _ChartsTooltip = require("@mui/x-charts/ChartsTooltip");
9
+ var _internals = require("@mui/x-charts/internals");
10
10
  const useUtilityClasses = props => {
11
11
  const {
12
12
  classes
@@ -22,6 +22,6 @@ const useUtilityClasses = props => {
22
22
  labelCell: ['labelCell'],
23
23
  valueCell: ['valueCell']
24
24
  };
25
- return (0, _composeClasses.default)(slots, _ChartsTooltip.getChartsTooltipUtilityClass, classes);
25
+ return (0, _composeClasses.default)(slots, _internals.getChartsTooltipUtilityClass, classes);
26
26
  };
27
27
  exports.useUtilityClasses = useUtilityClasses;