@mui/x-charts 8.6.0 → 8.8.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 (254) hide show
  1. package/BarChart/BarChart.d.ts +1 -1
  2. package/BarChart/BarChart.js +16 -0
  3. package/BarChart/BarPlot.js +11 -150
  4. package/BarChart/useBarPlotData.d.ts +8 -0
  5. package/BarChart/useBarPlotData.js +146 -0
  6. package/CHANGELOG.md +202 -1
  7. package/ChartContainer/ChartContainer.d.ts +1 -21
  8. package/ChartContainer/ChartContainer.js +22 -8
  9. package/ChartContainer/index.d.ts +8 -1
  10. package/ChartContainer/useChartContainerProps.js +8 -2
  11. package/ChartDataProvider/ChartDataProvider.js +6 -0
  12. package/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
  13. package/ChartDataProvider/useChartDataProviderProps.js +6 -1
  14. package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -1
  15. package/ChartsAxisHighlight/ChartsXAxisHighlight.js +34 -24
  16. package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -1
  17. package/ChartsAxisHighlight/ChartsYAxisHighlight.js +34 -24
  18. package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
  19. package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +3 -0
  20. package/ChartsReferenceLine/ChartsXReferenceLine.js +48 -1
  21. package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +3 -0
  22. package/ChartsReferenceLine/ChartsYReferenceLine.js +48 -1
  23. package/ChartsReferenceLine/index.d.ts +3 -1
  24. package/ChartsSurface/ChartsSurface.js +2 -1
  25. package/ChartsTooltip/ChartsTooltipContainer.js +6 -3
  26. package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  27. package/ChartsTooltip/utils.js +18 -29
  28. package/Gauge/GaugeContainer.d.ts +1 -1
  29. package/LineChart/AreaPlot.js +5 -115
  30. package/LineChart/LineChart.js +22 -0
  31. package/LineChart/LineHighlightPlot.js +10 -4
  32. package/LineChart/LinePlot.js +5 -99
  33. package/LineChart/MarkPlot.js +17 -3
  34. package/LineChart/useAreaPlotData.d.ts +12 -0
  35. package/LineChart/useAreaPlotData.js +126 -0
  36. package/LineChart/useLinePlotData.d.ts +11 -0
  37. package/LineChart/useLinePlotData.js +108 -0
  38. package/PieChart/PieChart.d.ts +1 -1
  39. package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -1
  40. package/ScatterChart/Scatter.js +22 -48
  41. package/ScatterChart/ScatterChart.d.ts +1 -1
  42. package/ScatterChart/ScatterPlot.js +2 -2
  43. package/ScatterChart/seriesConfig/seriesProcessor.js +3 -0
  44. package/ScatterChart/useScatterPlotData.d.ts +8 -0
  45. package/ScatterChart/useScatterPlotData.js +33 -0
  46. package/SparkLineChart/SparkLineChart.d.ts +1 -1
  47. package/SparkLineChart/SparkLineChart.js +16 -0
  48. package/context/ChartApi.d.ts +22 -0
  49. package/context/ChartApi.js +5 -0
  50. package/context/ChartProvider/ChartContext.js +1 -0
  51. package/context/index.d.ts +2 -1
  52. package/context/useChartApiContext.d.ts +1 -1
  53. package/esm/BarChart/BarChart.d.ts +1 -1
  54. package/esm/BarChart/BarChart.js +16 -0
  55. package/esm/BarChart/BarPlot.js +12 -152
  56. package/esm/BarChart/useBarPlotData.d.ts +8 -0
  57. package/esm/BarChart/useBarPlotData.js +139 -0
  58. package/esm/ChartContainer/ChartContainer.d.ts +1 -21
  59. package/esm/ChartContainer/ChartContainer.js +22 -8
  60. package/esm/ChartContainer/index.d.ts +8 -1
  61. package/esm/ChartContainer/index.js +6 -1
  62. package/esm/ChartContainer/useChartContainerProps.js +8 -2
  63. package/esm/ChartDataProvider/ChartDataProvider.js +6 -0
  64. package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
  65. package/esm/ChartDataProvider/useChartDataProviderProps.js +7 -2
  66. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -1
  67. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +36 -26
  68. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -1
  69. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +36 -26
  70. package/esm/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
  71. package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +3 -0
  72. package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +47 -0
  73. package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +3 -0
  74. package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +47 -0
  75. package/esm/ChartsReferenceLine/index.d.ts +3 -1
  76. package/esm/ChartsReferenceLine/index.js +2 -1
  77. package/esm/ChartsSurface/ChartsSurface.js +2 -1
  78. package/esm/ChartsTooltip/ChartsTooltipContainer.js +6 -3
  79. package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  80. package/esm/ChartsTooltip/utils.js +18 -29
  81. package/esm/Gauge/GaugeContainer.d.ts +1 -1
  82. package/esm/LineChart/AreaPlot.js +5 -115
  83. package/esm/LineChart/LineChart.js +22 -0
  84. package/esm/LineChart/LineHighlightPlot.js +11 -5
  85. package/esm/LineChart/LinePlot.js +5 -99
  86. package/esm/LineChart/MarkPlot.js +17 -3
  87. package/esm/LineChart/useAreaPlotData.d.ts +12 -0
  88. package/esm/LineChart/useAreaPlotData.js +119 -0
  89. package/esm/LineChart/useLinePlotData.d.ts +11 -0
  90. package/esm/LineChart/useLinePlotData.js +101 -0
  91. package/esm/PieChart/PieChart.d.ts +1 -1
  92. package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -1
  93. package/esm/ScatterChart/Scatter.js +23 -49
  94. package/esm/ScatterChart/ScatterChart.d.ts +1 -1
  95. package/esm/ScatterChart/ScatterPlot.js +2 -2
  96. package/esm/ScatterChart/seriesConfig/seriesProcessor.js +3 -0
  97. package/esm/ScatterChart/useScatterPlotData.d.ts +8 -0
  98. package/esm/ScatterChart/useScatterPlotData.js +26 -0
  99. package/esm/SparkLineChart/SparkLineChart.d.ts +1 -1
  100. package/esm/SparkLineChart/SparkLineChart.js +16 -0
  101. package/esm/context/ChartApi.d.ts +22 -0
  102. package/esm/context/ChartApi.js +1 -0
  103. package/esm/context/ChartProvider/ChartContext.js +2 -0
  104. package/esm/context/index.d.ts +2 -1
  105. package/esm/context/useChartApiContext.d.ts +1 -1
  106. package/esm/hooks/useAxis.d.ts +2 -2
  107. package/esm/hooks/useInteractionItemProps.d.ts +14 -9
  108. package/esm/hooks/useInteractionItemProps.js +28 -28
  109. package/esm/index.d.ts +2 -1
  110. package/esm/index.js +2 -2
  111. package/esm/internals/constants.d.ts +3 -0
  112. package/esm/internals/constants.js +4 -0
  113. package/esm/internals/getLabel.d.ts +1 -1
  114. package/esm/internals/index.d.ts +6 -0
  115. package/esm/internals/index.js +6 -0
  116. package/esm/internals/plugins/corePlugins/corePlugins.d.ts +4 -2
  117. package/esm/internals/plugins/corePlugins/corePlugins.js +3 -1
  118. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
  119. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -29
  120. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
  121. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +0 -6
  122. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/index.d.ts +3 -0
  123. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/index.js +2 -0
  124. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +3 -0
  125. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +27 -0
  126. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +8 -0
  127. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +3 -0
  128. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +21 -0
  129. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js +1 -0
  130. package/esm/internals/plugins/corePlugins/useChartId/useChartId.js +2 -0
  131. package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
  132. package/esm/internals/plugins/corePlugins/useChartInteractionListener/index.d.ts +2 -0
  133. package/esm/internals/plugins/corePlugins/useChartInteractionListener/index.js +1 -0
  134. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +3 -0
  135. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +77 -0
  136. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +31 -0
  137. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.js +1 -0
  138. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  139. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
  140. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -2
  141. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +1 -0
  142. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +5 -2
  143. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +7 -0
  144. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js +14 -0
  145. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
  146. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +2 -0
  147. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
  148. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +90 -36
  149. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +18 -1
  150. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -0
  151. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +76 -0
  152. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -5
  153. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +8 -5
  154. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +47 -0
  155. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +48 -0
  156. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +18 -12
  157. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +16 -2
  158. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +6 -1
  159. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
  160. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
  161. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +34 -34
  162. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
  163. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +7 -8
  164. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +47 -30
  165. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
  166. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
  167. package/esm/internals/plugins/utils/useLazySelectorEffect.d.ts +7 -0
  168. package/esm/internals/plugins/utils/useLazySelectorEffect.js +70 -0
  169. package/esm/internals/store/useCharts.d.ts +1 -1
  170. package/esm/locales/elGR.d.ts +19 -0
  171. package/esm/locales/elGR.js +15 -0
  172. package/esm/locales/index.d.ts +1 -0
  173. package/esm/locales/index.js +1 -0
  174. package/esm/models/axis.d.ts +15 -0
  175. package/esm/models/axis.js +4 -0
  176. package/esm/models/index.d.ts +1 -1
  177. package/esm/models/seriesType/scatter.d.ts +11 -2
  178. package/esm/themeAugmentation/components.d.ts +3 -0
  179. package/esm/themeAugmentation/props.d.ts +2 -0
  180. package/hooks/useAxis.d.ts +2 -2
  181. package/hooks/useInteractionItemProps.d.ts +14 -9
  182. package/hooks/useInteractionItemProps.js +29 -28
  183. package/index.d.ts +2 -1
  184. package/index.js +37 -11
  185. package/internals/constants.d.ts +3 -0
  186. package/internals/constants.js +5 -1
  187. package/internals/getLabel.d.ts +1 -1
  188. package/internals/index.d.ts +6 -0
  189. package/internals/index.js +52 -0
  190. package/internals/plugins/corePlugins/corePlugins.d.ts +4 -2
  191. package/internals/plugins/corePlugins/corePlugins.js +3 -1
  192. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
  193. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -29
  194. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
  195. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +0 -6
  196. package/internals/plugins/corePlugins/useChartExperimentalFeature/index.d.ts +3 -0
  197. package/internals/plugins/corePlugins/useChartExperimentalFeature/index.js +27 -0
  198. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +3 -0
  199. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +34 -0
  200. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +8 -0
  201. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +10 -0
  202. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +21 -0
  203. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js +5 -0
  204. package/internals/plugins/corePlugins/useChartId/useChartId.js +1 -0
  205. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
  206. package/internals/plugins/corePlugins/useChartInteractionListener/index.d.ts +2 -0
  207. package/internals/plugins/corePlugins/useChartInteractionListener/index.js +12 -0
  208. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +3 -0
  209. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +84 -0
  210. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +31 -0
  211. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.js +5 -0
  212. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  213. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
  214. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -2
  215. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +1 -0
  216. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +4 -1
  217. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +7 -0
  218. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js +21 -0
  219. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
  220. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +24 -0
  221. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
  222. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +90 -36
  223. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +18 -1
  224. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -0
  225. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +82 -0
  226. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -5
  227. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +9 -6
  228. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +47 -0
  229. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +55 -0
  230. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +18 -12
  231. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +18 -3
  232. package/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +6 -1
  233. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
  234. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
  235. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +34 -34
  236. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
  237. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +7 -8
  238. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +46 -30
  239. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
  240. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
  241. package/internals/plugins/utils/useLazySelectorEffect.d.ts +7 -0
  242. package/internals/plugins/utils/useLazySelectorEffect.js +77 -0
  243. package/internals/store/useCharts.d.ts +1 -1
  244. package/locales/elGR.d.ts +19 -0
  245. package/locales/elGR.js +21 -0
  246. package/locales/index.d.ts +1 -0
  247. package/locales/index.js +11 -0
  248. package/models/axis.d.ts +15 -0
  249. package/models/axis.js +4 -0
  250. package/models/index.d.ts +1 -1
  251. package/models/seriesType/scatter.d.ts +11 -2
  252. package/package.json +4 -3
  253. package/themeAugmentation/components.d.ts +3 -0
  254. package/themeAugmentation/props.d.ts +2 -0
