@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
@@ -2,13 +2,12 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["initialZoom", "onZoomChange", "apiRef"];
5
+ const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef"];
6
6
  import * as React from 'react';
7
7
  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';
@@ -18,6 +17,7 @@ import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
18
17
  import { useScatterChartProps, ChartsWrapper } from '@mui/x-charts/internals';
19
18
  import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
20
19
  import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
20
+ import { SCATTER_CHART_PRO_PLUGINS } from "./ScatterChartPro.plugins.js";
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  /**
23
23
  * Demos:
@@ -36,6 +36,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
36
36
  });
37
37
  const {
38
38
  initialZoom,
39
+ zoomData,
39
40
  onZoomChange,
40
41
  apiRef
41
42
  } = props,
@@ -43,7 +44,6 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
43
44
  const {
44
45
  chartsWrapperProps,
45
46
  chartContainerProps,
46
- voronoiHandlerProps,
47
47
  chartsAxisProps,
48
48
  gridProps,
49
49
  scatterPlotProps,
@@ -57,14 +57,16 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
57
57
  chartsSurfaceProps
58
58
  } = useChartContainerProProps(_extends({}, chartContainerProps, {
59
59
  initialZoom,
60
+ zoomData,
60
61
  onZoomChange,
61
- apiRef
62
+ apiRef,
63
+ plugins: SCATTER_CHART_PRO_PLUGINS
62
64
  }), ref);
63
65
  const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
64
66
  return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
65
67
  children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
66
68
  children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
67
- children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
69
+ children: [/*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
68
70
  "data-drawing-container": true,
69
71
  children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
70
72
  }), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip, {
@@ -93,17 +95,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
93
95
  x: PropTypes.oneOf(['band', 'line', 'none']),
94
96
  y: PropTypes.oneOf(['band', 'line', 'none'])
95
97
  }),
96
- /**
97
- * Indicate which axis to display the bottom of the charts.
98
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
99
- * @default xAxisIds[0] The id of the first provided axis
100
- */
101
- bottomAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
102
98
  children: PropTypes.node,
103
99
  className: PropTypes.string,
104
100
  /**
105
101
  * Color palette used to colorize multiple series.
106
- * @default blueberryTwilightPalette
102
+ * @default rainbowSurgePalette
107
103
  */
108
104
  colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
109
105
  /**
@@ -138,11 +134,12 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
138
134
  */
139
135
  hideLegend: PropTypes.bool,
140
136
  /**
141
- * The item currently highlighted. Turns highlighting into a controlled prop.
137
+ * The highlighted item.
138
+ * Used when the highlight is controlled.
142
139
  */
143
140
  highlightedItem: PropTypes.shape({
144
141
  dataIndex: PropTypes.number,
145
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
142
+ seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
146
143
  }),
147
144
  /**
148
145
  * This prop is used to help implement the accessibility logic.
@@ -151,18 +148,13 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
151
148
  id: PropTypes.string,
152
149
  /**
153
150
  * The list of zoom data related to each axis.
151
+ * Used to initialize the zoom in a specific configuration without controlling it.
154
152
  */
155
153
  initialZoom: PropTypes.arrayOf(PropTypes.shape({
156
154
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
157
155
  end: PropTypes.number.isRequired,
158
156
  start: PropTypes.number.isRequired
159
157
  })),
160
- /**
161
- * Indicate which axis to display the left of the charts.
162
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
163
- * @default yAxisIds[0] The id of the first provided axis
164
- */
165
- leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
166
158
  /**
167
159
  * If `true`, a loading overlay is displayed.
168
160
  * @default false
@@ -171,14 +163,22 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
171
163
  /**
172
164
  * The margin between the SVG and the drawing area.
173
165
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
174
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
166
+ *
167
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
175
168
  */
