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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. package/BarChartPro/BarChartPro.d.ts +4 -4
  2. package/BarChartPro/BarChartPro.js +240 -284
  3. package/BarChartPro/BarChartPro.plugins.d.ts +4 -0
  4. package/BarChartPro/BarChartPro.plugins.js +9 -0
  5. package/BarChartPro/index.d.ts +1 -1
  6. package/BarChartPro/index.js +16 -1
  7. package/CHANGELOG.md +1446 -0
  8. package/ChartContainerPro/ChartContainerPro.d.ts +8 -9
  9. package/ChartContainerPro/ChartContainerPro.js +181 -174
  10. package/ChartContainerPro/index.d.ts +2 -1
  11. package/ChartContainerPro/index.js +17 -1
  12. package/ChartContainerPro/useChartContainerProProps.d.ts +5 -5
  13. package/ChartContainerPro/useChartContainerProProps.js +28 -19
  14. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +7 -7
  15. package/ChartDataProviderPro/ChartDataProviderPro.js +40 -220
  16. package/ChartDataProviderPro/index.d.ts +2 -1
  17. package/ChartDataProviderPro/index.js +17 -1
  18. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +7 -7
  19. package/ChartDataProviderPro/useChartDataProviderProProps.js +10 -6
  20. package/FunnelChart/FunnelChart.d.ts +37 -0
  21. package/FunnelChart/FunnelChart.js +218 -0
  22. package/FunnelChart/FunnelPlot.d.ts +16 -0
  23. package/FunnelChart/FunnelPlot.js +191 -0
  24. package/FunnelChart/FunnelSection.d.ts +15 -0
  25. package/FunnelChart/FunnelSection.js +62 -0
  26. package/FunnelChart/categoryAxis.types.d.ts +24 -0
  27. package/FunnelChart/funnel.types.d.ts +124 -0
  28. package/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  29. package/FunnelChart/funnelSectionClasses.d.ts +13 -0
  30. package/FunnelChart/funnelSectionClasses.js +28 -0
  31. package/FunnelChart/funnelSlots.types.d.ts +19 -0
  32. package/FunnelChart/funnelStepCurve.d.ts +4 -0
  33. package/FunnelChart/funnelStepCurve.js +74 -0
  34. package/FunnelChart/index.d.ts +7 -0
  35. package/FunnelChart/index.js +59 -0
  36. package/FunnelChart/labelUtils.d.ts +42 -0
  37. package/FunnelChart/labelUtils.js +174 -0
  38. package/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  39. package/FunnelChart/seriesConfig/extremums.js +50 -0
  40. package/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  41. package/FunnelChart/seriesConfig/getColor.js +10 -0
  42. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  43. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +18 -0
  44. package/FunnelChart/seriesConfig/index.d.ts +2 -0
  45. package/FunnelChart/seriesConfig/index.js +22 -0
  46. package/FunnelChart/seriesConfig/legend.d.ts +3 -0
  47. package/FunnelChart/seriesConfig/legend.js +31 -0
  48. package/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  49. package/FunnelChart/seriesConfig/seriesProcessor.js +96 -0
  50. package/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  51. package/FunnelChart/seriesConfig/tooltip.js +36 -0
  52. package/FunnelChart/useFunnelChartProps.d.ts +30 -0
  53. package/FunnelChart/useFunnelChartProps.js +168 -0
  54. package/Heatmap/Heatmap.d.ts +45 -45
  55. package/Heatmap/Heatmap.js +236 -244
  56. package/Heatmap/Heatmap.plugins.d.ts +3 -0
  57. package/Heatmap/Heatmap.plugins.js +8 -0
  58. package/Heatmap/HeatmapItem.d.ts +33 -33
  59. package/Heatmap/HeatmapItem.js +43 -36
  60. package/Heatmap/HeatmapPlot.d.ts +4 -5
  61. package/Heatmap/HeatmapPlot.js +22 -16
  62. package/Heatmap/HeatmapTooltip.d.ts +3 -4
  63. package/Heatmap/HeatmapTooltip.js +101 -89
  64. package/Heatmap/heatmapClasses.d.ts +7 -7
  65. package/Heatmap/heatmapClasses.js +15 -7
  66. package/Heatmap/index.d.ts +4 -4
  67. package/Heatmap/index.js +47 -4
  68. package/Heatmap/{extremums.d.ts → seriesConfig/extremums.d.ts} +1 -1
  69. package/Heatmap/{getColor.d.ts → seriesConfig/getColor.d.ts} +1 -1
  70. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  71. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +15 -0
  72. package/Heatmap/seriesConfig/index.d.ts +2 -0
  73. package/Heatmap/seriesConfig/index.js +21 -0
  74. package/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  75. package/{node/Heatmap/formatter.js → Heatmap/seriesConfig/seriesProcessor.js} +2 -2
  76. package/Heatmap/seriesConfig/tooltip.d.ts +3 -0
  77. package/Heatmap/seriesConfig/tooltip.js +31 -0
  78. package/LineChartPro/LineChartPro.d.ts +4 -4
  79. package/LineChartPro/LineChartPro.js +242 -340
  80. package/LineChartPro/LineChartPro.plugins.d.ts +4 -0
  81. package/LineChartPro/LineChartPro.plugins.js +9 -0
  82. package/LineChartPro/index.d.ts +1 -1
  83. package/LineChartPro/index.js +16 -1
  84. package/README.md +1 -1
  85. package/ScatterChartPro/ScatterChartPro.d.ts +4 -4
  86. package/ScatterChartPro/ScatterChartPro.js +244 -235
  87. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
  88. package/ScatterChartPro/ScatterChartPro.plugins.js +9 -0
  89. package/ScatterChartPro/index.d.ts +1 -1
  90. package/ScatterChartPro/index.js +16 -1
  91. package/esm/BarChartPro/BarChartPro.d.ts +18 -0
  92. package/esm/BarChartPro/BarChartPro.js +404 -0
  93. package/esm/BarChartPro/BarChartPro.plugins.d.ts +4 -0
  94. package/esm/BarChartPro/BarChartPro.plugins.js +3 -0
  95. package/esm/BarChartPro/index.d.ts +1 -0
  96. package/esm/BarChartPro/index.js +1 -0
  97. package/esm/ChartContainerPro/ChartContainerPro.d.ts +35 -0
  98. package/esm/ChartContainerPro/ChartContainerPro.js +290 -0
  99. package/esm/ChartContainerPro/index.d.ts +2 -0
  100. package/esm/ChartContainerPro/index.js +2 -0
  101. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +9 -0
  102. package/esm/ChartContainerPro/useChartContainerProProps.js +35 -0
  103. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
  104. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +106 -0
  105. package/esm/ChartDataProviderPro/index.d.ts +2 -0
  106. package/esm/ChartDataProviderPro/index.js +2 -0
  107. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
  108. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
  109. package/esm/FunnelChart/FunnelChart.d.ts +37 -0
  110. package/esm/FunnelChart/FunnelChart.js +212 -0
  111. package/esm/FunnelChart/FunnelPlot.d.ts +16 -0
  112. package/esm/FunnelChart/FunnelPlot.js +184 -0
  113. package/esm/FunnelChart/FunnelSection.d.ts +15 -0
  114. package/esm/FunnelChart/FunnelSection.js +56 -0
  115. package/esm/FunnelChart/categoryAxis.types.d.ts +24 -0
  116. package/esm/FunnelChart/funnel.types.d.ts +124 -0
  117. package/esm/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  118. package/esm/FunnelChart/funnelPlotSlots.types.js +1 -0
  119. package/esm/FunnelChart/funnelSectionClasses.d.ts +13 -0
  120. package/esm/FunnelChart/funnelSectionClasses.js +20 -0
  121. package/esm/FunnelChart/funnelSlots.types.d.ts +19 -0
  122. package/esm/FunnelChart/funnelSlots.types.js +1 -0
  123. package/esm/FunnelChart/funnelStepCurve.d.ts +4 -0
  124. package/esm/FunnelChart/funnelStepCurve.js +67 -0
  125. package/esm/FunnelChart/index.d.ts +7 -0
  126. package/esm/FunnelChart/index.js +5 -0
  127. package/esm/FunnelChart/labelUtils.d.ts +42 -0
  128. package/esm/FunnelChart/labelUtils.js +166 -0
  129. package/esm/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  130. package/esm/FunnelChart/seriesConfig/extremums.js +42 -0
  131. package/esm/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  132. package/esm/FunnelChart/seriesConfig/getColor.js +4 -0
  133. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  134. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
  135. package/esm/FunnelChart/seriesConfig/index.d.ts +2 -0
  136. package/esm/FunnelChart/seriesConfig/index.js +15 -0
  137. package/esm/FunnelChart/seriesConfig/legend.d.ts +3 -0
  138. package/esm/FunnelChart/seriesConfig/legend.js +25 -0
  139. package/esm/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  140. package/esm/FunnelChart/seriesConfig/seriesProcessor.js +89 -0
  141. package/esm/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  142. package/esm/FunnelChart/seriesConfig/tooltip.js +29 -0
  143. package/esm/FunnelChart/useFunnelChartProps.d.ts +30 -0
  144. package/esm/FunnelChart/useFunnelChartProps.js +161 -0
  145. package/esm/Heatmap/Heatmap.d.ts +57 -0
  146. package/esm/Heatmap/Heatmap.js +387 -0
  147. package/esm/Heatmap/Heatmap.plugins.d.ts +3 -0
  148. package/esm/Heatmap/Heatmap.plugins.js +2 -0
  149. package/esm/Heatmap/HeatmapItem.d.ts +49 -0
  150. package/esm/Heatmap/HeatmapItem.js +106 -0
  151. package/esm/Heatmap/HeatmapPlot.d.ts +8 -0
  152. package/{node → esm}/Heatmap/HeatmapPlot.js +16 -22
  153. package/esm/Heatmap/HeatmapTooltip.d.ts +8 -0
  154. package/esm/Heatmap/HeatmapTooltip.js +280 -0
  155. package/esm/Heatmap/heatmapClasses.d.ts +11 -0
  156. package/esm/Heatmap/heatmapClasses.js +14 -0
  157. package/esm/Heatmap/index.d.ts +4 -0
  158. package/esm/Heatmap/index.js +4 -0
  159. package/esm/Heatmap/seriesConfig/extremums.d.ts +2 -0
  160. package/esm/Heatmap/seriesConfig/getColor.d.ts +3 -0
  161. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  162. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +8 -0
  163. package/esm/Heatmap/seriesConfig/index.d.ts +2 -0
  164. package/esm/Heatmap/seriesConfig/index.js +14 -0
  165. package/esm/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  166. package/{Heatmap/formatter.js → esm/Heatmap/seriesConfig/seriesProcessor.js} +2 -2
  167. package/esm/Heatmap/seriesConfig/tooltip.d.ts +3 -0
  168. package/esm/Heatmap/seriesConfig/tooltip.js +25 -0
  169. package/esm/LineChartPro/LineChartPro.d.ts +17 -0
  170. package/esm/LineChartPro/LineChartPro.js +401 -0
  171. package/esm/LineChartPro/LineChartPro.plugins.d.ts +4 -0
  172. package/esm/LineChartPro/LineChartPro.plugins.js +3 -0
  173. package/esm/LineChartPro/index.d.ts +1 -0
  174. package/esm/LineChartPro/index.js +1 -0
  175. package/esm/ScatterChartPro/ScatterChartPro.d.ts +17 -0
  176. package/esm/ScatterChartPro/ScatterChartPro.js +395 -0
  177. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
  178. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
  179. package/esm/ScatterChartPro/index.d.ts +1 -0
  180. package/esm/ScatterChartPro/index.js +1 -0
  181. package/esm/hooks/index.d.ts +2 -0
  182. package/esm/hooks/index.js +2 -0
  183. package/esm/hooks/useFunnelSeries.d.ts +33 -0
  184. package/esm/hooks/useFunnelSeries.js +42 -0
  185. package/esm/hooks/useHeatmapSeries.d.ts +33 -0
  186. package/esm/hooks/useHeatmapSeries.js +42 -0
  187. package/esm/hooks/zoom/index.d.ts +1 -0
  188. package/esm/hooks/zoom/index.js +1 -0
  189. package/esm/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
  190. package/esm/hooks/zoom/useIsZoomInteracting.js +14 -0
  191. package/esm/index.d.ts +34 -0
  192. package/esm/index.js +45 -0
  193. package/esm/internals/plugins/allPlugins.d.ts +8 -0
  194. package/esm/internals/plugins/allPlugins.js +6 -0
  195. package/esm/internals/plugins/useChartProZoom/index.d.ts +3 -0
  196. package/esm/internals/plugins/useChartProZoom/index.js +3 -0
  197. package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
  198. package/{node → esm}/internals/plugins/useChartProZoom/useChartProZoom.js +94 -54
  199. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +203 -0
  200. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +4 -0
  201. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +53 -0
  202. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.js +1 -0
  203. package/esm/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
  204. package/{node → esm}/internals/plugins/useChartProZoom/useChartProZoom.utils.js +8 -22
  205. package/esm/internals/utils/releaseInfo.d.ts +1 -0
  206. package/esm/internals/utils/releaseInfo.js +13 -0
  207. package/esm/models/index.d.ts +2 -0
  208. package/esm/models/index.js +2 -0
  209. package/esm/models/seriesType/heatmap.d.ts +28 -0
  210. package/esm/models/seriesType/heatmap.js +1 -0
  211. package/esm/models/seriesType/index.d.ts +1 -0
  212. package/esm/models/seriesType/index.js +1 -0
  213. package/esm/package.json +1 -0
  214. package/esm/themeAugmentation/components.d.ts +23 -0
  215. package/esm/themeAugmentation/index.d.ts +4 -0
  216. package/esm/themeAugmentation/index.js +0 -0
  217. package/esm/themeAugmentation/overrides.d.ts +11 -0
  218. package/esm/themeAugmentation/props.d.ts +20 -0
  219. package/esm/typeOverloads/index.d.ts +1 -0
  220. package/esm/typeOverloads/index.js +1 -0
  221. package/esm/typeOverloads/modules.d.ts +33 -0
  222. package/esm/typeOverloads/modules.js +1 -0
  223. package/hooks/index.d.ts +2 -2
  224. package/hooks/index.js +27 -2
  225. package/hooks/useFunnelSeries.d.ts +33 -0
  226. package/hooks/useFunnelSeries.js +48 -0
  227. package/hooks/useHeatmapSeries.d.ts +33 -0
  228. package/hooks/useHeatmapSeries.js +48 -0
  229. package/hooks/zoom/index.d.ts +1 -1
  230. package/hooks/zoom/index.js +16 -1
  231. package/hooks/zoom/useIsZoomInteracting.d.ts +1 -1
  232. package/hooks/zoom/useIsZoomInteracting.js +10 -5
  233. package/index.d.ts +10 -8
  234. package/index.js +369 -37
  235. package/internals/plugins/allPlugins.d.ts +7 -9
  236. package/internals/plugins/allPlugins.js +10 -3
  237. package/internals/plugins/useChartProZoom/index.d.ts +3 -3
  238. package/internals/plugins/useChartProZoom/index.js +38 -3
  239. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
  240. package/internals/plugins/useChartProZoom/useChartProZoom.js +101 -47
  241. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +154 -328
  242. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +11 -10
  243. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +42 -39
  244. package/internals/plugins/useChartProZoom/useChartProZoom.types.js +5 -1
  245. package/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +13 -13
  246. package/internals/plugins/useChartProZoom/useChartProZoom.utils.js +22 -8
  247. package/internals/utils/releaseInfo.d.ts +1 -1
  248. package/internals/utils/releaseInfo.js +13 -5
  249. package/models/index.d.ts +1 -1
  250. package/models/index.js +16 -2
  251. package/models/seriesType/heatmap.d.ts +18 -19
  252. package/models/seriesType/heatmap.js +5 -1
  253. package/models/seriesType/index.d.ts +1 -1
  254. package/models/seriesType/index.js +16 -1
  255. package/modern/BarChartPro/BarChartPro.d.ts +18 -0
  256. package/modern/BarChartPro/BarChartPro.js +35 -85
  257. package/modern/BarChartPro/BarChartPro.plugins.d.ts +4 -0
  258. package/modern/BarChartPro/BarChartPro.plugins.js +3 -0
  259. package/modern/BarChartPro/index.d.ts +1 -0
  260. package/modern/ChartContainerPro/ChartContainerPro.d.ts +35 -0
  261. package/modern/ChartContainerPro/ChartContainerPro.js +4 -3
  262. package/modern/ChartContainerPro/index.d.ts +2 -0
  263. package/modern/ChartContainerPro/index.js +1 -0
  264. package/modern/ChartContainerPro/useChartContainerProProps.d.ts +9 -0
  265. package/modern/ChartContainerPro/useChartContainerProProps.js +15 -13
  266. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
  267. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +18 -204
  268. package/modern/ChartDataProviderPro/index.d.ts +2 -0
  269. package/modern/ChartDataProviderPro/index.js +1 -0
  270. package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
  271. package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
  272. package/modern/FunnelChart/FunnelChart.d.ts +37 -0
  273. package/modern/FunnelChart/FunnelChart.js +212 -0
  274. package/modern/FunnelChart/FunnelPlot.d.ts +16 -0
  275. package/modern/FunnelChart/FunnelPlot.js +184 -0
  276. package/modern/FunnelChart/FunnelSection.d.ts +15 -0
  277. package/modern/FunnelChart/FunnelSection.js +56 -0
  278. package/modern/FunnelChart/categoryAxis.types.d.ts +24 -0
  279. package/modern/FunnelChart/categoryAxis.types.js +1 -0
  280. package/modern/FunnelChart/funnel.types.d.ts +124 -0
  281. package/modern/FunnelChart/funnel.types.js +1 -0
  282. package/modern/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  283. package/modern/FunnelChart/funnelPlotSlots.types.js +1 -0
  284. package/modern/FunnelChart/funnelSectionClasses.d.ts +13 -0
  285. package/modern/FunnelChart/funnelSectionClasses.js +20 -0
  286. package/modern/FunnelChart/funnelSlots.types.d.ts +19 -0
  287. package/modern/FunnelChart/funnelSlots.types.js +1 -0
  288. package/modern/FunnelChart/funnelStepCurve.d.ts +4 -0
  289. package/modern/FunnelChart/funnelStepCurve.js +67 -0
  290. package/modern/FunnelChart/index.d.ts +7 -0
  291. package/modern/FunnelChart/index.js +5 -0
  292. package/modern/FunnelChart/labelUtils.d.ts +42 -0
  293. package/modern/FunnelChart/labelUtils.js +166 -0
  294. package/modern/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  295. package/modern/FunnelChart/seriesConfig/extremums.js +42 -0
  296. package/modern/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  297. package/modern/FunnelChart/seriesConfig/getColor.js +4 -0
  298. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  299. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
  300. package/modern/FunnelChart/seriesConfig/index.d.ts +2 -0
  301. package/modern/FunnelChart/seriesConfig/index.js +15 -0
  302. package/modern/FunnelChart/seriesConfig/legend.d.ts +3 -0
  303. package/modern/FunnelChart/seriesConfig/legend.js +25 -0
  304. package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  305. package/modern/FunnelChart/seriesConfig/seriesProcessor.js +89 -0
  306. package/modern/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  307. package/modern/FunnelChart/seriesConfig/tooltip.js +29 -0
  308. package/modern/FunnelChart/useFunnelChartProps.d.ts +30 -0
  309. package/modern/FunnelChart/useFunnelChartProps.js +161 -0
  310. package/modern/Heatmap/Heatmap.d.ts +57 -0
  311. package/modern/Heatmap/Heatmap.js +47 -61
  312. package/modern/Heatmap/Heatmap.plugins.d.ts +3 -0
  313. package/modern/Heatmap/Heatmap.plugins.js +2 -0
  314. package/modern/Heatmap/HeatmapItem.d.ts +49 -0
  315. package/modern/Heatmap/HeatmapItem.js +7 -7
  316. package/modern/Heatmap/HeatmapPlot.d.ts +8 -0
  317. package/modern/Heatmap/HeatmapPlot.js +2 -2
  318. package/modern/Heatmap/HeatmapTooltip.d.ts +8 -0
  319. package/modern/Heatmap/HeatmapTooltip.js +10 -4
  320. package/modern/Heatmap/heatmapClasses.d.ts +11 -0
  321. package/modern/Heatmap/index.d.ts +4 -0
  322. package/modern/Heatmap/seriesConfig/extremums.d.ts +2 -0
  323. package/modern/Heatmap/seriesConfig/getColor.d.ts +3 -0
  324. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  325. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +8 -0
  326. package/modern/Heatmap/seriesConfig/index.d.ts +2 -0
  327. package/modern/Heatmap/seriesConfig/index.js +14 -0
  328. package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +3 -0
  329. package/modern/Heatmap/{formatter.js → seriesConfig/seriesProcessor.js} +2 -2
  330. package/modern/Heatmap/seriesConfig/tooltip.d.ts +3 -0
  331. package/modern/Heatmap/seriesConfig/tooltip.js +25 -0
  332. package/modern/LineChartPro/LineChartPro.d.ts +17 -0
  333. package/modern/LineChartPro/LineChartPro.js +36 -140
  334. package/modern/LineChartPro/LineChartPro.plugins.d.ts +4 -0
  335. package/modern/LineChartPro/LineChartPro.plugins.js +3 -0
  336. package/modern/LineChartPro/index.d.ts +1 -0
  337. package/modern/ScatterChartPro/ScatterChartPro.d.ts +17 -0
  338. package/modern/ScatterChartPro/ScatterChartPro.js +40 -37
  339. package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -0
  340. package/modern/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
  341. package/modern/ScatterChartPro/index.d.ts +1 -0
  342. package/modern/hooks/index.d.ts +2 -0
  343. package/modern/hooks/index.js +1 -1
  344. package/modern/hooks/useFunnelSeries.d.ts +33 -0
  345. package/modern/hooks/useFunnelSeries.js +42 -0
  346. package/modern/hooks/useHeatmapSeries.d.ts +33 -0
  347. package/modern/hooks/useHeatmapSeries.js +42 -0
  348. package/modern/hooks/zoom/index.d.ts +1 -0
  349. package/modern/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
  350. package/modern/index.d.ts +34 -0
  351. package/modern/index.js +5 -4
  352. package/modern/internals/plugins/allPlugins.d.ts +8 -0
  353. package/modern/internals/plugins/allPlugins.js +3 -2
  354. package/modern/internals/plugins/useChartProZoom/index.d.ts +3 -0
  355. package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
  356. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +65 -18
  357. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +203 -0
  358. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -7
  359. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +53 -0
  360. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
  361. package/modern/internals/utils/releaseInfo.d.ts +1 -0
  362. package/modern/internals/utils/releaseInfo.js +1 -1
  363. package/modern/models/index.d.ts +2 -0
  364. package/modern/models/seriesType/heatmap.d.ts +28 -0
  365. package/modern/models/seriesType/index.d.ts +1 -0
  366. package/modern/package.json +1 -0
  367. package/modern/themeAugmentation/components.d.ts +23 -0
  368. package/modern/themeAugmentation/index.d.ts +4 -0
  369. package/modern/themeAugmentation/overrides.d.ts +11 -0
  370. package/modern/themeAugmentation/props.d.ts +20 -0
  371. package/modern/typeOverloads/index.d.ts +1 -0
  372. package/modern/typeOverloads/modules.d.ts +33 -0
  373. package/package.json +44 -11
  374. package/themeAugmentation/components.d.ts +1 -3
  375. package/themeAugmentation/index.d.ts +1 -1
  376. package/themeAugmentation/index.js +1 -0
  377. package/themeAugmentation/overrides.d.ts +2 -4
  378. package/themeAugmentation/props.d.ts +5 -7
  379. package/tsconfig.build.tsbuildinfo +1 -0
  380. package/typeOverloads/index.d.ts +1 -1
  381. package/typeOverloads/index.js +6 -1
  382. package/typeOverloads/modules.d.ts +32 -24
  383. package/typeOverloads/modules.js +5 -1
  384. package/BarChartPro/package.json +0 -6
  385. package/ChartContainerPro/package.json +0 -6
  386. package/ChartDataProviderPro/package.json +0 -6
  387. package/Heatmap/formatter.d.ts +0 -3
  388. package/Heatmap/package.json +0 -6
  389. package/Heatmap/plugin.d.ts +0 -2
  390. package/Heatmap/plugin.js +0 -10
  391. package/LineChartPro/package.json +0 -6
  392. package/ScatterChartPro/package.json +0 -6
  393. package/hooks/package.json +0 -6
  394. package/hooks/useSeries.d.ts +0 -11
  395. package/hooks/useSeries.js +0 -16
  396. package/internals/plugins/useChartProZoom/creatZoomLookup.d.ts +0 -3
  397. package/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -12
  398. package/internals/plugins/useChartProZoom/defaultizeZoom.d.ts +0 -2
  399. package/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -25
  400. package/internals/plugins/useChartProZoom/zoom.types.d.ts +0 -53
  401. package/models/package.json +0 -6
  402. package/modern/Heatmap/plugin.js +0 -10
  403. package/modern/hooks/useSeries.js +0 -16
  404. package/modern/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -12
  405. package/modern/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -25
  406. package/node/BarChartPro/BarChartPro.js +0 -460
  407. package/node/BarChartPro/index.js +0 -16
  408. package/node/ChartContainerPro/ChartContainerPro.js +0 -295
  409. package/node/ChartContainerPro/index.js +0 -16
  410. package/node/ChartContainerPro/useChartContainerProProps.js +0 -40
  411. package/node/ChartDataProviderPro/ChartDataProviderPro.js +0 -298
  412. package/node/ChartDataProviderPro/index.js +0 -16
  413. package/node/ChartDataProviderPro/useChartDataProviderProProps.js +0 -23
  414. package/node/Heatmap/Heatmap.js +0 -407
  415. package/node/Heatmap/HeatmapItem.js +0 -113
  416. package/node/Heatmap/HeatmapTooltip.js +0 -280
  417. package/node/Heatmap/heatmapClasses.js +0 -22
  418. package/node/Heatmap/index.js +0 -47
  419. package/node/Heatmap/plugin.js +0 -17
  420. package/node/LineChartPro/LineChartPro.js +0 -511
  421. package/node/LineChartPro/index.js +0 -16
  422. package/node/ScatterChartPro/ScatterChartPro.js +0 -398
  423. package/node/ScatterChartPro/index.js +0 -16
  424. package/node/hooks/index.js +0 -27
  425. package/node/hooks/useSeries.js +0 -21
  426. package/node/hooks/zoom/index.js +0 -16
  427. package/node/hooks/zoom/useIsZoomInteracting.js +0 -19
  428. package/node/index.js +0 -365
  429. package/node/internals/plugins/allPlugins.js +0 -11
  430. package/node/internals/plugins/useChartProZoom/creatZoomLookup.js +0 -19
  431. package/node/internals/plugins/useChartProZoom/defaultizeZoom.js +0 -33
  432. package/node/internals/plugins/useChartProZoom/index.js +0 -38
  433. package/node/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -18
  434. package/node/internals/utils/releaseInfo.js +0 -21
  435. package/node/models/index.js +0 -16
  436. package/node/models/seriesType/index.js +0 -16
  437. package/node/themeAugmentation/index.js +0 -1
  438. package/node/typeOverloads/index.js +0 -6
  439. package/themeAugmentation/package.json +0 -6
  440. package/typeOverloads/package.json +0 -6
  441. /package/{node/internals/plugins/useChartProZoom/useChartProZoom.types.js → FunnelChart/categoryAxis.types.js} +0 -0
  442. /package/{node/internals/plugins/useChartProZoom/zoom.types.js → FunnelChart/funnel.types.js} +0 -0
  443. /package/{node/models/seriesType/heatmap.js → FunnelChart/funnelPlotSlots.types.js} +0 -0
  444. /package/{node/typeOverloads/modules.js → FunnelChart/funnelSlots.types.js} +0 -0
  445. /package/{node/Heatmap → Heatmap/seriesConfig}/extremums.js +0 -0
  446. /package/{node/Heatmap → Heatmap/seriesConfig}/getColor.js +0 -0
  447. /package/{internals/plugins/useChartProZoom/zoom.types.js → esm/FunnelChart/categoryAxis.types.js} +0 -0
  448. /package/{modern/internals/plugins/useChartProZoom/zoom.types.js → esm/FunnelChart/funnel.types.js} +0 -0
  449. /package/{Heatmap → esm/Heatmap/seriesConfig}/extremums.js +0 -0
  450. /package/{Heatmap → esm/Heatmap/seriesConfig}/getColor.js +0 -0
  451. /package/modern/Heatmap/{extremums.js → seriesConfig/extremums.js} +0 -0
  452. /package/modern/Heatmap/{getColor.js → seriesConfig/getColor.js} +0 -0
