@mui/x-charts-pro 8.0.0-alpha.11 → 8.0.0-alpha.12

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 (318) hide show
  1. package/BarChartPro/BarChartPro.d.ts +3 -4
  2. package/BarChartPro/BarChartPro.js +227 -221
  3. package/BarChartPro/BarChartPro.plugins.d.ts +3 -9
  4. package/BarChartPro/BarChartPro.plugins.js +9 -3
  5. package/BarChartPro/index.d.ts +1 -1
  6. package/BarChartPro/index.js +16 -1
  7. package/CHANGELOG.md +161 -1
  8. package/ChartContainerPro/ChartContainerPro.d.ts +4 -4
  9. package/ChartContainerPro/ChartContainerPro.js +178 -172
  10. package/ChartContainerPro/index.d.ts +2 -1
  11. package/ChartContainerPro/index.js +17 -1
  12. package/ChartContainerPro/useChartContainerProProps.d.ts +3 -3
  13. package/ChartContainerPro/useChartContainerProProps.js +17 -10
  14. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +3 -3
  15. package/ChartDataProviderPro/ChartDataProviderPro.js +34 -28
  16. package/ChartDataProviderPro/index.d.ts +2 -1
  17. package/ChartDataProviderPro/index.js +17 -1
  18. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +4 -4
  19. package/ChartDataProviderPro/useChartDataProviderProProps.js +10 -4
  20. package/Heatmap/Heatmap.d.ts +43 -43
  21. package/Heatmap/Heatmap.js +210 -204
  22. package/Heatmap/Heatmap.plugins.d.ts +2 -7
  23. package/Heatmap/Heatmap.plugins.js +8 -2
  24. package/Heatmap/HeatmapItem.d.ts +33 -33
  25. package/Heatmap/HeatmapItem.js +39 -32
  26. package/Heatmap/HeatmapPlot.d.ts +4 -5
  27. package/Heatmap/HeatmapPlot.js +22 -16
  28. package/Heatmap/HeatmapTooltip.d.ts +3 -4
  29. package/Heatmap/HeatmapTooltip.js +97 -89
  30. package/Heatmap/heatmapClasses.d.ts +7 -7
  31. package/Heatmap/heatmapClasses.js +15 -7
  32. package/Heatmap/index.d.ts +4 -4
  33. package/Heatmap/index.js +47 -4
  34. package/Heatmap/{extremums.d.ts → seriesConfig/extremums.d.ts} +1 -1
  35. package/Heatmap/{getColor.d.ts → seriesConfig/getColor.d.ts} +1 -1
  36. package/Heatmap/seriesConfig/index.d.ts +2 -0
  37. package/{node/Heatmap/plugin.js → Heatmap/seriesConfig/index.js} +4 -4
  38. package/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  39. package/{node/Heatmap/formatter.js → Heatmap/seriesConfig/seriesProcessor.js} +2 -2
  40. package/Heatmap/{tooltip.d.ts → seriesConfig/tooltip.d.ts} +1 -1
  41. package/LineChartPro/LineChartPro.d.ts +3 -4
  42. package/LineChartPro/LineChartPro.js +239 -233
  43. package/LineChartPro/LineChartPro.plugins.d.ts +3 -9
  44. package/LineChartPro/LineChartPro.plugins.js +9 -3
  45. package/LineChartPro/index.d.ts +1 -1
  46. package/LineChartPro/index.js +16 -1
  47. package/ScatterChartPro/ScatterChartPro.d.ts +4 -4
  48. package/ScatterChartPro/ScatterChartPro.js +216 -212
  49. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -10
  50. package/ScatterChartPro/ScatterChartPro.plugins.js +9 -3
  51. package/ScatterChartPro/index.d.ts +1 -1
  52. package/ScatterChartPro/index.js +16 -1
  53. package/esm/BarChartPro/BarChartPro.d.ts +17 -0
  54. package/esm/BarChartPro/BarChartPro.js +455 -0
  55. package/esm/BarChartPro/BarChartPro.plugins.d.ts +4 -0
  56. package/esm/BarChartPro/BarChartPro.plugins.js +3 -0
  57. package/esm/BarChartPro/index.d.ts +1 -0
  58. package/esm/BarChartPro/index.js +1 -0
  59. package/esm/ChartContainerPro/ChartContainerPro.d.ts +35 -0
  60. package/esm/ChartContainerPro/ChartContainerPro.js +290 -0
  61. package/esm/ChartContainerPro/index.d.ts +2 -0
  62. package/esm/ChartContainerPro/index.js +2 -0
  63. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +9 -0
  64. package/esm/ChartContainerPro/useChartContainerProProps.js +33 -0
  65. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
  66. package/{node → esm}/ChartDataProviderPro/ChartDataProviderPro.js +28 -34
  67. package/esm/ChartDataProviderPro/index.d.ts +2 -0
  68. package/esm/ChartDataProviderPro/index.js +2 -0
  69. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
  70. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
  71. package/esm/Heatmap/Heatmap.d.ts +56 -0
  72. package/esm/Heatmap/Heatmap.js +402 -0
  73. package/esm/Heatmap/Heatmap.plugins.d.ts +3 -0
  74. package/esm/Heatmap/Heatmap.plugins.js +2 -0
  75. package/esm/Heatmap/HeatmapItem.d.ts +49 -0
  76. package/esm/Heatmap/HeatmapItem.js +106 -0
  77. package/esm/Heatmap/HeatmapPlot.d.ts +8 -0
  78. package/{node → esm}/Heatmap/HeatmapPlot.js +16 -22
  79. package/esm/Heatmap/HeatmapTooltip.d.ts +8 -0
  80. package/esm/Heatmap/HeatmapTooltip.js +276 -0
  81. package/esm/Heatmap/heatmapClasses.d.ts +11 -0
  82. package/esm/Heatmap/heatmapClasses.js +14 -0
  83. package/esm/Heatmap/index.d.ts +4 -0
  84. package/esm/Heatmap/index.js +4 -0
  85. package/esm/Heatmap/seriesConfig/extremums.d.ts +2 -0
  86. package/esm/Heatmap/seriesConfig/getColor.d.ts +3 -0
  87. package/esm/Heatmap/seriesConfig/index.d.ts +2 -0
  88. package/{Heatmap/plugin.js → esm/Heatmap/seriesConfig/index.js} +3 -3
  89. package/esm/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  90. package/{Heatmap/formatter.js → esm/Heatmap/seriesConfig/seriesProcessor.js} +2 -2
  91. package/esm/Heatmap/seriesConfig/tooltip.d.ts +3 -0
  92. package/esm/LineChartPro/LineChartPro.d.ts +16 -0
  93. package/esm/LineChartPro/LineChartPro.js +506 -0
  94. package/esm/LineChartPro/LineChartPro.plugins.d.ts +4 -0
  95. package/esm/LineChartPro/LineChartPro.plugins.js +3 -0
  96. package/esm/LineChartPro/index.d.ts +1 -0
  97. package/esm/LineChartPro/index.js +1 -0
  98. package/esm/ScatterChartPro/ScatterChartPro.d.ts +17 -0
  99. package/esm/ScatterChartPro/ScatterChartPro.js +400 -0
  100. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
  101. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
  102. package/esm/ScatterChartPro/index.d.ts +1 -0
  103. package/esm/ScatterChartPro/index.js +1 -0
  104. package/esm/hooks/index.d.ts +2 -0
  105. package/esm/hooks/index.js +2 -0
  106. package/esm/hooks/useHeatmapSeries.d.ts +33 -0
  107. package/esm/hooks/useHeatmapSeries.js +42 -0
  108. package/esm/hooks/zoom/index.d.ts +1 -0
  109. package/esm/hooks/zoom/index.js +1 -0
  110. package/esm/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
  111. package/esm/hooks/zoom/useIsZoomInteracting.js +14 -0
  112. package/esm/index.d.ts +32 -0
  113. package/esm/index.js +43 -0
  114. package/esm/internals/plugins/allPlugins.d.ts +5 -0
  115. package/esm/internals/plugins/allPlugins.js +5 -0
  116. package/esm/internals/plugins/useChartProZoom/index.d.ts +3 -0
  117. package/esm/internals/plugins/useChartProZoom/index.js +3 -0
  118. package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
  119. package/{node → esm}/internals/plugins/useChartProZoom/useChartProZoom.js +33 -44
  120. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +201 -0
  121. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +4 -0
  122. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +44 -0
  123. package/esm/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
  124. package/{node → esm}/internals/plugins/useChartProZoom/useChartProZoom.utils.js +8 -22
  125. package/esm/internals/utils/releaseInfo.d.ts +1 -0
  126. package/esm/internals/utils/releaseInfo.js +13 -0
  127. package/esm/models/index.d.ts +2 -0
  128. package/esm/models/index.js +2 -0
  129. package/esm/models/seriesType/heatmap.d.ts +28 -0
  130. package/esm/models/seriesType/index.d.ts +1 -0
  131. package/esm/models/seriesType/index.js +1 -0
  132. package/esm/package.json +1 -0
  133. package/esm/themeAugmentation/components.d.ts +23 -0
  134. package/esm/themeAugmentation/index.d.ts +4 -0
  135. package/esm/themeAugmentation/index.js +0 -0
  136. package/esm/themeAugmentation/overrides.d.ts +11 -0
  137. package/esm/themeAugmentation/props.d.ts +20 -0
  138. package/esm/typeOverloads/index.d.ts +1 -0
  139. package/esm/typeOverloads/index.js +1 -0
  140. package/esm/typeOverloads/modules.d.ts +22 -0
  141. package/esm/typeOverloads/modules.js +1 -0
  142. package/hooks/index.d.ts +2 -2
  143. package/hooks/index.js +27 -2
  144. package/hooks/useHeatmapSeries.d.ts +33 -0
  145. package/hooks/useHeatmapSeries.js +48 -0
  146. package/hooks/zoom/index.d.ts +1 -1
  147. package/hooks/zoom/index.js +16 -1
  148. package/hooks/zoom/useIsZoomInteracting.d.ts +1 -1
  149. package/hooks/zoom/useIsZoomInteracting.js +10 -5
  150. package/index.d.ts +8 -7
  151. package/index.js +347 -36
  152. package/internals/plugins/allPlugins.d.ts +3 -9
  153. package/internals/plugins/allPlugins.js +9 -3
  154. package/internals/plugins/useChartProZoom/index.d.ts +3 -3
  155. package/internals/plugins/useChartProZoom/index.js +38 -3
  156. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
  157. package/internals/plugins/useChartProZoom/useChartProZoom.js +40 -37
  158. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +149 -325
  159. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +11 -10
  160. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +35 -41
  161. package/internals/plugins/useChartProZoom/useChartProZoom.types.js +5 -1
  162. package/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +13 -13
  163. package/internals/plugins/useChartProZoom/useChartProZoom.utils.js +22 -8
  164. package/internals/utils/releaseInfo.d.ts +1 -1
  165. package/internals/utils/releaseInfo.js +13 -5
  166. package/models/index.d.ts +1 -1
  167. package/models/index.js +16 -2
  168. package/models/seriesType/heatmap.d.ts +17 -18
  169. package/models/seriesType/heatmap.js +5 -1
  170. package/models/seriesType/index.d.ts +1 -1
  171. package/models/seriesType/index.js +16 -1
  172. package/modern/BarChartPro/BarChartPro.d.ts +17 -0
  173. package/modern/BarChartPro/BarChartPro.plugins.d.ts +4 -0
  174. package/modern/BarChartPro/index.d.ts +1 -0
  175. package/modern/ChartContainerPro/ChartContainerPro.d.ts +35 -0
  176. package/modern/ChartContainerPro/index.d.ts +2 -0
  177. package/modern/ChartContainerPro/index.js +1 -0
  178. package/modern/ChartContainerPro/useChartContainerProProps.d.ts +9 -0
  179. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
  180. package/modern/ChartDataProviderPro/index.d.ts +2 -0
  181. package/modern/ChartDataProviderPro/index.js +1 -0
  182. package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
  183. package/modern/Heatmap/Heatmap.d.ts +56 -0
  184. package/modern/Heatmap/Heatmap.js +2 -2
  185. package/modern/Heatmap/Heatmap.plugins.d.ts +3 -0
  186. package/modern/Heatmap/HeatmapItem.d.ts +49 -0
  187. package/modern/Heatmap/HeatmapPlot.d.ts +8 -0
  188. package/modern/Heatmap/HeatmapPlot.js +2 -2
  189. package/modern/Heatmap/HeatmapTooltip.d.ts +8 -0
  190. package/modern/Heatmap/HeatmapTooltip.js +6 -4
  191. package/modern/Heatmap/heatmapClasses.d.ts +11 -0
  192. package/modern/Heatmap/index.d.ts +4 -0
  193. package/modern/Heatmap/seriesConfig/extremums.d.ts +2 -0
  194. package/modern/Heatmap/seriesConfig/getColor.d.ts +3 -0
  195. package/modern/Heatmap/seriesConfig/index.d.ts +2 -0
  196. package/modern/Heatmap/{plugin.js → seriesConfig/index.js} +3 -3
  197. package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  198. package/modern/Heatmap/{formatter.js → seriesConfig/seriesProcessor.js} +2 -2
  199. package/modern/Heatmap/seriesConfig/tooltip.d.ts +3 -0
  200. package/modern/LineChartPro/LineChartPro.d.ts +16 -0
  201. package/modern/LineChartPro/LineChartPro.plugins.d.ts +4 -0
  202. package/modern/LineChartPro/index.d.ts +1 -0
  203. package/modern/ScatterChartPro/ScatterChartPro.d.ts +17 -0
  204. package/modern/ScatterChartPro/ScatterChartPro.js +1 -3
  205. package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
  206. package/modern/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
  207. package/modern/ScatterChartPro/index.d.ts +1 -0
  208. package/modern/hooks/index.d.ts +2 -0
  209. package/modern/hooks/index.js +1 -1
  210. package/modern/hooks/useHeatmapSeries.d.ts +33 -0
  211. package/modern/hooks/useHeatmapSeries.js +42 -0
  212. package/modern/hooks/zoom/index.d.ts +1 -0
  213. package/modern/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
  214. package/modern/index.d.ts +32 -0
  215. package/modern/index.js +2 -2
  216. package/modern/internals/plugins/allPlugins.d.ts +5 -0
  217. package/modern/internals/plugins/useChartProZoom/index.d.ts +3 -0
  218. package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
  219. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +4 -8
  220. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +201 -0
  221. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -7
  222. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +44 -0
  223. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
  224. package/modern/internals/utils/releaseInfo.d.ts +1 -0
  225. package/modern/internals/utils/releaseInfo.js +1 -1
  226. package/modern/models/index.d.ts +2 -0
  227. package/modern/models/seriesType/heatmap.d.ts +28 -0
  228. package/modern/models/seriesType/index.d.ts +1 -0
  229. package/modern/package.json +1 -0
  230. package/modern/themeAugmentation/components.d.ts +23 -0
  231. package/modern/themeAugmentation/index.d.ts +4 -0
  232. package/modern/themeAugmentation/overrides.d.ts +11 -0
  233. package/modern/themeAugmentation/props.d.ts +20 -0
  234. package/modern/typeOverloads/index.d.ts +1 -0
  235. package/modern/typeOverloads/modules.d.ts +22 -0
  236. package/package.json +41 -11
  237. package/themeAugmentation/components.d.ts +1 -3
  238. package/themeAugmentation/index.d.ts +1 -1
  239. package/themeAugmentation/index.js +1 -0
  240. package/themeAugmentation/overrides.d.ts +2 -4
  241. package/themeAugmentation/props.d.ts +5 -7
  242. package/tsconfig.build.tsbuildinfo +1 -0
  243. package/typeOverloads/index.d.ts +1 -1
  244. package/typeOverloads/index.js +6 -1
  245. package/typeOverloads/modules.d.ts +20 -23
  246. package/typeOverloads/modules.js +5 -1
  247. package/BarChartPro/package.json +0 -6
  248. package/ChartContainerPro/package.json +0 -6
  249. package/ChartDataProviderPro/package.json +0 -6
  250. package/Heatmap/formatter.d.ts +0 -3
  251. package/Heatmap/package.json +0 -6
  252. package/Heatmap/plugin.d.ts +0 -2
  253. package/LineChartPro/package.json +0 -6
  254. package/ScatterChartPro/package.json +0 -6
  255. package/hooks/package.json +0 -6
  256. package/hooks/useSeries.d.ts +0 -9
  257. package/hooks/useSeries.js +0 -16
  258. package/internals/plugins/useChartProZoom/creatZoomLookup.d.ts +0 -3
  259. package/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -12
  260. package/internals/plugins/useChartProZoom/defaultizeZoom.d.ts +0 -2
  261. package/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -25
  262. package/internals/plugins/useChartProZoom/zoom.types.d.ts +0 -53
  263. package/models/package.json +0 -6
  264. package/modern/hooks/useSeries.js +0 -16
  265. package/modern/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -12
  266. package/modern/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -25
  267. package/node/BarChartPro/BarChartPro.js +0 -461
  268. package/node/BarChartPro/BarChartPro.plugins.js +0 -9
  269. package/node/BarChartPro/index.js +0 -16
  270. package/node/ChartContainerPro/ChartContainerPro.js +0 -296
  271. package/node/ChartContainerPro/index.js +0 -16
  272. package/node/ChartContainerPro/useChartContainerProProps.js +0 -40
  273. package/node/ChartDataProviderPro/index.js +0 -16
  274. package/node/ChartDataProviderPro/useChartDataProviderProProps.js +0 -21
  275. package/node/Heatmap/Heatmap.js +0 -408
  276. package/node/Heatmap/Heatmap.plugins.js +0 -8
  277. package/node/Heatmap/HeatmapItem.js +0 -113
  278. package/node/Heatmap/HeatmapTooltip.js +0 -280
  279. package/node/Heatmap/heatmapClasses.js +0 -22
  280. package/node/Heatmap/index.js +0 -47
  281. package/node/LineChartPro/LineChartPro.js +0 -512
  282. package/node/LineChartPro/LineChartPro.plugins.js +0 -9
  283. package/node/LineChartPro/index.js +0 -16
  284. package/node/ScatterChartPro/ScatterChartPro.js +0 -408
  285. package/node/ScatterChartPro/ScatterChartPro.plugins.js +0 -9
  286. package/node/ScatterChartPro/index.js +0 -16
  287. package/node/hooks/index.js +0 -27
  288. package/node/hooks/useSeries.js +0 -21
  289. package/node/hooks/zoom/index.js +0 -16
  290. package/node/hooks/zoom/useIsZoomInteracting.js +0 -19
  291. package/node/index.js +0 -354
  292. package/node/internals/plugins/allPlugins.js +0 -11
  293. package/node/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -19
  294. package/node/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -33
  295. package/node/internals/plugins/useChartProZoom/index.js +0 -38
  296. package/node/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -18
  297. package/node/internals/plugins/useChartProZoom/useChartProZoom.types.js +0 -5
  298. package/node/internals/plugins/useChartProZoom/zoom.types.js +0 -5
  299. package/node/internals/utils/releaseInfo.js +0 -21
  300. package/node/models/index.js +0 -16
  301. package/node/models/seriesType/heatmap.js +0 -5
  302. package/node/models/seriesType/index.js +0 -16
  303. package/node/themeAugmentation/index.js +0 -1
  304. package/node/typeOverloads/index.js +0 -6
  305. package/node/typeOverloads/modules.js +0 -5
  306. package/themeAugmentation/package.json +0 -6
  307. package/typeOverloads/package.json +0 -6
  308. /package/{node/Heatmap → Heatmap/seriesConfig}/extremums.js +0 -0
  309. /package/{node/Heatmap → Heatmap/seriesConfig}/getColor.js +0 -0
  310. /package/{node/Heatmap → Heatmap/seriesConfig}/tooltip.js +0 -0
  311. /package/{Heatmap → esm/Heatmap/seriesConfig}/extremums.js +0 -0
  312. /package/{Heatmap → esm/Heatmap/seriesConfig}/getColor.js +0 -0
  313. /package/{Heatmap → esm/Heatmap/seriesConfig}/tooltip.js +0 -0
  314. /package/{internals/plugins/useChartProZoom/zoom.types.js → esm/internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
  315. /package/{modern/internals/plugins/useChartProZoom/zoom.types.js → esm/models/seriesType/heatmap.js} +0 -0
  316. /package/modern/Heatmap/{extremums.js → seriesConfig/extremums.js} +0 -0
  317. /package/modern/Heatmap/{getColor.js → seriesConfig/getColor.js} +0 -0
  318. /package/modern/Heatmap/{tooltip.js → seriesConfig/tooltip.js} +0 -0
@@ -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
@@ -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";
@@ -0,0 +1,2 @@
1
+ import { CartesianExtremumGetter } from '@mui/x-charts/internals';
2
+ export declare const getBaseExtremum: CartesianExtremumGetter<'heatmap'>;
@@ -0,0 +1,3 @@
1
+ import { ColorProcessor } from '@mui/x-charts/internals';
2
+ declare const getColor: ColorProcessor<'heatmap'>;
3
+ export default getColor;
@@ -0,0 +1,2 @@
1
+ import { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
2
+ export declare const seriesConfig: ChartSeriesTypeConfig<'heatmap'>;
@@ -1,9 +1,9 @@
1
1
  import { getBaseExtremum } from "./extremums.js";
2
- import formatter from "./formatter.js";
2
+ import seriesProcessor from "./seriesProcessor.js";
3
3
  import getColor from "./getColor.js";
4
4
  import tooltipGetter from "./tooltip.js";
5
- export const plugin = {
6
- seriesProcessor: formatter,
5
+ export const seriesConfig = {
6
+ seriesProcessor,
7
7
  colorProcessor: getColor,
8
8
  legendGetter: () => [],
9
9
  tooltipGetter,
@@ -0,0 +1,3 @@
1
+ import { SeriesProcessor } from '@mui/x-charts/internals';
2
+ declare const seriesProcessor: SeriesProcessor<'heatmap'>;
3
+ export default seriesProcessor;
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- const formatter = params => {
2
+ const seriesProcessor = params => {
3
3
  const {
4
4
  series,
5
5
  seriesOrder
@@ -18,4 +18,4 @@ const formatter = params => {
18
18
  seriesOrder
19
19
  };
20
20
  };
21
- export default formatter;
21
+ export default seriesProcessor;
@@ -0,0 +1,3 @@
1
+ import { TooltipGetter } from '@mui/x-charts/internals';
2
+ declare const tooltipGetter: TooltipGetter<'heatmap'>;
3
+ export default tooltipGetter;
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { LineChartProps } from '@mui/x-charts/LineChart';
3
+ import { ChartContainerProProps } from "../ChartContainerPro/index.js";
4
+ export interface LineChartProProps extends Omit<LineChartProps, 'apiRef'>, Omit<ChartContainerProProps<'line'>, 'series' | 'plugins' | 'seriesConfig'> {}
5
+ /**
6
+ * Demos:
7
+ *
8
+ * - [Lines](https://mui.com/x/react-charts/lines/)
9
+ * - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
10
+ *
11
+ * API:
12
+ *
13
+ * - [LineChart API](https://mui.com/x/api/charts/line-chart/)
14
+ */
15
+ declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<SVGSVGElement>>;
16
+ export { LineChartPro };
@@ -0,0 +1,4 @@
1
+ import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
2
+ import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
3
+ export type LineChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'line'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
4
+ export declare const LINE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<LineChartProPluginsSignatures>;
@@ -0,0 +1 @@
1
+ export * from "./LineChartPro.js";
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import { ScatterChartProps } from '@mui/x-charts/ScatterChart';
3
+ import { ChartContainerProProps } from "../ChartContainerPro/ChartContainerPro.js";
4
+ import { ScatterChartProPluginsSignatures } from "./ScatterChartPro.plugins.js";
5
+ export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef'>, Omit<ChartContainerProProps<'scatter', ScatterChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'onItemClick'> {}
6
+ /**
7
+ * Demos:
8
+ *
9
+ * - [Scatter](https://mui.com/x/react-charts/scatter/)
10
+ * - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
11
+ *
12
+ * API:
13
+ *
14
+ * - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
15
+ */
16
+ declare const ScatterChartPro: React.ForwardRefExoticComponent<ScatterChartProProps & React.RefAttributes<SVGSVGElement>>;
17
+ export { ScatterChartPro };
@@ -8,7 +8,6 @@ import PropTypes from 'prop-types';
8
8
  import { useThemeProps } from '@mui/material/styles';
9
9
  import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
10
10
  import { ScatterPlot } from '@mui/x-charts/ScatterChart';
11
- import { ChartsVoronoiHandler } from '@mui/x-charts/ChartsVoronoiHandler';
12
11
  import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
13
12
  import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
14
13
  import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
@@ -44,7 +43,6 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
44
43
  const {
45
44
  chartsWrapperProps,
46
45
  chartContainerProps,
47
- voronoiHandlerProps,
48
46
  chartsAxisProps,
49
47
  gridProps,
50
48
  scatterPlotProps,
@@ -66,7 +64,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
66
64
  return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
67
65
  children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
68
66
  children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
69
- children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
67
+ children: [/*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
70
68
  "data-drawing-container": true,
71
69
  children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
72
70
  }), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip, {
@@ -0,0 +1,4 @@
1
+ import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
2
+ import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
3
+ export type ScatterChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature, UseChartProZoomSignature];
4
+ export declare const SCATTER_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<ScatterChartProPluginsSignatures>;
@@ -1,3 +1,3 @@
1
- import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
1
+ import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi } from '@mui/x-charts/internals';
2
2
  import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
3
- export const SCATTER_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
3
+ export const SCATTER_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi, useChartProZoom];
@@ -0,0 +1 @@
1
+ export * from "./ScatterChartPro.js";
@@ -0,0 +1,2 @@
1
+ export { useHeatmapSeries } from "./useHeatmapSeries.js";
2
+ export * from "./zoom/index.js";
@@ -1,2 +1,2 @@
1
- export { useHeatmapSeries as unstable_useHeatmapSeries } from "./useSeries.js";
1
+ export { useHeatmapSeries } from "./useHeatmapSeries.js";
2
2
  export * from "./zoom/index.js";
@@ -0,0 +1,33 @@
1
+ import { ProcessedSeries, SeriesId, ChartSeriesDefaultized } from '@mui/x-charts/internals';
2
+ export type UseHeatmapSeriesReturnValue = ChartSeriesDefaultized<'heatmap'>;
3
+ export type UseHeatmapSeriesContextReturnValue = ProcessedSeries['heatmap'];
4
+ /**
5
+ * Get access to the internal state of heatmap series.
6
+ *
7
+ * @param {SeriesId} seriesId The id of the series to get.
8
+ * @returns {UseHeatmapSeriesReturnValue} the heatmap series
9
+ */
10
+ export declare function useHeatmapSeries(seriesId: SeriesId): UseHeatmapSeriesReturnValue | undefined;
11
+ /**
12
+ * Get access to the internal state of heatmap series.
13
+ *
14
+ * When called without arguments, it returns all heatmap series.
15
+ *
16
+ * @returns {UseHeatmapSeriesReturnValue[]} the heatmap series
17
+ */
18
+ export declare function useHeatmapSeries(): UseHeatmapSeriesReturnValue[];
19
+ /**
20
+ * Get access to the internal state of heatmap series.
21
+ *
22
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
23
+ * @returns {UseHeatmapSeriesReturnValue[]} the heatmap series
24
+ */
25
+ export declare function useHeatmapSeries(seriesIds: SeriesId[]): UseHeatmapSeriesReturnValue[];
26
+ /**
27
+ * Get access to the internal state of heatmap series.
28
+ * The returned object contains:
29
+ * - series: a mapping from ids to series attributes.
30
+ * - seriesOrder: the array of series ids.
31
+ * @returns the heatmap series
32
+ */
33
+ export declare function useHeatmapSeriesContext(): UseHeatmapSeriesContextReturnValue;
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+
3
+ import { createAllSeriesSelectorOfType, createSeriesSelectorsOfType } from '@mui/x-charts/internals';
4
+ const useSelectorSeries = createSeriesSelectorsOfType('heatmap');
5
+ const useSelectorSeriesContext = createAllSeriesSelectorOfType('heatmap');
6
+
7
+ /**
8
+ * Get access to the internal state of heatmap series.
9
+ *
10
+ * @param {SeriesId} seriesId The id of the series to get.
11
+ * @returns {UseHeatmapSeriesReturnValue} the heatmap series
12
+ */
13
+
14
+ /**
15
+ * Get access to the internal state of heatmap series.
16
+ *
17
+ * When called without arguments, it returns all heatmap series.
18
+ *
19
+ * @returns {UseHeatmapSeriesReturnValue[]} the heatmap series
20
+ */
21
+
22
+ /**
23
+ * Get access to the internal state of heatmap series.
24
+ *
25
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
26
+ * @returns {UseHeatmapSeriesReturnValue[]} the heatmap series
27
+ */
28
+
29
+ export function useHeatmapSeries(seriesIds) {
30
+ return useSelectorSeries(seriesIds);
31
+ }
32
+
33
+ /**
34
+ * Get access to the internal state of heatmap series.
35
+ * The returned object contains:
36
+ * - series: a mapping from ids to series attributes.
37
+ * - seriesOrder: the array of series ids.
38
+ * @returns the heatmap series
39
+ */
40
+ export function useHeatmapSeriesContext() {
41
+ return useSelectorSeriesContext();
42
+ }
@@ -0,0 +1 @@
1
+ export * from "./useIsZoomInteracting.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get access to the zoom state.
3
+ *
4
+ * @returns {boolean} Inform the zoom is interacting.
5
+ */
6
+ export declare function useIsZoomInteracting(): boolean;
@@ -0,0 +1,32 @@
1
+ import "./typeOverloads/modules.js";
2
+ export * from '@mui/x-charts/constants';
3
+ export * from '@mui/x-charts/context';
4
+ export * from '@mui/x-charts/hooks';
5
+ export * from '@mui/x-charts/colorPalettes';
6
+ export * from '@mui/x-charts/models';
7
+ export * from '@mui/x-charts/ChartsClipPath';
8
+ export * from '@mui/x-charts/ChartsReferenceLine';
9
+ export * from '@mui/x-charts/ChartsAxis';
10
+ export * from '@mui/x-charts/ChartsXAxis';
11
+ export * from '@mui/x-charts/ChartsYAxis';
12
+ export * from '@mui/x-charts/ChartsGrid';
13
+ export * from '@mui/x-charts/ChartsText';
14
+ export * from '@mui/x-charts/ChartsTooltip';
15
+ export * from '@mui/x-charts/ChartsLegend';
16
+ export * from '@mui/x-charts/ChartsAxisHighlight';
17
+ export * from '@mui/x-charts/BarChart';
18
+ export * from '@mui/x-charts/LineChart';
19
+ export * from '@mui/x-charts/PieChart';
20
+ export * from '@mui/x-charts/ScatterChart';
21
+ export * from '@mui/x-charts/SparkLineChart';
22
+ export * from '@mui/x-charts/Gauge';
23
+ export * from '@mui/x-charts/ChartsSurface';
24
+ export * from '@mui/x-charts/ChartDataProvider';
25
+ export * from '@mui/x-charts/ChartsLabel';
26
+ export * from "./hooks/index.js";
27
+ export * from "./Heatmap/index.js";
28
+ export * from "./ChartContainerPro/index.js";
29
+ export * from "./ChartDataProviderPro/index.js";
30
+ export * from "./ScatterChartPro/index.js";
31
+ export * from "./BarChartPro/index.js";
32
+ export * from "./LineChartPro/index.js";
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.0.0-alpha.11
2
+ * @mui/x-charts-pro v8.0.0-alpha.12
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -23,7 +23,6 @@ export * from '@mui/x-charts/ChartsText';
23
23
  export * from '@mui/x-charts/ChartsTooltip';
24
24
  export * from '@mui/x-charts/ChartsLegend';
25
25
  export * from '@mui/x-charts/ChartsAxisHighlight';
26
- export * from '@mui/x-charts/ChartsVoronoiHandler';
27
26
  export * from '@mui/x-charts/BarChart';
28
27
  export * from '@mui/x-charts/LineChart';
29
28
  export * from '@mui/x-charts/PieChart';
@@ -35,6 +34,7 @@ export * from '@mui/x-charts/ChartDataProvider';
35
34
  export * from '@mui/x-charts/ChartsLabel';
36
35
 
37
36
  // Pro components
37
+ export * from "./hooks/index.js";
38
38
  export * from "./Heatmap/index.js";
39
39
  export * from "./ChartContainerPro/index.js";
40
40
  export * from "./ChartDataProviderPro/index.js";
@@ -0,0 +1,5 @@
1
+ import { ChartSeriesType, ConvertSignaturesIntoPlugins, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartZAxisSignature, UseChartHighlightSignature } from '@mui/x-charts/internals';
2
+ import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
3
+ export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
4
+ export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
5
+ export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
@@ -0,0 +1,3 @@
1
+ export * from "./useChartProZoom.selectors.js";
2
+ export * from "./useChartProZoom.js";
3
+ export * from "./useChartProZoom.types.js";
@@ -0,0 +1,3 @@
1
+ import { ChartPlugin } from '@mui/x-charts/internals';
2
+ import { UseChartProZoomSignature } from "./useChartProZoom.types.js";
3
+ export declare const useChartProZoom: ChartPlugin<UseChartProZoomSignature>;
@@ -2,10 +2,8 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
- import { useSelector, getSVGPoint, selectorChartDrawingArea } from '@mui/x-charts/internals';
6
- import { creatZoomLookup } from "./creatZoomLookup.js";
5
+ import { useSelector, getSVGPoint, selectorChartDrawingArea, createZoomLookup, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
7
6
  import { getDiff, getHorizontalCenterRatio, getPinchScaleRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, preventDefault, zoomAtPoint } from "./useChartProZoom.utils.js";
8
- import { selectorChartZoomOptionsLookup } from "./useChartProZoom.selectors.js";
9
7
 
10
8
  // It is helpful to avoid the need to provide the possibly auto-generated id for each axis.
11
9
  function initializeZoomData(options) {
@@ -288,15 +286,13 @@ useChartProZoom.params = {
288
286
  useChartProZoom.getDefaultizedParams = ({
289
287
  params
290
288
  }) => {
291
- const optionsLookup = _extends({}, creatZoomLookup('x')(params.defaultizedXAxis), creatZoomLookup('y')(params.defaultizedYAxis));
292
- return _extends({}, params, {
293
- optionsLookup
294
- });
289
+ return _extends({}, params);
295
290
  };
296
291
  useChartProZoom.getInitialState = params => {
292
+ const optionsLookup = _extends({}, createZoomLookup('x')(params.defaultizedXAxis), createZoomLookup('y')(params.defaultizedYAxis));
297
293
  return {
298
294
  zoom: {
299
- zoomData: params.initialZoom === undefined ? initializeZoomData(params.optionsLookup) : params.initialZoom,
295
+ zoomData: params.initialZoom === undefined ? initializeZoomData(optionsLookup) : params.initialZoom,
300
296
  isInteracting: false
301
297
  }
302
298
  };