176
- margin: PropTypes.shape({
169
+ margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
177
170
  bottom: PropTypes.number,
178
171
  left: PropTypes.number,
179
172
  right: PropTypes.number,
180
173
  top: PropTypes.number
181
- }),
174
+ })]),
175
+ /**
176
+ * The function called for onClick events.
177
+ * The second argument contains information about all line/bar elements at the current mouse position.
178
+ * @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
179
+ * @param {null | AxisData} data The data about the clicked axis and items associated with it.
180
+ */
181
+ onAxisClick: PropTypes.func,
182
182
  /**
183
183
  * The callback fired when the highlighted item changes.
184
184
  *
@@ -197,12 +197,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
197
197
  * @param {ZoomData[]} zoomData Updated zoom data.
198
198
  */
199
199
  onZoomChange: PropTypes.func,
200
- /**
201
- * Indicate which axis to display the right of the charts.
202
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
203
- * @default null
204
- */
205
- rightAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
206
200
  /**
207
201
  * The series to display in the scatter chart.
208
202
  * An array of [[ScatterSeriesType]] objects.
@@ -226,12 +220,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
226
220
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
227
221
  theme: PropTypes.oneOf(['dark', 'light']),
228
222
  title: PropTypes.string,
229
- /**
230
- * Indicate which axis to display the top of the charts.
231
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
232
- * @default null
233
- */
234
- topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
235
223
  /**
236
224
  * Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
237
225
  * If `undefined`, the radius is assumed to be infinite.
@@ -247,6 +235,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
247
235
  * An array of [[AxisConfig]] objects.
248
236
  */