@@ -0,0 +1,13 @@
1
+ import type { FunnelSectionProps } from './FunnelSection';
2
+ export interface FunnelSectionClasses {
3
+ /** Styles applied to the root element. */
4
+ root: string;
5
+ /** Styles applied to the root element if `highlighted={true}`. */
6
+ highlighted: string;
7
+ /** Styles applied to the root element if `faded={true}`. */
8
+ faded: string;
9
+ /** Styles applied to the label element. */
10
+ label: string;
11
+ }
12
+ export declare const useUtilityClasses: (props: FunnelSectionProps) => Record<"label" | "highlighted" | "faded" | "root", string>;
13
+ export declare const funnelSectionClasses: FunnelSectionClasses;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useUtilityClasses = exports.funnelSectionClasses = void 0;
8
+ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
9
+ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
10
+ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
11
+ function getFunnelSectionUtilityClass(slot) {
12
+ return (0, _generateUtilityClass.default)('MuiFunnelSection', slot);
13
+ }
14
+ const useUtilityClasses = props => {
15
+ const {
16
+ classes,
17
+ seriesId
18
+ } = props;
19
+ const slots = {
20
+ root: ['root', `series-${seriesId}`],
21
+ highlighted: ['highlighted'],
22
+ faded: ['faded'],
23
+ label: ['label']
24
+ };
25
+ return (0, _composeClasses.default)(slots, getFunnelSectionUtilityClass, classes);
26
+ };
27
+ exports.useUtilityClasses = useUtilityClasses;
28
+ const funnelSectionClasses = exports.funnelSectionClasses = (0, _generateUtilityClasses.default)('MuiFunnelSection', ['root', 'highlighted', 'faded', 'label']);
@@ -0,0 +1,19 @@
1
+ import { ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
2
+ import { ChartsTooltipSlotProps, ChartsTooltipSlots } from '@mui/x-charts/ChartsTooltip';
3
+ import { ChartsAxisSlotProps, ChartsAxisSlots } from '@mui/x-charts/internals';
4
+ import { ChartsLegendSlotProps, ChartsLegendSlots } from '@mui/x-charts/ChartsLegend';
5
+ import { FunnelPlotSlotProps, FunnelPlotSlots } from "./funnelPlotSlots.types.js";
6
+ export interface FunnelChartSlots extends ChartsAxisSlots, FunnelPlotSlots, ChartsLegendSlots, ChartsTooltipSlots, ChartsOverlaySlots, ChartsAxisSlots {}
7
+ export interface FunnelChartSlotProps extends ChartsAxisSlotProps, FunnelPlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps, ChartsOverlaySlotProps, ChartsAxisSlotProps {}
8
+ export interface FunnelChartSlotExtension {
9
+ /**
10
+ * Overridable component slots.
11
+ * @default {}
12
+ */
13
+ slots?: FunnelChartSlots;
14
+ /**
15
+ * The props used for each component slot.
16
+ * @default {}
17
+ */
18
+ slotProps?: FunnelChartSlotProps;
19
+ }
@@ -0,0 +1,4 @@
1
+ import { CurveFactory } from '@mui/x-charts-vendor/d3-shape';
2
+ declare const funnelHorizontalStepCurve: CurveFactory;
3
+ declare const funnelVerticalStepCurve: CurveFactory;
4
+ export { funnelHorizontalStepCurve, funnelVerticalStepCurve };
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.funnelVerticalStepCurve = exports.funnelHorizontalStepCurve = void 0;
7
+ /**
8
+ * This is a custom "step" curve generator for the funnel chart.
9
+ * It is used to draw the funnel using "rectangles" without having to rework the rendering logic.
10
+ *
11
+ * It is based on the d3-shape step curve generator.
12
+ * https://github.com/d3/d3-shape/blob/a82254af78f08799c71d7ab25df557c4872a3c51/src/curve/step.js
13
+ */
14
+ class FunnelStep {
15
+ constructor(context, isHorizontal) {
16
+ this.context = void 0;
17
+ this.line = NaN;
18
+ this.x = NaN;
19
+ this.y = NaN;
20
+ this.currentPoint = 0;
21
+ this.isHorizontal = false;
22
+ this.context = context;
23
+ this.isHorizontal = isHorizontal;
24
+ }
25
+ areaStart() {
26
+ this.line = 0;
27
+ }
28
+ areaEnd() {
29
+ this.line = NaN;
30
+ }
31
+ lineStart() {
32
+ this.x = NaN;
33
+ this.y = NaN;
34
+ this.currentPoint = 0;
35
+ }
36
+ lineEnd() {
37
+ if (this.currentPoint === 2) {
38
+ this.context.lineTo(this.x, this.y);
39
+ }
40
+ if (this.line || this.line !== 0 && this.currentPoint === 1) {
41
+ this.context.closePath();
42
+ }
43
+ if (this.line >= 0) {
44
+ this.line = 1 - this.line;
45
+ }
46
+ }
47
+ point(x, y) {
48
+ x = +x;
49
+ y = +y;
50
+ if (this.currentPoint === 0) {
51
+ this.context.moveTo(x, y);
52
+ } else if (this.isHorizontal && (this.currentPoint === 2 || this.currentPoint === 1)) {
53
+ this.context.lineTo(x, this.y);
54
+ this.context.lineTo(x, y);
55
+ } else if (this.currentPoint === 3 && !this.isHorizontal) {
56
+ this.context.lineTo(x, this.y);
57
+ this.context.lineTo(x, y);
58
+ } else {
59
+ this.context.lineTo(this.x, y);
60
+ this.context.lineTo(x, y);
61
+ }
62
+ this.currentPoint += 1;
63
+ this.x = x;
64
+ this.y = y;
65
+ }
66
+ }
67
+ const funnelHorizontalStepCurve = context => {
68
+ return new FunnelStep(context, true);
69
+ };
70
+ exports.funnelHorizontalStepCurve = funnelHorizontalStepCurve;
71
+ const funnelVerticalStepCurve = context => {
72
+ return new FunnelStep(context, false);
73
+ };
74
+ exports.funnelVerticalStepCurve = funnelVerticalStepCurve;
@@ -0,0 +1,7 @@
1
+ export { FunnelChart as Unstable_FunnelChart } from "./FunnelChart.js";
2
+ export type { FunnelChartProps } from './FunnelChart';
3
+ export * from "./FunnelPlot.js";
4
+ export * from "./funnel.types.js";
5
+ export * from "./funnelSlots.types.js";
6
+ export { funnelSectionClasses } from "./funnelSectionClasses.js";
7
+ export type { FunnelSectionClasses } from './funnelSectionClasses';
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ Unstable_FunnelChart: true,
8
+ funnelSectionClasses: true
9
+ };
10
+ Object.defineProperty(exports, "Unstable_FunnelChart", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _FunnelChart.FunnelChart;
14
+ }
15
+ });
16
+ Object.defineProperty(exports, "funnelSectionClasses", {
17
+ enumerable: true,
18
+ get: function () {
19
+ return _funnelSectionClasses.funnelSectionClasses;
20
+ }
21
+ });
22
+ var _FunnelChart = require("./FunnelChart");
23
+ var _FunnelPlot = require("./FunnelPlot");
24
+ Object.keys(_FunnelPlot).forEach(function (key) {
25
+ if (key === "default" || key === "__esModule") return;
26
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
27
+ if (key in exports && exports[key] === _FunnelPlot[key]) return;
28
+ Object.defineProperty(exports, key, {
29
+ enumerable: true,
30
+ get: function () {
31
+ return _FunnelPlot[key];
32
+ }
33
+ });
34
+ });
35
+ var _funnel = require("./funnel.types");
36
+ Object.keys(_funnel).forEach(function (key) {
37
+ if (key === "default" || key === "__esModule") return;
38
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
39
+ if (key in exports && exports[key] === _funnel[key]) return;
40
+ Object.defineProperty(exports, key, {
41
+ enumerable: true,
42
+ get: function () {
43
+ return _funnel[key];
44
+ }
45
+ });
46
+ });
47
+ var _funnelSlots = require("./funnelSlots.types");
48
+ Object.keys(_funnelSlots).forEach(function (key) {
49
+ if (key === "default" || key === "__esModule") return;
50
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
51
+ if (key in exports && exports[key] === _funnelSlots[key]) return;
52
+ Object.defineProperty(exports, key, {
53
+ enumerable: true,
54
+ get: function () {
55
+ return _funnelSlots[key];
56
+ }
57
+ });
58
+ });
59
+ var _funnelSectionClasses = require("./funnelSectionClasses");
@@ -0,0 +1,42 @@
1
+ import { FunnelDataPoints, FunnelLabelOptions } from "./funnel.types.js";
2
+ /**
3
+ * It tries to keep the label inside the bounds of the section based on the position.
4
+ *
5
+ * @returns The text anchor and dominant baseline of the label.
6
+ */
7
+ export declare const alignLabel: ({
8
+ position,
9
+ textAnchor,
10
+ dominantBaseline
11
+ }: Omit<FunnelLabelOptions, "margin">) => {
12
+ textAnchor: string;
13
+ dominantBaseline: string;
14
+ };
15
+ /**
16
+ * This function calculates the position of the label based on the position and margin.
17
+ *
18
+ * It is quite complex, because it needs to calculate the position based on the position of the points of a rectangle.
19
+ * And we are manually calculating each possible position of the label.
20
+ *
21
+ * @returns The x and y position of the label.
22
+ */
23
+ export declare const positionLabel: ({
24
+ position,
25
+ offset,
26
+ xPosition,
27
+ yPosition,
28
+ isHorizontal,
29
+ values,
30
+ dataIndex,
31
+ baseScaleData
32
+ }: Omit<FunnelLabelOptions, "textAnchor" | "dominantBaseline"> & {
33
+ xPosition: (value: number, bandIndex: number, stackOffset?: number, useBand?: boolean) => number | undefined;
34
+ yPosition: (value: number, bandIndex: number, stackOffset?: number, useBand?: boolean) => number | undefined;
35
+ isHorizontal: boolean;
36
+ values: readonly FunnelDataPoints[];
37
+ dataIndex: number;
38
+ baseScaleData: readonly number[];
39
+ }) => {
40
+ x: number;
41
+ y: number;
42
+ };
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.positionLabel = exports.alignLabel = void 0;
7
+ /**
8
+ * It tries to keep the label inside the bounds of the section based on the position.
9
+ *
10
+ * @returns The text anchor and dominant baseline of the label.
11
+ */
12
+ const alignLabel = ({
13
+ position,
14
+ textAnchor,
15
+ dominantBaseline
16
+ }) => {
17
+ const vertical = position?.vertical ?? 'middle';
18
+ const horizontal = position?.horizontal ?? 'center';
19
+ let anchor = 'middle';
20
+ let baseline = 'central';
21
+ if (vertical === 'top') {
22
+ baseline = 'hanging';
23
+ } else if (vertical === 'bottom') {
24
+ baseline = 'baseline';
25
+ }
26
+ if (horizontal === 'start') {
27
+ anchor = 'start';
28
+ } else if (horizontal === 'end') {
29
+ anchor = 'end';
30
+ }
31
+ return {
32
+ textAnchor: textAnchor ?? anchor,
33
+ dominantBaseline: dominantBaseline ?? baseline
34
+ };
35
+ };
36
+
37
+ /**
38
+ * This function calculates the position of the label based on the position and margin.
39
+ *
40
+ * It is quite complex, because it needs to calculate the position based on the position of the points of a rectangle.
41
+ * And we are manually calculating each possible position of the label.
42
+ *
43
+ * @returns The x and y position of the label.
44
+ */
45
+ exports.alignLabel = alignLabel;
46
+ const positionLabel = ({
47
+ position,
48
+ offset,
49
+ xPosition,
50
+ yPosition,
51
+ isHorizontal,
52
+ values,
53
+ dataIndex,
54
+ baseScaleData
55
+ }) => {
56
+ const vertical = position?.vertical ?? 'middle';
57
+ const horizontal = position?.horizontal ?? 'center';
58
+ let x = 0;
59
+ let y = 0;
60
+ let minTop = 0;
61
+ let maxTop = 0;
62
+ let minBottom = 0;
63
+ let maxBottom = 0;
64
+ let minLeft = 0;
65
+ let maxLeft = 0;
66
+ let minRight = 0;
67
+ let maxRight = 0;
68
+ let center = 0;
69
+ let leftCenter = 0;
70
+ let rightCenter = 0;
71
+ let middle = 0;
72
+ let topMiddle = 0;
73
+ let bottomMiddle = 0;
74
+ const mv = typeof offset === 'number' ? offset : offset?.y ?? 0;
75
+ const mh = typeof offset === 'number' ? offset : offset?.x ?? 0;
76
+ const stackOffset = values[0].stackOffset;
77
+ if (isHorizontal) {
78
+ maxTop = yPosition(values[0].y, baseScaleData[dataIndex], stackOffset) - mv;
79
+ minTop = yPosition(values[1].y, baseScaleData[dataIndex], stackOffset) - mv;
80
+ minBottom = yPosition(values[2].y, baseScaleData[dataIndex], stackOffset) + mv;
81
+ maxBottom = yPosition(values[3].y, baseScaleData[dataIndex], stackOffset) + mv;
82
+ minRight = 0;
83
+ maxRight = xPosition(Math.min(...values.map(v => v.x)), baseScaleData[dataIndex], stackOffset, true) + mh;
84
+ minLeft = 0;
85
+ maxLeft = xPosition(Math.max(...values.map(v => v.x)), baseScaleData[dataIndex], stackOffset) + mh;
86
+ center = maxRight - (maxRight - maxLeft) / 2;
87
+ leftCenter = 0;
88
+ rightCenter = 0;
89
+ middle = yPosition(0, baseScaleData[dataIndex], stackOffset) - mv;
90
+ topMiddle = yPosition(values[0].y - (values[0].y - values[1].y) / 2, baseScaleData[dataIndex], stackOffset) - mv;
91
+ bottomMiddle = yPosition(values[3].y - (values[3].y - values[2].y) / 2, baseScaleData[dataIndex], stackOffset) + mv;
92
+ } else {
93
+ minTop = 0;
94
+ maxTop = yPosition(Math.max(...values.map(v => v.y)), baseScaleData[dataIndex], stackOffset) - mv;
95
+ minBottom = 0;
96
+ maxBottom = yPosition(Math.min(...values.map(v => v.y)), baseScaleData[dataIndex], stackOffset, true) - mv;
97
+ maxRight = xPosition(values[0].x, baseScaleData[dataIndex], stackOffset) + mh;
98
+ minRight = xPosition(values[1].x, baseScaleData[dataIndex], stackOffset) + mh;
99
+ minLeft = xPosition(values[2].x, baseScaleData[dataIndex], stackOffset) - mh;
100
+ maxLeft = xPosition(values[3].x, baseScaleData[dataIndex], stackOffset) - mh;
101
+ center = xPosition(0, baseScaleData[dataIndex], stackOffset) - mh;
102
+ rightCenter = xPosition(values[0].x - (values[0].x - values[1].x) / 2, baseScaleData[dataIndex], stackOffset) + mh;
103
+ leftCenter = xPosition(values[3].x - (values[3].x - values[2].x) / 2, baseScaleData[dataIndex], stackOffset) - mh;
104
+ middle = yPosition(values[0].y - (values[0].y - values[1].y) / 2, baseScaleData[dataIndex], stackOffset);
105
+ middle = maxTop - (maxTop - maxBottom) / 2;
106
+ topMiddle = 0;
107
+ bottomMiddle = 0;
108
+ }
109
+ if (isHorizontal) {
110
+ if (horizontal === 'center') {
111
+ x = center;
112
+ if (vertical === 'top') {
113
+ y = topMiddle;
114
+ } else if (vertical === 'middle') {
115
+ y = middle;
116
+ } else if (vertical === 'bottom') {
117
+ y = bottomMiddle;
118
+ }
119
+ } else if (horizontal === 'start') {
120
+ x = maxLeft;
121
+ if (vertical === 'top') {
122
+ y = maxTop;
123
+ } else if (vertical === 'middle') {
124
+ y = middle;
125
+ } else if (vertical === 'bottom') {
126
+ y = maxBottom;
127
+ }
128
+ } else if (horizontal === 'end') {
129
+ x = maxRight;
130
+ if (vertical === 'top') {
131
+ y = minTop;
132
+ } else if (vertical === 'middle') {
133
+ y = middle;
134
+ } else if (vertical === 'bottom') {
135
+ y = minBottom;
136
+ }
137
+ }
138
+ }
139
+ if (!isHorizontal) {
140
+ if (vertical === 'middle') {
141
+ y = middle;
142
+ if (horizontal === 'start') {
143
+ x = leftCenter;
144
+ } else if (horizontal === 'center') {
145
+ x = center;
146
+ } else if (horizontal === 'end') {
147
+ x = rightCenter;
148
+ }
149
+ } else if (vertical === 'top') {
150
+ y = maxTop;
151
+ if (horizontal === 'start') {
152
+ x = maxLeft;
153
+ } else if (horizontal === 'center') {
154
+ x = center;
155
+ } else if (horizontal === 'end') {
156
+ x = maxRight;
157
+ }
158
+ } else if (vertical === 'bottom') {
159
+ y = maxBottom;
160
+ if (horizontal === 'start') {
161
+ x = minLeft;
162
+ } else if (horizontal === 'center') {
163
+ x = center;
164
+ } else if (horizontal === 'end') {
165
+ x = minRight;
166
+ }
167
+ }
168
+ }
169
+ return {
170
+ x,
171
+ y
172
+ };
173
+ };
174
+ exports.positionLabel = positionLabel;
@@ -0,0 +1,3 @@
1
+ import { CartesianExtremumGetter } from '@mui/x-charts/internals';
2
+ export declare const getExtremumX: CartesianExtremumGetter<'funnel'>;
3
+ export declare const getExtremumY: CartesianExtremumGetter<'funnel'>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getExtremumY = exports.getExtremumX = void 0;
7
+ const getValueExtremum = (direction, isHorizontal, params) => {
8
+ const {
9
+ series,
10
+ axis,
11
+ isDefaultAxis
12
+ } = params;
13
+ return Object.keys(series)
14
+ // Keep only series that are associated with the current axis
15
+ .reduce((acc, seriesId) => {
16
+ const yAxisId = series[seriesId].yAxisId;
17
+ const xAxisId = series[seriesId].xAxisId;
18
+ const {
19
+ dataPoints
20
+ } = series[seriesId];
21
+ if (
22
+ // We skip except if the axis id is not defined for the direction and we are on the default one.
23
+ !(isDefaultAxis && yAxisId === undefined && direction === 'y') && !(isDefaultAxis && xAxisId === undefined && direction === 'x')) {
24
+ return acc;
25
+ }
26
+ if (axis.scaleType === 'band' || !isHorizontal && direction === 'x' || isHorizontal && direction === 'y') {
27
+ const [seriesMin, seriesMax] = dataPoints.map(v => v.map(t => t[direction]))?.reduce((seriesAcc, values) => {
28
+ return [Math.min(...values, seriesAcc[0]), Math.max(...values, seriesAcc[1])];
29
+ }, [Infinity, -Infinity]) ?? [Infinity, -Infinity];
30
+ return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];
31
+ }
32
+ const seriesMin = dataPoints.flatMap(v => v.map(t => t[direction]).reduce((min, value) => Math.min(value, min), Infinity)).reduce((sumAcc, value) => sumAcc + value, 0);
33
+ const seriesMax = dataPoints.flatMap(v => v.map(t => t[direction]).reduce((max, value) => Math.max(value, max), -Infinity)).reduce((sumAcc, value) => sumAcc + value, 0);
34
+ return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];
35
+ }, [Infinity, -Infinity]);
36
+ };
37
+ const getExtremumX = params => {
38
+ const isHorizontal = Object.keys(params.series).some(seriesId => params.series[seriesId].layout === 'horizontal');
39
+ if (isHorizontal) {
40
+ const [min, max] = getValueExtremum('x', isHorizontal, params);
41
+ return [max, min];
42
+ }
43
+ return getValueExtremum('x', isHorizontal, params);
44
+ };
45
+ exports.getExtremumX = getExtremumX;
46
+ const getExtremumY = params => {
47
+ const isHorizontal = Object.keys(params.series).some(seriesId => params.series[seriesId].layout === 'horizontal');
48
+ return getValueExtremum('y', isHorizontal, params);
49
+ };
50
+ exports.getExtremumY = getExtremumY;
@@ -0,0 +1,3 @@
1
+ import { ColorProcessor } from '@mui/x-charts/internals';
2
+ declare const getColor: ColorProcessor<'funnel'>;
3
+ export default getColor;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const getColor = series => {
8
+ return dataIndex => series.data[dataIndex].color;
9
+ };
10
+ var _default = exports.default = getColor;
@@ -0,0 +1,3 @@
1
+ import { GetSeriesWithDefaultValues } from '@mui/x-charts/internals';
2
+ declare const getSeriesWithDefaultValues: GetSeriesWithDefaultValues<'funnel'>;
3
+ export default getSeriesWithDefaultValues;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
10
+ return (0, _extends2.default)({
11
+ id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
12
+ }, seriesData, {
13
+ data: seriesData.data.map((d, index) => (0, _extends2.default)({
14
+ color: colors[index % colors.length]
15
+ }, d))
16
+ });
17
+ };
18
+ var _default = exports.default = getSeriesWithDefaultValues;
@@ -0,0 +1,2 @@
1
+ import type { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
2
+ export declare const seriesConfig: ChartSeriesTypeConfig<'funnel'>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.seriesConfig = void 0;
8
+ var _extremums = require("./extremums");
9
+ var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
10
+ var _getColor = _interopRequireDefault(require("./getColor"));
11
+ var _legend = _interopRequireDefault(require("./legend"));
12
+ var _tooltip = _interopRequireDefault(require("./tooltip"));
13
+ var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
14
+ const seriesConfig = exports.seriesConfig = {
15
+ seriesProcessor: _seriesProcessor.default,
16
+ colorProcessor: _getColor.default,
17
+ legendGetter: _legend.default,
18
+ tooltipGetter: _tooltip.default,
19
+ xExtremumGetter: _extremums.getExtremumX,
20
+ yExtremumGetter: _extremums.getExtremumY,
21
+ getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default
22
+ };
@@ -0,0 +1,3 @@
1
+ import { LegendGetter } from '@mui/x-charts/internals';
2
+ declare const legendGetter: LegendGetter<'funnel'>;
3
+ export default legendGetter;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _internals = require("@mui/x-charts/internals");
8
+ const legendGetter = params => {
9
+ const {
10
+ seriesOrder,
11
+ series
12
+ } = params;
13
+ return seriesOrder.reduce((acc, seriesId) => {
14
+ series[seriesId].data.forEach(item => {
15
+ const formattedLabel = (0, _internals.getLabel)(item.label, 'legend');
16
+ if (formattedLabel === undefined) {
17
+ return;
18
+ }
19
+ acc.push({
20
+ markType: item.labelMarkType ?? series[seriesId].labelMarkType,
21
+ seriesId,
22
+ id: item.id,
23
+ itemId: item.id,
24
+ color: item.color,
25
+ label: formattedLabel
26
+ });
27
+ });
28
+ return acc;
29
+ }, []);
30
+ };
31
+ var _default = exports.default = legendGetter;
@@ -0,0 +1,3 @@
1
+ import { SeriesProcessor } from '@mui/x-charts/internals';
2
+ declare const seriesProcessor: SeriesProcessor<'funnel'>;
3
+ export default seriesProcessor;