@mui/x-charts 8.0.0-alpha.12 → 8.0.0-alpha.13

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 (314) hide show
  1. package/BarChart/BarChart.d.ts +1 -1
  2. package/BarChart/BarChart.js +14 -30
  3. package/BarChart/useBarChartProps.js +3 -18
  4. package/CHANGELOG.md +299 -0
  5. package/ChartContainer/ChartContainer.d.ts +1 -1
  6. package/ChartContainer/ChartContainer.js +15 -7
  7. package/ChartDataProvider/ChartDataProvider.d.ts +2 -2
  8. package/ChartDataProvider/ChartDataProvider.js +4 -3
  9. package/ChartsAxis/ChartsAxis.d.ts +1 -25
  10. package/ChartsAxis/ChartsAxis.js +25 -87
  11. package/ChartsAxis/axisClasses.d.ts +5 -1
  12. package/ChartsLabel/ChartsLabelMark.d.ts +6 -1
  13. package/ChartsLabel/ChartsLabelMark.js +15 -2
  14. package/ChartsLabel/index.d.ts +1 -1
  15. package/ChartsLabel/labelGradientClasses.d.ts +1 -1
  16. package/ChartsLabel/labelMarkClasses.d.ts +1 -1
  17. package/ChartsLabel/labelMarkClasses.js +1 -1
  18. package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
  19. package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  20. package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
  21. package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
  22. package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
  23. package/ChartsTooltip/ChartsTooltipTable.js +1 -1
  24. package/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
  25. package/ChartsXAxis/ChartsXAxis.js +70 -57
  26. package/ChartsYAxis/ChartsYAxis.js +11 -15
  27. package/Gauge/Gauge.js +4 -3
  28. package/Gauge/GaugeContainer.js +7 -5
  29. package/LineChart/LineChart.d.ts +1 -1
  30. package/LineChart/LineChart.js +14 -30
  31. package/LineChart/useLineChartProps.js +2 -17
  32. package/PieChart/PieArcLabelPlot.js +1 -1
  33. package/PieChart/PieArcPlot.js +1 -1
  34. package/PieChart/PieChart.d.ts +1 -1
  35. package/PieChart/PieChart.js +6 -4
  36. package/ScatterChart/ScatterChart.d.ts +1 -1
  37. package/ScatterChart/ScatterChart.js +14 -30
  38. package/ScatterChart/useScatterChartProps.js +2 -17
  39. package/SparkLineChart/SparkLineChart.d.ts +4 -8
  40. package/SparkLineChart/SparkLineChart.js +23 -21
  41. package/constants/index.d.ts +8 -1
  42. package/constants/index.js +13 -6
  43. package/context/AnimationProvider/useSkipAnimation.js +1 -1
  44. package/context/ChartProvider/ChartProvider.types.d.ts +6 -6
  45. package/context/PolarProvider/Polar.types.d.ts +3 -2
  46. package/esm/BarChart/BarChart.d.ts +1 -1
  47. package/esm/BarChart/BarChart.js +14 -30
  48. package/esm/BarChart/useBarChartProps.js +3 -18
  49. package/esm/ChartContainer/ChartContainer.d.ts +1 -1
  50. package/esm/ChartContainer/ChartContainer.js +15 -7
  51. package/esm/ChartDataProvider/ChartDataProvider.d.ts +2 -2
  52. package/esm/ChartDataProvider/ChartDataProvider.js +4 -3
  53. package/esm/ChartsAxis/ChartsAxis.d.ts +1 -25
  54. package/esm/ChartsAxis/ChartsAxis.js +24 -86
  55. package/esm/ChartsAxis/axisClasses.d.ts +5 -1
  56. package/esm/ChartsLabel/ChartsLabelMark.d.ts +6 -1
  57. package/esm/ChartsLabel/ChartsLabelMark.js +15 -2
  58. package/esm/ChartsLabel/index.d.ts +1 -1
  59. package/esm/ChartsLabel/index.js +0 -3
  60. package/esm/ChartsLabel/labelGradientClasses.d.ts +1 -1
  61. package/esm/ChartsLabel/labelMarkClasses.d.ts +1 -1
  62. package/esm/ChartsLabel/labelMarkClasses.js +1 -1
  63. package/esm/ChartsLegend/chartsLegendClasses.d.ts +1 -1
  64. package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  65. package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
  66. package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
  67. package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
  68. package/esm/ChartsTooltip/ChartsTooltipTable.js +1 -1
  69. package/esm/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
  70. package/esm/ChartsXAxis/ChartsXAxis.js +70 -57
  71. package/esm/ChartsYAxis/ChartsYAxis.js +12 -16
  72. package/esm/Gauge/Gauge.js +4 -3
  73. package/esm/Gauge/GaugeContainer.js +7 -5
  74. package/esm/LineChart/LineChart.d.ts +1 -1
  75. package/esm/LineChart/LineChart.js +14 -30
  76. package/esm/LineChart/useLineChartProps.js +2 -17
  77. package/esm/PieChart/PieArcLabelPlot.js +1 -1
  78. package/esm/PieChart/PieArcPlot.js +1 -1
  79. package/esm/PieChart/PieChart.d.ts +1 -1
  80. package/esm/PieChart/PieChart.js +6 -4
  81. package/esm/ScatterChart/ScatterChart.d.ts +1 -1
  82. package/esm/ScatterChart/ScatterChart.js +14 -30
  83. package/esm/ScatterChart/useScatterChartProps.js +2 -17
  84. package/esm/SparkLineChart/SparkLineChart.d.ts +4 -8
  85. package/esm/SparkLineChart/SparkLineChart.js +23 -21
  86. package/esm/constants/index.d.ts +8 -1
  87. package/esm/constants/index.js +12 -5
  88. package/esm/context/AnimationProvider/useSkipAnimation.js +1 -1
  89. package/esm/context/ChartProvider/ChartProvider.types.d.ts +6 -6
  90. package/esm/context/PolarProvider/Polar.types.d.ts +3 -2
  91. package/esm/hooks/useAxis.d.ts +2 -2
  92. package/esm/hooks/useAxis.js +1 -1
  93. package/esm/hooks/useSvgRef.js +1 -1
  94. package/esm/index.js +1 -1
  95. package/esm/internals/defaultizeColor.d.ts +23 -23
  96. package/esm/internals/defaultizeMargin.d.ts +3 -0
  97. package/esm/internals/defaultizeMargin.js +15 -0
  98. package/esm/internals/domUtils.js +1 -0
  99. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
  100. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +52 -31
  101. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
  102. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +19 -18
  103. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
  104. package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
  105. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
  106. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
  107. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  108. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +7 -2
  109. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
  110. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +37 -35
  111. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
  112. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +37 -9
  113. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
  114. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -1
  115. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
  116. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +6 -0
  117. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +15 -14
  118. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -13
  119. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
  120. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -0
  121. package/{internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.d.ts → esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
  122. package/{modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js → esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js} +4 -6
  123. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
  124. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
  125. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
  126. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +9 -4
  127. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
  128. package/esm/internals/plugins/models/plugin.d.ts +1 -1
  129. package/esm/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
  130. package/esm/internals/plugins/utils/ChartStore.d.ts +7 -7
  131. package/esm/internals/plugins/utils/selectors.d.ts +1 -0
  132. package/esm/internals/store/useCharts.js +0 -8
  133. package/esm/internals/store/useSelector.d.ts +1 -1
  134. package/esm/internals/store/useSelector.js +4 -1
  135. package/esm/internals/store/useStore.js +1 -1
  136. package/esm/models/axis.d.ts +56 -10
  137. package/esm/models/colorMapping.d.ts +1 -1
  138. package/esm/models/index.d.ts +0 -1
  139. package/esm/models/index.js +0 -1
  140. package/esm/models/seriesType/bar.d.ts +1 -1
  141. package/esm/models/seriesType/config.d.ts +1 -1
  142. package/esm/models/seriesType/line.d.ts +1 -1
  143. package/esm/models/seriesType/pie.d.ts +1 -1
  144. package/esm/models/seriesType/scatter.d.ts +1 -1
  145. package/esm/models/z-axis.d.ts +1 -1
  146. package/hooks/useAxis.d.ts +2 -2
  147. package/hooks/useAxis.js +5 -5
  148. package/hooks/useSvgRef.js +1 -1
  149. package/index.js +1 -1
  150. package/internals/defaultizeColor.d.ts +23 -23
  151. package/internals/defaultizeMargin.d.ts +3 -0
  152. package/internals/defaultizeMargin.js +22 -0
  153. package/internals/domUtils.js +1 -0
  154. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
  155. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +51 -30
  156. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
  157. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +20 -19
  158. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
  159. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
  160. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
  161. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
  162. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  163. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +7 -2
  164. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
  165. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +39 -37
  166. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
  167. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +36 -8
  168. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
  169. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +4 -4
  170. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
  171. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +12 -0
  172. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +16 -15
  173. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -13
  174. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
  175. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +11 -0
  176. package/{modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.d.ts → internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
  177. package/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.js → useChartCartesianAxisRendering.selectors.js} +10 -13
  178. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
  179. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
  180. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
  181. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -5
  182. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
  183. package/internals/plugins/models/plugin.d.ts +1 -1
  184. package/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
  185. package/internals/plugins/utils/ChartStore.d.ts +7 -7
  186. package/internals/plugins/utils/selectors.d.ts +1 -0
  187. package/internals/store/useCharts.js +0 -8
  188. package/internals/store/useSelector.d.ts +1 -1
  189. package/internals/store/useSelector.js +5 -1
  190. package/internals/store/useStore.js +1 -1
  191. package/models/axis.d.ts +56 -10
  192. package/models/colorMapping.d.ts +1 -1
  193. package/models/index.d.ts +0 -1
  194. package/models/index.js +0 -11
  195. package/models/seriesType/bar.d.ts +1 -1
  196. package/models/seriesType/config.d.ts +1 -1
  197. package/models/seriesType/line.d.ts +1 -1
  198. package/models/seriesType/pie.d.ts +1 -1
  199. package/models/seriesType/scatter.d.ts +1 -1
  200. package/models/z-axis.d.ts +1 -1
  201. package/modern/BarChart/BarChart.d.ts +1 -1
  202. package/modern/BarChart/BarChart.js +14 -30
  203. package/modern/BarChart/useBarChartProps.js +3 -18
  204. package/modern/ChartContainer/ChartContainer.d.ts +1 -1
  205. package/modern/ChartContainer/ChartContainer.js +15 -7
  206. package/modern/ChartDataProvider/ChartDataProvider.d.ts +2 -2
  207. package/modern/ChartDataProvider/ChartDataProvider.js +4 -3
  208. package/modern/ChartsAxis/ChartsAxis.d.ts +1 -25
  209. package/modern/ChartsAxis/ChartsAxis.js +24 -86
  210. package/modern/ChartsAxis/axisClasses.d.ts +5 -1
  211. package/modern/ChartsLabel/ChartsLabelMark.d.ts +6 -1
  212. package/modern/ChartsLabel/ChartsLabelMark.js +15 -2
  213. package/modern/ChartsLabel/index.d.ts +1 -1
  214. package/modern/ChartsLabel/index.js +0 -3
  215. package/modern/ChartsLabel/labelGradientClasses.d.ts +1 -1
  216. package/modern/ChartsLabel/labelMarkClasses.d.ts +1 -1
  217. package/modern/ChartsLabel/labelMarkClasses.js +1 -1
  218. package/modern/ChartsLegend/chartsLegendClasses.d.ts +1 -1
  219. package/modern/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  220. package/modern/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
  221. package/modern/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
  222. package/modern/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
  223. package/modern/ChartsTooltip/ChartsTooltipTable.js +1 -1
  224. package/modern/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
  225. package/modern/ChartsXAxis/ChartsXAxis.js +70 -57
  226. package/modern/ChartsYAxis/ChartsYAxis.js +12 -16
  227. package/modern/Gauge/Gauge.js +4 -3
  228. package/modern/Gauge/GaugeContainer.js +7 -5
  229. package/modern/LineChart/LineChart.d.ts +1 -1
  230. package/modern/LineChart/LineChart.js +14 -30
  231. package/modern/LineChart/useLineChartProps.js +2 -17
  232. package/modern/PieChart/PieArcLabelPlot.js +1 -1
  233. package/modern/PieChart/PieArcPlot.js +1 -1
  234. package/modern/PieChart/PieChart.d.ts +1 -1
  235. package/modern/PieChart/PieChart.js +6 -4
  236. package/modern/ScatterChart/ScatterChart.d.ts +1 -1
  237. package/modern/ScatterChart/ScatterChart.js +14 -30
  238. package/modern/ScatterChart/useScatterChartProps.js +2 -17
  239. package/modern/SparkLineChart/SparkLineChart.d.ts +4 -8
  240. package/modern/SparkLineChart/SparkLineChart.js +23 -21
  241. package/modern/constants/index.d.ts +8 -1
  242. package/modern/constants/index.js +12 -5
  243. package/modern/context/AnimationProvider/useSkipAnimation.js +1 -1
  244. package/modern/context/ChartProvider/ChartProvider.types.d.ts +6 -6
  245. package/modern/context/PolarProvider/Polar.types.d.ts +3 -2
  246. package/modern/hooks/useAxis.d.ts +2 -2
  247. package/modern/hooks/useAxis.js +1 -1
  248. package/modern/hooks/useSvgRef.js +1 -1
  249. package/modern/index.js +1 -1
  250. package/modern/internals/defaultizeColor.d.ts +23 -23
  251. package/modern/internals/defaultizeMargin.d.ts +3 -0
  252. package/modern/internals/defaultizeMargin.js +15 -0
  253. package/modern/internals/domUtils.js +1 -0
  254. package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
  255. package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +52 -31
  256. package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
  257. package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +19 -18
  258. package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
  259. package/modern/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
  260. package/modern/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
  261. package/modern/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
  262. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  263. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +7 -2
  264. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
  265. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +37 -35
  266. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
  267. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +37 -9
  268. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
  269. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -1
  270. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
  271. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +6 -0
  272. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +15 -14
  273. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -13
  274. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
  275. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -0
  276. package/{esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.d.ts → modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
  277. package/{esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js → modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js} +4 -6
  278. package/modern/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
  279. package/modern/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
  280. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
  281. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +9 -4
  282. package/modern/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
  283. package/modern/internals/plugins/models/plugin.d.ts +1 -1
  284. package/modern/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
  285. package/modern/internals/plugins/utils/ChartStore.d.ts +7 -7
  286. package/modern/internals/plugins/utils/selectors.d.ts +1 -0
  287. package/modern/internals/store/useCharts.js +0 -8
  288. package/modern/internals/store/useSelector.d.ts +1 -1
  289. package/modern/internals/store/useSelector.js +4 -1
  290. package/modern/internals/store/useStore.js +1 -1
  291. package/modern/models/axis.d.ts +56 -10
  292. package/modern/models/colorMapping.d.ts +1 -1
  293. package/modern/models/index.d.ts +0 -1
  294. package/modern/models/index.js +0 -1
  295. package/modern/models/seriesType/bar.d.ts +1 -1
  296. package/modern/models/seriesType/config.d.ts +1 -1
  297. package/modern/models/seriesType/line.d.ts +1 -1
  298. package/modern/models/seriesType/pie.d.ts +1 -1
  299. package/modern/models/seriesType/scatter.d.ts +1 -1
  300. package/modern/models/z-axis.d.ts +1 -1
  301. package/package.json +3 -3
  302. package/tsconfig.build.tsbuildinfo +1 -1
  303. package/esm/internals/calculateMargins.d.ts +0 -7
  304. package/esm/internals/calculateMargins.js +0 -25
  305. package/esm/models/layout.d.ts +0 -18
  306. package/esm/models/layout.js +0 -1
  307. package/internals/calculateMargins.d.ts +0 -7
  308. package/internals/calculateMargins.js +0 -33
  309. package/models/layout.d.ts +0 -18
  310. package/models/layout.js +0 -5
  311. package/modern/internals/calculateMargins.d.ts +0 -7
  312. package/modern/internals/calculateMargins.js +0 -25
  313. package/modern/models/layout.d.ts +0 -18
  314. package/modern/models/layout.js +0 -1
@@ -18,7 +18,7 @@ export interface BarChartProps extends Omit<ChartContainerProps<'bar', BarChartP
18
18
  * The series to display in the bar chart.
19
19
  * An array of [[BarSeriesType]] objects.
20
20
  */
21
- series: MakeOptional<BarSeriesType, 'type'>[];
21
+ series: Readonly<MakeOptional<BarSeriesType, 'type'>[]>;
22
22
  /**
23
23
  * Option to display a cartesian grid in the background.
24
24
  */
@@ -99,12 +99,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
99
99
  * Defines the border radius of the bar element.
100
100
  */
101
101
  borderRadius: _propTypes.default.number,
102
- /**
103
- * Indicate which axis to display the bottom of the charts.
104
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
105
- * @default xAxisIds[0] The id of the first provided axis
106
- */
107
- bottomAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
108
102
  children: _propTypes.default.node,
109
103
  className: _propTypes.default.string,
110
104
  /**
@@ -156,12 +150,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
156
150
  * @default 'vertical'
157
151
  */
158
152
  layout: _propTypes.default.oneOf(['horizontal', 'vertical']),
159
- /**
160
- * Indicate which axis to display the left of the charts.
161
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
162
- * @default yAxisIds[0] The id of the first provided axis
163
- */
164
- leftAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
165
153
  /**
166
154
  * If `true`, a loading overlay is displayed.
167
155
  * @default false
@@ -170,14 +158,15 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
170
158
  /**
171
159
  * The margin between the SVG and the drawing area.
172
160
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
173
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
161
+ *
162
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
174
163
  */
175
- margin: _propTypes.default.shape({
164
+ margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
176
165
  bottom: _propTypes.default.number,
177
166
  left: _propTypes.default.number,
178
167
  right: _propTypes.default.number,
179
168
  top: _propTypes.default.number
180
- }),
169
+ })]),
181
170
  /**
182
171
  * The function called for onClick events.
183
172
  * The second argument contains information about all line/bar elements at the current mouse position.
@@ -197,12 +186,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
197
186
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
198
187
  */