@@ -15,7 +15,7 @@ import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from "
15
15
  import { BarChartPluginsSignatures } from "./BarChart.plugins.js";
16
16
  export interface BarChartSlots extends ChartsAxisSlots, BarPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
17
17
  export interface BarChartSlotProps extends ChartsAxisSlotProps, BarPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
18
- export interface BarChartProps extends Omit<ChartContainerProps<'bar', BarChartPluginsSignatures>, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<BarPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
18
+ export interface BarChartProps extends Omit<ChartContainerProps<'bar', BarChartPluginsSignatures>, 'series' | 'plugins' | 'zAxis' | 'experimentalFeatures'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<BarPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
19
19
  /**
20
20
  * The series to display in the bar chart.
21
21
  * An array of [[BarSeriesType]] objects.
@@ -134,6 +134,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
134
134
  * If `true`, the legend is not rendered.
135
135
  */
136
136
  hideLegend: _propTypes.default.bool,
137
+ /**
138
+ * The controlled axis highlight.
139
+ * Identified by the axis id, and data index.
140
+ */
141
+ highlightedAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
142
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
143
+ dataIndex: _propTypes.default.number.isRequired
144
+ })),
137
145
  /**
138
146
  * The highlighted item.
139
147
  * Used when the highlight is controlled.
@@ -186,6 +194,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
186
194
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
187
195
  */
