@mui/x-charts 7.15.0 → 7.17.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 (516) hide show
  1. package/BarChart/BarChart.js +26 -12
  2. package/BarChart/BarClipPath.js +1 -1
  3. package/BarChart/BarElement.js +4 -2
  4. package/BarChart/BarLabel/BarLabel.js +3 -1
  5. package/BarChart/BarLabel/BarLabelItem.js +4 -4
  6. package/BarChart/BarLabel/BarLabelPlot.js +1 -1
  7. package/BarChart/BarLabel/index.js +2 -2
  8. package/BarChart/BarPlot.js +10 -8
  9. package/BarChart/checkScaleErrors.js +2 -2
  10. package/BarChart/formatter.js +2 -2
  11. package/BarChart/index.js +4 -4
  12. package/BarChart/legend.js +4 -3
  13. package/BarChart/plugin.js +3 -3
  14. package/BarChart/useBarChartProps.js +3 -1
  15. package/CHANGELOG.md +185 -1
  16. package/ChartContainer/ChartContainer.js +11 -9
  17. package/ChartContainer/index.js +1 -1
  18. package/ChartContainer/useChartContainerProps.js +4 -2
  19. package/ChartContainer/useDefaultizeAxis.js +3 -1
  20. package/ChartsAxis/ChartsAxis.js +5 -3
  21. package/ChartsAxis/index.js +2 -2
  22. package/ChartsAxisHighlight/ChartsAxisHighlight.js +6 -4
  23. package/ChartsAxisHighlight/index.js +1 -1
  24. package/ChartsClipPath/ChartsClipPath.js +3 -1
  25. package/ChartsClipPath/index.js +1 -1
  26. package/ChartsGrid/ChartsGrid.js +20 -66
  27. package/ChartsGrid/ChartsHorizontalGrid.d.ts +14 -0
  28. package/ChartsGrid/ChartsHorizontalGrid.js +36 -0
  29. package/ChartsGrid/ChartsVerticalGrid.d.ts +14 -0
  30. package/ChartsGrid/ChartsVerticalGrid.js +36 -0
  31. package/ChartsGrid/index.js +2 -2
  32. package/ChartsGrid/styledCommonents.d.ts +2 -0
  33. package/ChartsGrid/styledCommonents.js +22 -0
  34. package/ChartsLegend/ChartsLegend.d.ts +4 -13
  35. package/ChartsLegend/ChartsLegend.js +70 -26
  36. package/ChartsLegend/ChartsLegendItem.d.ts +26 -0
  37. package/ChartsLegend/ChartsLegendItem.js +65 -0
  38. package/ChartsLegend/ContinuousColorLegend.js +9 -7
  39. package/ChartsLegend/DefaultChartsLegend.d.ts +15 -2
  40. package/ChartsLegend/DefaultChartsLegend.js +31 -5
  41. package/ChartsLegend/LegendPerItem.d.ts +10 -6
  42. package/ChartsLegend/LegendPerItem.js +22 -35
  43. package/ChartsLegend/PiecewiseColorLegend.d.ts +9 -1
  44. package/ChartsLegend/PiecewiseColorLegend.js +31 -15
  45. package/ChartsLegend/chartsLegend.types.d.ts +39 -1
  46. package/ChartsLegend/chartsLegendClasses.d.ts +2 -0
  47. package/ChartsLegend/chartsLegendClasses.js +1 -1
  48. package/ChartsLegend/index.js +6 -6
  49. package/ChartsLegend/useAxis.js +4 -2
  50. package/ChartsLegend/utils.js +4 -4
  51. package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +7 -5
  52. package/ChartsOnAxisClickHandler/index.js +1 -1
  53. package/ChartsOverlay/ChartsLoadingOverlay.js +3 -1
  54. package/ChartsOverlay/ChartsNoDataOverlay.js +3 -1
  55. package/ChartsOverlay/ChartsOverlay.js +5 -3
  56. package/ChartsOverlay/index.js +3 -3
  57. package/ChartsReferenceLine/ChartsReferenceLine.js +4 -2
  58. package/ChartsReferenceLine/ChartsXReferenceLine.js +7 -5
  59. package/ChartsReferenceLine/ChartsYReferenceLine.js +7 -5
  60. package/ChartsReferenceLine/common.js +1 -1
  61. package/ChartsReferenceLine/index.js +2 -2
  62. package/ChartsSurface/ChartsSurface.js +3 -1
  63. package/ChartsSurface/index.js +1 -1
  64. package/ChartsText/ChartsText.js +3 -1
  65. package/ChartsText/index.js +1 -1
  66. package/ChartsTooltip/ChartsAxisTooltipContent.js +6 -6
  67. package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -1
  68. package/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
  69. package/ChartsTooltip/ChartsTooltip.d.ts +2 -2
  70. package/ChartsTooltip/ChartsTooltip.js +15 -11
  71. package/ChartsTooltip/ChartsTooltipTable.js +10 -5
  72. package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +7 -5
  73. package/ChartsTooltip/DefaultChartsItemTooltipContent.js +5 -3
  74. package/ChartsTooltip/chartsTooltipClasses.d.ts +2 -0
  75. package/ChartsTooltip/chartsTooltipClasses.js +1 -1
  76. package/ChartsTooltip/index.js +7 -7
  77. package/ChartsTooltip/utils.js +1 -1
  78. package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +9 -7
  79. package/ChartsVoronoiHandler/index.js +1 -1
  80. package/ChartsXAxis/ChartsXAxis.js +20 -13
  81. package/ChartsXAxis/index.js +1 -1
  82. package/ChartsYAxis/ChartsYAxis.js +17 -10
  83. package/ChartsYAxis/index.js +1 -1
  84. package/Gauge/Gauge.js +7 -5
  85. package/Gauge/GaugeContainer.js +6 -4
  86. package/Gauge/GaugeProvider.js +3 -3
  87. package/Gauge/GaugeReferenceArc.js +3 -1
  88. package/Gauge/GaugeValueArc.js +3 -1
  89. package/Gauge/GaugeValueText.js +4 -2
  90. package/Gauge/index.js +7 -7
  91. package/LineChart/AnimatedArea.js +33 -14
  92. package/LineChart/AnimatedLine.js +34 -15
  93. package/LineChart/AreaElement.js +5 -3
  94. package/LineChart/AreaPlot.js +85 -78
  95. package/LineChart/CircleMarkElement.d.ts +34 -0
  96. package/LineChart/CircleMarkElement.js +107 -0
  97. package/LineChart/LineChart.d.ts +4 -0
  98. package/LineChart/LineChart.js +33 -15
  99. package/LineChart/LineElement.js +5 -3
  100. package/LineChart/LineHighlightElement.js +2 -0
  101. package/LineChart/LineHighlightPlot.js +10 -8
  102. package/LineChart/LinePlot.js +67 -60
  103. package/LineChart/MarkElement.d.ts +1 -19
  104. package/LineChart/MarkElement.js +7 -23
  105. package/LineChart/MarkPlot.d.ts +6 -0
  106. package/LineChart/MarkPlot.js +22 -12
  107. package/LineChart/formatter.js +2 -2
  108. package/LineChart/index.d.ts +2 -0
  109. package/LineChart/index.js +12 -11
  110. package/LineChart/legend.js +4 -3
  111. package/LineChart/markElementClasses.d.ts +20 -0
  112. package/LineChart/markElementClasses.js +19 -0
  113. package/LineChart/plugin.js +3 -3
  114. package/LineChart/useLineChartProps.js +8 -4
  115. package/PieChart/PieArc.js +3 -1
  116. package/PieChart/PieArcLabel.js +2 -0
  117. package/PieChart/PieArcLabelPlot.js +6 -4
  118. package/PieChart/PieArcPlot.js +6 -4
  119. package/PieChart/PieChart.js +22 -8
  120. package/PieChart/PiePlot.js +8 -6
  121. package/PieChart/dataTransform/useTransformData.js +3 -1
  122. package/PieChart/formatter.js +1 -1
  123. package/PieChart/getPieCoordinates.js +1 -1
  124. package/PieChart/index.js +7 -7
  125. package/PieChart/legend.js +4 -2
  126. package/PieChart/plugin.js +2 -2
  127. package/ResponsiveChartContainer/ResponsiveChartContainer.js +5 -3
  128. package/ResponsiveChartContainer/index.js +1 -1
  129. package/ResponsiveChartContainer/useChartContainerDimensions.js +3 -1
  130. package/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -1
  131. package/ScatterChart/Scatter.js +7 -5
  132. package/ScatterChart/ScatterChart.js +26 -12
  133. package/ScatterChart/ScatterPlot.js +7 -5
  134. package/ScatterChart/formatter.js +1 -1
  135. package/ScatterChart/index.js +3 -3
  136. package/ScatterChart/legend.js +4 -3
  137. package/ScatterChart/plugin.js +3 -3
  138. package/ScatterChart/useScatterChartProps.js +2 -0
  139. package/SparkLineChart/SparkLineChart.js +8 -6
  140. package/SparkLineChart/index.js +1 -1
  141. package/colorPalettes/index.js +1 -1
  142. package/context/CartesianProvider/CartesianProvider.js +8 -6
  143. package/context/CartesianProvider/computeValue.js +6 -6
  144. package/context/CartesianProvider/defaultizeAxis.js +1 -1
  145. package/context/CartesianProvider/index.js +5 -5
  146. package/context/CartesianProvider/useCartesianContext.js +3 -1
  147. package/context/DrawingProvider.js +3 -1
  148. package/context/HighlightedProvider/HighlightedProvider.js +6 -4
  149. package/context/HighlightedProvider/index.js +4 -4
  150. package/context/HighlightedProvider/useHighlighted.js +3 -1
  151. package/context/HighlightedProvider/useItemHighlighted.js +3 -1
  152. package/context/InteractionProvider.js +2 -0
  153. package/context/PluginProvider/PluginProvider.js +4 -2
  154. package/context/PluginProvider/index.js +10 -10
  155. package/context/PluginProvider/mergePlugins.js +4 -4
  156. package/context/PluginProvider/useColorProcessor.js +3 -1
  157. package/context/PluginProvider/useSeriesFormatter.js +3 -1
  158. package/context/PluginProvider/useXExtremumGetter.js +1 -1
  159. package/context/PluginProvider/useYExtremumGetter.js +1 -1
  160. package/context/SeriesProvider/SeriesProvider.js +6 -4
  161. package/context/SeriesProvider/index.js +4 -4
  162. package/context/SeriesProvider/processSeries.js +1 -1
  163. package/context/ZAxisContextProvider.js +3 -1
  164. package/context/index.js +2 -2
  165. package/hooks/index.js +7 -7
  166. package/hooks/useAxis.js +3 -1
  167. package/hooks/useAxisEvents.js +8 -6
  168. package/hooks/useChartDimensions.js +3 -1
  169. package/hooks/useChartId.js +3 -1
  170. package/hooks/useColorScale.js +4 -2
  171. package/hooks/useDrawingArea.js +3 -1
  172. package/hooks/useInteractionItemProps.js +4 -2
  173. package/hooks/useMounted.js +2 -0
  174. package/hooks/useReducedMotion.js +15 -12
  175. package/hooks/useScale.js +4 -2
  176. package/hooks/useSeries.js +3 -1
  177. package/hooks/useSvgRef.js +3 -1
  178. package/hooks/useTicks.js +4 -2
  179. package/index.js +27 -27
  180. package/internals/components/AxisSharedComponents.js +1 -1
  181. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +5 -5
  182. package/internals/components/ChartsAxesGradients/index.js +1 -1
  183. package/internals/getWordsByLines.js +1 -1
  184. package/internals/index.js +31 -31
  185. package/internals/isCartesian.js +1 -1
  186. package/internals/useStringInterpolator.d.ts +1 -0
  187. package/{modern/internals/useAnimatedPath.js → internals/useStringInterpolator.js} +2 -15
  188. package/models/index.d.ts +1 -0
  189. package/models/index.js +5 -3
  190. package/models/seriesType/index.js +4 -4
  191. package/modern/BarChart/BarChart.js +26 -12
  192. package/modern/BarChart/BarClipPath.js +1 -1
  193. package/modern/BarChart/BarElement.js +4 -2
  194. package/modern/BarChart/BarLabel/BarLabel.js +3 -1
  195. package/modern/BarChart/BarLabel/BarLabelItem.js +4 -4
  196. package/modern/BarChart/BarLabel/BarLabelPlot.js +1 -1
  197. package/modern/BarChart/BarLabel/index.js +2 -2
  198. package/modern/BarChart/BarPlot.js +10 -8
  199. package/modern/BarChart/checkScaleErrors.js +2 -2
  200. package/modern/BarChart/formatter.js +2 -2
  201. package/modern/BarChart/index.js +4 -4
  202. package/modern/BarChart/legend.js +4 -3
  203. package/modern/BarChart/plugin.js +3 -3
  204. package/modern/BarChart/useBarChartProps.js +3 -1
  205. package/modern/ChartContainer/ChartContainer.js +11 -9
  206. package/modern/ChartContainer/index.js +1 -1
  207. package/modern/ChartContainer/useChartContainerProps.js +4 -2
  208. package/modern/ChartContainer/useDefaultizeAxis.js +3 -1
  209. package/modern/ChartsAxis/ChartsAxis.js +5 -3
  210. package/modern/ChartsAxis/index.js +2 -2
  211. package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +6 -4
  212. package/modern/ChartsAxisHighlight/index.js +1 -1
  213. package/modern/ChartsClipPath/ChartsClipPath.js +3 -1
  214. package/modern/ChartsClipPath/index.js +1 -1
  215. package/modern/ChartsGrid/ChartsGrid.js +20 -66
  216. package/modern/ChartsGrid/ChartsHorizontalGrid.js +36 -0
  217. package/modern/ChartsGrid/ChartsVerticalGrid.js +36 -0
  218. package/modern/ChartsGrid/index.js +2 -2
  219. package/modern/ChartsGrid/styledCommonents.js +22 -0
  220. package/modern/ChartsLegend/ChartsLegend.js +70 -26
  221. package/modern/ChartsLegend/ChartsLegendItem.js +65 -0
  222. package/modern/ChartsLegend/ContinuousColorLegend.js +9 -7
  223. package/modern/ChartsLegend/DefaultChartsLegend.js +31 -5
  224. package/modern/ChartsLegend/LegendPerItem.js +22 -35
  225. package/modern/ChartsLegend/PiecewiseColorLegend.js +31 -15
  226. package/modern/ChartsLegend/chartsLegendClasses.js +1 -1
  227. package/modern/ChartsLegend/index.js +6 -6
  228. package/modern/ChartsLegend/useAxis.js +4 -2
  229. package/modern/ChartsLegend/utils.js +4 -4
  230. package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +7 -5
  231. package/modern/ChartsOnAxisClickHandler/index.js +1 -1
  232. package/modern/ChartsOverlay/ChartsLoadingOverlay.js +3 -1
  233. package/modern/ChartsOverlay/ChartsNoDataOverlay.js +3 -1
  234. package/modern/ChartsOverlay/ChartsOverlay.js +5 -3
  235. package/modern/ChartsOverlay/index.js +3 -3
  236. package/modern/ChartsReferenceLine/ChartsReferenceLine.js +4 -2
  237. package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +7 -5
  238. package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +7 -5
  239. package/modern/ChartsReferenceLine/common.js +1 -1
  240. package/modern/ChartsReferenceLine/index.js +2 -2
  241. package/modern/ChartsSurface/ChartsSurface.js +3 -1
  242. package/modern/ChartsSurface/index.js +1 -1
  243. package/modern/ChartsText/ChartsText.js +3 -1
  244. package/modern/ChartsText/index.js +1 -1
  245. package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +6 -6
  246. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
  247. package/modern/ChartsTooltip/ChartsTooltip.js +15 -11
  248. package/modern/ChartsTooltip/ChartsTooltipTable.js +10 -5
  249. package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +7 -5
  250. package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +5 -3
  251. package/modern/ChartsTooltip/chartsTooltipClasses.js +1 -1
  252. package/modern/ChartsTooltip/index.js +7 -7
  253. package/modern/ChartsTooltip/utils.js +1 -1
  254. package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +9 -7
  255. package/modern/ChartsVoronoiHandler/index.js +1 -1
  256. package/modern/ChartsXAxis/ChartsXAxis.js +20 -13
  257. package/modern/ChartsXAxis/index.js +1 -1
  258. package/modern/ChartsYAxis/ChartsYAxis.js +17 -10
  259. package/modern/ChartsYAxis/index.js +1 -1
  260. package/modern/Gauge/Gauge.js +7 -5
  261. package/modern/Gauge/GaugeContainer.js +6 -4
  262. package/modern/Gauge/GaugeProvider.js +3 -3
  263. package/modern/Gauge/GaugeReferenceArc.js +3 -1
  264. package/modern/Gauge/GaugeValueArc.js +3 -1
  265. package/modern/Gauge/GaugeValueText.js +4 -2
  266. package/modern/Gauge/index.js +7 -7
  267. package/modern/LineChart/AnimatedArea.js +33 -14
  268. package/modern/LineChart/AnimatedLine.js +34 -15
  269. package/modern/LineChart/AreaElement.js +5 -3
  270. package/modern/LineChart/AreaPlot.js +85 -78
  271. package/modern/LineChart/CircleMarkElement.js +107 -0
  272. package/modern/LineChart/LineChart.js +33 -15
  273. package/modern/LineChart/LineElement.js +5 -3
  274. package/modern/LineChart/LineHighlightElement.js +2 -0
  275. package/modern/LineChart/LineHighlightPlot.js +10 -8
  276. package/modern/LineChart/LinePlot.js +67 -60
  277. package/modern/LineChart/MarkElement.js +7 -23
  278. package/modern/LineChart/MarkPlot.js +22 -12
  279. package/modern/LineChart/formatter.js +2 -2
  280. package/modern/LineChart/index.js +12 -11
  281. package/modern/LineChart/legend.js +4 -3
  282. package/modern/LineChart/markElementClasses.js +19 -0
  283. package/modern/LineChart/plugin.js +3 -3
  284. package/modern/LineChart/useLineChartProps.js +8 -4
  285. package/modern/PieChart/PieArc.js +3 -1
  286. package/modern/PieChart/PieArcLabel.js +2 -0
  287. package/modern/PieChart/PieArcLabelPlot.js +6 -4
  288. package/modern/PieChart/PieArcPlot.js +6 -4
  289. package/modern/PieChart/PieChart.js +22 -8
  290. package/modern/PieChart/PiePlot.js +8 -6
  291. package/modern/PieChart/dataTransform/useTransformData.js +3 -1
  292. package/modern/PieChart/formatter.js +1 -1
  293. package/modern/PieChart/getPieCoordinates.js +1 -1
  294. package/modern/PieChart/index.js +7 -7
  295. package/modern/PieChart/legend.js +4 -2
  296. package/modern/PieChart/plugin.js +2 -2
  297. package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +5 -3
  298. package/modern/ResponsiveChartContainer/index.js +1 -1
  299. package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +3 -1
  300. package/modern/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -1
  301. package/modern/ScatterChart/Scatter.js +7 -5
  302. package/modern/ScatterChart/ScatterChart.js +26 -12
  303. package/modern/ScatterChart/ScatterPlot.js +7 -5
  304. package/modern/ScatterChart/formatter.js +1 -1
  305. package/modern/ScatterChart/index.js +3 -3
  306. package/modern/ScatterChart/legend.js +4 -3
  307. package/modern/ScatterChart/plugin.js +3 -3
  308. package/modern/ScatterChart/useScatterChartProps.js +2 -0
  309. package/modern/SparkLineChart/SparkLineChart.js +8 -6
  310. package/modern/SparkLineChart/index.js +1 -1
  311. package/modern/colorPalettes/index.js +1 -1
  312. package/modern/context/CartesianProvider/CartesianProvider.js +8 -6
  313. package/modern/context/CartesianProvider/computeValue.js +6 -6
  314. package/modern/context/CartesianProvider/defaultizeAxis.js +1 -1
  315. package/modern/context/CartesianProvider/index.js +5 -5
  316. package/modern/context/CartesianProvider/useCartesianContext.js +3 -1
  317. package/modern/context/DrawingProvider.js +3 -1
  318. package/modern/context/HighlightedProvider/HighlightedProvider.js +6 -4
  319. package/modern/context/HighlightedProvider/index.js +4 -4
  320. package/modern/context/HighlightedProvider/useHighlighted.js +3 -1
  321. package/modern/context/HighlightedProvider/useItemHighlighted.js +3 -1
  322. package/modern/context/InteractionProvider.js +2 -0
  323. package/modern/context/PluginProvider/PluginProvider.js +4 -2
  324. package/modern/context/PluginProvider/index.js +10 -10
  325. package/modern/context/PluginProvider/mergePlugins.js +4 -4
  326. package/modern/context/PluginProvider/useColorProcessor.js +3 -1
  327. package/modern/context/PluginProvider/useSeriesFormatter.js +3 -1
  328. package/modern/context/PluginProvider/useXExtremumGetter.js +1 -1
  329. package/modern/context/PluginProvider/useYExtremumGetter.js +1 -1
  330. package/modern/context/SeriesProvider/SeriesProvider.js +6 -4
  331. package/modern/context/SeriesProvider/index.js +4 -4
  332. package/modern/context/SeriesProvider/processSeries.js +1 -1
  333. package/modern/context/ZAxisContextProvider.js +3 -1
  334. package/modern/context/index.js +2 -2
  335. package/modern/hooks/index.js +7 -7
  336. package/modern/hooks/useAxis.js +3 -1
  337. package/modern/hooks/useAxisEvents.js +8 -6
  338. package/modern/hooks/useChartDimensions.js +3 -1
  339. package/modern/hooks/useChartId.js +3 -1
  340. package/modern/hooks/useColorScale.js +4 -2
  341. package/modern/hooks/useDrawingArea.js +3 -1
  342. package/modern/hooks/useInteractionItemProps.js +4 -2
  343. package/modern/hooks/useMounted.js +2 -0
  344. package/modern/hooks/useReducedMotion.js +15 -12
  345. package/modern/hooks/useScale.js +4 -2
  346. package/modern/hooks/useSeries.js +3 -1
  347. package/modern/hooks/useSvgRef.js +3 -1
  348. package/modern/hooks/useTicks.js +4 -2
  349. package/modern/index.js +27 -27
  350. package/modern/internals/components/AxisSharedComponents.js +1 -1
  351. package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +5 -5
  352. package/modern/internals/components/ChartsAxesGradients/index.js +1 -1
  353. package/modern/internals/getWordsByLines.js +1 -1
  354. package/modern/internals/index.js +31 -31
  355. package/modern/internals/isCartesian.js +1 -1
  356. package/{internals/useAnimatedPath.js → modern/internals/useStringInterpolator.js} +2 -15
  357. package/modern/models/index.js +5 -3
  358. package/modern/models/seriesType/index.js +4 -4
  359. package/modern/themeAugmentation/index.js +0 -3
  360. package/node/BarChart/BarChart.js +16 -4
  361. package/node/BarChart/BarClipPath.js +2 -3
  362. package/node/BarChart/BarElement.js +3 -3
  363. package/node/BarChart/BarLabel/BarLabel.js +3 -3
  364. package/node/BarChart/BarLabel/BarLabelItem.js +2 -3
  365. package/node/BarChart/BarLabel/BarLabelPlot.js +2 -3
  366. package/node/BarChart/BarLabel/barLabelClasses.js +1 -1
  367. package/node/BarChart/BarPlot.js +3 -3
  368. package/node/BarChart/formatter.js +1 -1
  369. package/node/BarChart/legend.js +3 -2
  370. package/node/BarChart/plugin.js +1 -1
  371. package/node/BarChart/useBarChartProps.js +2 -1
  372. package/node/ChartContainer/ChartContainer.js +3 -3
  373. package/node/ChartContainer/useChartContainerProps.js +3 -3
  374. package/node/ChartContainer/useDefaultizeAxis.js +3 -3
  375. package/node/ChartsAxis/ChartsAxis.js +3 -3
  376. package/node/ChartsAxisHighlight/ChartsAxisHighlight.js +3 -3
  377. package/node/ChartsClipPath/ChartsClipPath.js +3 -3
  378. package/node/ChartsGrid/ChartsGrid.js +18 -66
  379. package/node/ChartsGrid/ChartsHorizontalGrid.js +43 -0
  380. package/node/ChartsGrid/ChartsVerticalGrid.js +43 -0
  381. package/node/ChartsGrid/chartsGridClasses.js +1 -1
  382. package/node/ChartsGrid/styledCommonents.js +28 -0
  383. package/node/ChartsLegend/ChartsLegend.js +66 -24
  384. package/node/ChartsLegend/ChartsLegendItem.js +72 -0
  385. package/node/ChartsLegend/ContinuousColorLegend.js +3 -3
  386. package/node/ChartsLegend/DefaultChartsLegend.js +31 -7
  387. package/node/ChartsLegend/LegendPerItem.js +20 -35
  388. package/node/ChartsLegend/PiecewiseColorLegend.js +29 -15
  389. package/node/ChartsLegend/chartsLegendClasses.js +1 -1
  390. package/node/ChartsLegend/legendItemsPlacement.js +1 -1
  391. package/node/ChartsLegend/useAxis.js +2 -2
  392. package/node/ChartsLegend/utils.js +1 -1
  393. package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +4 -4
  394. package/node/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
  395. package/node/ChartsOverlay/ChartsNoDataOverlay.js +3 -3
  396. package/node/ChartsOverlay/ChartsOverlay.js +3 -3
  397. package/node/ChartsReferenceLine/ChartsReferenceLine.js +3 -3
  398. package/node/ChartsReferenceLine/ChartsXReferenceLine.js +4 -4
  399. package/node/ChartsReferenceLine/ChartsYReferenceLine.js +4 -4
  400. package/node/ChartsReferenceLine/chartsReferenceLineClasses.js +1 -1
  401. package/node/ChartsReferenceLine/common.js +1 -1
  402. package/node/ChartsSurface/ChartsSurface.js +3 -3
  403. package/node/ChartsText/ChartsText.js +3 -3
  404. package/node/ChartsTooltip/ChartsAxisTooltipContent.js +2 -3
  405. package/node/ChartsTooltip/ChartsItemTooltipContent.js +2 -3
  406. package/node/ChartsTooltip/ChartsTooltip.js +11 -9
  407. package/node/ChartsTooltip/ChartsTooltipTable.js +9 -4
  408. package/node/ChartsTooltip/DefaultChartsAxisTooltipContent.js +4 -4
  409. package/node/ChartsTooltip/DefaultChartsItemTooltipContent.js +4 -4
  410. package/node/ChartsTooltip/chartsTooltipClasses.js +1 -1
  411. package/node/ChartsTooltip/utils.js +2 -3
  412. package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +3 -3
  413. package/node/ChartsXAxis/ChartsXAxis.js +9 -4
  414. package/node/ChartsYAxis/ChartsYAxis.js +9 -4
  415. package/node/Gauge/Gauge.js +3 -3
  416. package/node/Gauge/GaugeContainer.js +3 -3
  417. package/node/Gauge/GaugeProvider.js +1 -2
  418. package/node/Gauge/GaugeReferenceArc.js +3 -3
  419. package/node/Gauge/GaugeValueArc.js +3 -3
  420. package/node/Gauge/GaugeValueText.js +3 -3
  421. package/node/Gauge/gaugeClasses.js +1 -1
  422. package/node/LineChart/AnimatedArea.js +31 -14
  423. package/node/LineChart/AnimatedLine.js +31 -14
  424. package/node/LineChart/AreaElement.js +3 -3
  425. package/node/LineChart/AreaPlot.js +79 -74
  426. package/node/LineChart/CircleMarkElement.js +113 -0
  427. package/node/LineChart/LineChart.js +20 -4
  428. package/node/LineChart/LineElement.js +3 -3
  429. package/node/LineChart/LineHighlightElement.js +3 -3
  430. package/node/LineChart/LineHighlightPlot.js +3 -3
  431. package/node/LineChart/LinePlot.js +61 -56
  432. package/node/LineChart/MarkElement.js +5 -25
  433. package/node/LineChart/MarkPlot.js +14 -6
  434. package/node/LineChart/formatter.js +1 -1
  435. package/node/LineChart/index.js +29 -1
  436. package/node/LineChart/legend.js +3 -2
  437. package/node/LineChart/markElementClasses.js +28 -0
  438. package/node/LineChart/plugin.js +1 -1
  439. package/node/LineChart/useLineChartProps.js +7 -4
  440. package/node/PieChart/PieArc.js +3 -3
  441. package/node/PieChart/PieArcLabel.js +3 -3
  442. package/node/PieChart/PieArcLabelPlot.js +3 -3
  443. package/node/PieChart/PieArcPlot.js +3 -3
  444. package/node/PieChart/PieChart.js +15 -3
  445. package/node/PieChart/PiePlot.js +3 -3
  446. package/node/PieChart/dataTransform/useTransformData.js +3 -3
  447. package/node/PieChart/formatter.js +1 -1
  448. package/node/PieChart/legend.js +3 -1
  449. package/node/PieChart/plugin.js +1 -1
  450. package/node/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -3
  451. package/node/ResponsiveChartContainer/useChartContainerDimensions.js +4 -4
  452. package/node/ResponsiveChartContainer/useResponsiveChartContainerProps.js +2 -1
  453. package/node/ScatterChart/Scatter.js +3 -3
  454. package/node/ScatterChart/ScatterChart.js +16 -4
  455. package/node/ScatterChart/ScatterPlot.js +3 -3
  456. package/node/ScatterChart/legend.js +3 -2
  457. package/node/ScatterChart/plugin.js +1 -1
  458. package/node/ScatterChart/useScatterChartProps.js +2 -1
  459. package/node/SparkLineChart/SparkLineChart.js +3 -3
  460. package/node/context/CartesianProvider/CartesianContext.js +1 -2
  461. package/node/context/CartesianProvider/CartesianProvider.js +2 -2
  462. package/node/context/CartesianProvider/computeValue.js +1 -1
  463. package/node/context/CartesianProvider/defaultizeAxis.js +1 -1
  464. package/node/context/CartesianProvider/useCartesianContext.js +2 -2
  465. package/node/context/DrawingProvider.js +3 -3
  466. package/node/context/HighlightedProvider/HighlightedContext.js +1 -2
  467. package/node/context/HighlightedProvider/HighlightedProvider.js +3 -3
  468. package/node/context/HighlightedProvider/useHighlighted.js +2 -2
  469. package/node/context/HighlightedProvider/useItemHighlighted.js +1 -0
  470. package/node/context/InteractionProvider.js +3 -3
  471. package/node/context/PluginProvider/PluginContext.js +1 -2
  472. package/node/context/PluginProvider/PluginProvider.js +2 -2
  473. package/node/context/PluginProvider/useColorProcessor.js +2 -2
  474. package/node/context/PluginProvider/useSeriesFormatter.js +2 -2
  475. package/node/context/PluginProvider/useXExtremumGetter.js +1 -2
  476. package/node/context/PluginProvider/useYExtremumGetter.js +1 -2
  477. package/node/context/SeriesProvider/SeriesContext.js +1 -2
  478. package/node/context/SeriesProvider/SeriesProvider.js +2 -2
  479. package/node/context/SeriesProvider/processSeries.js +1 -1
  480. package/node/context/ZAxisContextProvider.js +3 -3
  481. package/node/hooks/useAxis.js +1 -0
  482. package/node/hooks/useAxisEvents.js +2 -2
  483. package/node/hooks/useChartDimensions.js +3 -3
  484. package/node/hooks/useChartId.js +2 -2
  485. package/node/hooks/useColorScale.js +2 -2
  486. package/node/hooks/useDrawingArea.js +2 -2
  487. package/node/hooks/useInteractionItemProps.js +2 -2
  488. package/node/hooks/useMounted.js +3 -3
  489. package/node/hooks/useReducedMotion.js +15 -12
  490. package/node/hooks/useScale.js +1 -0
  491. package/node/hooks/useSeries.js +2 -2
  492. package/node/hooks/useSvgRef.js +2 -2
  493. package/node/hooks/useTicks.js +2 -2
  494. package/node/index.js +1 -1
  495. package/node/internals/components/AxisSharedComponents.js +1 -1
  496. package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +2 -3
  497. package/node/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +1 -2
  498. package/node/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +1 -2
  499. package/node/internals/defaultizeColor.js +1 -1
  500. package/node/internals/defaultizeValueFormatter.js +1 -1
  501. package/node/internals/domUtils.js +1 -1
  502. package/node/internals/getWordsByLines.js +1 -1
  503. package/node/internals/useStringInterpolator.js +28 -0
  504. package/node/tests/firePointerEvent.js +1 -1
  505. package/node/themeAugmentation/index.js +1 -38
  506. package/package.json +4 -3
  507. package/themeAugmentation/components.d.ts +2 -0
  508. package/themeAugmentation/index.d.ts +3 -3
  509. package/themeAugmentation/index.js +0 -3
  510. package/themeAugmentation/overrides.d.ts +6 -4
  511. package/internals/useAnimatedPath.d.ts +0 -1
  512. package/internals/warning.d.ts +0 -2
  513. package/internals/warning.js +0 -21
  514. package/modern/internals/warning.js +0 -21
  515. package/node/internals/useAnimatedPath.js +0 -42
  516. package/node/internals/warning.js +0 -28