199
188
  onItemClick: _propTypes.default.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.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
206
189
  /**
207
190
  * The series to display in the bar chart.
208
191
  * An array of [[BarSeriesType]] objects.
@@ -226,12 +209,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
226
209
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
227
210
  theme: _propTypes.default.oneOf(['dark', 'light']),
228
211
  title: _propTypes.default.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.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
235
212
  /**
236
213
  * The width of the chart in px. If not defined, it takes the width of the parent element.
237
214
  */
@@ -242,6 +219,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
242
219
  * An array of [[AxisConfig]] objects.
243
220
  */
244
221
  xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
222
+ axis: _propTypes.default.oneOf(['x']),
245
223
  classes: _propTypes.default.object,
246
224
  colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
247
225
  colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
@@ -264,13 +242,15 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
264
242
  disableTicks: _propTypes.default.bool,
265
243
  domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
266
244
  fill: _propTypes.default.string,
245
+ height: _propTypes.default.number,
267
246
  hideTooltip: _propTypes.default.bool,
268
247
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
269
248
  label: _propTypes.default.string,
270
249
  labelStyle: _propTypes.default.object,
271
250
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
272
251
  min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
273
- position: _propTypes.default.oneOf(['bottom', 'top']),
252
+ offset: _propTypes.default.number,
253
+ position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
274
254
  reverse: _propTypes.default.bool,
