@mui/x-charts-pro 8.0.0-alpha.9 → 8.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. package/BarChartPro/BarChartPro.d.ts +4 -4
  2. package/BarChartPro/BarChartPro.js +240 -284
  3. package/BarChartPro/BarChartPro.plugins.d.ts +4 -0
  4. package/BarChartPro/BarChartPro.plugins.js +9 -0
  5. package/BarChartPro/index.d.ts +1 -1
  6. package/BarChartPro/index.js +16 -1
  7. package/CHANGELOG.md +1446 -0
  8. package/ChartContainerPro/ChartContainerPro.d.ts +8 -9
  9. package/ChartContainerPro/ChartContainerPro.js +181 -174
  10. package/ChartContainerPro/index.d.ts +2 -1
  11. package/ChartContainerPro/index.js +17 -1
  12. package/ChartContainerPro/useChartContainerProProps.d.ts +5 -5
  13. package/ChartContainerPro/useChartContainerProProps.js +28 -19
  14. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +7 -7
  15. package/ChartDataProviderPro/ChartDataProviderPro.js +40 -220
  16. package/ChartDataProviderPro/index.d.ts +2 -1
  17. package/ChartDataProviderPro/index.js +17 -1
  18. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +7 -7
  19. package/ChartDataProviderPro/useChartDataProviderProProps.js +10 -6
  20. package/FunnelChart/FunnelChart.d.ts +37 -0
  21. package/FunnelChart/FunnelChart.js +218 -0
  22. package/FunnelChart/FunnelPlot.d.ts +16 -0
  23. package/FunnelChart/FunnelPlot.js +191 -0
  24. package/FunnelChart/FunnelSection.d.ts +15 -0
  25. package/FunnelChart/FunnelSection.js +62 -0
  26. package/FunnelChart/categoryAxis.types.d.ts +24 -0
  27. package/FunnelChart/funnel.types.d.ts +124 -0
  28. package/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  29. package/FunnelChart/funnelSectionClasses.d.ts +13 -0
  30. package/FunnelChart/funnelSectionClasses.js +28 -0
  31. package/FunnelChart/funnelSlots.types.d.ts +19 -0
  32. package/FunnelChart/funnelStepCurve.d.ts +4 -0
  33. package/FunnelChart/funnelStepCurve.js +74 -0
  34. package/FunnelChart/index.d.ts +7 -0
  35. package/FunnelChart/index.js +59 -0
  36. package/FunnelChart/labelUtils.d.ts +42 -0
  37. package/FunnelChart/labelUtils.js +174 -0
  38. package/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  39. package/FunnelChart/seriesConfig/extremums.js +50 -0
  40. package/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  41. package/FunnelChart/seriesConfig/getColor.js +10 -0
  42. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  43. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +18 -0
  44. package/FunnelChart/seriesConfig/index.d.ts +2 -0
  45. package/FunnelChart/seriesConfig/index.js +22 -0
  46. package/FunnelChart/seriesConfig/legend.d.ts +3 -0
  47. package/FunnelChart/seriesConfig/legend.js +31 -0
  48. package/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  49. package/FunnelChart/seriesConfig/seriesProcessor.js +96 -0
  50. package/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  51. package/FunnelChart/seriesConfig/tooltip.js +36 -0
  52. package/FunnelChart/useFunnelChartProps.d.ts +30 -0
  53. package/FunnelChart/useFunnelChartProps.js +168 -0
  54. package/Heatmap/Heatmap.d.ts +45 -45
  55. package/Heatmap/Heatmap.js +236 -244
  56. package/Heatmap/Heatmap.plugins.d.ts +3 -0
  57. package/Heatmap/Heatmap.plugins.js +8 -0
  58. package/Heatmap/HeatmapItem.d.ts +33 -33
  59. package/Heatmap/HeatmapItem.js +43 -36
  60. package/Heatmap/HeatmapPlot.d.ts +4 -5
  61. package/Heatmap/HeatmapPlot.js +22 -16
  62. package/Heatmap/HeatmapTooltip.d.ts +3 -4
  63. package/Heatmap/HeatmapTooltip.js +101 -89
  64. package/Heatmap/heatmapClasses.d.ts +7 -7
  65. package/Heatmap/heatmapClasses.js +15 -7
  66. package/Heatmap/index.d.ts +4 -4
  67. package/Heatmap/index.js +47 -4
  68. package/Heatmap/{extremums.d.ts → seriesConfig/extremums.d.ts} +1 -1
  69. package/Heatmap/{getColor.d.ts → seriesConfig/getColor.d.ts} +1 -1
  70. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  71. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +15 -0
  72. package/Heatmap/seriesConfig/index.d.ts +2 -0
  73. package/Heatmap/seriesConfig/index.js +21 -0
  74. package/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  75. package/{node/Heatmap/formatter.js → Heatmap/seriesConfig/seriesProcessor.js} +2 -2
  76. package/Heatmap/seriesConfig/tooltip.d.ts +3 -0
  77. package/Heatmap/seriesConfig/tooltip.js +31 -0
  78. package/LineChartPro/LineChartPro.d.ts +4 -4
  79. package/LineChartPro/LineChartPro.js +242 -340
  80. package/LineChartPro/LineChartPro.plugins.d.ts +4 -0
  81. package/LineChartPro/LineChartPro.plugins.js +9 -0
  82. package/LineChartPro/index.d.ts +1 -1
  83. package/LineChartPro/index.js +16 -1
  84. package/README.md +1 -1
  85. package/ScatterChartPro/ScatterChartPro.d.ts +4 -4
  86. package/ScatterChartPro/ScatterChartPro.js +244 -235
  87. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
  88. package/ScatterChartPro/ScatterChartPro.plugins.js +9 -0
  89. package/ScatterChartPro/index.d.ts +1 -1
  90. package/ScatterChartPro/index.js +16 -1
  91. package/esm/BarChartPro/BarChartPro.d.ts +18 -0
  92. package/esm/BarChartPro/BarChartPro.js +404 -0
  93. package/esm/BarChartPro/BarChartPro.plugins.d.ts +4 -0
  94. package/esm/BarChartPro/BarChartPro.plugins.js +3 -0
  95. package/esm/BarChartPro/index.d.ts +1 -0
  96. package/esm/BarChartPro/index.js +1 -0
  97. package/esm/ChartContainerPro/ChartContainerPro.d.ts +35 -0
  98. package/esm/ChartContainerPro/ChartContainerPro.js +290 -0
  99. package/esm/ChartContainerPro/index.d.ts +2 -0
  100. package/esm/ChartContainerPro/index.js +2 -0
  101. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +9 -0
  102. package/esm/ChartContainerPro/useChartContainerProProps.js +35 -0
  103. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
  104. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +106 -0
  105. package/esm/ChartDataProviderPro/index.d.ts +2 -0
  106. package/esm/ChartDataProviderPro/index.js +2 -0
  107. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
  108. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
  109. package/esm/FunnelChart/FunnelChart.d.ts +37 -0
  110. package/esm/FunnelChart/FunnelChart.js +212 -0
  111. package/esm/FunnelChart/FunnelPlot.d.ts +16 -0
  112. package/esm/FunnelChart/FunnelPlot.js +184 -0
  113. package/esm/FunnelChart/FunnelSection.d.ts +15 -0
  114. package/esm/FunnelChart/FunnelSection.js +56 -0
  115. package/esm/FunnelChart/categoryAxis.types.d.ts +24 -0
  116. package/esm/FunnelChart/funnel.types.d.ts +124 -0
  117. package/esm/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  118. package/esm/FunnelChart/funnelPlotSlots.types.js +1 -0
  119. package/esm/FunnelChart/funnelSectionClasses.d.ts +13 -0
  120. package/esm/FunnelChart/funnelSectionClasses.js +20 -0
  121. package/esm/FunnelChart/funnelSlots.types.d.ts +19 -0
  122. package/esm/FunnelChart/funnelSlots.types.js +1 -0
  123. package/esm/FunnelChart/funnelStepCurve.d.ts +4 -0
  124. package/esm/FunnelChart/funnelStepCurve.js +67 -0
  125. package/esm/FunnelChart/index.d.ts +7 -0
  126. package/esm/FunnelChart/index.js +5 -0
  127. package/esm/FunnelChart/labelUtils.d.ts +42 -0
  128. package/esm/FunnelChart/labelUtils.js +166 -0
  129. package/esm/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  130. package/esm/FunnelChart/seriesConfig/extremums.js +42 -0
  131. package/esm/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  132. package/esm/FunnelChart/seriesConfig/getColor.js +4 -0
  133. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  134. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
  135. package/esm/FunnelChart/seriesConfig/index.d.ts +2 -0
  136. package/esm/FunnelChart/seriesConfig/index.js +15 -0
  137. package/esm/FunnelChart/seriesConfig/legend.d.ts +3 -0
  138. package/esm/FunnelChart/seriesConfig/legend.js +25 -0
  139. package/esm/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  140. package/esm/FunnelChart/seriesConfig/seriesProcessor.js +89 -0
  141. package/esm/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  142. package/esm/FunnelChart/seriesConfig/tooltip.js +29 -0
  143. package/esm/FunnelChart/useFunnelChartProps.d.ts +30 -0
  144. package/esm/FunnelChart/useFunnelChartProps.js +161 -0
  145. package/esm/Heatmap/Heatmap.d.ts +57 -0
  146. package/esm/Heatmap/Heatmap.js +387 -0
  147. package/esm/Heatmap/Heatmap.plugins.d.ts +3 -0
  148. package/esm/Heatmap/Heatmap.plugins.js +2 -0
  149. package/esm/Heatmap/HeatmapItem.d.ts +49 -0
  150. package/esm/Heatmap/HeatmapItem.js +106 -0
  151. package/esm/Heatmap/HeatmapPlot.d.ts +8 -0
  152. package/{node → esm}/Heatmap/HeatmapPlot.js +16 -22
  153. package/esm/Heatmap/HeatmapTooltip.d.ts +8 -0
  154. package/esm/Heatmap/HeatmapTooltip.js +280 -0
  155. package/esm/Heatmap/heatmapClasses.d.ts +11 -0
  156. package/esm/Heatmap/heatmapClasses.js +14 -0
  157. package/esm/Heatmap/index.d.ts +4 -0
  158. package/esm/Heatmap/index.js +4 -0
  159. package/esm/Heatmap/seriesConfig/extremums.d.ts +2 -0
  160. package/esm/Heatmap/seriesConfig/getColor.d.ts +3 -0
  161. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  162. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +8 -0
  163. package/esm/Heatmap/seriesConfig/index.d.ts +2 -0
  164. package/esm/Heatmap/seriesConfig/index.js +14 -0
  165. package/esm/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  166. package/{Heatmap/formatter.js → esm/Heatmap/seriesConfig/seriesProcessor.js} +2 -2
  167. package/esm/Heatmap/seriesConfig/tooltip.d.ts +3 -0
  168. package/esm/Heatmap/seriesConfig/tooltip.js +25 -0
  169. package/esm/LineChartPro/LineChartPro.d.ts +17 -0
  170. package/esm/LineChartPro/LineChartPro.js +401 -0
  171. package/esm/LineChartPro/LineChartPro.plugins.d.ts +4 -0
  172. package/esm/LineChartPro/LineChartPro.plugins.js +3 -0
  173. package/esm/LineChartPro/index.d.ts +1 -0
  174. package/esm/LineChartPro/index.js +1 -0
  175. package/esm/ScatterChartPro/ScatterChartPro.d.ts +17 -0
  176. package/esm/ScatterChartPro/ScatterChartPro.js +395 -0
  177. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
  178. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
  179. package/esm/ScatterChartPro/index.d.ts +1 -0
  180. package/esm/ScatterChartPro/index.js +1 -0
  181. package/esm/hooks/index.d.ts +2 -0
  182. package/esm/hooks/index.js +2 -0
  183. package/esm/hooks/useFunnelSeries.d.ts +33 -0
  184. package/esm/hooks/useFunnelSeries.js +42 -0
  185. package/esm/hooks/useHeatmapSeries.d.ts +33 -0
  186. package/esm/hooks/useHeatmapSeries.js +42 -0
  187. package/esm/hooks/zoom/index.d.ts +1 -0
  188. package/esm/hooks/zoom/index.js +1 -0
  189. package/esm/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
  190. package/esm/hooks/zoom/useIsZoomInteracting.js +14 -0
  191. package/esm/index.d.ts +34 -0
  192. package/esm/index.js +45 -0
  193. package/esm/internals/plugins/allPlugins.d.ts +8 -0
  194. package/esm/internals/plugins/allPlugins.js +6 -0
  195. package/esm/internals/plugins/useChartProZoom/index.d.ts +3 -0
  196. package/esm/internals/plugins/useChartProZoom/index.js +3 -0
  197. package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
  198. package/{node → esm}/internals/plugins/useChartProZoom/useChartProZoom.js +94 -54
  199. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +203 -0
  200. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +4 -0
  201. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +53 -0
  202. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.js +1 -0
  203. package/esm/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
  204. package/{node → esm}/internals/plugins/useChartProZoom/useChartProZoom.utils.js +8 -22
  205. package/esm/internals/utils/releaseInfo.d.ts +1 -0
  206. package/esm/internals/utils/releaseInfo.js +13 -0
  207. package/esm/models/index.d.ts +2 -0
  208. package/esm/models/index.js +2 -0
  209. package/esm/models/seriesType/heatmap.d.ts +28 -0
  210. package/esm/models/seriesType/heatmap.js +1 -0
  211. package/esm/models/seriesType/index.d.ts +1 -0
  212. package/esm/models/seriesType/index.js +1 -0
  213. package/esm/package.json +1 -0
  214. package/esm/themeAugmentation/components.d.ts +23 -0
  215. package/esm/themeAugmentation/index.d.ts +4 -0
  216. package/esm/themeAugmentation/index.js +0 -0
  217. package/esm/themeAugmentation/overrides.d.ts +11 -0
  218. package/esm/themeAugmentation/props.d.ts +20 -0
  219. package/esm/typeOverloads/index.d.ts +1 -0
  220. package/esm/typeOverloads/index.js +1 -0
  221. package/esm/typeOverloads/modules.d.ts +33 -0
  222. package/esm/typeOverloads/modules.js +1 -0
  223. package/hooks/index.d.ts +2 -2
  224. package/hooks/index.js +27 -2
  225. package/hooks/useFunnelSeries.d.ts +33 -0
  226. package/hooks/useFunnelSeries.js +48 -0
  227. package/hooks/useHeatmapSeries.d.ts +33 -0
  228. package/hooks/useHeatmapSeries.js +48 -0
  229. package/hooks/zoom/index.d.ts +1 -1
  230. package/hooks/zoom/index.js +16 -1
  231. package/hooks/zoom/useIsZoomInteracting.d.ts +1 -1
  232. package/hooks/zoom/useIsZoomInteracting.js +10 -5
  233. package/index.d.ts +10 -8
  234. package/index.js +369 -37
  235. package/internals/plugins/allPlugins.d.ts +7 -9
  236. package/internals/plugins/allPlugins.js +10 -3
  237. package/internals/plugins/useChartProZoom/index.d.ts +3 -3
  238. package/internals/plugins/useChartProZoom/index.js +38 -3
  239. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
  240. package/internals/plugins/useChartProZoom/useChartProZoom.js +101 -47
  241. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +154 -328
  242. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +11 -10
  243. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +42 -39
  244. package/internals/plugins/useChartProZoom/useChartProZoom.types.js +5 -1
  245. package/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +13 -13
  246. package/internals/plugins/useChartProZoom/useChartProZoom.utils.js +22 -8
  247. package/internals/utils/releaseInfo.d.ts +1 -1
  248. package/internals/utils/releaseInfo.js +13 -5
  249. package/models/index.d.ts +1 -1
  250. package/models/index.js +16 -2
  251. package/models/seriesType/heatmap.d.ts +18 -19
  252. package/models/seriesType/heatmap.js +5 -1
  253. package/models/seriesType/index.d.ts +1 -1
  254. package/models/seriesType/index.js +16 -1
  255. package/modern/BarChartPro/BarChartPro.d.ts +18 -0
  256. package/modern/BarChartPro/BarChartPro.js +35 -85
  257. package/modern/BarChartPro/BarChartPro.plugins.d.ts +4 -0
  258. package/modern/BarChartPro/BarChartPro.plugins.js +3 -0
  259. package/modern/BarChartPro/index.d.ts +1 -0
  260. package/modern/ChartContainerPro/ChartContainerPro.d.ts +35 -0
  261. package/modern/ChartContainerPro/ChartContainerPro.js +4 -3
  262. package/modern/ChartContainerPro/index.d.ts +2 -0
  263. package/modern/ChartContainerPro/index.js +1 -0
  264. package/modern/ChartContainerPro/useChartContainerProProps.d.ts +9 -0
  265. package/modern/ChartContainerPro/useChartContainerProProps.js +15 -13
  266. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
  267. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +18 -204
  268. package/modern/ChartDataProviderPro/index.d.ts +2 -0
  269. package/modern/ChartDataProviderPro/index.js +1 -0
  270. package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
  271. package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
  272. package/modern/FunnelChart/FunnelChart.d.ts +37 -0
  273. package/modern/FunnelChart/FunnelChart.js +212 -0
  274. package/modern/FunnelChart/FunnelPlot.d.ts +16 -0
  275. package/modern/FunnelChart/FunnelPlot.js +184 -0
  276. package/modern/FunnelChart/FunnelSection.d.ts +15 -0
  277. package/modern/FunnelChart/FunnelSection.js +56 -0
  278. package/modern/FunnelChart/categoryAxis.types.d.ts +24 -0
  279. package/modern/FunnelChart/categoryAxis.types.js +1 -0
  280. package/modern/FunnelChart/funnel.types.d.ts +124 -0
  281. package/modern/FunnelChart/funnel.types.js +1 -0
  282. package/modern/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  283. package/modern/FunnelChart/funnelPlotSlots.types.js +1 -0
  284. package/modern/FunnelChart/funnelSectionClasses.d.ts +13 -0
  285. package/modern/FunnelChart/funnelSectionClasses.js +20 -0
  286. package/modern/FunnelChart/funnelSlots.types.d.ts +19 -0
  287. package/modern/FunnelChart/funnelSlots.types.js +1 -0
  288. package/modern/FunnelChart/funnelStepCurve.d.ts +4 -0
  289. package/modern/FunnelChart/funnelStepCurve.js +67 -0
  290. package/modern/FunnelChart/index.d.ts +7 -0
  291. package/modern/FunnelChart/index.js +5 -0
  292. package/modern/FunnelChart/labelUtils.d.ts +42 -0
  293. package/modern/FunnelChart/labelUtils.js +166 -0
  294. package/modern/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  295. package/modern/FunnelChart/seriesConfig/extremums.js +42 -0
  296. package/modern/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  297. package/modern/FunnelChart/seriesConfig/getColor.js +4 -0
  298. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  299. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
  300. package/modern/FunnelChart/seriesConfig/index.d.ts +2 -0
  301. package/modern/FunnelChart/seriesConfig/index.js +15 -0
  302. package/modern/FunnelChart/seriesConfig/legend.d.ts +3 -0
  303. package/modern/FunnelChart/seriesConfig/legend.js +25 -0
  304. package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  305. package/modern/FunnelChart/seriesConfig/seriesProcessor.js +89 -0
  306. package/modern/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  307. package/modern/FunnelChart/seriesConfig/tooltip.js +29 -0
  308. package/modern/FunnelChart/useFunnelChartProps.d.ts +30 -0
  309. package/modern/FunnelChart/useFunnelChartProps.js +161 -0
  310. package/modern/Heatmap/Heatmap.d.ts +57 -0
  311. package/modern/Heatmap/Heatmap.js +47 -61
  312. package/modern/Heatmap/Heatmap.plugins.d.ts +3 -0
  313. package/modern/Heatmap/Heatmap.plugins.js +2 -0
  314. package/modern/Heatmap/HeatmapItem.d.ts +49 -0
  315. package/modern/Heatmap/HeatmapItem.js +7 -7
  316. package/modern/Heatmap/HeatmapPlot.d.ts +8 -0
  317. package/modern/Heatmap/HeatmapPlot.js +2 -2
  318. package/modern/Heatmap/HeatmapTooltip.d.ts +8 -0
  319. package/modern/Heatmap/HeatmapTooltip.js +10 -4
  320. package/modern/Heatmap/heatmapClasses.d.ts +11 -0
  321. package/modern/Heatmap/index.d.ts +4 -0
  322. package/modern/Heatmap/seriesConfig/extremums.d.ts +2 -0
  323. package/modern/Heatmap/seriesConfig/getColor.d.ts +3 -0
  324. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  325. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +8 -0
  326. package/modern/Heatmap/seriesConfig/index.d.ts +2 -0
  327. package/modern/Heatmap/seriesConfig/index.js +14 -0
  328. package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  329. package/modern/Heatmap/{formatter.js → seriesConfig/seriesProcessor.js} +2 -2
  330. package/modern/Heatmap/seriesConfig/tooltip.d.ts +3 -0
  331. package/modern/Heatmap/seriesConfig/tooltip.js +25 -0
  332. package/modern/LineChartPro/LineChartPro.d.ts +17 -0
  333. package/modern/LineChartPro/LineChartPro.js +36 -140
  334. package/modern/LineChartPro/LineChartPro.plugins.d.ts +4 -0
  335. package/modern/LineChartPro/LineChartPro.plugins.js +3 -0
  336. package/modern/LineChartPro/index.d.ts +1 -0
  337. package/modern/ScatterChartPro/ScatterChartPro.d.ts +17 -0
  338. package/modern/ScatterChartPro/ScatterChartPro.js +40 -37
  339. package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
  340. package/modern/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
  341. package/modern/ScatterChartPro/index.d.ts +1 -0
  342. package/modern/hooks/index.d.ts +2 -0
  343. package/modern/hooks/index.js +1 -1
  344. package/modern/hooks/useFunnelSeries.d.ts +33 -0
  345. package/modern/hooks/useFunnelSeries.js +42 -0
  346. package/modern/hooks/useHeatmapSeries.d.ts +33 -0
  347. package/modern/hooks/useHeatmapSeries.js +42 -0
  348. package/modern/hooks/zoom/index.d.ts +1 -0
  349. package/modern/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
  350. package/modern/index.d.ts +34 -0
  351. package/modern/index.js +5 -4
  352. package/modern/internals/plugins/allPlugins.d.ts +8 -0
  353. package/modern/internals/plugins/allPlugins.js +3 -2
  354. package/modern/internals/plugins/useChartProZoom/index.d.ts +3 -0
  355. package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
  356. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +65 -18
  357. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +203 -0
  358. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -7
  359. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +53 -0
  360. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
  361. package/modern/internals/utils/releaseInfo.d.ts +1 -0
  362. package/modern/internals/utils/releaseInfo.js +1 -1
  363. package/modern/models/index.d.ts +2 -0
  364. package/modern/models/seriesType/heatmap.d.ts +28 -0
  365. package/modern/models/seriesType/index.d.ts +1 -0
  366. package/modern/package.json +1 -0
  367. package/modern/themeAugmentation/components.d.ts +23 -0
  368. package/modern/themeAugmentation/index.d.ts +4 -0
  369. package/modern/themeAugmentation/overrides.d.ts +11 -0
  370. package/modern/themeAugmentation/props.d.ts +20 -0
  371. package/modern/typeOverloads/index.d.ts +1 -0
  372. package/modern/typeOverloads/modules.d.ts +33 -0
  373. package/package.json +44 -11
  374. package/themeAugmentation/components.d.ts +1 -3
  375. package/themeAugmentation/index.d.ts +1 -1
  376. package/themeAugmentation/index.js +1 -0
  377. package/themeAugmentation/overrides.d.ts +2 -4
  378. package/themeAugmentation/props.d.ts +5 -7
  379. package/tsconfig.build.tsbuildinfo +1 -0
  380. package/typeOverloads/index.d.ts +1 -1
  381. package/typeOverloads/index.js +6 -1
  382. package/typeOverloads/modules.d.ts +32 -24
  383. package/typeOverloads/modules.js +5 -1
  384. package/BarChartPro/package.json +0 -6
  385. package/ChartContainerPro/package.json +0 -6
  386. package/ChartDataProviderPro/package.json +0 -6
  387. package/Heatmap/formatter.d.ts +0 -3
  388. package/Heatmap/package.json +0 -6
  389. package/Heatmap/plugin.d.ts +0 -2
  390. package/Heatmap/plugin.js +0 -10
  391. package/LineChartPro/package.json +0 -6
  392. package/ScatterChartPro/package.json +0 -6
  393. package/hooks/package.json +0 -6
  394. package/hooks/useSeries.d.ts +0 -11
  395. package/hooks/useSeries.js +0 -16
  396. package/internals/plugins/useChartProZoom/creatZoomLookup.d.ts +0 -3
  397. package/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -12
  398. package/internals/plugins/useChartProZoom/defaultizeZoom.d.ts +0 -2
  399. package/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -25
  400. package/internals/plugins/useChartProZoom/zoom.types.d.ts +0 -53
  401. package/models/package.json +0 -6
  402. package/modern/Heatmap/plugin.js +0 -10
  403. package/modern/hooks/useSeries.js +0 -16
  404. package/modern/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -12
  405. package/modern/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -25
  406. package/node/BarChartPro/BarChartPro.js +0 -460
  407. package/node/BarChartPro/index.js +0 -16
  408. package/node/ChartContainerPro/ChartContainerPro.js +0 -295
  409. package/node/ChartContainerPro/index.js +0 -16
  410. package/node/ChartContainerPro/useChartContainerProProps.js +0 -40
  411. package/node/ChartDataProviderPro/ChartDataProviderPro.js +0 -298
  412. package/node/ChartDataProviderPro/index.js +0 -16
  413. package/node/ChartDataProviderPro/useChartDataProviderProProps.js +0 -23
  414. package/node/Heatmap/Heatmap.js +0 -407
  415. package/node/Heatmap/HeatmapItem.js +0 -113
  416. package/node/Heatmap/HeatmapTooltip.js +0 -280
  417. package/node/Heatmap/heatmapClasses.js +0 -22
  418. package/node/Heatmap/index.js +0 -47
  419. package/node/Heatmap/plugin.js +0 -17
  420. package/node/LineChartPro/LineChartPro.js +0 -511
  421. package/node/LineChartPro/index.js +0 -16
  422. package/node/ScatterChartPro/ScatterChartPro.js +0 -398
  423. package/node/ScatterChartPro/index.js +0 -16
  424. package/node/hooks/index.js +0 -27
  425. package/node/hooks/useSeries.js +0 -21
  426. package/node/hooks/zoom/index.js +0 -16
  427. package/node/hooks/zoom/useIsZoomInteracting.js +0 -19
  428. package/node/index.js +0 -365
  429. package/node/internals/plugins/allPlugins.js +0 -11
  430. package/node/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -19
  431. package/node/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -33
  432. package/node/internals/plugins/useChartProZoom/index.js +0 -38
  433. package/node/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -18
  434. package/node/internals/utils/releaseInfo.js +0 -21
  435. package/node/models/index.js +0 -16
  436. package/node/models/seriesType/index.js +0 -16
  437. package/node/themeAugmentation/index.js +0 -1
  438. package/node/typeOverloads/index.js +0 -6
  439. package/themeAugmentation/package.json +0 -6
  440. package/typeOverloads/package.json +0 -6
  441. /package/{node/internals/plugins/useChartProZoom/useChartProZoom.types.js → FunnelChart/categoryAxis.types.js} +0 -0
  442. /package/{node/internals/plugins/useChartProZoom/zoom.types.js → FunnelChart/funnel.types.js} +0 -0
  443. /package/{node/models/seriesType/heatmap.js → FunnelChart/funnelPlotSlots.types.js} +0 -0
  444. /package/{node/typeOverloads/modules.js → FunnelChart/funnelSlots.types.js} +0 -0
  445. /package/{node/Heatmap → Heatmap/seriesConfig}/extremums.js +0 -0
  446. /package/{node/Heatmap → Heatmap/seriesConfig}/getColor.js +0 -0
  447. /package/{internals/plugins/useChartProZoom/zoom.types.js → esm/FunnelChart/categoryAxis.types.js} +0 -0
  448. /package/{modern/internals/plugins/useChartProZoom/zoom.types.js → esm/FunnelChart/funnel.types.js} +0 -0
  449. /package/{Heatmap → esm/Heatmap/seriesConfig}/extremums.js +0 -0
  450. /package/{Heatmap → esm/Heatmap/seriesConfig}/getColor.js +0 -0
  451. /package/modern/Heatmap/{extremums.js → seriesConfig/extremums.js} +0 -0
  452. /package/modern/Heatmap/{getColor.js → seriesConfig/getColor.js} +0 -0