188
196
  onHighlightChange: _propTypes.default.func,
197
+ /**
198
+ * The function called when the pointer position corresponds to a new axis data item.
199
+ * This update can either be caused by a pointer movement, or an axis update.
200
+ * In case of multiple axes, the function is called if at least one axis is updated.
201
+ * The argument contains the identifier for all axes with a `data` property.
202
+ * @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
203
+ */
204
+ onHighlightedAxisChange: _propTypes.default.func,
189
205
  /**
190
206
  * Callback fired when a bar item is clicked.
191
207
  * @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
@@ -14,160 +14,15 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
14
14
  var _styles = require("@mui/material/styles");
15
15
  var _barElementClasses = require("./barElementClasses");
16
16
  var _BarElement = require("./BarElement");
17
- var _getColor = _interopRequireDefault(require("./seriesConfig/getColor"));
18
17
  var _hooks = require("../hooks");
19
18
  var _BarClipPath = require("./BarClipPath");
20
19
  var _BarLabelPlot = require("./BarLabel/BarLabelPlot");
21
- var _checkScaleErrors = require("./checkScaleErrors");
22
- var _useBarSeries = require("../hooks/useBarSeries");
23
20
  var _useSkipAnimation = require("../hooks/useSkipAnimation");
24
21
  var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
22
+ var _useBarPlotData = require("./useBarPlotData");
25
23
  var _barClasses = require("./barClasses");
26
24
  var _jsxRuntime = require("react/jsx-runtime");
27
25
  const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
28
- /**
29
- * Solution of the equations
30
- * W = barWidth * N + offset * (N-1)
31
- * offset / (offset + barWidth) = r
32
- * @param bandWidth The width available to place bars.
33
- * @param numberOfGroups The number of bars to place in that space.
34
- * @param gapRatio The ratio of the gap between bars over the bar width.
35
- * @returns The bar width and the offset between bars.
36
- */
37
- function getBandSize({
38
- bandWidth: W,
39
- numberOfGroups: N,
40
- gapRatio: r
41
- }) {
42
- if (r === 0) {
43
- return {
44
- barWidth: W / N,
45
- offset: 0
46
- };
47
- }
48
- const barWidth = W / (N + (N - 1) * r);
49
- const offset = r * barWidth;
50
- return {
51
- barWidth,
52
- offset
53
- };
54
- }
55
- const useAggregatedData = () => {
56
- const seriesData = (0, _useBarSeries.useBarSeriesContext)() ?? {
57
- series: {},
58
- stackingGroups: [],
59
- seriesOrder: []
60
- };
61
- const drawingArea = (0, _hooks.useDrawingArea)();
62
- const chartId = (0, _hooks.useChartId)();
63
- const {
64
- series,
65
- stackingGroups
66
- } = seriesData;
67
- const {
68
- xAxis,
69
- xAxisIds
70
- } = (0, _hooks.useXAxes)();
71
- const {
72
- yAxis,
73
- yAxisIds
74
- } = (0, _hooks.useYAxes)();
75
- const defaultXAxisId = xAxisIds[0];
76
- const defaultYAxisId = yAxisIds[0];
77
- const masks = {};
78
- const data = stackingGroups.flatMap(({
79
- ids: seriesIds
80
- }, groupIndex) => {
81
- const xMin = drawingArea.left;
82
- const xMax = drawingArea.left + drawingArea.width;
83
- const yMin = drawingArea.top;
84
- const yMax = drawingArea.top + drawingArea.height;
85
- return seriesIds.map(seriesId => {
86
- const xAxisId = series[seriesId].xAxisId ?? defaultXAxisId;
87
- const yAxisId = series[seriesId].yAxisId ?? defaultYAxisId;
88
- const xAxisConfig = xAxis[xAxisId];
89
- const yAxisConfig = yAxis[yAxisId];
90
- const verticalLayout = series[seriesId].layout === 'vertical';
91
- (0, _checkScaleErrors.checkScaleErrors)(verticalLayout, seriesId, series[seriesId], xAxisId, xAxis, yAxisId, yAxis);
92
- const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
93
- const xScale = xAxisConfig.scale;
94
- const yScale = yAxisConfig.scale;
95
- const colorGetter = (0, _getColor.default)(series[seriesId], xAxis[xAxisId], yAxis[yAxisId]);
96
- const bandWidth = baseScaleConfig.scale.bandwidth();
97
- const {
98
- barWidth,
99
- offset
100
- } = getBandSize({
101
- bandWidth,
102
- numberOfGroups: stackingGroups.length,
103
- gapRatio: baseScaleConfig.barGapRatio
104
- });
105
- const barOffset = groupIndex * (barWidth + offset);
106
- const {
107
- stackedData,
108
- data: currentSeriesData,
109
- layout
110
- } = series[seriesId];
111
- const seriesDataPoints = baseScaleConfig.data.map((baseValue, dataIndex) => {
112
- if (currentSeriesData[dataIndex] == null) {
113
- return null;
114
- }
115
- const values = stackedData[dataIndex];
116
- const valueCoordinates = values.map(v => verticalLayout ? yScale(v) : xScale(v));
117
- const minValueCoord = Math.round(Math.min(...valueCoordinates));
118
- const maxValueCoord = Math.round(Math.max(...valueCoordinates));
119
- const stackId = series[seriesId].stack;
120
- const result = {
121
- seriesId,
122
- dataIndex,
123
- layout,
124
- x: verticalLayout ? xScale(baseValue) + barOffset : minValueCoord,
125
- y: verticalLayout ? minValueCoord : yScale(baseValue) + barOffset,
126
- xOrigin: xScale(0) ?? 0,
127
- yOrigin: yScale(0) ?? 0,
128
- height: verticalLayout ? maxValueCoord - minValueCoord : barWidth,
129
- width: verticalLayout ? barWidth : maxValueCoord - minValueCoord,
130
- color: colorGetter(dataIndex),
131
- value: currentSeriesData[dataIndex],
132
- maskId: `${chartId}_${stackId || seriesId}_${groupIndex}_${dataIndex}`
133
- };
134
- if (result.x > xMax || result.x + result.width < xMin || result.y > yMax || result.y + result.height < yMin) {
135
- return null;
136
- }
137
- if (!masks[result.maskId]) {
138
- masks[result.maskId] = {
139
- id: result.maskId,
140
- width: 0,
141
- height: 0,
142
- hasNegative: false,
143
- hasPositive: false,
144
- layout: result.layout,
145
- xOrigin: xScale(0),
146
- yOrigin: yScale(0),
147
- x: 0,
148
- y: 0
149
- };
150
- }
151
- const mask = masks[result.maskId];
152
- mask.width = result.layout === 'vertical' ? result.width : mask.width + result.width;
153
- mask.height = result.layout === 'vertical' ? mask.height + result.height : result.height;
154
- mask.x = Math.min(mask.x === 0 ? Infinity : mask.x, result.x);
155
- mask.y = Math.min(mask.y === 0 ? Infinity : mask.y, result.y);
156
- mask.hasNegative = mask.hasNegative || (result.value ?? 0) < 0;
157
- mask.hasPositive = mask.hasPositive || (result.value ?? 0) > 0;
158
- return result;
159
- }).filter(rectangle => rectangle !== null);
160
- return {
161
- seriesId,
162
- data: seriesDataPoints
163
- };
164
- });
165
- });
166
- return {
167
- completedData: data,
168
- masksData: Object.values(masks)
169
- };
170
- };
171
26
  const BarPlotRoot = (0, _styles.styled)('g', {
172
27
  name: 'MuiBarPlot',
173
28
  slot: 'Root'
@@ -189,10 +44,6 @@ const BarPlotRoot = (0, _styles.styled)('g', {
189
44
  * - [BarPlot API](https://mui.com/x/api/charts/bar-plot/)
190
45
  */
191
46
  function BarPlot(props) {
192
- const {
193
- completedData,
194
- masksData
195
- } = useAggregatedData();
196
47
  const {
197
48
  skipAnimation: inSkipAnimation,
198
49
  onItemClick,
@@ -202,6 +53,16 @@ function BarPlot(props) {
202
53
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
203
54
  const isZoomInteracting = (0, _useInternalIsZoomInteracting.useInternalIsZoomInteracting)();
204
55
  const skipAnimation = (0, _useSkipAnimation.useSkipAnimation)(isZoomInteracting || inSkipAnimation);
56
+ const {
57
+ xAxis: xAxes
58
+ } = (0, _hooks.useXAxes)();
59
+ const {
60
+ yAxis: yAxes
61
+ } = (0, _hooks.useYAxes)();
62
+ const {
63
+ completedData,
64
+ masksData
65
+ } = (0, _useBarPlotData.useBarPlotData)((0, _hooks.useDrawingArea)(), xAxes, yAxes);
205
66
  const withoutBorderRadius = !borderRadius || borderRadius <= 0;
206
67
  const classes = (0, _barClasses.useUtilityClasses)();
207
68
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(BarPlotRoot, {
@@ -0,0 +1,8 @@
1
+ import { ChartsXAxisProps, ChartsYAxisProps } from "../models/axis.js";
2
+ import { ChartDrawingArea } from "../hooks/index.js";
3
+ import { MaskData, ProcessedBarSeriesData } from "./types.js";
4
+ import { ComputedAxisConfig } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.js";
5
+ export declare function useBarPlotData(drawingArea: ChartDrawingArea, xAxes: ComputedAxisConfig<ChartsXAxisProps>, yAxes: ComputedAxisConfig<ChartsYAxisProps>): {
6
+ completedData: ProcessedBarSeriesData[];
7
+ masksData: MaskData[];
8
+ };
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useBarPlotData = useBarPlotData;
8
+ var _getColor = _interopRequireDefault(require("./seriesConfig/getColor"));
9
+ var _hooks = require("../hooks");
10
+ var _checkScaleErrors = require("./checkScaleErrors");
11
+ var _useBarSeries = require("../hooks/useBarSeries");
12
+ function useBarPlotData(drawingArea, xAxes, yAxes) {
13
+ const seriesData = (0, _useBarSeries.useBarSeriesContext)() ?? {
14
+ series: {},
15
+ stackingGroups: [],
16
+ seriesOrder: []
17
+ };
18
+ const defaultXAxisId = (0, _hooks.useXAxes)().xAxisIds[0];
19
+ const defaultYAxisId = (0, _hooks.useYAxes)().yAxisIds[0];
20
+ const chartId = (0, _hooks.useChartId)();
21
+ const {
22
+ series,
23
+ stackingGroups
24
+ } = seriesData;
25
+ const masks = {};
26
+ const data = stackingGroups.flatMap(({
27
+ ids: seriesIds
28
+ }, groupIndex) => {
29
+ const xMin = drawingArea.left;
30
+ const xMax = drawingArea.left + drawingArea.width;
31
+ const yMin = drawingArea.top;
32
+ const yMax = drawingArea.top + drawingArea.height;
33
+ return seriesIds.map(seriesId => {
34
+ const xAxisId = series[seriesId].xAxisId ?? defaultXAxisId;
35
+ const yAxisId = series[seriesId].yAxisId ?? defaultYAxisId;
36
+ const xAxisConfig = xAxes[xAxisId];
37
+ const yAxisConfig = yAxes[yAxisId];
38
+ const verticalLayout = series[seriesId].layout === 'vertical';
39
+ (0, _checkScaleErrors.checkScaleErrors)(verticalLayout, seriesId, series[seriesId], xAxisId, xAxes, yAxisId, yAxes);
40
+ const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
41
+ const xScale = xAxisConfig.scale;
42
+ const yScale = yAxisConfig.scale;
43
+ const colorGetter = (0, _getColor.default)(series[seriesId], xAxes[xAxisId], yAxes[yAxisId]);
44
+ const bandWidth = baseScaleConfig.scale.bandwidth();
45
+ const {
46
+ barWidth,
47
+ offset
48
+ } = getBandSize({
49
+ bandWidth,
50
+ numberOfGroups: stackingGroups.length,
51
+ gapRatio: baseScaleConfig.barGapRatio
52
+ });
53
+ const barOffset = groupIndex * (barWidth + offset);
54
+ const {
55
+ stackedData,
56
+ data: currentSeriesData,
57
+ layout
58
+ } = series[seriesId];
59
+ const seriesDataPoints = baseScaleConfig.data.map((baseValue, dataIndex) => {
60
+ if (currentSeriesData[dataIndex] == null) {
61
+ return null;
62
+ }
63
+ const values = stackedData[dataIndex];
64
+ const valueCoordinates = values.map(v => verticalLayout ? yScale(v) : xScale(v));
65
+ const minValueCoord = Math.round(Math.min(...valueCoordinates));
66
+ const maxValueCoord = Math.round(Math.max(...valueCoordinates));
67
+ const stackId = series[seriesId].stack;
68
+ const result = {
69
+ seriesId,
70
+ dataIndex,
71
+ layout,
72
+ x: verticalLayout ? xScale(baseValue) + barOffset : minValueCoord,
73
+ y: verticalLayout ? minValueCoord : yScale(baseValue) + barOffset,
74
+ xOrigin: xScale(0) ?? 0,
75
+ yOrigin: yScale(0) ?? 0,
76
+ height: verticalLayout ? maxValueCoord - minValueCoord : barWidth,
77
+ width: verticalLayout ? barWidth : maxValueCoord - minValueCoord,
78
+ color: colorGetter(dataIndex),
79
+ value: currentSeriesData[dataIndex],
80
+ maskId: `${chartId}_${stackId || seriesId}_${groupIndex}_${dataIndex}`
81
+ };
82
+ if (result.x > xMax || result.x + result.width < xMin || result.y > yMax || result.y + result.height < yMin) {
83
+ return null;
84
+ }
85
+ if (!masks[result.maskId]) {
86
+ masks[result.maskId] = {
87
+ id: result.maskId,
88
+ width: 0,
89
+ height: 0,
90
+ hasNegative: false,
91
+ hasPositive: false,
92
+ layout: result.layout,
93
+ xOrigin: xScale(0),
94
+ yOrigin: yScale(0),
95
+ x: 0,
96
+ y: 0
97
+ };
98
+ }
99
+ const mask = masks[result.maskId];
100
+ mask.width = result.layout === 'vertical' ? result.width : mask.width + result.width;
101
+ mask.height = result.layout === 'vertical' ? mask.height + result.height : result.height;
102
+ mask.x = Math.min(mask.x === 0 ? Infinity : mask.x, result.x);
103
+ mask.y = Math.min(mask.y === 0 ? Infinity : mask.y, result.y);
104
+ mask.hasNegative = mask.hasNegative || (result.value ?? 0) < 0;
105
+ mask.hasPositive = mask.hasPositive || (result.value ?? 0) > 0;
106
+ return result;
107
+ }).filter(rectangle => rectangle !== null);
108
+ return {
109
+ seriesId,
110
+ data: seriesDataPoints
111
+ };
112
+ });
113
+ });
114
+ return {
115
+ completedData: data,
116
+ masksData: Object.values(masks)
117
+ };
118
+ }
119
+
120
+ /**
121
+ * Solution of the equations
122
+ * W = barWidth * N + offset * (N-1)
123
+ * offset / (offset + barWidth) = r
124
+ * @param bandWidth The width available to place bars.
125
+ * @param numberOfGroups The number of bars to place in that space.
126
+ * @param gapRatio The ratio of the gap between bars over the bar width.
127
+ * @returns The bar width and the offset between bars.
128
+ */
129
+ function getBandSize({
130
+ bandWidth: W,
131
+ numberOfGroups: N,
132
+ gapRatio: r
133
+ }) {
134
+ if (r === 0) {
135
+ return {
136
+ barWidth: W / N,
137
+ offset: 0
138
+ };
139
+ }
140
+ const barWidth = W / (N + (N - 1) * r);
141
+ const offset = r * barWidth;
142
+ return {
143
+ barWidth,
144
+ offset
145
+ };
146
+ }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,207 @@
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.8.0
9
+
10
+ _Jul 11, 2025_
11
+
12
+ We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Chart zoom preview can be enabled
15
+
16
+ <img width="758" alt="chart with x-axis preview" src="https://github.com/user-attachments/assets/50ce6f61-16dc-4e9b-a727-ca65d80927d7" />
17
+
18
+ - 🌎 Add Indonesian (id-ID) locale on the Data Grid
19
+
20
+ Special thanks go out to the community members for their valuable contributions:
21
+ @kennarddh
22
+
23
+ The following are all team members who have contributed to this release:
24
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @noraleonte, @prakhargupta1, @rita-codes, @siriwatknp
25
+
26
+ ### Data Grid
27
+
28
+ #### `@mui/x-data-grid@8.8.0`
29
+
30
+ - [DataGrid] Fix `useGridSelector` missing subscription in `React.StrictMode` (#18676) @cherniavskii
31
+ - [DataGrid] Fix scrollbar filler `z-index` (#18688) @KenanYusuf
32
+ - [DataGrid] Set correct data source cache chunk size when pagination is disabled (#18636) @arminmeh
33
+ - [l10n] Add Indonesian (id-ID) locale (#18710) @kennarddh
34
+
35
+ #### `@mui/x-data-grid-pro@8.8.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
36
+
37
+ Same changes as in `@mui/x-data-grid@8.8.0`, plus:
38
+
39
+ - [DataGridPro] Fix row ordering not auto-scrolling when moving beyond viewport (#18557) @MBilalShafi
40
+ - [DataGridPro] Set correct parent paths when tree is refreshed with data source tree data and row grouping (#18715) @arminmeh
41
+
42
+ #### `@mui/x-data-grid-premium@8.8.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
43
+
44
+ Same changes as in `@mui/x-data-grid-pro@8.8.0`.
45
+
46
+ ### Date and Time Pickers
47
+
48
+ #### `@mui/x-date-pickers@8.8.0`
49
+
50
+ Internal changes.
51
+
52
+ #### `@mui/x-date-pickers-pro@8.8.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
53
+
54
+ Same changes as in `@mui/x-date-pickers@8.8.0`.
55
+
56
+ ### Charts
57
+
58
+ #### `@mui/x-charts@8.8.0`
59
+
60
+ - [charts] Add control to the axis highlight (#17900) @alexfauquette
61
+ - [charts] Avoid processing area plot data if area isn't used in series (#18712) @bernardobelchior
62
+ - [charts] Make smarter default domain limit (#18506) @alexfauquette
63
+
64
+ #### `@mui/x-charts-pro@8.8.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
65
+
66
+ Same changes as in `@mui/x-charts@8.8.0`, plus:
67
+
68
+ - [charts-pro] Add `funnelDirection` to control pyramid direction (#18568) @JCQuintas
69
+ - [charts-pro] Add `onBeforeExport` callback (#18722) @bernardobelchior
70
+ - [charts-pro] Add chart zoom preview (#18267) @bernardobelchior
71
+ - [charts-pro] Allow customizing scatter preview marker size (#18726) @bernardobelchior
72
+ - [charts-pro] Allow disabling the copy of styles in charts export (#18753) @bernardobelchior
73
+
74
+ ### Tree View
75
+
76
+ #### `@mui/x-tree-view@8.8.0`
77
+
78
+ - [tree view] Fix state update that caused scrolling bug when lazy loading and `checkboxSelection` are enabled (#18749) @rita-codes
79
+
80
+ #### `@mui/x-tree-view-pro@8.8.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
81
+
82
+ Same changes as in `@mui/x-tree-view@8.8.0`.
83
+
84
+ ### Codemod
85
+
86
+ #### `@mui/x-codemod@8.8.0`
87
+
88
+ Internal changes.
89
+
90
+ ### Docs
91
+
92
+ - [docs] Add standalone Pyramid chart page to improve SEO (#18527) @prakhargupta1
93
+ - [docs] Add example to customise line interaction (#18539) @alexfauquette
94
+ - [docs] Fix `size` column filtering in files tree demo (#17952) @cherniavskii
95
+ - [docs] Generate `llms.txt` for X and their products (#18595) @siriwatknp
96
+ - [docs] Improve bar chart demos on mobile (#18721) @alexfauquette
97
+ - [docs] Refine charts overview page (#17447) @noraleonte
98
+
99
+ ### Miscellaneous
100
+
101
+ - [code-infra] Ensure all `@mui/*` packages are picked by `Material UI` renovate group (#18711) @LukasTy
102
+ - [code-infra] Fix broken CI (#18716) @LukasTy
103
+ - [code-infra] Refactor `prettier` config resolving (#18720) @LukasTy
104
+ - [test] Increase data points in chart benchmarks (#18714) @bernardobelchior
105
+
106
+ ## 8.7.0
107
+
108
+ _Jul 4, 2025_
109
+
110
+ We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
111
+
112
+ - 📊 Add `useChartProApiRef` for easier access to the API
113
+ - 📆 Support different start and end `referenceDate` props on range components
114
+ - 📚 Documentation improvements
115
+ - 🐞 Bugfixes
116
+ - 🌎 Improve Greek (el-GR) translations on the Charts
117
+ - 🌎 Improve Danish (da-DK) locale on the Data Grid
118
+
119
+ Special thanks go out to the community members for their valuable contributions:
120
+ @ShahrazH, @vadimkuragkovskiy, @whythecode
121
+
122
+ The following are all team members who have contributed to this release:
123
+ @alexfauquette, @brijeshb42, @mapache-salvaje, @arminmeh, @bernardobelchior, @bharatkashyap, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @rita-codes
124
+
125
+ ### Data Grid
126
+
127
+ #### `@mui/x-data-grid@8.7.0`
128
+
129
+ - [DataGrid] Fix column state restore with controlled column visibility model (#18567) @arminmeh
130
+ - [DataGrid] Fix styling virtualized column headers (#18603) @KenanYusuf
131
+ - [l10n] Improve Danish (da-DK) locale (#18537) @ShahrazH
132
+
133
+ #### `@mui/x-data-grid-pro@8.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
134
+
135
+ Same changes as in `@mui/x-data-grid@8.7.0`.
136
+
137
+ #### `@mui/x-data-grid-premium@8.7.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
138
+
139
+ Same changes as in `@mui/x-data-grid-pro@8.7.0`.
140
+
141
+ ### Date and Time Pickers
142
+
143
+ #### `@mui/x-date-pickers@8.7.0`
144
+
145
+ - [pickers] Support different `start` and `end` `referenceDate` props on range components (#18549) @LukasTy
146
+
147
+ #### `@mui/x-date-pickers-pro@8.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
148
+
149
+ Same changes as in `@mui/x-date-pickers@8.7.0`.
150
+
151
+ ### Charts
152
+
153
+ #### `@mui/x-charts@8.7.0`
154
+
155
+ - [charts] Export `ChartsReferenceLineProps` (#18598) @bernardobelchior
156
+ - [charts] Extract bar and line plot logic into reusable hooks (#18541) @bernardobelchior
157
+ - [charts] Extract plot logic into separate files for reuse (#18522) @bernardobelchior
158
+ - [charts] Profile charts benchmarks using chromium (#18528) @bernardobelchior
159
+ - [l10n] Add Greek (el-GR) locale to charts (#18548) @whythecode
160
+
161
+ #### `@mui/x-charts-pro@8.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
162
+
163
+ Same changes as in `@mui/x-charts@8.7.0`, plus:
164
+
165
+ - [charts-pro] Add `useChartProApiRef` for easier refs (#18013) @JCQuintas
166
+ - [charts-pro] Add tests and classes to zoom slider (#18660) @JCQuintas
167
+ - [charts-pro] Fix geometry not handling gestures in specific scenarios (#18651) @JCQuintas
168
+ - [charts-pro] Rename `useChartApiContext` to `useChartProApiContext` (#18565) @JCQuintas
169
+ - [charts-pro] Zoom pointer improvements (#17480) @JCQuintas
170
+
171
+ ### Tree View
172
+
173
+ #### `@mui/x-tree-view@8.7.0`
174
+
175
+ Internal changes.
176
+
177
+ #### `@mui/x-tree-view-pro@8.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
178
+
179
+ Same changes as in `@mui/x-tree-view@8.7.0`, plus:
180
+
181
+ - [tree view pro] Add missing `dataSource` JSDoc (#18650) @LukasTy
182
+
183
+ ### Docs
184
+
185
+ - [docs] Add MCP stub (#18204) @bharatkashyap
186
+ - [docs] Fix AI Assistant proxy rewrite prefix (#18661) @arminmeh
187
+ - [docs] Improve test README.MD (#18634) @LukasTy
188
+ - [docs] Provide workaround for pie chart composition (#18600) @alexfauquette
189
+ - [docs][charts] Add donut chart as a special case of a pie chart (#18652) @bernardobelchior
190
+ - [docs][charts] Centralize country and continent data (#18604) @bernardobelchior
191
+ - [docs][data grid] Audit and revise the Pro row docs (#17926) @mapache-salvaje
192
+ - [docs][pickers] Add mention of theme augmentation in relevant migration section (#18608) @LukasTy
193
+
194
+ ### Core
195
+
196
+ - [core] Avoid stringifying `document` object (#18657) @vadimkuragkovskiy
197
+
198
+ ### Miscellaneous
199
+
200
+ - [code-infra] Bump code-infra version and fix breaking changes (#18653) @brijeshb42
201
+ - [code-infra] Ensure `material-ui/disallow-react-api-in-server-components` ESLint rule is applied (#18570) @LukasTy
202
+ - [code-infra] Migrate to flat eslint config (#18562) @brijeshb42
203
+ - [code-infra] Refactor eslint config (#18643) @LukasTy
204
+ - [infra] Add renovatebot rule for latest infra packages (#18609) @Janpot
205
+ - [infra] Move pushArgos script to code-infra (#18667) @Janpot
206
+ - [infra] Updates release script to fetch latest major version from upstream (#18552) @michelengelen
207
+ - [release] Add missing contributor to changelog (#18561) @bernardobelchior
208
+
8
209
  ## 8.6.0
9
210
 
10
211
  _Jun 27, 2025_
@@ -19,7 +220,7 @@ We'd like to extend a big thank you to the 12 contributors who made this release
19
220
  - 🌎 Improve German (de-DE) locale
20
221
 
21
222
  Special thanks go out to the community members for their valuable contributions:
22
- @ShahrazH, @vadimka123
223
+ @omalyutin, @ShahrazH, @vadimka123
23
224
 
24
225
  The following are all team members who have contributed to this release:
25
226
  @arminmeh, @bernardobelchior, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes, @sai6855
@@ -1,30 +1,10 @@
1
1
  import * as React from 'react';
2
- import { PieChartPluginSignatures } from "../PieChart/PieChart.plugins.js";
3
- import { BarChartPluginsSignatures } from "../BarChart/BarChart.plugins.js";
4
- import { ScatterChartPluginsSignatures } from "../ScatterChart/ScatterChart.plugins.js";
5
- import { LineChartPluginsSignatures } from "../LineChart/LineChart.plugins.js";
6
2
  import { ChartSeriesType } from "../models/seriesType/config.js";
7
3
  import { ChartDataProviderProps } from "../ChartDataProvider/index.js";
8
4
  import { ChartsSurfaceProps } from "../ChartsSurface/index.js";
9
- import { AllPluginSignatures, DefaultPluginSignatures } from "../internals/plugins/allPlugins.js";
5
+ import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
10
6
  import { ChartAnyPluginSignature } from "../internals/plugins/models/plugin.js";
11
- import { ChartPublicAPI } from "../internals/plugins/models/index.js";
12
7
  export type ChartContainerProps<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>> = Omit<ChartDataProviderProps<SeriesType, TSignatures>, 'children'> & ChartsSurfaceProps;
13
- type PluginsPerSeriesType = {
14
- line: LineChartPluginsSignatures;
15
- scatter: ScatterChartPluginsSignatures;
16
- bar: BarChartPluginsSignatures;
17
- pie: PieChartPluginSignatures;
18
- composition: DefaultPluginSignatures;
19
- };
20
- /**
21
- * The API of the chart `apiRef` object.
22
- * The chart type can be passed as the first generic parameter to narrow down the API to the specific chart type.
23
- * @example ChartApi<'bar'>
24
- * If the chart is being created using composition, the `composition` value can be used.
25
- * @example ChartApi<'composition'>
26
- */
27
- export type ChartApi<TSeries extends keyof PluginsPerSeriesType | undefined = undefined, TSignatures extends readonly ChartAnyPluginSignature[] = (TSeries extends keyof PluginsPerSeriesType ? PluginsPerSeriesType[TSeries] : AllPluginSignatures)> = ChartPublicAPI<TSignatures>;
28
8
  /**
29
9
  * It sets up the data providers as well as the `<svg>` for the chart.
30
10
  *