275
255
  scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
276
256
  slotProps: _propTypes.default.object,
@@ -279,6 +259,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
279
259
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
280
260
  tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
281
261
  tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
262
+ tickLabelMinGap: _propTypes.default.number,
282
263
  tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
283
264
  tickLabelStyle: _propTypes.default.object,
284
265
  tickMaxStep: _propTypes.default.number,
@@ -294,6 +275,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
294
275
  * An array of [[AxisConfig]] objects.
295
276
  */
296
277
  yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
278
+ axis: _propTypes.default.oneOf(['y']),
297
279
  classes: _propTypes.default.object,
298
280
  colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
299
281
  colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
@@ -322,7 +304,8 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
322
304
  labelStyle: _propTypes.default.object,
323
305
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
324
306
  min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
325
- position: _propTypes.default.oneOf(['left', 'right']),
307
+ offset: _propTypes.default.number,
308
+ position: _propTypes.default.oneOf(['left', 'none', 'right']),
326
309
  reverse: _propTypes.default.bool,
327
310
  scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
328
311
  slotProps: _propTypes.default.object,
@@ -338,6 +321,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
338
321
  tickNumber: _propTypes.default.number,
339
322
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
340
323
  tickSize: _propTypes.default.number,
341
- valueFormatter: _propTypes.default.func
324
+ valueFormatter: _propTypes.default.func,
325
+ width: _propTypes.default.number
342
326
  }))