@@ -0,0 +1,161 @@
1
+ 'use client';
2
+
3
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
+ import _extends from "@babel/runtime/helpers/esm/extends";
5
+ const _excluded = ["categoryAxis", "series", "width", "height", "margin", "colors", "sx", "children", "slots", "slotProps", "skipAnimation", "loading", "onItemClick", "highlightedItem", "onHighlightChange", "className", "hideLegend", "axisHighlight", "apiRef"];
6
+ import { DEFAULT_MARGINS, DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '@mui/x-charts/constants';
7
+ import useId from '@mui/utils/useId';
8
+ import { defaultizeMargin } from '@mui/x-charts/internals';
9
+ import { warnOnce } from '@mui/x-internals/warning';
10
+ function getCategoryAxisConfig(categoryAxis, series, isHorizontal, direction) {
11
+ const maxSeriesLength = Math.max(...series.map(s => (s.data ?? []).length), 0);
12
+ const maxSeriesValue = Array.from({
13
+ length: maxSeriesLength
14
+ }, (_, index) => series.reduce((a, s) => a + (s.data?.[index]?.value ?? 0), 0));
15
+ if (process.env.NODE_ENV !== 'production') {
16
+ if ((categoryAxis?.position === 'left' || categoryAxis?.position === 'right') && isHorizontal || (categoryAxis?.position === 'top' || categoryAxis?.position === 'bottom') && !isHorizontal) {
17
+ warnOnce([`MUI X: the categoryAxis position is set to '${categoryAxis.position}' but the series layout is ${isHorizontal ? 'horizontal' : 'vertical'}.`, `Ensure that the categoryAxis position is set to '${isHorizontal ? 'top' : 'left'}' or '${isHorizontal ? 'bottom' : 'right'}' for ${isHorizontal ? 'horizontal' : 'vertical'} layout.\n`], 'warning');
18
+ }
19
+ }
20
+ const side = isHorizontal ? 'bottom' : 'left';
21
+ const categoryValues = _extends({
22
+ id: direction === 'x' ? DEFAULT_X_AXIS_KEY : DEFAULT_Y_AXIS_KEY
23
+ }, categoryAxis, categoryAxis?.size ? {
24
+ [isHorizontal ? 'height' : 'width']: categoryAxis.size
25
+ } : {}, {
26
+ position: categoryAxis?.position ?? (categoryAxis?.categories ? side : 'none')
27
+ });
28
+
29
+ // If the scaleType is not defined or is 'band', our job is simple.
30
+ if (!categoryAxis?.scaleType || categoryAxis.scaleType === 'band') {
31
+ return _extends({
32
+ scaleType: 'band',
33
+ categoryGapRatio: 0,
34
+ // Use the categories as the domain if they are defined.
35
+ data: categoryAxis?.categories ? categoryAxis.categories :
36
+ // Otherwise we just need random data to create the band scale.
37
+ Array.from({
38
+ length: maxSeriesLength
39
+ }, (_, index) => index),
40
+ tickLabelPlacement: 'middle'
41
+ }, categoryValues);
42
+ }
43
+
44
+ // If the scaleType is other than 'band', we have to do some magic.
45
+ // First we need to calculate the tick values additively and in reverse order.
46
+ const tickValues = [...maxSeriesValue.toReversed().map((_, i, arr) => arr.slice(0, i).reduce((a, value) => a + value, 0)),
47
+ // We add the total value of the series as the last tick value
48
+ maxSeriesValue.reduce((a, value) => a + value, 0)];
49
+ return _extends({
50
+ scaleType: categoryAxis.scaleType,
51
+ domainLimit: 'strict',
52
+ tickLabelPlacement: 'middle',
53
+ tickInterval: tickValues,
54
+ // No need to show the first tick label
55
+ tickLabelInterval: (_, i) => i !== 0,
56
+ // We trick the valueFormatter to show the category values.
57
+ // By using the index of the tickValues array we can get the category value.
58
+ valueFormatter: value => `${categoryAxis.categories?.toReversed()[tickValues.findIndex(v => v === value) - 1]}`
59
+ }, categoryValues);
60
+ }
61
+
62
+ /**
63
+ * A helper function that extracts FunnelChartProps from the input props
64
+ * and returns an object with props for the children components of FunnelChart.
65
+ *
66
+ * @param props The input props for FunnelChart
67
+ * @returns An object with props for the children components of FunnelChart
68
+ */
69
+ export const useFunnelChartProps = props => {
70
+ const {
71
+ categoryAxis,
72
+ series,
73
+ width,
74
+ height,
75
+ margin: marginProps,
76
+ colors,
77
+ sx,
78
+ children,
79
+ slots,
80
+ slotProps,
81
+ loading,
82
+ onItemClick,
83
+ highlightedItem,
84
+ onHighlightChange,
85
+ className,
86
+ axisHighlight,
87
+ apiRef
88
+ } = props,
89
+ rest = _objectWithoutPropertiesLoose(props, _excluded);
90
+ const margin = defaultizeMargin(marginProps, DEFAULT_MARGINS);
91
+ const id = useId();
92
+ const clipPathId = `${id}-clip-path`;
93
+ const isHorizontal = series.some(s => s.layout === 'horizontal');
94
+ const valueAxisConfig = {
95
+ id: isHorizontal ? DEFAULT_Y_AXIS_KEY : DEFAULT_X_AXIS_KEY,
96
+ scaleType: 'linear',
97
+ domainLimit: 'strict',
98
+ position: 'none'
99
+ };
100
+ const xAxis = isHorizontal ? getCategoryAxisConfig(categoryAxis, series, isHorizontal, 'x') : valueAxisConfig;
101
+ const yAxis = isHorizontal ? valueAxisConfig : getCategoryAxisConfig(categoryAxis, series, isHorizontal, 'y');
102
+ const chartContainerProps = _extends({}, rest, {
103
+ series: series.map(s => _extends({
104
+ type: 'funnel',
105
+ layout: isHorizontal ? 'horizontal' : 'vertical'
106
+ }, s)),
107
+ width,
108
+ height,
109
+ margin,
110
+ colors,
111
+ xAxis: [xAxis],
112
+ yAxis: [yAxis],
113
+ sx,
114
+ highlightedItem,
115
+ onHighlightChange,
116
+ className,
117
+ apiRef
118
+ });
119
+ const funnelPlotProps = {
120
+ onItemClick,
121
+ slots,
122
+ slotProps
123
+ };
124
+ const overlayProps = {
125
+ slots,
126
+ slotProps,
127
+ loading
128
+ };
129
+ const chartsAxisProps = {
130
+ slots,
131
+ slotProps
132
+ };
133
+ const legendProps = {
134
+ slots,
135
+ slotProps
136
+ };
137
+ const clipPathGroupProps = {
138
+ clipPath: `url(#${clipPathId})`
139
+ };
140
+ const clipPathProps = {
141
+ id: clipPathId
142
+ };
143
+ const chartsWrapperProps = {
144
+ sx,
145
+ legendPosition: props.slotProps?.legend?.position,
146
+ legendDirection: props.slotProps?.legend?.direction
147
+ };
148
+ const axisHighlightProps = _extends({}, axisHighlight);
149
+ return {
150
+ chartContainerProps,
151
+ funnelPlotProps,
152
+ overlayProps,
153
+ chartsAxisProps,
154
+ legendProps,
155
+ clipPathGroupProps,
156
+ clipPathProps,
157
+ chartsWrapperProps,
158
+ axisHighlightProps,
159
+ children
160
+ };
161
+ };
@@ -0,0 +1,57 @@
1
+ import * as React from 'react';
2
+ import { MakeOptional } from '@mui/x-internals/types';
3
+ import { ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
4
+ import { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
5
+ import { ChartsAxisSlots, ChartsAxisSlotProps, ChartsXAxisProps, ChartsYAxisProps, AxisConfig } from '@mui/x-charts/internals';
6
+ import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
7
+ import { ChartContainerProProps } from "../ChartContainerPro/index.js";
8
+ import { HeatmapSeriesType } from "../models/seriesType/heatmap.js";
9
+ import { HeatmapTooltipProps } from "./HeatmapTooltip.js";
10
+ import { HeatmapItemSlotProps, HeatmapItemSlots } from "./HeatmapItem.js";
11
+ import { HeatmapPluginsSignatures } from "./Heatmap.plugins.js";
12
+ export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, HeatmapItemSlots {
13
+ /**
14
+ * Custom component for the tooltip popper.
15
+ * @default ChartsTooltipRoot
16
+ */
17
+ tooltip?: React.ElementType<HeatmapTooltipProps>;
18
+ }
19
+ export interface HeatmapSlotProps extends ChartsAxisSlotProps, ChartsOverlaySlotProps, HeatmapItemSlotProps {
20
+ tooltip?: Partial<HeatmapTooltipProps>;
21
+ }
22
+ export interface HeatmapProps extends Omit<ChartContainerProProps<'heatmap', HeatmapPluginsSignatures>, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'skipAnimation'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
23
+ /**
24
+ * The configuration of the x-axes.
25
+ * If not provided, a default axis config is used.
26
+ * An array of [[AxisConfig]] objects.
27
+ */
28
+ xAxis: Readonly<MakeOptional<AxisConfig<'band', any, ChartsXAxisProps>, 'id' | 'scaleType'>[]>;
29
+ /**
30
+ * The configuration of the y-axes.
31
+ * If not provided, a default axis config is used.
32
+ * An array of [[AxisConfig]] objects.
33
+ */
34
+ yAxis: Readonly<MakeOptional<AxisConfig<'band', any, ChartsYAxisProps>, 'id' | 'scaleType'>[]>;
35
+ /**
36
+ * The series to display in the bar chart.
37
+ * An array of [[HeatmapSeriesType]] objects.
38
+ */
39
+ series: Readonly<MakeOptional<HeatmapSeriesType, 'type'>[]>;
40
+ /**
41
+ * The configuration of the tooltip.
42
+ * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
43
+ */
44
+ tooltip?: ChartsTooltipProps;
45
+ /**
46
+ * Overridable component slots.
47
+ * @default {}
48
+ */
49
+ slots?: HeatmapSlots;
50
+ /**
51
+ * The props used for each component slot.
52
+ * @default {}
53
+ */
54
+ slotProps?: HeatmapSlotProps;
55
+ }
56
+ declare const Heatmap: React.ForwardRefExoticComponent<HeatmapProps & React.RefAttributes<SVGSVGElement>>;
57
+ export { Heatmap };
@@ -8,18 +8,29 @@ import useId from '@mui/utils/useId';
8
8
  import { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate';
9
9
  import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
10
10
  import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
11
- import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
12
11
  import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
12
+ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '@mui/x-charts/constants';
13
13
  import { ChartContainerPro } from "../ChartContainerPro/index.js";
14
14
  import { HeatmapPlot } from "./HeatmapPlot.js";
15
- import { plugin as heatmapPlugin } from "./plugin.js";
15
+ import { seriesConfig as heatmapSeriesConfig } from "./seriesConfig/index.js";
16
16
  import { HeatmapTooltip } from "./HeatmapTooltip.js";
17
+ import { HEATMAP_PLUGINS } from "./Heatmap.plugins.js";
17
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
19
  // The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
19
20
  const defaultColorMap = interpolateRgbBasis(['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081']);
20
21
  const seriesConfig = {
21
- heatmap: heatmapPlugin
22
+ heatmap: heatmapSeriesConfig
22
23
  };
24
+ function getDefaultDataForAxis(series, dimension) {
25
+ if (series?.[0]?.data === undefined || series[0].data.length === 0) {
26
+ return [];
27
+ }
28
+ return Array.from({
29
+ length: Math.max(...series[0].data.map(dataPoint => dataPoint[dimension])) + 1
30
+ }, (_, index) => index);
31
+ }
32
+ const getDefaultDataForXAxis = series => getDefaultDataForAxis(series, 0);
33
+ const getDefaultDataForYAxis = series => getDefaultDataForAxis(series, 1);
23
34
  const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
24
35
  const props = useThemeProps({
25
36
  props: inProps,
@@ -36,10 +47,6 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
36
47
  colors,
37
48
  dataset,
38
49
  sx,
39
- topAxis,
40
- leftAxis,
41
- rightAxis,
42
- bottomAxis,
43
50
  onAxisClick,
44
51
  children,
45
52
  slots,
@@ -50,14 +57,22 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
50
57
  } = props;
51
58
  const id = useId();
52
59
  const clipPathId = `${id}-clip-path`;
53
- const defaultizedXAxis = React.useMemo(() => xAxis.map(axis => _extends({
60
+ const defaultizedXAxis = React.useMemo(() => (xAxis && xAxis.length > 0 ? xAxis : [{
61
+ id: DEFAULT_X_AXIS_KEY
62
+ }]).map(axis => _extends({
54
63
  scaleType: 'band',
55
64
  categoryGapRatio: 0
56
- }, axis)), [xAxis]);
57
- const defaultizedYAxis = React.useMemo(() => yAxis.map(axis => _extends({
65
+ }, axis, {
66
+ data: axis.data ?? getDefaultDataForXAxis(series)
67
+ })), [series, xAxis]);
68
+ const defaultizedYAxis = React.useMemo(() => (yAxis && yAxis.length > 0 ? yAxis : [{
69
+ id: DEFAULT_Y_AXIS_KEY
70
+ }]).map(axis => _extends({
58
71
  scaleType: 'band',
59
72
  categoryGapRatio: 0
60
- }, axis)), [yAxis]);
73
+ }, axis, {
74
+ data: axis.data ?? getDefaultDataForYAxis(series)
75
+ })), [series, yAxis]);
61
76
  const defaultizedZAxis = React.useMemo(() => zAxis ?? [{
62
77
  colorMap: {
63
78
  type: 'continuous',
@@ -85,9 +100,9 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
85
100
  disableAxisListener: true,
86
101
  highlightedItem: highlightedItem,
87
102
  onHighlightChange: onHighlightChange,
88
- children: [onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, {
89
- onAxisClick: onAxisClick
90
- }), /*#__PURE__*/_jsxs("g", {
103
+ onAxisClick: onAxisClick,
104
+ plugins: HEATMAP_PLUGINS,
105
+ children: [/*#__PURE__*/_jsxs("g", {
91
106
  clipPath: `url(#${clipPathId})`,
92
107
  children: [/*#__PURE__*/_jsx(HeatmapPlot, {
93
108
  slots: slots,
@@ -98,10 +113,6 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
98
113
  slotProps: slotProps
99
114
  })]
100
115
  }), /*#__PURE__*/_jsx(ChartsAxis, {
101
- topAxis: topAxis,
102
- leftAxis: leftAxis,
103
- rightAxis: rightAxis,
104
- bottomAxis: bottomAxis,
105
116
  slots: slots,
106
117
  slotProps: slotProps
107
118
  }), !loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, {
@@ -115,21 +126,13 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
115
126
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
116
127
  // ----------------------------------------------------------------------
117
128
  apiRef: PropTypes.shape({
118
- current: PropTypes.shape({
119
- setZoomData: PropTypes.func.isRequired
120
- })
129
+ current: PropTypes.object
121
130
  }),
122
- /**
123
- * Indicate which axis to display the bottom of the charts.
124
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
125
- * @default xAxisIds[0] The id of the first provided axis
126
- */
127
- bottomAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
128
131
  children: PropTypes.node,
129
132
  className: PropTypes.string,
130
133
  /**
131
134
  * Color palette used to colorize multiple series.
132
- * @default blueberryTwilightPalette
135
+ * @default rainbowSurgePalette
133
136
  */
134
137
  colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
135
138
  /**
@@ -148,31 +151,18 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
148
151
  */
149
152
  height: PropTypes.number,
150
153
  /**
151
- * The item currently highlighted. Turns highlighting into a controlled prop.
154
+ * The highlighted item.
155
+ * Used when the highlight is controlled.
152
156
  */
153
157
  highlightedItem: PropTypes.shape({
154
158
  dataIndex: PropTypes.number,
155
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
159
+ seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
156
160
  }),
157
161
  /**
158
162
  * This prop is used to help implement the accessibility logic.
159
163
  * If you don't provide this prop. It falls back to a randomly generated id.
160
164
  */
161
165
  id: PropTypes.string,
162
- /**
163
- * The list of zoom data related to each axis.
164
- */
165
- initialZoom: PropTypes.arrayOf(PropTypes.shape({
166
- axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
167
- end: PropTypes.number.isRequired,
168
- start: PropTypes.number.isRequired
169
- })),
170
- /**
171
- * Indicate which axis to display the left of the charts.
172
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
173
- * @default yAxisIds[0] The id of the first provided axis
174
- */
175
- leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
176
166
  /**
177
167
  * If `true`, a loading overlay is displayed.
178
168
  * @default false
@@ -181,14 +171,15 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
181
171
  /**
182
172
  * The margin between the SVG and the drawing area.
183
173
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
184
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
174
+ *
175
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
185
176
  */
186
- margin: PropTypes.shape({
177
+ margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
187
178
  bottom: PropTypes.number,
188
179
  left: PropTypes.number,
189
180
  right: PropTypes.number,
190
181
  top: PropTypes.number
191
- }),
182
+ })]),
192
183
  /**
193
184
  * The function called for onClick events.
194
185
  * The second argument contains information about all line/bar elements at the current mouse position.
@@ -202,12 +193,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
202
193
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
203
194
  */
204
195
  onHighlightChange: PropTypes.func,
205
- /**
206
- * Indicate which axis to display the right of the charts.
207
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
208
- * @default null
209
- */
210
- rightAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
211
196
  /**
212
197
  * The series to display in the bar chart.
213
198
  * An array of [[HeatmapSeriesType]] objects.
@@ -236,12 +221,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
236
221
  * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
237
222
  */
238
223
  tooltip: PropTypes.object,
239
- /**
240
- * Indicate which axis to display the top of the charts.
241
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
242
- * @default null
243
- */
244
- topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
245
224
  /**
246
225
  * The width of the chart in px. If not defined, it takes the width of the parent element.
247
226
  */
@@ -252,6 +231,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
252
231
  * An array of [[AxisConfig]] objects.
253
232
  */
254
233
  xAxis: PropTypes.arrayOf(PropTypes.shape({
234
+ axis: PropTypes.oneOf(['x']),
255
235
  barGapRatio: PropTypes.number,
256
236
  categoryGapRatio: PropTypes.number,
257
237
  classes: PropTypes.object,
@@ -276,13 +256,15 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
276
256
  disableTicks: PropTypes.bool,
277
257
  domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
278
258
  fill: PropTypes.string,
259
+ height: PropTypes.number,
279
260
  hideTooltip: PropTypes.bool,
280
261
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
281
262
  label: PropTypes.string,
282
263
  labelStyle: PropTypes.object,
283
264
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
284
265
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
285
- position: PropTypes.oneOf(['bottom', 'top']),
266
+ offset: PropTypes.number,
267
+ position: PropTypes.oneOf(['bottom', 'none', 'top']),
286
268
  reverse: PropTypes.bool,
287
269
  scaleType: PropTypes.oneOf(['band']),
288
270
  slotProps: PropTypes.object,
@@ -291,6 +273,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
291
273
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
292
274
  tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
293
275
  tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
276
+ tickLabelMinGap: PropTypes.number,
294
277
  tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
295
278
  tickLabelStyle: PropTypes.object,
296
279
  tickMaxStep: PropTypes.number,
@@ -315,6 +298,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
315
298
  * An array of [[AxisConfig]] objects.
316
299
  */
317
300
  yAxis: PropTypes.arrayOf(PropTypes.shape({
301
+ axis: PropTypes.oneOf(['y']),
318
302
  barGapRatio: PropTypes.number,
319
303
  categoryGapRatio: PropTypes.number,
320
304
  classes: PropTypes.object,
@@ -345,7 +329,8 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
345
329
  labelStyle: PropTypes.object,
346
330
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
347
331
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
348
- position: PropTypes.oneOf(['left', 'right']),
332
+ offset: PropTypes.number,
333
+ position: PropTypes.oneOf(['left', 'none', 'right']),
349
334
  reverse: PropTypes.bool,
350
335
  scaleType: PropTypes.oneOf(['band']),
351
336
  slotProps: PropTypes.object,
@@ -362,6 +347,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
362
347
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
363
348
  tickSize: PropTypes.number,
364
349
  valueFormatter: PropTypes.func,
350
+ width: PropTypes.number,
365
351
  zoom: PropTypes.oneOfType([PropTypes.shape({
366
352
  filterMode: PropTypes.oneOf(['discard', 'keep']),
367
353
  maxEnd: PropTypes.number,
@@ -0,0 +1,3 @@
1
+ import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
2
+ export type HeatmapPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartInteractionSignature, UseChartHighlightSignature];
3
+ export declare const HEATMAP_PLUGINS: ConvertSignaturesIntoPlugins<HeatmapPluginsSignatures>;
@@ -0,0 +1,2 @@
1
+ import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
2
+ export const HEATMAP_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight];
@@ -0,0 +1,49 @@
1
+ import * as React from 'react';
2
+ import { SeriesId } from '@mui/x-charts/internals';
3
+ import { HeatmapClasses } from "./heatmapClasses.js";
4
+ export interface HeatmapItemSlots {
5
+ /**
6
+ * The component that renders the heatmap cell.
7
+ * @default HeatmapCell
8
+ */
9
+ cell?: React.ElementType;
10
+ }
11
+ export interface HeatmapItemSlotProps {
12
+ cell?: Partial<React.ComponentPropsWithRef<'rect'>>;
13
+ }
14
+ export interface HeatmapItemProps {
15
+ dataIndex: number;
16
+ seriesId: SeriesId;
17
+ value: number;
18
+ width: number;
19
+ height: number;
20
+ x: number;
21
+ y: number;
22
+ color: string;
23
+ /**
24
+ * The props used for each component slot.
25
+ * @default {}
26
+ */
27
+ slotProps?: HeatmapItemSlotProps;
28
+ /**
29
+ * Overridable component slots.
30
+ * @default {}
31
+ */
32
+ slots?: HeatmapItemSlots;
33
+ }
34
+ export interface HeatmapItemOwnerState {
35
+ seriesId: SeriesId;
36
+ dataIndex: number;
37
+ color: string;
38
+ isFaded: boolean;
39
+ isHighlighted: boolean;
40
+ classes?: Partial<HeatmapClasses>;
41
+ }
42
+ /**
43
+ * @ignore - internal component.
44
+ */
45
+ declare function HeatmapItem(props: HeatmapItemProps): React.JSX.Element;
46
+ declare namespace HeatmapItem {
47
+ var propTypes: any;
48
+ }
49
+ export { HeatmapItem };
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import { styled } from '@mui/material/styles';
7
7
  import useSlotProps from '@mui/utils/useSlotProps';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
- import { useItemHighlighted } from '@mui/x-charts/context';
9
+ import { useItemHighlighted } from '@mui/x-charts/hooks';
10
10
  import { useInteractionItemProps } from '@mui/x-charts/internals';
11
11
  import { getHeatmapUtilityClass } from "./heatmapClasses.js";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -47,7 +47,11 @@ function HeatmapItem(props) {
47
47
  slots = {}
48
48
  } = props,
49
49
  other = _objectWithoutPropertiesLoose(props, _excluded);
50
- const getInteractionItemProps = useInteractionItemProps();
50
+ const interactionProps = useInteractionItemProps({
51
+ type: 'heatmap',
52
+ seriesId,
53
+ dataIndex
54
+ });
51
55
  const {
52
56
  isFaded,
53
57
  isHighlighted
@@ -67,11 +71,7 @@ function HeatmapItem(props) {
67
71
  const Cell = slots?.cell ?? HeatmapCell;
68
72
  const cellProps = useSlotProps({
69
73
  elementType: Cell,
70
- additionalProps: _extends({}, getInteractionItemProps({
71
- type: 'heatmap',
72
- seriesId,
73
- dataIndex
74
- })),
74
+ additionalProps: interactionProps,
75
75
  externalForwardedProps: _extends({}, other),
76
76
  externalSlotProps: slotProps.cell,
77
77
  ownerState,
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { HeatmapItemProps } from "./HeatmapItem.js";
3
+ export interface HeatmapPlotProps extends Pick<HeatmapItemProps, 'slots' | 'slotProps'> {}
4
+ declare function HeatmapPlot(props: HeatmapPlotProps): React.JSX.Element | null;
5
+ declare namespace HeatmapPlot {
6
+ var propTypes: any;
7
+ }
8
+ export { HeatmapPlot };
@@ -3,14 +3,14 @@
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useXScale, useYScale, useZColorScale } from '@mui/x-charts/hooks';
6
- import { useHeatmapSeries } from "../hooks/useSeries.js";
6
+ import { useHeatmapSeriesContext } from "../hooks/useHeatmapSeries.js";
7
7
  import { HeatmapItem } from "./HeatmapItem.js";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  function HeatmapPlot(props) {
10
10
  const xScale = useXScale();
11
11
  const yScale = useYScale();
12
12
  const colorScale = useZColorScale();
13
- const series = useHeatmapSeries();
13
+ const series = useHeatmapSeriesContext();
14
14
  const xDomain = xScale.domain();
15
15
  const yDomain = yScale.domain();
16
16
  if (!series || series.seriesOrder.length === 0) {
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
3
+ export interface HeatmapTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {}
4
+ declare function HeatmapTooltip(props: HeatmapTooltipProps): React.JSX.Element;
5
+ declare namespace HeatmapTooltip {
6
+ var propTypes: any;
7
+ }
8
+ export { HeatmapTooltip };
@@ -9,7 +9,7 @@ import composeClasses from '@mui/utils/composeClasses';
9
9
  import { ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipRow, ChartsTooltipCell, useItemTooltip, getChartsTooltipUtilityClass, ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip';
10
10
  import { useXAxis, useYAxis } from '@mui/x-charts/hooks';
11
11
  import { getLabel, ChartsLabelMark } from '@mui/x-charts/internals';
12
- import { useHeatmapSeries } from "../hooks/useSeries.js";
12
+ import { useHeatmapSeriesContext } from "../hooks/useHeatmapSeries.js";
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  const useUtilityClasses = ownerState => {
15
15
  const {
@@ -34,7 +34,7 @@ function DefaultHeatmapTooltipContent(props) {
34
34
  } = props;
35
35
  const xAxis = useXAxis();
36
36
  const yAxis = useYAxis();
37
- const heatmapSeries = useHeatmapSeries();
37
+ const heatmapSeries = useHeatmapSeriesContext();
38
38
  const tooltipData = useItemTooltip();
39
39
  if (!tooltipData || !heatmapSeries || heatmapSeries.seriesOrder.length === 0) {
40
40
  return null;
@@ -52,10 +52,12 @@ function DefaultHeatmapTooltipContent(props) {
52
52
  } = tooltipData;
53
53
  const [xIndex, yIndex] = value;
54
54
  const formattedX = xAxis.valueFormatter?.(xAxis.data[xIndex], {
55
- location: 'tooltip'
55
+ location: 'tooltip',
56
+ scale: xAxis.scale
56
57
  }) ?? xAxis.data[xIndex].toLocaleString();
57
58
  const formattedY = yAxis.valueFormatter?.(yAxis.data[yIndex], {
58
- location: 'tooltip'
59
+ location: 'tooltip',
60
+ scale: yAxis.scale
59
61
  }) ?? yAxis.data[yIndex].toLocaleString();
60
62
  const formattedValue = series[seriesId].valueFormatter(value, {
61
63
  dataIndex: identifier.dataIndex
@@ -144,6 +146,8 @@ process.env.NODE_ENV !== "production" ? HeatmapTooltip.propTypes = {
144
146
  /**
145
147
  * The components used for each slot inside the Popper.
146
148
  * Either a string to use a HTML element or a component.
149
+ *
150
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
147
151
  * @default {}
148
152
  */
149
153
  components: PropTypes.shape({
@@ -151,6 +155,8 @@ process.env.NODE_ENV !== "production" ? HeatmapTooltip.propTypes = {
151
155
  }),
152
156
  /**
153
157
  * The props used for each slot inside the Popper.
158
+ *
159
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
154
160
  * @default {}
155
161
  */
156
162
  componentsProps: PropTypes.shape({
@@ -0,0 +1,11 @@
1
+ export interface HeatmapClasses {
2
+ /** Styles applied to the heatmap cells. */
3
+ cell: string;
4
+ /** Styles applied to the cell element if highlighted. */
5
+ highlighted: string;
6
+ /** Styles applied to the cell element if faded. */
7
+ faded: string;
8
+ }
9
+ export type HeatmapClassKey = keyof HeatmapClasses;
10
+ export declare function getHeatmapUtilityClass(slot: string): string;
11
+ export declare const heatmapClasses: HeatmapClasses;
@@ -0,0 +1,4 @@
1
+ export { Heatmap } from "./Heatmap.js";
2
+ export { HeatmapPlot } from "./HeatmapPlot.js";
3
+ export * from "./HeatmapTooltip.js";
4
+ export * from "./heatmapClasses.js";