@mui/x-charts 8.5.3 → 8.7.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 (228) hide show
  1. package/BarChart/AnimatedBarElement.js +3 -1
  2. package/BarChart/BarLabel/BarLabelPlot.d.ts +2 -2
  3. package/BarChart/BarLabel/BarLabelPlot.js +33 -25
  4. package/BarChart/BarPlot.js +59 -183
  5. package/BarChart/barClasses.d.ts +12 -0
  6. package/BarChart/barClasses.js +25 -0
  7. package/BarChart/index.d.ts +3 -1
  8. package/BarChart/index.js +23 -1
  9. package/BarChart/types.d.ts +5 -1
  10. package/BarChart/useBarPlotData.d.ts +8 -0
  11. package/BarChart/useBarPlotData.js +146 -0
  12. package/CHANGELOG.md +210 -0
  13. package/ChartContainer/ChartContainer.d.ts +1 -21
  14. package/ChartContainer/ChartContainer.js +0 -8
  15. package/ChartContainer/index.d.ts +8 -1
  16. package/ChartsLegend/ChartsLegend.js +1 -0
  17. package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
  18. package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +3 -0
  19. package/ChartsReferenceLine/ChartsXReferenceLine.js +48 -1
  20. package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +3 -0
  21. package/ChartsReferenceLine/ChartsYReferenceLine.js +48 -1
  22. package/ChartsReferenceLine/index.d.ts +3 -1
  23. package/ChartsSurface/ChartsSurface.js +2 -1
  24. package/ChartsTooltip/ChartsTooltipContainer.js +6 -3
  25. package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  26. package/ChartsTooltip/utils.js +18 -29
  27. package/ChartsXAxis/ChartsXAxis.js +4 -108
  28. package/ChartsXAxis/getVisibleLabels.d.ts +14 -0
  29. package/ChartsXAxis/getVisibleLabels.js +71 -0
  30. package/ChartsXAxis/shortenLabels.d.ts +4 -0
  31. package/ChartsXAxis/shortenLabels.js +48 -0
  32. package/ChartsYAxis/ChartsYAxis.js +2 -39
  33. package/ChartsYAxis/shortenLabels.d.ts +4 -0
  34. package/ChartsYAxis/shortenLabels.js +46 -0
  35. package/LineChart/AnimatedArea.js +4 -1
  36. package/LineChart/AnimatedLine.js +4 -1
  37. package/LineChart/AreaPlot.js +5 -115
  38. package/LineChart/CircleMarkElement.js +4 -1
  39. package/LineChart/LinePlot.js +5 -99
  40. package/LineChart/MarkElement.js +4 -1
  41. package/LineChart/MarkPlot.js +1 -0
  42. package/LineChart/useAreaPlotData.d.ts +12 -0
  43. package/LineChart/useAreaPlotData.js +125 -0
  44. package/LineChart/useLinePlotData.d.ts +11 -0
  45. package/LineChart/useLinePlotData.js +108 -0
  46. package/PieChart/PieArc.js +3 -1
  47. package/PieChart/PiePlot.js +6 -0
  48. package/PieChart/index.d.ts +3 -1
  49. package/PieChart/index.js +18 -1
  50. package/PieChart/pieClasses.d.ts +12 -0
  51. package/PieChart/pieClasses.js +24 -0
  52. package/ScatterChart/Scatter.js +22 -48
  53. package/ScatterChart/useScatterPlotData.d.ts +8 -0
  54. package/ScatterChart/useScatterPlotData.js +33 -0
  55. package/Toolbar/ToolbarButton.js +2 -0
  56. package/context/ChartApi.d.ts +22 -0
  57. package/context/ChartApi.js +5 -0
  58. package/context/ChartProvider/ChartContext.js +1 -0
  59. package/context/index.d.ts +2 -1
  60. package/context/useChartApiContext.d.ts +1 -1
  61. package/esm/BarChart/AnimatedBarElement.js +3 -1
  62. package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +2 -2
  63. package/esm/BarChart/BarLabel/BarLabelPlot.js +33 -25
  64. package/esm/BarChart/BarPlot.js +60 -185
  65. package/esm/BarChart/barClasses.d.ts +12 -0
  66. package/esm/BarChart/barClasses.js +15 -0
  67. package/esm/BarChart/index.d.ts +3 -1
  68. package/esm/BarChart/index.js +2 -1
  69. package/esm/BarChart/types.d.ts +5 -1
  70. package/esm/BarChart/useBarPlotData.d.ts +8 -0
  71. package/esm/BarChart/useBarPlotData.js +139 -0
  72. package/esm/ChartContainer/ChartContainer.d.ts +1 -21
  73. package/esm/ChartContainer/ChartContainer.js +0 -8
  74. package/esm/ChartContainer/index.d.ts +8 -1
  75. package/esm/ChartContainer/index.js +6 -1
  76. package/esm/ChartsLegend/ChartsLegend.js +1 -0
  77. package/esm/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
  78. package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +3 -0
  79. package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +47 -0
  80. package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +3 -0
  81. package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +47 -0
  82. package/esm/ChartsReferenceLine/index.d.ts +3 -1
  83. package/esm/ChartsReferenceLine/index.js +2 -1
  84. package/esm/ChartsSurface/ChartsSurface.js +2 -1
  85. package/esm/ChartsTooltip/ChartsTooltipContainer.js +6 -3
  86. package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  87. package/esm/ChartsTooltip/utils.js +18 -29
  88. package/esm/ChartsXAxis/ChartsXAxis.js +2 -106
  89. package/esm/ChartsXAxis/getVisibleLabels.d.ts +14 -0
  90. package/esm/ChartsXAxis/getVisibleLabels.js +67 -0
  91. package/esm/ChartsXAxis/shortenLabels.d.ts +4 -0
  92. package/esm/ChartsXAxis/shortenLabels.js +42 -0
  93. package/esm/ChartsYAxis/ChartsYAxis.js +1 -38
  94. package/esm/ChartsYAxis/shortenLabels.d.ts +4 -0
  95. package/esm/ChartsYAxis/shortenLabels.js +41 -0
  96. package/esm/LineChart/AnimatedArea.js +4 -1
  97. package/esm/LineChart/AnimatedLine.js +4 -1
  98. package/esm/LineChart/AreaPlot.js +5 -115
  99. package/esm/LineChart/CircleMarkElement.js +4 -1
  100. package/esm/LineChart/LinePlot.js +5 -99
  101. package/esm/LineChart/MarkElement.js +4 -1
  102. package/esm/LineChart/MarkPlot.js +1 -0
  103. package/esm/LineChart/useAreaPlotData.d.ts +12 -0
  104. package/esm/LineChart/useAreaPlotData.js +118 -0
  105. package/esm/LineChart/useLinePlotData.d.ts +11 -0
  106. package/esm/LineChart/useLinePlotData.js +101 -0
  107. package/esm/PieChart/PieArc.js +3 -1
  108. package/esm/PieChart/PiePlot.js +6 -0
  109. package/esm/PieChart/index.d.ts +3 -1
  110. package/esm/PieChart/index.js +2 -1
  111. package/esm/PieChart/pieClasses.d.ts +12 -0
  112. package/esm/PieChart/pieClasses.js +15 -0
  113. package/esm/ScatterChart/Scatter.js +23 -49
  114. package/esm/ScatterChart/useScatterPlotData.d.ts +8 -0
  115. package/esm/ScatterChart/useScatterPlotData.js +26 -0
  116. package/esm/Toolbar/ToolbarButton.js +2 -0
  117. package/esm/context/ChartApi.d.ts +22 -0
  118. package/esm/context/ChartApi.js +1 -0
  119. package/esm/context/ChartProvider/ChartContext.js +2 -0
  120. package/esm/context/index.d.ts +2 -1
  121. package/esm/context/useChartApiContext.d.ts +1 -1
  122. package/esm/hooks/useInteractionItemProps.d.ts +14 -9
  123. package/esm/hooks/useInteractionItemProps.js +28 -28
  124. package/esm/index.d.ts +2 -1
  125. package/esm/index.js +2 -2
  126. package/esm/internals/components/NotRendered.d.ts +9 -0
  127. package/esm/internals/components/NotRendered.js +10 -0
  128. package/esm/internals/index.d.ts +6 -0
  129. package/esm/internals/index.js +6 -0
  130. package/esm/internals/plugins/corePlugins/corePlugins.d.ts +3 -2
  131. package/esm/internals/plugins/corePlugins/corePlugins.js +2 -1
  132. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
  133. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -1
  134. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
  135. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +2 -2
  136. package/esm/internals/plugins/corePlugins/useChartId/useChartId.js +2 -0
  137. package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
  138. package/esm/internals/plugins/corePlugins/useChartInteractionListener/index.d.ts +2 -0
  139. package/esm/internals/plugins/corePlugins/useChartInteractionListener/index.js +1 -0
  140. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +3 -0
  141. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +77 -0
  142. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +31 -0
  143. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.js +1 -0
  144. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  145. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
  146. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +44 -33
  147. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +5 -5
  148. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +7 -7
  149. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
  150. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
  151. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +52 -36
  152. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
  153. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +6 -6
  154. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +47 -30
  155. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
  156. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
  157. package/esm/internals/store/useCharts.d.ts +1 -1
  158. package/esm/locales/elGR.d.ts +19 -0
  159. package/esm/locales/elGR.js +15 -0
  160. package/esm/locales/enUS.d.ts +3 -0
  161. package/esm/locales/enUS.js +8 -2
  162. package/esm/locales/frFR.d.ts +3 -0
  163. package/esm/locales/frFR.js +7 -0
  164. package/esm/locales/index.d.ts +1 -0
  165. package/esm/locales/index.js +1 -0
  166. package/esm/locales/ptBR.d.ts +3 -0
  167. package/esm/locales/ptBR.js +7 -1
  168. package/esm/locales/ptPT.d.ts +3 -0
  169. package/esm/locales/ptPT.js +7 -1
  170. package/esm/locales/utils/chartsLocaleTextApi.d.ts +17 -0
  171. package/esm/locales/utils/getChartsLocalization.d.ts +3 -0
  172. package/esm/locales/utils/imageMimeTypes.d.ts +2 -0
  173. package/esm/locales/utils/imageMimeTypes.js +5 -0
  174. package/esm/models/slots/chartsBaseSlotProps.d.ts +4 -0
  175. package/hooks/useInteractionItemProps.d.ts +14 -9
  176. package/hooks/useInteractionItemProps.js +29 -28
  177. package/index.d.ts +2 -1
  178. package/index.js +37 -11
  179. package/internals/components/NotRendered.d.ts +9 -0
  180. package/internals/components/NotRendered.js +16 -0
  181. package/internals/index.d.ts +6 -0
  182. package/internals/index.js +56 -0
  183. package/internals/plugins/corePlugins/corePlugins.d.ts +3 -2
  184. package/internals/plugins/corePlugins/corePlugins.js +2 -1
  185. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
  186. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -1
  187. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
  188. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +2 -2
  189. package/internals/plugins/corePlugins/useChartId/useChartId.js +1 -0
  190. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
  191. package/internals/plugins/corePlugins/useChartInteractionListener/index.d.ts +2 -0
  192. package/internals/plugins/corePlugins/useChartInteractionListener/index.js +12 -0
  193. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +3 -0
  194. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +84 -0
  195. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +31 -0
  196. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.js +5 -0
  197. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  198. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
  199. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +44 -33
  200. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +5 -5
  201. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +7 -7
  202. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
  203. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
  204. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +52 -36
  205. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
  206. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +6 -6
  207. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +46 -30
  208. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
  209. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
  210. package/internals/store/useCharts.d.ts +1 -1
  211. package/locales/elGR.d.ts +19 -0
  212. package/locales/elGR.js +21 -0
  213. package/locales/enUS.d.ts +3 -0
  214. package/locales/enUS.js +8 -2
  215. package/locales/frFR.d.ts +3 -0
  216. package/locales/frFR.js +7 -0
  217. package/locales/index.d.ts +1 -0
  218. package/locales/index.js +11 -0
  219. package/locales/ptBR.d.ts +3 -0
  220. package/locales/ptBR.js +7 -1
  221. package/locales/ptPT.d.ts +3 -0
  222. package/locales/ptPT.js +7 -1
  223. package/locales/utils/chartsLocaleTextApi.d.ts +17 -0
  224. package/locales/utils/getChartsLocalization.d.ts +3 -0
  225. package/locales/utils/imageMimeTypes.d.ts +2 -0
  226. package/locales/utils/imageMimeTypes.js +11 -0
  227. package/models/slots/chartsBaseSlotProps.d.ts +4 -0
  228. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,216 @@
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.7.0
9
+
10
+ _Jul 4, 2025_
11
+
12
+ We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Add `useChartProApiRef` for easier access to the API
15
+ - 📆 Support different start and end `referenceDate` props on range components
16
+ - 📚 Documentation improvements
17
+ - 🐞 Bugfixes
18
+ - 🌎 Improve Greek (el-GR) translations on the Charts
19
+ - 🌎 Improve Danish (da-DK) locale on the Data Grid
20
+
21
+ Special thanks go out to the community members for their valuable contributions:
22
+ @ShahrazH, @vadimkuragkovskiy, @whythecode
23
+
24
+ The following are all team members who have contributed to this release:
25
+ @alexfauquette, @brijeshb42, @mapache-salvaje, @arminmeh, @bernardobelchior, @bharatkashyap, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @rita-codes
26
+
27
+ ### Data Grid
28
+
29
+ #### `@mui/x-data-grid@8.7.0`
30
+
31
+ - [DataGrid] Fix column state restore with controlled column visibility model (#18567) @arminmeh
32
+ - [DataGrid] Fix styling virtualized column headers (#18603) @KenanYusuf
33
+ - [l10n] Improve Danish (da-DK) locale (#18537) @ShahrazH
34
+
35
+ #### `@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')
36
+
37
+ Same changes as in `@mui/x-data-grid@8.7.0`.
38
+
39
+ #### `@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')
40
+
41
+ Same changes as in `@mui/x-data-grid-pro@8.7.0`.
42
+
43
+ ### Date and Time Pickers
44
+
45
+ #### `@mui/x-date-pickers@8.7.0`
46
+
47
+ - [pickers] Support different `start` and `end` `referenceDate` props on range components (#18549) @LukasTy
48
+
49
+ #### `@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')
50
+
51
+ Same changes as in `@mui/x-date-pickers@8.7.0`.
52
+
53
+ ### Charts
54
+
55
+ #### `@mui/x-charts@8.7.0`
56
+
57
+ - [charts] Export `ChartsReferenceLineProps` (#18598) @bernardobelchior
58
+ - [charts] Extract bar and line plot logic into reusable hooks (#18541) @bernardobelchior
59
+ - [charts] Extract plot logic into separate files for reuse (#18522) @bernardobelchior
60
+ - [charts] Profile charts benchmarks using chromium (#18528) @bernardobelchior
61
+ - [l10n] Add Greek (el-GR) locale to charts (#18548) @whythecode
62
+
63
+ #### `@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')
64
+
65
+ Same changes as in `@mui/x-charts@8.7.0`, plus:
66
+
67
+ - [charts-pro] Add `useChartProApiRef` for easier refs (#18013) @JCQuintas
68
+ - [charts-pro] Add tests and classes to zoom slider (#18660) @JCQuintas
69
+ - [charts-pro] Fix geometry not handling gestures in specific scenarios (#18651) @JCQuintas
70
+ - [charts-pro] Rename `useChartApiContext` to `useChartProApiContext` (#18565) @JCQuintas
71
+ - [charts-pro] Zoom pointer improvements (#17480) @JCQuintas
72
+
73
+ ### Tree View
74
+
75
+ #### `@mui/x-tree-view@8.7.0`
76
+
77
+ Internal changes.
78
+
79
+ #### `@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')
80
+
81
+ Same changes as in `@mui/x-tree-view@8.7.0`, plus:
82
+
83
+ - [tree view pro] Add missing `dataSource` JSDoc (#18650) @LukasTy
84
+
85
+ ### Docs
86
+
87
+ - [docs] Add MCP stub (#18204) @bharatkashyap
88
+ - [docs] Fix AI Assistant proxy rewrite prefix (#18661) @arminmeh
89
+ - [docs] Improve test README.MD (#18634) @LukasTy
90
+ - [docs] Provide workaround for pie chart composition (#18600) @alexfauquette
91
+ - [docs][charts] Add donut chart as a special case of a pie chart (#18652) @bernardobelchior
92
+ - [docs][charts] Centralize country and continent data (#18604) @bernardobelchior
93
+ - [docs][data grid] Audit and revise the Pro row docs (#17926) @mapache-salvaje
94
+ - [docs][pickers] Add mention of theme augmentation in relevant migration section (#18608) @LukasTy
95
+
96
+ ### Core
97
+
98
+ - [core] Avoid stringifying `document` object (#18657) @vadimkuragkovskiy
99
+
100
+ ### Miscellaneous
101
+
102
+ - [code-infra] Bump code-infra version and fix breaking changes (#18653) @brijeshb42
103
+ - [code-infra] Ensure `material-ui/disallow-react-api-in-server-components` ESLint rule is applied (#18570) @LukasTy
104
+ - [code-infra] Migrate to flat eslint config (#18562) @brijeshb42
105
+ - [code-infra] Refactor eslint config (#18643) @LukasTy
106
+ - [infra] Add renovatebot rule for latest infra packages (#18609) @Janpot
107
+ - [infra] Move pushArgos script to code-infra (#18667) @Janpot
108
+ - [infra] Updates release script to fetch latest major version from upstream (#18552) @michelengelen
109
+ - [release] Add missing contributor to changelog (#18561) @bernardobelchior
110
+
111
+ ## 8.6.0
112
+
113
+ _Jun 27, 2025_
114
+
115
+ We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
116
+
117
+ - 📊 Add export menu to charts toolbar
118
+ - 📅 Add `usePickerAdapter` hook to access the date adapter.
119
+
120
+ You can use the adapter in your custom components if you need them to work with multiple date libraries — [Learn more](https://mui.com/x/react-date-pickers/custom-components/#access-date-adapter).
121
+ - 🌎 Improve Danish (da-DK) locale
122
+ - 🌎 Improve German (de-DE) locale
123
+
124
+ Special thanks go out to the community members for their valuable contributions:
125
+ @omalyutin, @ShahrazH, @vadimka123
126
+
127
+ The following are all team members who have contributed to this release:
128
+ @arminmeh, @bernardobelchior, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes, @sai6855
129
+
130
+ ### Data Grid
131
+
132
+ #### `@mui/x-data-grid@8.6.0`
133
+
134
+ - [DataGrid] Fix `label` type in `GridActionsCellItem` type (#18175) @sai6855
135
+ - [DataGrid] Fix grid menu not closing when pressing escape/tab (#18300) @KenanYusuf
136
+ - [l10n] Improve Danish (da-DK) locale (#18428) @ShahrazH
137
+ - [l10n] Improve German (de-DE) locale (#18388) @omalyutin
138
+
139
+ #### `@mui/x-data-grid-pro@8.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
140
+
141
+ Same changes as in `@mui/x-data-grid@8.6.0`, plus:
142
+
143
+ - [DataGridPro] Fix lazy loading params calculated from rendering context (#18460) @arminmeh
144
+
145
+ #### `@mui/x-data-grid-premium@8.6.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link "Premium plan")
146
+
147
+ Same changes as in `@mui/x-data-grid-pro@8.6.0`.
148
+
149
+ ### Date and Time Pickers
150
+
151
+ #### `@mui/x-date-pickers@8.6.0`
152
+
153
+ - [pickers] Add `usePickerAdapter` hook (#18457) @LukasTy
154
+ - [pickers] Fix to use latest `value` when updating `lastCommittedValue` in internal state (#18518) @LukasTy
155
+ - [pickers] Use `usePickerAdapter` hook internally instead of `useUtils` (#18465) @LukasTy
156
+
157
+ #### `@mui/x-date-pickers-pro@8.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
158
+
159
+ Same changes as in `@mui/x-date-pickers@8.6.0`.
160
+
161
+ ### Charts
162
+
163
+ #### `@mui/x-charts@8.6.0`
164
+
165
+ - [charts] Add `data-series` to charts legend item (#18414) @bernardobelchior
166
+ - [charts] Add `data-series` to bar charts (#18413) @bernardobelchior
167
+ - [charts] Add `data-series` to elements of line chart (#18409) @bernardobelchior
168
+ - [charts] Add `data-series` to pie charts (#18432) @bernardobelchior
169
+ - [charts] Fix missing key in bar plot (#18502) @bernardobelchior
170
+ - [charts] Split axis utils from main file (#18517) @JCQuintas
171
+ - [charts] Improve touch behavior for polar axis (#18531) @JCQuintas
172
+ - [charts] Add `isElementInside` helper (#18530) @JCQuintas
173
+
174
+ #### `@mui/x-charts-pro@8.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
175
+
176
+ Same changes as in `@mui/x-charts@8.6.0`, plus:
177
+
178
+ - [charts-pro] Add export menu to charts toolbar (#18210) @bernardobelchior
179
+ - [charts-pro] Fix export docs mentioning tooltip instead of toolbar (#18490) @bernardobelchior
180
+ - [charts-pro] Fix iframe not being removed after print export (#18500) @bernardobelchior
181
+
182
+ ### Tree View
183
+
184
+ #### `@mui/x-tree-view@8.6.0`
185
+
186
+ Internal changes.
187
+
188
+ #### `@mui/x-tree-view-pro@8.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
189
+
190
+ Same changes as in `@mui/x-tree-view@8.6.0`, plus:
191
+
192
+ - [tree view pro] Fix theme augmentation (#18437) @LukasTy
193
+
194
+ ### Codemod
195
+
196
+ #### `@mui/x-codemod@8.6.0`
197
+
198
+ Internal changes.
199
+
200
+ ### Docs
201
+
202
+ - [docs] Document `GridRenderContext` (#18492) @arminmeh
203
+ - [docs] Prevent stale rows to appear on sort and filter change in the lazy loading demo (#18461) @arminmeh
204
+ - [docs][pickers] Update action bar demo to use the `nextOrAccept` action (#18505) @LukasTy
205
+ - [docs] Update indeterminate checkbox section in migration guide (#18229) @michelengelen
206
+ - [docs] Data source nested pagination recipe (#14777) @MBilalShafi
207
+
208
+ ### Core
209
+
210
+ - [core] Avoid json stringify whole window object (#18512) @vadimka123
211
+
212
+ ### Miscellaneous
213
+
214
+ - [code-infra] Dynamically get pickers adapters dependencies versions (#18446) @JCQuintas
215
+ - [infra] Adjust inquirer version and usage (#18495) @michelengelen
216
+ - [infra] Use `String.raw` for creating the remote regex (#18462) @michelengelen
217
+
8
218
  ## 8.5.3
9
219
 
10
220
  _Jun 19, 2025_
@@ -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
  *
@@ -14,14 +14,6 @@ var _ChartDataProvider = require("../ChartDataProvider");
14
14
  var _useChartContainerProps = require("./useChartContainerProps");
15
15
  var _ChartsSurface = require("../ChartsSurface");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
- /**
18
- * The API of the chart `apiRef` object.
19
- * The chart type can be passed as the first generic parameter to narrow down the API to the specific chart type.
20
- * @example ChartApi<'bar'>
21
- * If the chart is being created using composition, the `composition` value can be used.
22
- * @example ChartApi<'composition'>
23
- */
24
-
25
17
  /**
26
18
  * It sets up the data providers as well as the `<svg>` for the chart.
27
19
  *
@@ -1 +1,8 @@
1
- export * from "./ChartContainer.js";
1
+ import type { ChartApi as ChartApiOriginal, PluginsPerSeriesType } from "../context/ChartApi.js";
2
+ import type { ChartAnyPluginSignature } from "../internals/plugins/models/plugin.js";
3
+ import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
4
+ export * from "./ChartContainer.js";
5
+ /**
6
+ * @deprecated Use `ChartApi` from `@mui/x-charts/context` instead.
7
+ */
8
+ export type ChartApi<TSeries extends keyof PluginsPerSeriesType | undefined = undefined, TSignatures extends readonly ChartAnyPluginSignature[] = (TSeries extends keyof PluginsPerSeriesType ? PluginsPerSeriesType[TSeries] : AllPluginSignatures)> = ChartApiOriginal<TSeries, TSignatures>;
@@ -88,6 +88,7 @@ const ChartsLegend = exports.ChartsLegend = (0, _consumeSlots.consumeSlots)('Mui
88
88
  children: data.items.map((item, i) => {
89
89
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
90
90
  className: classes?.item,
91
+ "data-series": item.id,
91
92
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Element, {
92
93
  className: classes?.series,
93
94
  role: onItemClick ? 'button' : undefined,
@@ -7,4 +7,4 @@ declare function ChartsReferenceLine(props: ChartsReferenceLineProps): React.JSX
7
7
  declare namespace ChartsReferenceLine {
8
8
  var propTypes: any;
9
9
  }
10
- export { ChartsReferenceLine };
10
+ export { ChartsReferenceLine, type ChartsReferenceLineProps };
@@ -10,4 +10,7 @@ export type ChartsXReferenceLineProps<TValue extends string | number | Date = st
10
10
  };
11
11
  export declare function getXReferenceLineClasses(classes?: Partial<ChartsReferenceLineClasses>): Record<"root" | "line" | "label", string>;
12
12
  declare function ChartsXReferenceLine(props: ChartsXReferenceLineProps): React.JSX.Element | null;
13
+ declare namespace ChartsXReferenceLine {
14
+ var propTypes: any;
15
+ }
13
16
  export { ChartsXReferenceLine };
@@ -10,6 +10,7 @@ exports.ChartsXReferenceLine = ChartsXReferenceLine;
10
10
  exports.getXReferenceLineClasses = getXReferenceLineClasses;
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
15
  var _warning = require("@mui/x-internals/warning");
15
16
  var _hooks = require("../hooks");
@@ -106,4 +107,50 @@ function ChartsXReferenceLine(props) {
106
107
  style: (0, _extends2.default)({}, textParams.style, labelStyle)
107
108
  }))]
108
109
  });
109
- }
110
+ }
111
+ process.env.NODE_ENV !== "production" ? ChartsXReferenceLine.propTypes = {
112
+ // ----------------------------- Warning --------------------------------
113
+ // | These PropTypes are generated from the TypeScript type definitions |
114
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
115
+ // ----------------------------------------------------------------------
116
+ /**
117
+ * The id of the axis used for the reference value.
118
+ * @default The `id` of the first defined axis.
119
+ */
120
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
121
+ /**
122
+ * Override or extend the styles applied to the component.
123
+ */
124
+ classes: _propTypes.default.object,
125
+ /**
126
+ * The label to display along the reference line.
127
+ */
128
+ label: _propTypes.default.string,
129
+ /**
130
+ * The alignment if the label is in the chart drawing area.
131
+ * @default 'middle'
132
+ */
133
+ labelAlign: _propTypes.default.oneOf(['end', 'middle', 'start']),
134
+ /**
135
+ * The style applied to the label.
136
+ */
137
+ labelStyle: _propTypes.default.object,
138
+ /**
139
+ * The style applied to the line.
140
+ */
141
+ lineStyle: _propTypes.default.object,
142
+ /**
143
+ * Additional space around the label in px.
144
+ * Can be a number or an object `{ x, y }` to distinguish space with the reference line and space with axes.
145
+ * @default 5
146
+ */
147
+ spacing: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
148
+ x: _propTypes.default.number,
149
+ y: _propTypes.default.number
150
+ })]),
151
+ /**
152
+ * The x value associated with the reference line.
153
+ * If defined the reference line will be vertical.
154
+ */
155
+ x: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired
156
+ } : void 0;
@@ -10,4 +10,7 @@ export type ChartsYReferenceLineProps<TValue extends string | number | Date = st
10
10
  };
11
11
  export declare function getYReferenceLineClasses(classes?: Partial<ChartsReferenceLineClasses>): Record<"root" | "line" | "label", string>;
12
12
  declare function ChartsYReferenceLine(props: ChartsYReferenceLineProps): React.JSX.Element | null;
13
+ declare namespace ChartsYReferenceLine {
14
+ var propTypes: any;
15
+ }
13
16
  export { ChartsYReferenceLine };
@@ -10,6 +10,7 @@ exports.ChartsYReferenceLine = ChartsYReferenceLine;
10
10
  exports.getYReferenceLineClasses = getYReferenceLineClasses;
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
15
  var _warning = require("@mui/x-internals/warning");
15
16
  var _hooks = require("../hooks");
@@ -106,4 +107,50 @@ function ChartsYReferenceLine(props) {
106
107
  style: (0, _extends2.default)({}, textParams.style, labelStyle)
107
108
  }))]
108
109
  });
109
- }
110
+ }
111
+ process.env.NODE_ENV !== "production" ? ChartsYReferenceLine.propTypes = {
112
+ // ----------------------------- Warning --------------------------------
113
+ // | These PropTypes are generated from the TypeScript type definitions |
114
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
115
+ // ----------------------------------------------------------------------
116
+ /**
117
+ * The id of the axis used for the reference value.
118
+ * @default The `id` of the first defined axis.
119
+ */
120
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
121
+ /**
122
+ * Override or extend the styles applied to the component.
123
+ */
124
+ classes: _propTypes.default.object,
125
+ /**
126
+ * The label to display along the reference line.
127
+ */
128
+ label: _propTypes.default.string,
129
+ /**
130
+ * The alignment if the label is in the chart drawing area.
131
+ * @default 'middle'
132
+ */
133
+ labelAlign: _propTypes.default.oneOf(['end', 'middle', 'start']),
134
+ /**
135
+ * The style applied to the label.
136
+ */
137
+ labelStyle: _propTypes.default.object,
138
+ /**
139
+ * The style applied to the line.
140
+ */
141
+ lineStyle: _propTypes.default.object,
142
+ /**
143
+ * Additional space around the label in px.
144
+ * Can be a number or an object `{ x, y }` to distinguish space with the reference line and space with axes.
145
+ * @default 5
146
+ */
147
+ spacing: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
148
+ x: _propTypes.default.number,
149
+ y: _propTypes.default.number
150
+ })]),
151
+ /**
152
+ * The y value associated with the reference line.
153
+ * If defined the reference line will be horizontal.
154
+ */
155
+ y: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired
156
+ } : void 0;
@@ -1,2 +1,4 @@
1
1
  export * from "./ChartsReferenceLine.js";
2
- export * from "./chartsReferenceLineClasses.js";
2
+ export * from "./chartsReferenceLineClasses.js";
3
+ export type { ChartsXReferenceLineProps } from "./ChartsXReferenceLine.js";
4
+ export type { ChartsYReferenceLineProps } from "./ChartsYReferenceLine.js";
@@ -36,7 +36,8 @@ const ChartsSurfaceStyles = (0, _styles.styled)('svg', {
36
36
  overflow: 'hidden',
37
37
  // This prevents default touch actions when using the svg on mobile devices.
38
38
  // For example, prevent page scroll & zoom.
39
- touchAction: 'none'
39
+ touchAction: 'pan-y',
40
+ userSelect: 'none'
40
41
  }));
41
42
 
42
43
  /**
@@ -16,7 +16,7 @@ var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
16
16
  var _styles = require("@mui/material/styles");
17
17
  var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
18
18
  var _NoSsr = _interopRequireDefault(require("@mui/material/NoSsr"));
19
- var _useSvgRef = require("../hooks/useSvgRef");
19
+ var _rafThrottle = require("@mui/x-internals/rafThrottle");
20
20
  var _utils = require("./utils");
21
21
  var _chartsTooltipClasses = require("./chartsTooltipClasses");
22
22
  var _useSelector = require("../internals/store/useSelector");
@@ -25,6 +25,7 @@ var _useChartInteraction = require("../internals/plugins/featurePlugins/useChart
25
25
  var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
26
26
  var _useChartPolarInteraction = require("../internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors");
27
27
  var _useAxisSystem = require("../hooks/useAxisSystem");
28
+ var _hooks = require("../hooks");
28
29
  var _jsxRuntime = require("react/jsx-runtime");
29
30
  const _excluded = ["trigger", "classes", "children"];
30
31
  const noAxis = () => false;
@@ -58,8 +59,8 @@ function ChartsTooltipContainer(inProps) {
58
59
  children
59
60
  } = props,
60
61
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
62
+ const svgRef = (0, _hooks.useSvgRef)();
61
63
  const classes = (0, _chartsTooltipClasses.useUtilityClasses)(propClasses);
62
- const svgRef = (0, _useSvgRef.useSvgRef)();
63
64
  const pointerType = (0, _utils.usePointerType)();
64
65
  const isFineMainPointer = (0, _utils.useIsFineMainPointer)();
65
66
  const popperRef = React.useRef(null);
@@ -75,19 +76,21 @@ function ChartsTooltipContainer(inProps) {
75
76
  if (element === null) {
76
77
  return () => {};
77
78
  }
79
+ const update = (0, _rafThrottle.rafThrottle)(() => popperRef.current?.update());
78
80
  const handlePointerEvent = event => {
79
81
  // eslint-disable-next-line react-compiler/react-compiler
80
82
  positionRef.current = {
81
83
  x: event.clientX,
82
84
  y: event.clientY
83
85
  };
84
- popperRef.current?.update();
86
+ update();
85
87
  };
86
88
  element.addEventListener('pointerdown', handlePointerEvent);
87
89
  element.addEventListener('pointermove', handlePointerEvent);
88
90
  return () => {
89
91
  element.removeEventListener('pointerdown', handlePointerEvent);
90
92
  element.removeEventListener('pointermove', handlePointerEvent);
93
+ update.clear();
91
94
  };
92
95
  }, [svgRef, positionRef]);
93
96
  const anchorEl = React.useMemo(() => ({
@@ -13,6 +13,6 @@ export declare const ChartsTooltipRow: import("@emotion/styled").StyledComponent
13
13
  /**
14
14
  * @ignore - internal component.
15
15
  */
16
- export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/Typography").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "className" | "children" | "sx" | "align" | "variant" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "p" | "slot" | "style" | "title" | "ref" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "sx" | "align" | "variant" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
16
+ export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/Typography").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "className" | "children" | "sx" | "align" | "variant" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "p" | "slot" | "style" | "title" | "ref" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "sx" | "align" | "variant" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
17
17
  component?: React.ElementType;
18
18
  }, {}, {}>;
@@ -12,55 +12,44 @@ exports.usePointerType = usePointerType;
12
12
  exports.utcFormatter = utcFormatter;
13
13
  var React = _interopRequireWildcard(require("react"));
14
14
  var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
15
+ var _ChartProvider = require("../context/ChartProvider");
15
16
  var _hooks = require("../hooks");
16
17
  /**
17
18
  * @deprecated We recommend using vanilla JS to let popper track mouse position.
18
19
  */
19
20
  function useMouseTracker() {
20
- const svgRef = (0, _hooks.useSvgRef)();
21
+ const {
22
+ instance
23
+ } = (0, _ChartProvider.useChartContext)();
21
24
 
22
25
  // Use a ref to avoid rerendering on every mousemove event.
23
26
  const [mousePosition, setMousePosition] = React.useState(null);
24
27
  React.useEffect(() => {
25
- const element = svgRef.current;
26
- if (element === null) {
27
- return () => {};
28
- }
29
- const controller = new AbortController();
30
- const handleOut = event => {
31
- if (event.pointerType !== 'mouse') {
28
+ const moveEndHandler = instance.addInteractionListener('moveEnd', event => {
29
+ if (!event.detail.activeGestures.pan) {
32
30
  setMousePosition(null);
33
31
  }
34
- };
35
- const handleMove = event => {
32
+ });
33
+ const gestureHandler = event => {
36
34
  setMousePosition({
37
- x: event.clientX,
38
- y: event.clientY,
39
- height: event.height,
40
- pointerType: event.pointerType
35
+ x: event.detail.centroid.x,
36
+ y: event.detail.centroid.y,
37
+ height: event.detail.srcEvent.height,
38
+ pointerType: event.detail.srcEvent.pointerType
41
39
  });
42
40
  };
43
- element.addEventListener('pointerdown', handleMove, {
44
- signal: controller.signal
45
- });
46
- element.addEventListener('pointermove', handleMove, {
47
- signal: controller.signal
48
- });
49
- element.addEventListener('pointerup', handleOut, {
50
- signal: controller.signal
51
- });
41
+ const moveHandler = instance.addInteractionListener('move', gestureHandler);
42
+ const panHandler = instance.addInteractionListener('pan', gestureHandler);
52
43
  return () => {
53
- // Calling `.abort()` removes ALL event listeners
54
- // For more info, see https://kettanaito.com/blog/dont-sleep-on-abort-controller
55
- controller.abort();
44
+ moveHandler.cleanup();
45
+ panHandler.cleanup();
46
+ moveEndHandler.cleanup();
56
47
  };
57
- }, [svgRef]);
48
+ }, [instance]);
58
49
  return mousePosition;
59
50
  }
60
51
  function usePointerType() {
61
52
  const svgRef = (0, _hooks.useSvgRef)();
62
-
63
- // Use a ref to avoid rerendering on every mousemove event.
64
53
  const [pointerType, setPointerType] = React.useState(null);
65
54
  React.useEffect(() => {
66
55
  const element = svgRef.current;