343
327
  } : void 0;
@@ -10,9 +10,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
  var _useId = _interopRequireDefault(require("@mui/utils/useId"));
12
12
  var _constants = require("../constants");
13
- var _calculateMargins = require("../internals/calculateMargins");
14
13
  var _BarChart = require("./BarChart.plugins");
15
- const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "axisHighlight", "grid", "topAxis", "leftAxis", "rightAxis", "bottomAxis", "children", "slots", "slotProps", "skipAnimation", "loading", "layout", "onItemClick", "highlightedItem", "onHighlightChange", "borderRadius", "barLabel", "className", "hideLegend"];
14
+ const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "axisHighlight", "grid", "children", "slots", "slotProps", "skipAnimation", "loading", "layout", "onItemClick", "highlightedItem", "onHighlightChange", "borderRadius", "barLabel", "className", "hideLegend"];
16
15
  /**
17
16
  * A helper function that extracts BarChartProps from the input props
18
17
  * and returns an object with props for the children components of BarChart.
@@ -33,10 +32,6 @@ const useBarChartProps = props => {
33
32
  sx,
34
33
  axisHighlight,
35
34
  grid,
36
- topAxis,
37
- leftAxis,
38
- rightAxis,
39
- bottomAxis,
40
35
  children,
41
36
  slots,
42
37
  slotProps,
@@ -48,8 +43,7 @@ const useBarChartProps = props => {
48
43
  onHighlightChange,
49
44
  borderRadius,
50
45
  barLabel,
51
- className,
52
- hideLegend
46
+ className
53
47
  } = props,
54
48
  rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
55
49
  const id = (0, _useId.default)();
@@ -69,12 +63,7 @@ const useBarChartProps = props => {
69
63
  })),
70
64
  width,
71
65
  height,
72
- margin: (0, _calculateMargins.calculateMargins)({
73
- margin,
74
- hideLegend,
75
- slotProps,
76
- series
77
- }),
66
+ margin,
78
67
  colors,
79
68
  dataset,
80
69
  xAxis: xAxis ?? (hasHorizontalSeries ? undefined : [(0, _extends2.default)({
@@ -113,10 +102,6 @@ const useBarChartProps = props => {
113
102
  loading
114
103
  };
115
104
  const chartsAxisProps = {
116
- topAxis,
117
- leftAxis,
118
- rightAxis,
119
- bottomAxis,
120
105
  slots,
121
106
  slotProps
122
107
  };
package/CHANGELOG.md CHANGED
@@ -5,6 +5,305 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.0.0-alpha.13
9
+
10
+ _Feb 28, 2025_
11
+
12
+ We'd like to offer a big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Decouple `margin` and `axis-size`. A new API to support multiple axes (#16418) @JCQuintas
15
+ - 🗺️ Added Bangla (bn-BD) locale
16
+ - 🗺️ Improve Russian (ru-RU) and Hungarian (hu-HU) locale on the Data Grid
17
+
18
+ Special thanks go out to the community members for their contributions:
19
+ @denpiligrim, @lhilgert9, @noherczeg, @officialkidmax, @pcorpet.
20
+ Following are all team members who have contributed to this release:
21
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @MBilalShafi, @oliviertassinari, @romgrk.
22
+
23
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
24
+
25
+ ### Data Grid
26
+
27
+ #### Breaking changes
28
+
29
+ - The `slots.baseFormControl` component was removed.
30
+
31
+ - The "Reset" button in the column visibility panel now resets to the initial column visibility model. Previously it was reset to the model that was active at the time the panel was opened. The reset behavior follows these rules:
32
+
33
+ 1. If an initial `columnVisibilityModel` is provided, it resets to that model.
34
+ 2. If a controlled `columnVisibilityModel` is provided, it resets to the first model value.
35
+ 3. When the columns are updated (via the `columns` prop or `updateColumns()` API method), the reset reference point updates to the current `columnVisibilityModel`.
36
+
37
+ To revert to the previous behavior, provide a custom component to the `slots.columnsManagement`.
38
+
39
+ - The deprecated `LicenseInfo` export has been removed from the `@mui/x-data-grid-pro` and `@mui/x-data-grid-premium` packages.
40
+ You have to import it from `@mui/x-license` instead:
41
+
42
+ ```diff
43
+ - import { LicenseInfo } from '@mui/x-data-grid-pro';
44
+ - import { LicenseInfo } from '@mui/x-data-grid-premium';
45
+ + import { LicenseInfo } from '@mui/x-license';
46
+
47
+ LicenseInfo.setLicenseKey('YOUR_LICENSE_KEY');
48
+ ```
49
+
50
+ - The row selection model has been changed from `GridRowId[]` to `{ type: 'include' | 'exclude'; ids: Set<GridRowId> }`.
51
+ Using `Set` allows for a more efficient row selection management.
52
+ The `exclude` selection type allows to select all rows except the ones in the `ids` set.
53
+
54
+ This change impacts the following props:
55
+
56
+ - `rowSelectionModel`
57
+ - `onRowSelectionModelChange`
58
+ - `initialState.rowSelectionModel`
59
+
60
+ ```diff
61
+ - const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>([]);
62
+ + const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>({ type: 'include', ids: new Set() });
63
+ ```
64
+
65
+ This change also impacts the `gridRowSelectionStateSelector` selector.
66
+ For convenience, use the `gridRowSelectionManagerSelector` selector to handle both selection types:
67
+
68
+ ```diff
69
+ - const rowSelection = gridRowSelectionStateSelector(apiRef);
70
+ - const isRowSelected = rowSelection.includes(rowId);
71
+ + const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);
72
+ + const isRowSelected = rowSelectionManager.has(rowId);
73
+ ```
74
+
75
+ There is also a `createRowSelectionManager` utility function that can be used to manage the row selection:
76
+
77
+ ```ts
78
+ const rowSelectionManager = createRowSelectionManager({
79
+ type: 'include',
80
+ ids: new Set(),
81
+ });
82
+ rowSelectionManager.select(rowId);
83
+ rowSelectionManager.unselect(rowId);
84
+ rowSelectionManager.has(rowId);
85
+ ```
86
+
87
+ - The `selectedIdsLookupSelector` selector has been removed. Use the `gridRowSelectionManagerSelector` or `gridRowSelectionStateSelector` selectors instead.
88
+ - The `selectedGridRowsSelector` has been renamed to `gridRowSelectionIdsSelector`.
89
+ - The `selectedGridRowsCountSelector` has been renamed to `gridRowSelectionCountSelector`.
90
+
91
+ - The data source feature and its related props are now stable.
92
+
93
+ ```diff
94
+ <DataGridPro
95
+ - unstable_dataSource={dataSource}
96
+ - unstable_dataSourceCache={cache}
97
+ - unstable_lazyLoading
98
+ - unstable_lazyLoadingRequestThrottleMs={100}
99
+ + dataSource={dataSource}
100
+ + dataSourceCache={cache}
101
+ + lazyLoading
102
+ + lazyLoadingRequestThrottleMs={100}
103
+ />
104
+ ```
105
+
106
+ - The data source API is now stable.
107
+
108
+ ```diff
109
+ - apiRef.current.unstable_dataSource.getRows()
110
+ + apiRef.current.dataSource.getRows()
111
+ ```
112
+
113
+ - The signature of `unstable_onDataSourceError()` has been updated to support future use-cases.
114
+
115
+ ```diff
116
+ <DataGrid
117
+ - unstable_onDataSourceError={(error: Error, params: GridGetRowsParams) => {
118
+ - if (params.filterModel) {
119
+ - // do something
120
+ - }
121
+ - }}
122
+ + unstable_onDataSourceError={(error: GridGetRowsError | GridUpdateRowError) => {
123
+ + if (error instanceof GridGetRowsError && error.params.filterModel) {
124
+ + // do something
125
+ + }
126
+ + }}
127
+ />
128
+ ```
129
+
130
+ - Fix the type of the `GridSortModel` to allow readonly arrays.
131
+
132
+ - `GridSortItem` interface is not exported anymore.
133
+
134
+ - The `showToolbar` prop is now required to display the toolbar.
135
+
136
+ It is no longer necessary to pass `GridToolbar` as a slot to display the default toolbar.
137
+
138
+ ```diff
139
+ <DataGrid
140
+ + showToolbar
141
+ - slots={{
142
+ - toolbar: GridToolbar,
143
+ - }}
144
+ />
145
+ ```
146
+
147
+ #### `@mui/x-data-grid@8.0.0-alpha.13`
148
+
149
+ - [DataGrid] Add `showToolbar` prop to enable default toolbar (#16687) @KenanYusuf
150
+ - [DataGrid] Column Visibility: Update "Reset" button behavior (#16626) @MBilalShafi
151
+ - [DataGrid] Column management design updates (#16630) @KenanYusuf
152
+ - [DataGrid] Fix `showColumnVerticalBorder` prop (#16715) @KenanYusuf
153
+ - [DataGrid] Fix scrollbar overlapping cells on mount (#16639) @KenanYusuf
154
+ - [DataGrid] Fix: base `Select` menuprops `onClose()` (#16643) @romgrk
155
+ - [DataGrid] Make `GridSortItem` internal (#16732) @arminmeh
156
+ - [DataGrid] Make data source stable (#16710) @MBilalShafi
157
+ - [DataGrid] Reshape row selection model (#15651) @cherniavskii
158
+ - [DataGrid] Replace `sx` prop usage with `styled()` components (#16665) @KenanYusuf
159
+ - [DataGrid] Refactor: create base `Autocomplete` (#16390) @romgrk
160
+ - [DataGrid] Refactor: remove base form control (#16634) @romgrk
161
+ - [DataGrid] Refactor: remove base input label & adornment (#16646) @romgrk
162
+ - [DataGrid] Refactor: remove material containers (#16633) @romgrk
163
+ - [DataGrid] Refactor: theme to CSS variables (#16588) @romgrk
164
+ - [DataGrid] Update the signature of the `onDataSourceError()` callback (#16718) @MBilalShafi
165
+ - [DataGrid] Use readonly array for the `GridSortModel` (#16627) @pcorpet
166
+ - [DataGrid] Fix the popper focus trap (#16736) @romgrk
167
+ - [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
168
+ - [l10n] Improve Hungarian (hu-HU) locale (#16578) @noherczeg
169
+ - [l10n] Improve Russian (ru-RU) locale (#16591) @denpiligrim
170
+
171
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.13` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
172
+
173
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.13`, plus:
174
+
175
+ - [DataGridPro] Remove `LicenseInfo` reexports (#16671) @cherniavskii
176
+
177
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.13` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
178
+
179
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.13`, plus:
180
+
181
+ - [DataGridPremium] Use `valueGetter` to get row group keys (#16016) @cherniavskii
182
+
183
+ ### Date and Time Pickers
184
+
185
+ #### Breaking changes
186
+
187
+ - The `<DateRangePicker />` now uses a `dialog` instead of a `tooltip` to render their view when used with a single input range field.
188
+
189
+ #### `@mui/x-date-pickers@8.0.0-alpha.13`
190
+
191
+ - [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
192
+ - [pickers] Clean the typing of the slots on the range pickers (#16670) @flaviendelangle
193
+ - [pickers] Fix Time Clock meridiem button selected styles (#16681) @LukasTy
194
+ - [pickers] Make the single input field the default field on range pickers (#16656) @flaviendelangle
195
+ - [pickers] Move the opening logic to the range fields (#16175) @flaviendelangle
196
+
197
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.13` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
198
+
199
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.13`.
200
+
201
+ ### Charts
202
+
203
+ #### Breaking changes
204
+
205
+ - Charts array inputs are now `readonly`. Allowing externally defined `as const` to be used as a prop value of the React component.
206
+
207
+ ```tsx
208
+ const xAxis = [{ position: 'bottom' }] as const
209
+ <BarChart xAxis={xAxis} />
210
+ ```
211
+
212
+ - Replace `topAxis`, `rightAxis`, `bottomAxis` and `leftAxis` props by the `position` property in the axis config.
213
+ If you were using them to place axis, set the `position` property to the corresponding value `'top' | 'right' | 'bottom' | 'left'`.
214
+ If you were disabling an axis by setting it to `null`, set its `position` to `'none'`.
215
+
216
+ ```diff
217
+ <LineChart
218
+ yAxis={[
219
+ {
220
+ scaleType: 'linear',
221
+ + position: 'right',
222
+ },
223
+ ]}
224
+ series={[{ data: [1, 10, 30, 50, 70, 90, 100], label: 'linear' }]}
225
+ height={400}
226
+ - rightAxis={{}}
227
+ />
228
+ ```
229
+
230
+ - Remove `position` prop from `ChartsXAxis` and `ChartsYAxis`.
231
+ The `position` prop has been removed from the `ChartsXAxis` and `ChartsYAxis` components. Configure it directly in the axis config.
232
+
233
+ ```diff
234
+ <ChartContainer
235
+ yAxis={[
236
+ {
237
+ id: 'my-axis',
238
+ + position: 'right',
239
+ },
240
+ ]}
241
+ >
242
+ - <ChartsYAxis axisId="my-axis" position="right" />
243
+ + <ChartsYAxis axisId="my-axis" />
244
+ </ChartContainer>
245
+ ```
246
+
247
+ - Add `minTickLabelGap` to x-axis, which allows users to define the minimum gap, in pixels, between two tick labels. The default value is 4px. Make sure to check your charts as the spacing between tick labels might have changed.
248
+
249
+ #### `@mui/x-charts@8.0.0-alpha.13`
250
+
251
+ - [charts] Accept component in `labelMarkType` (#16739) @bernardobelchior
252
+ - [charts] Add `minTickLabelGap` to x-axis (#16548) @bernardobelchior
253
+ - [charts] Add unit test for pie chart with empty series (#16663) @bernardobelchior
254
+ - [charts] Decouple `margin` and `axis-size` (#16418) @JCQuintas
255
+ - [charts] Display slider tooltip on demos (#16723) @JCQuintas
256
+ - [charts] Fix composition docs link (#16761) @bernardobelchior
257
+ - [charts] Fix default label measurement being off (#16635) @bernardobelchior
258
+ - [charts] Fix is highlighted memoization (#16592) @alexfauquette
259
+ - [charts] Fix missing `theme.shape` error in the tooltip (#16748) @alexfauquette
260
+ - [charts] Fix typo in error message (#16641) @JCQuintas
261
+ - [charts] Improve axis size docs (#16673) @JCQuintas
262
+ - [charts] Improve performance of rendering ticks in x-axis (#16536) @bernardobelchior
263
+ - [charts] Make `defaultizeAxis` function type-safe (#16642) @JCQuintas
264
+ - [charts] Make `series.data` readonly (#16645) @JCQuintas
265
+ - [charts] Migrate `ChartsUsageDemo` to TSX and removed NoSnap (#16686) @JCQuintas
266
+ - [charts] Prevent `position='none'` axes from rendering (#16727) @JCQuintas
267
+ - [charts] Make array inputs readonly (#16632) @JCQuintas
268
+ - [charts] Remove state initialization hack (#16520) @alexfauquette
269
+ - [charts] Remove redundant default axis (#16734) @bernardobelchior
270
+
271
+ #### `@mui/x-charts-pro@8.0.0-alpha.13` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
272
+
273
+ Same changes as in `@mui/x-charts@8.0.0-alpha.13`, plus:
274
+
275
+ - [charts-pro] Add back zoom control (#16550) @alexfauquette
276
+
277
+ ### Tree View
278
+
279
+ #### `@mui/x-tree-view@8.0.0-alpha.13`
280
+
281
+ Internal changes.
282
+
283
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.13` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
284
+
285
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.13`.
286
+
287
+ ### `@mui/x-codemod@8.0.0-alpha.13`
288
+
289
+ - [codemod] Add a few Data Grid codemods (#16711) @MBilalShafi
290
+ - [codemod] Improve Pickers renaming codemod (#16685) @LukasTy
291
+
292
+ ### Docs
293
+
294
+ - [docs] Fix charts with on bar and line pages (#16712) @alexfauquette
295
+ - [docs] Fix migration guide introduction for charts (#16679) @alexfauquette
296
+ - [docs] Fix remaining charts demos on mobile (#16728) @alexfauquette
297
+ - [docs] Fix scroll overflow on mobile (#16675) @oliviertassinari
298
+ - [docs] Improve Pickers migration page (#16682) @LukasTy
299
+ - [docs] Update small Pickers doc inconsistencies (#16724) @LukasTy
300
+ - [code-infra] Charts changes for `vitest` (#16755) @JCQuintas
301
+ - [code-infra] General packages changes for `vitest` (#16757) @JCQuintas
302
+ - [code-infra] Native Node.js ESM (#16603) @Janpot
303
+ - [infra] Update contributor acknowledgment wording (#16751) @michelengelen
304
+ - [test] Revert timeout increase for possibly slow tests (#16651) @LukasTy
305
+ - [x-license] Introduce usage telemetry (#13530) @hasdfa
306
+
8
307
  ## 8.0.0-alpha.12
9
308
 
10
309
  _Feb 17, 2025_
@@ -25,7 +25,7 @@ export type ChartContainerProps<SeriesType extends ChartSeriesType = ChartSeries
25
25
  * xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
26
26
  * >
27
27
  * <BarPlot />
28
- * <ChartsXAxis position="bottom" axisId="x-axis" />
28
+ * <ChartsXAxis axisId="x-axis" />
29
29
  * </ChartContainer>
30
30
  * ```
31
31
  */