249
237
  xAxis: PropTypes.arrayOf(PropTypes.shape({
238
+ axis: PropTypes.oneOf(['x']),
250
239
  classes: PropTypes.object,
251
240
  colorMap: PropTypes.oneOfType([PropTypes.shape({
252
241
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
@@ -269,13 +258,15 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
269
258
  disableTicks: PropTypes.bool,
270
259
  domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
271
260
  fill: PropTypes.string,
261
+ height: PropTypes.number,
272
262
  hideTooltip: PropTypes.bool,
273
263
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
274
264
  label: PropTypes.string,
275
265
  labelStyle: PropTypes.object,
276
266
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
277
267
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
278
- position: PropTypes.oneOf(['bottom', 'top']),
268
+ offset: PropTypes.number,
269
+ position: PropTypes.oneOf(['bottom', 'none', 'top']),
279
270
  reverse: PropTypes.bool,
280
271
  scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
281
272
  slotProps: PropTypes.object,
@@ -284,6 +275,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
284
275
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
285
276
  tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
286
277
  tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
278
+ tickLabelMinGap: PropTypes.number,
287
279
  tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
288
280
  tickLabelStyle: PropTypes.object,
289
281
  tickMaxStep: PropTypes.number,
@@ -308,6 +300,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
308
300
  * An array of [[AxisConfig]] objects.
309
301
  */
310
302
  yAxis: PropTypes.arrayOf(PropTypes.shape({
303
+ axis: PropTypes.oneOf(['y']),
311
304
  classes: PropTypes.object,
312
305
  colorMap: PropTypes.oneOfType([PropTypes.shape({
313
306
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
@@ -336,7 +329,8 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
336
329
  labelStyle: PropTypes.object,
337
330
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
338
331
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
339
- position: PropTypes.oneOf(['left', 'right']),
332
+ offset: PropTypes.number,
333
+ position: PropTypes.oneOf(['left', 'none', 'right']),
340
334
  reverse: PropTypes.bool,
341
335
  scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
342
336
  slotProps: PropTypes.object,
@@ -353,6 +347,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
353
347
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
354
348
  tickSize: PropTypes.number,
355
349
  valueFormatter: PropTypes.func,
350
+ width: PropTypes.number,
356
351
  zoom: PropTypes.oneOfType([PropTypes.shape({
357
352
  filterMode: PropTypes.oneOf(['discard', 'keep']),
358
353
  maxEnd: PropTypes.number,
@@ -387,6 +382,14 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
387
382
  id: PropTypes.string,
388
383
  max: PropTypes.number,
389
384
  min: PropTypes.number
385
+ })),
386
+ /**
387
+ * The list of zoom data related to each axis.
388
+ */
389
+ zoomData: PropTypes.arrayOf(PropTypes.shape({
390
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
391
+ end: PropTypes.number.isRequired,
392
+ start: PropTypes.number.isRequired
390
393
  }))
391
394
  } : void 0;
392
395
  export { ScatterChartPro };
@@ -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>;
@@ -0,0 +1,3 @@
1
+ import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi } from '@mui/x-charts/internals';
2
+ import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
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 UseFunnelSeriesReturnValue = ChartSeriesDefaultized<'funnel'>;
3
+ export type UseFunnelSeriesContextReturnValue = ProcessedSeries['funnel'];
4
+ /**
5
+ * Get access to the internal state of funnel series.
6
+ *
7
+ * @param {SeriesId} seriesId The id of the series to get.
8
+ * @returns {UseFunnelSeriesReturnValue} the funnel series
9
+ */
10
+ export declare function useFunnelSeries(seriesId: SeriesId): UseFunnelSeriesReturnValue | undefined;
11
+ /**
12
+ * Get access to the internal state of funnel series.
13
+ *
14
+ * When called without arguments, it returns all funnel series.
15
+ *
16
+ * @returns {UseFunnelSeriesReturnValue[]} the funnel series
17
+ */
18
+ export declare function useFunnelSeries(): UseFunnelSeriesReturnValue[];
19
+ /**
20
+ * Get access to the internal state of funnel series.
21
+ *
22
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
23
+ * @returns {UseFunnelSeriesReturnValue[]} the funnel series
24
+ */
25
+ export declare function useFunnelSeries(seriesIds: SeriesId[]): UseFunnelSeriesReturnValue[];
26
+ /**
27
+ * Get access to the internal state of funnel 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 funnel series
32
+ */
33
+ export declare function useFunnelSeriesContext(): UseFunnelSeriesContextReturnValue;
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+
3
+ import { createAllSeriesSelectorOfType, createSeriesSelectorsOfType } from '@mui/x-charts/internals';
4
+ const useSelectorSeries = createSeriesSelectorsOfType('funnel');
5
+ const useSelectorSeriesContext = createAllSeriesSelectorOfType('funnel');
6
+
7
+ /**
8
+ * Get access to the internal state of funnel series.
9
+ *
10
+ * @param {SeriesId} seriesId The id of the series to get.
11
+ * @returns {UseFunnelSeriesReturnValue} the funnel series
12
+ */
13
+
14
+ /**
15
+ * Get access to the internal state of funnel series.
16
+ *
17
+ * When called without arguments, it returns all funnel series.
18
+ *
19
+ * @returns {UseFunnelSeriesReturnValue[]} the funnel series
20
+ */
21
+
22
+ /**
23
+ * Get access to the internal state of funnel series.
24
+ *
25
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
26
+ * @returns {UseFunnelSeriesReturnValue[]} the funnel series
27
+ */
28
+
29
+ export function useFunnelSeries(seriesIds) {
30
+ return useSelectorSeries(seriesIds);
31
+ }
32
+
33
+ /**
34
+ * Get access to the internal state of funnel 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 funnel series
39
+ */
40
+ export function useFunnelSeriesContext() {
41
+ return useSelectorSeriesContext();
42
+ }
@@ -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,34 @@
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/RadarChart';
24
+ export * from '@mui/x-charts/ChartsSurface';
25
+ export * from '@mui/x-charts/ChartDataProvider';
26
+ export * from '@mui/x-charts/ChartsLabel';
27
+ export * from "./hooks/index.js";
28
+ export * from "./Heatmap/index.js";
29
+ export * from "./ChartContainerPro/index.js";
30
+ export * from "./ChartDataProviderPro/index.js";
31
+ export * from "./ScatterChartPro/index.js";
32
+ export * from "./BarChartPro/index.js";
33
+ export * from "./LineChartPro/index.js";
34
+ export * from "./FunnelChart/index.js";
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.0.0-alpha.9
2
+ * @mui/x-charts-pro v8.0.0-beta.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -23,22 +23,23 @@ 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
- export * from '@mui/x-charts/ChartsOnAxisClickHandler';
28
26
  export * from '@mui/x-charts/BarChart';
29
27
  export * from '@mui/x-charts/LineChart';
30
28
  export * from '@mui/x-charts/PieChart';
31
29
  export * from '@mui/x-charts/ScatterChart';
32
30
  export * from '@mui/x-charts/SparkLineChart';
33
31
  export * from '@mui/x-charts/Gauge';
32
+ export * from '@mui/x-charts/RadarChart';
34
33
  export * from '@mui/x-charts/ChartsSurface';
35
34
  export * from '@mui/x-charts/ChartDataProvider';
36
35
  export * from '@mui/x-charts/ChartsLabel';
37
36
 
38
37
  // Pro components
38
+ export * from "./hooks/index.js";
39
39
  export * from "./Heatmap/index.js";
40
40
  export * from "./ChartContainerPro/index.js";
41
41
  export * from "./ChartDataProviderPro/index.js";
42
42
  export * from "./ScatterChartPro/index.js";
43
43
  export * from "./BarChartPro/index.js";
44
- export * from "./LineChartPro/index.js";
44
+ export * from "./LineChartPro/index.js";
45
+ export * from "./FunnelChart/index.js";
@@ -0,0 +1,8 @@
1
+ import { ChartSeriesType, ConvertSignaturesIntoPlugins, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartZAxisSignature, UseChartHighlightSignature, UseChartPolarAxisSignature } from '@mui/x-charts/internals';
2
+ import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
3
+ export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<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>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
6
+ export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
7
+ export type DefaultPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<TSeries>>;
8
+ export declare const DEFAULT_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>>)[];
@@ -1,5 +1,6 @@
1
1
  // This file should be removed after creating all plugins in favor of a file per chart type.
2
2
 
3
- import { useChartCartesianAxis, useChartInteraction, useChartZAxis } from '@mui/x-charts/internals';
3
+ import { useChartCartesianAxis, useChartInteraction, useChartZAxis, useChartHighlight, useChartPolarAxis } from '@mui/x-charts/internals';
4
4
  import { useChartProZoom } from "./useChartProZoom/index.js";
5
- export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartProZoom];
5
+ export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartPolarAxis, useChartInteraction, useChartHighlight, useChartProZoom];
6
+ export const DEFAULT_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
@@ -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,9 @@
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 useEnhancedEffect from '@mui/utils/useEnhancedEffect';
6
+ import { useSelector, getSVGPoint, selectorChartDrawingArea, createZoomLookup, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
7
7
  import { getDiff, getHorizontalCenterRatio, getPinchScaleRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, preventDefault, zoomAtPoint } from "./useChartProZoom.utils.js";
8
- import { selectorChartZoomOptionsLookup } from "./useChartProZoom.selectors.js";
9
8
 
10
9
  // It is helpful to avoid the need to provide the possibly auto-generated id for each axis.
11
10
  function initializeZoomData(options) {
@@ -25,15 +24,46 @@ export const useChartProZoom = ({
25
24
  svgRef,
26
25
  params
27
26
  }) => {
27
+ const {
28
+ zoomData: paramsZoomData,
29
+ onZoomChange
30
+ } = params;
28
31
  const drawingArea = useSelector(store, selectorChartDrawingArea);
29
32
  const optionsLookup = useSelector(store, selectorChartZoomOptionsLookup);
30
33
  const isZoomEnabled = Object.keys(optionsLookup).length > 0;
31
34
 
32
- // Add events
33
- const panningEventCacheRef = React.useRef([]);
34
- const zoomEventCacheRef = React.useRef([]);
35
- const eventPrevDiff = React.useRef(0);
36
- const interactionTimeoutRef = React.useRef(undefined);
35
+ // Manage controlled state
36
+
37
+ useEnhancedEffect(() => {
38
+ if (paramsZoomData === undefined) {
39
+ return undefined;
40
+ }
41
+ store.update(prevState => {
42
+ if (process.env.NODE_ENV !== 'production' && !prevState.zoom.isControlled) {
43
+ console.error([`MUI X: A chart component is changing the \`zoomData\` from uncontrolled to controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', 'Decide between using a controlled or uncontrolled for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
44
+ }
45
+ return _extends({}, prevState, {
46
+ zoom: _extends({}, prevState.zoom, {
47
+ isInteracting: true,
48
+ zoomData: paramsZoomData
49
+ })
50
+ });
51
+ });
52
+ const timeout = setTimeout(() => {
53
+ store.update(prevState => {
54
+ return _extends({}, prevState, {
55
+ zoom: _extends({}, prevState.zoom, {
56
+ isInteracting: false
57
+ })
58
+ });
59
+ });
60
+ }, 166);
61
+ return () => {
62
+ clearTimeout(timeout);
63
+ };
64
+ }, [store, paramsZoomData]);
65
+
66
+ // Add instance methods
37
67
  const setIsInteracting = React.useCallback(isInteracting => {
38
68
  store.update(prev => _extends({}, prev, {
39
69
  zoom: _extends({}, prev.zoom, {
@@ -43,15 +73,24 @@ export const useChartProZoom = ({
43
73
  }, [store]);
44
74
  const setZoomDataCallback = React.useCallback(zoomData => {
45
75
  store.update(prevState => {
46
- const newZoomData = typeof zoomData === 'function' ? zoomData(prevState.zoom.zoomData) : zoomData;
47
- params.onZoomChange?.(newZoomData);
76
+ const newZoomData = typeof zoomData === 'function' ? zoomData([...prevState.zoom.zoomData]) : zoomData;
77
+ onZoomChange?.(newZoomData);
78
+ if (prevState.zoom.isControlled) {
79
+ return prevState;
80
+ }
48
81
  return _extends({}, prevState, {
49
82
  zoom: _extends({}, prevState.zoom, {
50
83
  zoomData: newZoomData
51
84
  })
52
85
  });
53
86
  });
54
- }, [params, store]);
87
+ }, [onZoomChange, store]);
88
+
89
+ // Add events
90
+ const panningEventCacheRef = React.useRef([]);
91
+ const zoomEventCacheRef = React.useRef([]);
92
+ const eventPrevDiff = React.useRef(0);
93
+ const interactionTimeoutRef = React.useRef(undefined);
55
94
 
56
95
  // Add event for chart panning
57
96
  const isPanEnabled = React.useMemo(() => Object.values(optionsLookup).some(v => v.panning) || false, [optionsLookup]);
@@ -283,21 +322,29 @@ export const useChartProZoom = ({
283
322
  };
284
323
  useChartProZoom.params = {
285
324
  initialZoom: true,
286
- onZoomChange: true
325
+ onZoomChange: true,
326
+ zoomData: true
287
327
  };
288
328
  useChartProZoom.getDefaultizedParams = ({
289
329
  params
290
330
  }) => {
291
- const optionsLookup = _extends({}, creatZoomLookup(params.defaultizedXAxis), creatZoomLookup(params.defaultizedYAxis));
292
- return _extends({}, params, {
293
- optionsLookup
294
- });
331
+ return _extends({}, params);
295
332
  };
296
333
  useChartProZoom.getInitialState = params => {
334
+ const {
335
+ initialZoom,
336
+ zoomData,
337
+ defaultizedXAxis,
338
+ defaultizedYAxis
339
+ } = params;
340
+ const optionsLookup = _extends({}, createZoomLookup('x')(defaultizedXAxis), createZoomLookup('y')(defaultizedYAxis));
297
341
  return {
298
342
  zoom: {
299
- zoomData: params.initialZoom === undefined ? initializeZoomData(params.optionsLookup) : params.initialZoom,
300
- isInteracting: false
343
+ zoomData:
344
+ // eslint-disable-next-line no-nested-ternary
345
+ zoomData !== undefined ? zoomData : initialZoom !== undefined ? initialZoom : initializeZoomData(optionsLookup),
346
+ isInteracting: false,
347
+ isControlled: zoomData !== undefined
301
348
  }
302
349
  };
303
350
  };