@@ -40,7 +40,7 @@ export interface ChartsTooltipProps<T extends ChartSeriesType> {
40
40
  * - 'item': Shows data about the item below the mouse.
41
41
  * - 'axis': Shows values associated with the hovered x value
42
42
  * - 'none': Does not display tooltip
43
- * @default 'item'
43
+ * @default 'axis'
44
44
  */
45
45
  trigger?: TriggerOptions;
46
46
  /**
@@ -77,7 +77,7 @@ export interface ChartsTooltipProps<T extends ChartSeriesType> {
77
77
  *
78
78
  * - [ChartsTooltip API](https://mui.com/x/api/charts/charts-tool-tip/)
79
79
  */
80
- declare function ChartsTooltip<T extends ChartSeriesType>(props: ChartsTooltipProps<T>): React.JSX.Element | null;
80
+ declare function ChartsTooltip<T extends ChartSeriesType>(inProps: ChartsTooltipProps<T>): React.JSX.Element | null;
81
81
  declare namespace ChartsTooltip {
82
82
  var propTypes: any;
83
83
  }
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
@@ -6,11 +8,11 @@ import { styled, useThemeProps } from '@mui/material/styles';
6
8
  import Popper from '@mui/material/Popper';
7
9
  import NoSsr from '@mui/material/NoSsr';
8
10
  import useSlotProps from '@mui/utils/useSlotProps';
9
- import { InteractionContext } from '../context/InteractionProvider';
10
- import { generateVirtualElement, useMouseTracker, getTooltipHasData } from './utils';
11
- import { ChartsItemTooltipContent } from './ChartsItemTooltipContent';
12
- import { ChartsAxisTooltipContent } from './ChartsAxisTooltipContent';
13
- import { getChartsTooltipUtilityClass } from './chartsTooltipClasses';
11
+ import { InteractionContext } from "../context/InteractionProvider.js";
12
+ import { generateVirtualElement, useMouseTracker, getTooltipHasData } from "./utils.js";
13
+ import { ChartsItemTooltipContent } from "./ChartsItemTooltipContent.js";
14
+ import { ChartsAxisTooltipContent } from "./ChartsAxisTooltipContent.js";
15
+ import { getChartsTooltipUtilityClass } from "./chartsTooltipClasses.js";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
15
17
  const useUtilityClasses = ownerState => {
16
18
  const {
@@ -18,6 +20,7 @@ const useUtilityClasses = ownerState => {
18
20
  } = ownerState;
19
21
  const slots = {
20
22
  root: ['root'],
23
+ paper: ['paper'],
21
24
  table: ['table'],
22
25
  row: ['row'],
23
26
  cell: ['cell'],
@@ -48,9 +51,9 @@ const ChartsTooltipRoot = styled(Popper, {
48
51
  *
49
52
  * - [ChartsTooltip API](https://mui.com/x/api/charts/charts-tool-tip/)
50
53
  */
51
- function ChartsTooltip(props) {
52
- const themeProps = useThemeProps({
53
- props,
54
+ function ChartsTooltip(inProps) {
55
+ const props = useThemeProps({
56
+ props: inProps,
54
57
  name: 'MuiChartsTooltip'
55
58
  });
56
59
  const {
@@ -59,7 +62,7 @@ function ChartsTooltip(props) {
59
62
  axisContent,
60
63
  slots,
61
64
  slotProps
62
- } = themeProps;
65
+ } = props;
63
66
  const mousePosition = useMouseTracker();
64
67
  const {
65
68
  item,
@@ -69,7 +72,7 @@ function ChartsTooltip(props) {
69
72
  const tooltipHasData = getTooltipHasData(trigger, displayedData);
70
73
  const popperOpen = mousePosition !== null && tooltipHasData;
71
74
  const classes = useUtilityClasses({
72
- classes: themeProps.classes
75
+ classes: props.classes
73
76
  });
74
77
  const PopperComponent = slots?.popper ?? ChartsTooltipRoot;
75
78
  const popperProps = useSlotProps({
@@ -93,6 +96,7 @@ function ChartsTooltip(props) {
93
96
  }
94
97
  return /*#__PURE__*/_jsx(NoSsr, {
95
98
  children: popperOpen && /*#__PURE__*/_jsx(PopperComponent, _extends({}, popperProps, {
99
+ className: classes.root,
96
100
  children: trigger === 'item' ? /*#__PURE__*/_jsx(ChartsItemTooltipContent, {
97
101
  itemData: displayedData,
98
102
  content: slots?.itemContent ?? itemContent,
@@ -147,7 +151,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
147
151
  * - 'item': Shows data about the item below the mouse.
148
152
  * - 'axis': Shows values associated with the hovered x value
149
153
  * - 'none': Does not display tooltip
150
- * @default 'item'
154
+ * @default 'axis'
151
155
  */
152
156
  trigger: PropTypes.oneOf(['axis', 'item', 'none'])
153
157
  } : void 0;
@@ -1,13 +1,14 @@
1
1
  import { styled } from '@mui/material/styles';
2
2
  import { shouldForwardProp } from '@mui/system';
3
- import { chartsTooltipClasses } from './chartsTooltipClasses';
3
+ import { chartsTooltipClasses } from "./chartsTooltipClasses.js";
4
4
 
5
5
  /**
6
6
  * @ignore - internal component.
7
7
  */
8
8
  export const ChartsTooltipPaper = styled('div', {
9
9
  name: 'MuiChartsTooltip',
10
- slot: 'Container'
10
+ slot: 'Container',
11
+ overridesResolver: (props, styles) => styles.paper
11
12
  })(({
12
13
  theme
13
14
  }) => ({
@@ -23,7 +24,8 @@ export const ChartsTooltipPaper = styled('div', {
23
24
  */
24
25
  export const ChartsTooltipTable = styled('table', {
25
26
  name: 'MuiChartsTooltip',
26
- slot: 'Table'
27
+ slot: 'Table',
28
+ overridesResolver: (props, styles) => styles.table
27
29
  })(({
28
30
  theme
29
31
  }) => ({
@@ -38,7 +40,8 @@ export const ChartsTooltipTable = styled('table', {
38
40
  */
39
41
  export const ChartsTooltipRow = styled('tr', {
40
42
  name: 'MuiChartsTooltip',
41
- slot: 'Row'
43
+ slot: 'Row',
44
+ overridesResolver: (props, styles) => styles.row
42
45
  })(({
43
46
  theme
44
47
  }) => ({
@@ -55,7 +58,8 @@ export const ChartsTooltipRow = styled('tr', {
55
58
  */
56
59
  export const ChartsTooltipCell = styled('td', {
57
60
  name: 'MuiChartsTooltip',
58
- slot: 'Cell'
61
+ slot: 'Cell',
62
+ overridesResolver: (props, styles) => styles.cell
59
63
  })(({
60
64
  theme
61
65
  }) => ({
@@ -82,6 +86,7 @@ export const ChartsTooltipCell = styled('td', {
82
86
  export const ChartsTooltipMark = styled('div', {
83
87
  name: 'MuiChartsTooltip',
84
88
  slot: 'Mark',
89
+ overridesResolver: (props, styles) => styles.mark,
85
90
  shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'color'
86
91
  })(({
87
92
  theme,
@@ -1,11 +1,13 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import PropTypes from 'prop-types';
3
5
  import clsx from 'clsx';
4
6
  import Typography from '@mui/material/Typography';
5
- import { ChartsTooltipCell, ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipMark, ChartsTooltipRow } from './ChartsTooltipTable';
6
- import { utcFormatter } from './utils';
7
- import { getLabel } from '../internals/getLabel';
8
- import { isCartesianSeries } from '../internals/isCartesian';
7
+ import { ChartsTooltipCell, ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipMark, ChartsTooltipRow } from "./ChartsTooltipTable.js";
8
+ import { utcFormatter } from "./utils.js";
9
+ import { getLabel } from "../internals/getLabel.js";
10
+ import { isCartesianSeries } from "../internals/isCartesian.js";
9
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
12
  function DefaultChartsAxisTooltipContent(props) {
11
13
  const {
@@ -22,7 +24,7 @@ function DefaultChartsAxisTooltipContent(props) {
22
24
  const axisFormatter = axis.valueFormatter ?? (v => axis.scaleType === 'utc' ? utcFormatter(v) : v.toLocaleString());
23
25
  return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
24
26
  sx: sx,
25
- className: classes.root,
27
+ className: classes.paper,
26
28
  children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
27
29
  className: classes.table,
28
30
  children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx("thead", {
@@ -1,9 +1,11 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
4
6
  import clsx from 'clsx';
5
- import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltipPaper, ChartsTooltipRow } from './ChartsTooltipTable';
6
- import { getLabel } from '../internals/getLabel';
7
+ import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltipPaper, ChartsTooltipRow } from "./ChartsTooltipTable.js";
8
+ import { getLabel } from "../internals/getLabel.js";
7
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
10
  function DefaultChartsItemTooltipContent(props) {
9
11
  const {
@@ -34,7 +36,7 @@ function DefaultChartsItemTooltipContent(props) {
34
36
  });
35
37
  return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
36
38
  sx: sx,
37
- className: classes.root,
39
+ className: classes.paper,
38
40
  children: /*#__PURE__*/_jsx(ChartsTooltipTable, {
39
41
  className: classes.table,
40
42
  children: /*#__PURE__*/_jsx("tbody", {
@@ -1,6 +1,8 @@
1
1
  export interface ChartsTooltipClasses {
2
2
  /** Styles applied to the root element. */
3
3
  root: string;
4
+ /** Styles applied to the paper element. */
5
+ paper: string;
4
6
  /** Styles applied to the table element. */
5
7
  table: string;
6
8
  /** Styles applied to the row element. */
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClass as generateUtilityClass, unstable_generat
2
2
  export function getChartsTooltipUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiChartsTooltip', slot);
4
4
  }
5
- export const chartsTooltipClasses = generateUtilityClasses('MuiChartsTooltip', ['root', 'table', 'row', 'cell', 'mark', 'markCell', 'labelCell', 'valueCell']);
5
+ export const chartsTooltipClasses = generateUtilityClasses('MuiChartsTooltip', ['root', 'paper', 'table', 'row', 'cell', 'mark', 'markCell', 'labelCell', 'valueCell']);
@@ -1,7 +1,7 @@
1
- export * from './ChartsTooltip';
2
- export * from './chartsTooltipClasses';
3
- export * from './ChartsAxisTooltipContent';
4
- export * from './ChartsItemTooltipContent';
5
- export * from './DefaultChartsAxisTooltipContent';
6
- export * from './DefaultChartsItemTooltipContent';
7
- export * from './ChartsTooltipTable';
1
+ export * from "./ChartsTooltip.js";
2
+ export * from "./chartsTooltipClasses.js";
3
+ export * from "./ChartsAxisTooltipContent.js";
4
+ export * from "./ChartsItemTooltipContent.js";
5
+ export * from "./DefaultChartsAxisTooltipContent.js";
6
+ export * from "./DefaultChartsItemTooltipContent.js";
7
+ export * from "./ChartsTooltipTable.js";
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { useSvgRef } from '../hooks';
3
+ import { useSvgRef } from "../hooks/index.js";
4
4
  export function generateVirtualElement(mousePosition) {
5
5
  if (mousePosition === null) {
6
6
  return {
@@ -1,14 +1,16 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import PropTypes from 'prop-types';
3
5
  import { Delaunay } from '@mui/x-charts-vendor/d3-delaunay';
4
6
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
5
- import { InteractionContext } from '../context/InteractionProvider';
6
- import { useCartesianContext } from '../context/CartesianProvider';
7
- import { getValueToPositionMapper } from '../hooks/useScale';
8
- import { getSVGPoint } from '../internals/getSVGPoint';
9
- import { useDrawingArea, useSvgRef } from '../hooks';
10
- import { useHighlighted } from '../context';
11
- import { useScatterSeries } from '../hooks/useSeries';
7
+ import { InteractionContext } from "../context/InteractionProvider.js";
8
+ import { useCartesianContext } from "../context/CartesianProvider/index.js";
9
+ import { getValueToPositionMapper } from "../hooks/useScale.js";
10
+ import { getSVGPoint } from "../internals/getSVGPoint.js";
11
+ import { useDrawingArea, useSvgRef } from "../hooks/index.js";
12
+ import { useHighlighted } from "../context/index.js";
13
+ import { useScatterSeries } from "../hooks/useSeries.js";
12
14
  import { jsx as _jsx } from "react/jsx-runtime";
13
15
  function ChartsVoronoiHandler(props) {
14
16
  const {
@@ -1 +1 @@
1
- export * from './ChartsVoronoiHandler';
1
+ export * from "./ChartsVoronoiHandler.js";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  import _extends from "@babel/runtime/helpers/esm/extends";
3
5
  const _excluded = ["scale", "tickNumber", "reverse"];
@@ -5,18 +7,18 @@ import * as React from 'react';
5
7
  import PropTypes from 'prop-types';
6
8
  import useSlotProps from '@mui/utils/useSlotProps';
7
9
  import composeClasses from '@mui/utils/composeClasses';
8
- import { useThemeProps, useTheme } from '@mui/material/styles';
9
- import { useCartesianContext } from '../context/CartesianProvider';
10
- import { useTicks } from '../hooks/useTicks';
11
- import { getAxisUtilityClass } from '../ChartsAxis/axisClasses';
12
- import { AxisRoot } from '../internals/components/AxisSharedComponents';
13
- import { ChartsText } from '../ChartsText';
14
- import { getMinXTranslation } from '../internals/geometry';
15
- import { useMounted } from '../hooks/useMounted';
16
- import { useDrawingArea } from '../hooks/useDrawingArea';
17
- import { getWordsByLines } from '../internals/getWordsByLines';
18
- import { isInfinity } from '../internals/isInfinity';
19
- import { isBandScale } from '../internals/isBandScale';
10
+ import { useThemeProps, useTheme, styled } from '@mui/material/styles';
11
+ import { useCartesianContext } from "../context/CartesianProvider/index.js";
12
+ import { useTicks } from "../hooks/useTicks.js";
13
+ import { getAxisUtilityClass } from "../ChartsAxis/axisClasses.js";
14
+ import { AxisRoot } from "../internals/components/AxisSharedComponents.js";
15
+ import { ChartsText } from "../ChartsText/index.js";
16
+ import { getMinXTranslation } from "../internals/geometry.js";
17
+ import { useMounted } from "../hooks/useMounted.js";
18
+ import { useDrawingArea } from "../hooks/useDrawingArea.js";
19
+ import { getWordsByLines } from "../internals/getWordsByLines.js";
20
+ import { isInfinity } from "../internals/isInfinity.js";
21
+ import { isBandScale } from "../internals/isBandScale.js";
20
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
23
  const useUtilityClasses = ownerState => {
22
24
  const {
@@ -89,6 +91,11 @@ function addLabelDimension(xTicks, {
89
91
  return item;
90
92
  });
91
93
  }
94
+ const XAxisRoot = styled(AxisRoot, {
95
+ name: 'MuiChartsXAxis',
96
+ slot: 'Root',
97
+ overridesResolver: (props, styles) => styles.root
98
+ })({});
92
99
  const defaultProps = {
93
100
  position: 'bottom',
94
101
  disableLine: false,
@@ -210,7 +217,7 @@ function ChartsXAxis(inProps) {
210
217
  if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(isInfinity)) {
211
218
  return null;
212
219
  }
213
- return /*#__PURE__*/_jsxs(AxisRoot, {
220
+ return /*#__PURE__*/_jsxs(XAxisRoot, {
214
221
  transform: `translate(0, ${position === 'bottom' ? top + height : top})`,
215
222
  className: classes.root,
216
223
  sx: sx,
@@ -1 +1 @@
1
- export * from './ChartsXAxis';
1
+ export * from "./ChartsXAxis.js";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["scale", "tickNumber"];
@@ -5,16 +7,16 @@ import * as React from 'react';
5
7
  import PropTypes from 'prop-types';
6
8
  import useSlotProps from '@mui/utils/useSlotProps';
7
9
  import composeClasses from '@mui/utils/composeClasses';
8
- import { useThemeProps, useTheme } from '@mui/material/styles';
10
+ import { useThemeProps, useTheme, styled } from '@mui/material/styles';
9
11
  import { useRtl } from '@mui/system/RtlProvider';
10
- import { useCartesianContext } from '../context/CartesianProvider';
11
- import { useTicks } from '../hooks/useTicks';
12
- import { useDrawingArea } from '../hooks/useDrawingArea';
13
- import { AxisRoot } from '../internals/components/AxisSharedComponents';
14
- import { ChartsText } from '../ChartsText';
15
- import { getAxisUtilityClass } from '../ChartsAxis/axisClasses';
16
- import { isInfinity } from '../internals/isInfinity';
17
- import { isBandScale } from '../internals/isBandScale';
12
+ import { useCartesianContext } from "../context/CartesianProvider/index.js";
13
+ import { useTicks } from "../hooks/useTicks.js";
14
+ import { useDrawingArea } from "../hooks/useDrawingArea.js";
15
+ import { AxisRoot } from "../internals/components/AxisSharedComponents.js";
16
+ import { ChartsText } from "../ChartsText/index.js";
17
+ import { getAxisUtilityClass } from "../ChartsAxis/axisClasses.js";
18
+ import { isInfinity } from "../internals/isInfinity.js";
19
+ import { isBandScale } from "../internals/isBandScale.js";
18
20
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
21
  const useUtilityClasses = ownerState => {
20
22
  const {
@@ -31,6 +33,11 @@ const useUtilityClasses = ownerState => {
31
33
  };
32
34
  return composeClasses(slots, getAxisUtilityClass, classes);
33
35
  };
36
+ const YAxisRoot = styled(AxisRoot, {
37
+ name: 'MuiChartsYAxis',
38
+ slot: 'Root',
39
+ overridesResolver: (props, styles) => styles.root
40
+ })({});
34
41
  const defaultProps = {
35
42
  position: 'left',
36
43
  disableLine: false,
@@ -157,7 +164,7 @@ function ChartsYAxis(inProps) {
157
164
  if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(isInfinity)) {
158
165
  return null;
159
166
  }
160
- return /*#__PURE__*/_jsxs(AxisRoot, {
167
+ return /*#__PURE__*/_jsxs(YAxisRoot, {
161
168
  transform: `translate(${position === 'right' ? left + width : left}, 0)`,
162
169
  className: classes.root,
163
170
  sx: sx,
@@ -1 +1 @@
1
- export * from './ChartsYAxis';
1
+ export * from "./ChartsYAxis.js";
package/Gauge/Gauge.js CHANGED
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["text", "children", "classes", "className"];
@@ -5,11 +7,11 @@ import * as React from 'react';
5
7
  import PropTypes from 'prop-types';
6
8
  import composeClasses from '@mui/utils/composeClasses';
7
9
  import clsx from 'clsx';
8
- import { GaugeContainer } from './GaugeContainer';
9
- import { GaugeValueArc } from './GaugeValueArc';
10
- import { GaugeReferenceArc } from './GaugeReferenceArc';
11
- import { getGaugeUtilityClass } from './gaugeClasses';
12
- import { GaugeValueText } from './GaugeValueText';
10
+ import { GaugeContainer } from "./GaugeContainer.js";
11
+ import { GaugeValueArc } from "./GaugeValueArc.js";
12
+ import { GaugeReferenceArc } from "./GaugeReferenceArc.js";
13
+ import { getGaugeUtilityClass } from "./gaugeClasses.js";
14
+ import { GaugeValueText } from "./GaugeValueText.js";
13
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
16
  const useUtilityClasses = props => {
15
17
  const {
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["width", "height", "margin", "title", "desc", "value", "valueMin", "valueMax", "startAngle", "endAngle", "outerRadius", "innerRadius", "cornerRadius", "cx", "cy", "children"];
@@ -5,10 +7,10 @@ import * as React from 'react';
5
7
  import PropTypes from 'prop-types';
6
8
  import { styled } from '@mui/material/styles';
7
9
  import useForkRef from '@mui/utils/useForkRef';
8
- import { useChartContainerDimensions } from '../ResponsiveChartContainer/useChartContainerDimensions';
9
- import { ChartsSurface } from '../ChartsSurface';
10
- import { DrawingProvider } from '../context/DrawingProvider';
11
- import { GaugeProvider } from './GaugeProvider';
10
+ import { useChartContainerDimensions } from "../ResponsiveChartContainer/useChartContainerDimensions.js";
11
+ import { ChartsSurface } from "../ChartsSurface/index.js";
12
+ import { DrawingProvider } from "../context/DrawingProvider.js";
13
+ import { GaugeProvider } from "./GaugeProvider.js";
12
14
  import { jsx as _jsx } from "react/jsx-runtime";
13
15
  const ResizableContainer = styled('div', {
14
16
  name: 'MuiGauge',
@@ -1,8 +1,8 @@
1
1
  // @ignore - do not document.
2
2
  import * as React from 'react';
3
- import { getPercentageValue } from '../internals/getPercentageValue';
4
- import { getArcRatios, getAvailableRadius } from './utils';
5
- import { useDrawingArea } from '../hooks/useDrawingArea';
3
+ import { getPercentageValue } from "../internals/getPercentageValue.js";
4
+ import { getArcRatios, getAvailableRadius } from "./utils.js";
5
+ import { useDrawingArea } from "../hooks/useDrawingArea.js";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  export const GaugeContext = /*#__PURE__*/React.createContext({
8
8
  value: null,
@@ -1,8 +1,10 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
4
6
  import { styled } from '@mui/material/styles';
5
- import { useGaugeState } from './GaugeProvider';
7
+ import { useGaugeState } from "./GaugeProvider.js";
6
8
  import { jsx as _jsx } from "react/jsx-runtime";
7
9
  const StyledPath = styled('path', {
8
10
  name: 'MuiGauge',
@@ -1,8 +1,10 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
4
6
  import { styled } from '@mui/material/styles';
5
- import { useGaugeState } from './GaugeProvider';
7
+ import { useGaugeState } from "./GaugeProvider.js";
6
8
  import { jsx as _jsx } from "react/jsx-runtime";
7
9
  const StyledPath = styled('path', {
8
10
  name: 'MuiGauge',
@@ -1,10 +1,12 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["text", "className"];
4
6
  import * as React from 'react';
5
7
  import PropTypes from 'prop-types';
6
- import { useGaugeState } from './GaugeProvider';
7
- import { ChartsText } from '../ChartsText';
8
+ import { useGaugeState } from "./GaugeProvider.js";
9
+ import { ChartsText } from "../ChartsText/index.js";
8
10
  import { jsx as _jsx } from "react/jsx-runtime";
9
11
  function defaultFormatter({
10
12
  value
package/Gauge/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export * from './Gauge';
2
- export * from './GaugeContainer';
3
- export * from './GaugeValueText';
4
- export * from './GaugeValueArc';
5
- export * from './GaugeReferenceArc';
6
- export * from './gaugeClasses';
7
- export { useGaugeState } from './GaugeProvider';
1
+ export * from "./Gauge.js";
2
+ export * from "./GaugeContainer.js";
3
+ export * from "./GaugeValueText.js";
4
+ export * from "./GaugeValueArc.js";
5
+ export * from "./GaugeReferenceArc.js";
6
+ export * from "./gaugeClasses.js";
7
+ export { useGaugeState } from "./GaugeProvider.js";
@@ -1,14 +1,16 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["d", "skipAnimation", "ownerState"];
4
6
  import * as React from 'react';
5
7
  import PropTypes from 'prop-types';
6
8
  import { styled } from '@mui/material/styles';
7
- import { animated, useSpring } from '@react-spring/web';
9
+ import { animated, useTransition } from '@react-spring/web';
8
10
  import { color as d3Color } from '@mui/x-charts-vendor/d3-color';
9
- import { useAnimatedPath } from '../internals/useAnimatedPath';
10
- import { cleanId } from '../internals/cleanId';
11
- import { useChartId, useDrawingArea } from '../hooks';
11
+ import { cleanId } from "../internals/cleanId.js";
12
+ import { useChartId, useDrawingArea } from "../hooks/index.js";
13
+ import { useStringInterpolator } from "../internals/useStringInterpolator.js";
12
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
15
  export const AreaElementPath = styled(animated.path, {
14
16
  name: 'MuiAreaElement',
@@ -48,16 +50,33 @@ function AnimatedArea(props) {
48
50
  height
49
51
  } = useDrawingArea();
50
52
  const chartId = useChartId();
51
- const path = useAnimatedPath(d, skipAnimation);
52
- const {
53
- animatedWidth
54
- } = useSpring({
53
+ const stringInterpolator = useStringInterpolator(d);
54
+ const transitionAppear = useTransition([1], {
55
55
  from: {
56
56
  animatedWidth: left
57
57
  },
58
58
  to: {
59
59
  animatedWidth: width + left + right
60
60
  },
61
+ enter: {
62
+ animatedWidth: width + left + right
63
+ },
64
+ leave: {
65
+ animatedWidth: left
66
+ },
67
+ reset: false,
68
+ immediate: skipAnimation
69
+ });
70
+ const transitionChange = useTransition([stringInterpolator], {
71
+ from: {
72
+ value: 0
73
+ },
74
+ to: {
75
+ value: 1
76
+ },
77
+ enter: {
78
+ value: 1
79
+ },
61
80
  reset: false,
62
81
  immediate: skipAnimation
63
82
  });
@@ -65,18 +84,18 @@ function AnimatedArea(props) {
65
84
  return /*#__PURE__*/_jsxs(React.Fragment, {
66
85
  children: [/*#__PURE__*/_jsx("clipPath", {
67
86
  id: clipId,
68
- children: /*#__PURE__*/_jsx(animated.rect, {
87
+ children: transitionAppear(style => /*#__PURE__*/_jsx(animated.rect, {
69
88
  x: 0,
70
89
  y: 0,
71
- width: animatedWidth,
90
+ width: style.animatedWidth,
72
91
  height: top + height + bottom
73
- })
92
+ }))
74
93
  }), /*#__PURE__*/_jsx("g", {
75
94
  clipPath: `url(#${clipId})`,
76
- children: /*#__PURE__*/_jsx(AreaElementPath, _extends({}, other, {
95
+ children: transitionChange((style, interpolator) => /*#__PURE__*/_jsx(AreaElementPath, _extends({}, other, {
77
96
  ownerState: ownerState,
78
- d: path
79
- }))
97
+ d: style.value.to(interpolator)
98
+ })))
80
99
  })]
81
100
  });
82
101
  }