@@ -34,7 +34,7 @@ var _jsxRuntime = require("react/jsx-runtime");
34
34
  * xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
35
35
  * >
36
36
  * <BarPlot />
37
- * <ChartsXAxis position="bottom" axisId="x-axis" />
37
+ * <ChartsXAxis axisId="x-axis" />
38
38
  * </ChartContainer>
39
39
  * ```
40
40
  */
@@ -103,14 +103,15 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
103
103
  /**
104
104
  * The margin between the SVG and the drawing area.
105
105
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
106
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
106
+ *
107
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
107
108
  */
108
- margin: _propTypes.default.shape({
109
+ margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
109
110
  bottom: _propTypes.default.number,
110
111
  left: _propTypes.default.number,
111
112
  right: _propTypes.default.number,
112
113
  top: _propTypes.default.number
113
- }),
114
+ })]),
114
115
  /**
115
116
  * The function called for onClick events.
116
117
  * The second argument contains information about all line/bar elements at the current mouse position.
@@ -160,6 +161,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
160
161
  * An array of [[AxisConfig]] objects.
161
162
  */
162
163
  xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
164
+ axis: _propTypes.default.oneOf(['x']),
163
165
  classes: _propTypes.default.object,
164
166
  colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
165
167
  colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
@@ -182,13 +184,15 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
182
184
  disableTicks: _propTypes.default.bool,
183
185
  domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
184
186
  fill: _propTypes.default.string,
187
+ height: _propTypes.default.number,
185
188
  hideTooltip: _propTypes.default.bool,
186
189
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
187
190
  label: _propTypes.default.string,
188
191
  labelStyle: _propTypes.default.object,
189
192
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
190
193
  min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
191
- position: _propTypes.default.oneOf(['bottom', 'top']),
194
+ offset: _propTypes.default.number,
195
+ position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
192
196
  reverse: _propTypes.default.bool,
193
197
  scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
194
198
  slotProps: _propTypes.default.object,
@@ -197,6 +201,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
197
201
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
198
202
  tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
199
203
  tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
204
+ tickLabelMinGap: _propTypes.default.number,
200
205
  tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
201
206
  tickLabelStyle: _propTypes.default.object,
202
207
  tickMaxStep: _propTypes.default.number,
@@ -212,6 +217,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
212
217
  * An array of [[AxisConfig]] objects.
213
218
  */
214
219
  yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
220
+ axis: _propTypes.default.oneOf(['y']),
215
221
  classes: _propTypes.default.object,
216
222
  colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
217
223
  colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
@@ -240,7 +246,8 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
240
246
  labelStyle: _propTypes.default.object,
241
247
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
242
248
  min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
243
- position: _propTypes.default.oneOf(['left', 'right']),
249
+ offset: _propTypes.default.number,
250
+ position: _propTypes.default.oneOf(['left', 'none', 'right']),
244
251
  reverse: _propTypes.default.bool,
245
252
  scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
246
253
  slotProps: _propTypes.default.object,
@@ -256,7 +263,8 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
256
263
  tickNumber: _propTypes.default.number,
257
264
  tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
258
265
  tickSize: _propTypes.default.number,
259
- valueFormatter: _propTypes.default.func
266
+ valueFormatter: _propTypes.default.func,
267
+ width: _propTypes.default.number
260
268
  })),
261
269
  /**
262
270
  * The configuration of the z-axes.
@@ -14,7 +14,7 @@ export type ChartDataProviderProps<TSeries extends ChartSeriesType = ChartSeries
14
14
  *
15
15
  * Demos:
16
16
  *
17
- * - [Composition](https://mui.com/x/api/charts/composition/)
17
+ * - [Composition](https://mui.com/x/react-charts/composition/)
18
18
  *
19
19
  * API:
20
20
  *
@@ -28,7 +28,7 @@ export type ChartDataProviderProps<TSeries extends ChartSeriesType = ChartSeries
28
28
  * >
29
29
  * <ChartsSurface>
30
30
  * <BarPlot />
31
- * <ChartsXAxis position="bottom" axisId="x-axis" />
31
+ * <ChartsXAxis axisId="x-axis" />
32
32
  * </ChartsSurface>
33
33
  * {'Custom Legend Component'}
34
34
  * </ChartDataProvider>
@@ -21,7 +21,7 @@ var _jsxRuntime = require("react/jsx-runtime");
21
21
  *
22
22
  * Demos:
23
23
  *
24
- * - [Composition](https://mui.com/x/api/charts/composition/)
24
+ * - [Composition](https://mui.com/x/react-charts/composition/)
25
25
  *
26
26
  * API:
27
27
  *
@@ -35,7 +35,7 @@ var _jsxRuntime = require("react/jsx-runtime");
35
35
  * >
36
36
  * <ChartsSurface>
37
37
  * <BarPlot />
38
- * <ChartsXAxis position="bottom" axisId="x-axis" />
38
+ * <ChartsXAxis axisId="x-axis" />
39
39
  * </ChartsSurface>
40
40
  * {'Custom Legend Component'}
41
41
  * </ChartDataProvider>
@@ -81,7 +81,8 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
81
81
  /**
82
82
  * The margin between the SVG and the drawing area.
83
83
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
84
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
84
+ *
85
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
85
86
  */
86
87
  margin: _propTypes.default.any,
87
88
  /**