@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
@@ -1,5 +1,7 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
- import { DrawingContext } from '../context/DrawingProvider';
4
+ import { DrawingContext } from "../context/DrawingProvider.js";
3
5
  export function useChartId() {
4
6
  const {
5
7
  chartId
@@ -1,6 +1,8 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
- import { useCartesianContext } from '../context/CartesianProvider';
3
- import { ZAxisContext } from '../context/ZAxisContextProvider';
4
+ import { useCartesianContext } from "../context/CartesianProvider/index.js";
5
+ import { ZAxisContext } from "../context/ZAxisContextProvider.js";
4
6
  export function useXColorScale(identifier) {
5
7
  const {
6
8
  xAxis,
@@ -1,5 +1,7 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
- import { DrawingContext } from '../context/DrawingProvider';
4
+ import { DrawingContext } from "../context/DrawingProvider.js";
3
5
  export function useDrawingArea() {
4
6
  const {
5
7
  left,
@@ -1,6 +1,8 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
- import { InteractionContext } from '../context/InteractionProvider';
3
- import { useHighlighted } from '../context';
4
+ import { InteractionContext } from "../context/InteractionProvider.js";
5
+ import { useHighlighted } from "../context/index.js";
4
6
  export const useInteractionItemProps = skip => {
5
7
  const {
6
8
  dispatch: dispatchInteraction
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
3
5
  export function useMounted(defer = false) {
@@ -1,4 +1,12 @@
1
+ 'use client';
2
+
1
3
  import { useIsomorphicLayoutEffect, Globals } from '@react-spring/web';
4
+ const handleMediaChange = e => {
5
+ Globals.assign({
6
+ // Modification such the react-spring implementation such that this hook can remove animation but never activate animation.
7
+ skipAnimation: e.matches || undefined
8
+ });
9
+ };
2
10
 
3
11
  /**
4
12
  * Returns `boolean` or `null`, used to automatically
@@ -8,23 +16,18 @@ import { useIsomorphicLayoutEffect, Globals } from '@react-spring/web';
8
16
  * The return value, post-effect, is the value of their preferred setting
9
17
  */
10
18
  export const useReducedMotion = () => {
11
- // Taken from: https://github.com/pmndrs/react-spring/blob/02ec877bbfab0df46da0e4a47d5f68d3e731206a/packages/shared/src/hooks/useReducedMotion.ts#L13
19
+ // Taken from: https://github.com/pmndrs/react-spring/blob/fd65b605b85c3a24143c4ce9dd322fdfca9c66be/packages/shared/src/hooks/useReducedMotion.ts
12
20
 
13
21
  useIsomorphicLayoutEffect(() => {
14
- if (!window.matchMedia) {
15
- // skip animation in environments where `window.matchMedia` would not be available (i.e. test/jsdom)
16
- Globals.assign({
17
- skipAnimation: true
22
+ // Skip animation test/jsdom
23
+ const shouldSkipAnimation = !window?.matchMedia;
24
+ if (shouldSkipAnimation) {
25
+ handleMediaChange({
26
+ matches: true
18
27
  });
19
- return () => {};
28
+ return undefined;
20
29
  }
21
30
  const mql = window.matchMedia('(prefers-reduced-motion)');
22
- const handleMediaChange = event => {
23
- Globals.assign({
24
- // Modification such the react-spring implementation such that this hook can remove animation but never activate animation.
25
- skipAnimation: event.matches || undefined
26
- });
27
- };
28
31
  handleMediaChange(mql);
29
32
 
30
33
  // MatchMedia is not fully supported in all environments, so we need to check if it exists before calling addEventListener
package/hooks/useScale.js CHANGED
@@ -1,5 +1,7 @@
1
- import { isBandScale } from '../internals/isBandScale';
2
- import { useXAxis, useYAxis } from './useAxis';
1
+ 'use client';
2
+
3
+ import { isBandScale } from "../internals/isBandScale.js";
4
+ import { useXAxis, useYAxis } from "./useAxis.js";
3
5
 
4
6
  /**
5
7
  * For a given scale return a function that map value to their position.
@@ -1,5 +1,7 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
- import { SeriesContext } from '../context/SeriesProvider';
4
+ import { SeriesContext } from "../context/SeriesProvider/index.js";
3
5
 
4
6
  /**
5
7
  * Get access to the internal state of series.
@@ -1,5 +1,7 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
- import { SvgContext } from '../context/DrawingProvider';
4
+ import { SvgContext } from "../context/DrawingProvider.js";
3
5
  export function useSvgRef() {
4
6
  const {
5
7
  isInitialized,
package/hooks/useTicks.js CHANGED
@@ -1,6 +1,8 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
- import { isBandScale } from '../internals/isBandScale';
3
- import { isInfinity } from '../internals/isInfinity';
4
+ import { isBandScale } from "../internals/isBandScale.js";
5
+ import { isInfinity } from "../internals/isInfinity.js";
4
6
  export function getTickNumber(params) {
5
7
  const {
6
8
  tickMaxStep,
package/index.js CHANGED
@@ -1,33 +1,33 @@
1
1
  /**
2
- * @mui/x-charts v7.15.0
2
+ * @mui/x-charts v7.17.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- export * from './constants';
9
- export * from './context';
10
- export * from './hooks';
11
- export * from './colorPalettes';
12
- export * from './models';
13
- export * from './ChartsClipPath';
14
- export * from './ChartsReferenceLine';
15
- export * from './ChartsAxis';
16
- export * from './ChartsXAxis';
17
- export * from './ChartsYAxis';
18
- export * from './ChartsGrid';
19
- export * from './ChartsText';
20
- export * from './ChartsTooltip';
21
- export * from './ChartsLegend';
22
- export * from './ChartsAxisHighlight';
23
- export * from './ChartsVoronoiHandler';
24
- export * from './ChartsOnAxisClickHandler';
25
- export * from './BarChart';
26
- export * from './LineChart';
27
- export * from './PieChart';
28
- export * from './ScatterChart';
29
- export * from './SparkLineChart';
30
- export * from './Gauge';
31
- export * from './ChartContainer';
32
- export * from './ChartsSurface';
33
- export * from './ResponsiveChartContainer';
8
+ export * from "./constants/index.js";
9
+ export * from "./context/index.js";
10
+ export * from "./hooks/index.js";
11
+ export * from "./colorPalettes/index.js";
12
+ export * from "./models/index.js";
13
+ export * from "./ChartsClipPath/index.js";
14
+ export * from "./ChartsReferenceLine/index.js";
15
+ export * from "./ChartsAxis/index.js";
16
+ export * from "./ChartsXAxis/index.js";
17
+ export * from "./ChartsYAxis/index.js";
18
+ export * from "./ChartsGrid/index.js";
19
+ export * from "./ChartsText/index.js";
20
+ export * from "./ChartsTooltip/index.js";
21
+ export * from "./ChartsLegend/index.js";
22
+ export * from "./ChartsAxisHighlight/index.js";
23
+ export * from "./ChartsVoronoiHandler/index.js";
24
+ export * from "./ChartsOnAxisClickHandler/index.js";
25
+ export * from "./BarChart/index.js";
26
+ export * from "./LineChart/index.js";
27
+ export * from "./PieChart/index.js";
28
+ export * from "./ScatterChart/index.js";
29
+ export * from "./SparkLineChart/index.js";
30
+ export * from "./Gauge/index.js";
31
+ export * from "./ChartContainer/index.js";
32
+ export * from "./ChartsSurface/index.js";
33
+ export * from "./ResponsiveChartContainer/index.js";
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { styled } from '@mui/material/styles';
3
- import { axisClasses } from '../../ChartsAxis/axisClasses';
3
+ import { axisClasses } from "../../ChartsAxis/axisClasses.js";
4
4
  export const AxisRoot = styled('g', {
5
5
  name: 'MuiChartsAxis',
6
6
  slot: 'Root',
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { useCartesianContext } from '../../../context/CartesianProvider';
3
- import { DrawingContext } from '../../../context/DrawingProvider';
4
- import { useDrawingArea } from '../../../hooks';
5
- import ChartsPiecewiseGradient from './ChartsPiecewiseGradient';
6
- import ChartsContinuousGradient from './ChartsContinuousGradient';
2
+ import { useCartesianContext } from "../../../context/CartesianProvider/index.js";
3
+ import { DrawingContext } from "../../../context/DrawingProvider.js";
4
+ import { useDrawingArea } from "../../../hooks/index.js";
5
+ import ChartsPiecewiseGradient from "./ChartsPiecewiseGradient.js";
6
+ import ChartsContinuousGradient from "./ChartsContinuousGradient.js";
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  export function useChartGradient() {
9
9
  const {
@@ -1 +1 @@
1
- export * from './ChartsAxesGradients';
1
+ export * from "./ChartsAxesGradients.js";
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { getStringSize } from './domUtils';
2
+ import { getStringSize } from "./domUtils.js";
3
3
  export function getWordsByLines({
4
4
  style,
5
5
  needsComputation,
@@ -1,41 +1,41 @@
1
1
  // Components
2
- export * from './components/ChartsAxesGradients';
3
- export * from '../ResponsiveChartContainer/useChartContainerDimensions';
4
- export * from '../ResponsiveChartContainer/ResizableContainer';
2
+ export * from "./components/ChartsAxesGradients/index.js";
3
+ export * from "../ResponsiveChartContainer/useChartContainerDimensions.js";
4
+ export * from "../ResponsiveChartContainer/ResizableContainer.js";
5
5
 
6
6
  // hooks
7
- export { useReducedMotion } from '../hooks/useReducedMotion';
8
- export { useSeries } from '../hooks/useSeries';
9
- export { useInteractionItemProps } from '../hooks/useInteractionItemProps';
10
- export { useDrawingArea } from '../hooks/useDrawingArea';
11
- export { useScatterChartProps } from '../ScatterChart/useScatterChartProps';
12
- export { useLineChartProps } from '../LineChart/useLineChartProps';
13
- export { useBarChartProps } from '../BarChart/useBarChartProps';
14
- export { useResponsiveChartContainerProps } from '../ResponsiveChartContainer/useResponsiveChartContainerProps';
15
- export { useChartContainerProps } from '../ChartContainer/useChartContainerProps';
7
+ export { useReducedMotion } from "../hooks/useReducedMotion.js";
8
+ export { useSeries } from "../hooks/useSeries.js";
9
+ export { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
10
+ export { useDrawingArea } from "../hooks/useDrawingArea.js";
11
+ export { useScatterChartProps } from "../ScatterChart/useScatterChartProps.js";
12
+ export { useLineChartProps } from "../LineChart/useLineChartProps.js";
13
+ export { useBarChartProps } from "../BarChart/useBarChartProps.js";
14
+ export { useResponsiveChartContainerProps } from "../ResponsiveChartContainer/useResponsiveChartContainerProps.js";
15
+ export { useChartContainerProps } from "../ChartContainer/useChartContainerProps.js";
16
16
 
17
17
  // utils
18
- export * from './defaultizeValueFormatter';
19
- export * from './configInit';
20
- export * from './getLabel';
21
- export * from './getSVGPoint';
22
- export * from './isDefined';
23
- export { unstable_cleanupDOM } from './domUtils';
24
- export * from './getScale';
18
+ export * from "./defaultizeValueFormatter.js";
19
+ export * from "./configInit.js";
20
+ export * from "./getLabel.js";
21
+ export * from "./getSVGPoint.js";
22
+ export * from "./isDefined.js";
23
+ export { unstable_cleanupDOM } from "./domUtils.js";
24
+ export * from "./getScale.js";
25
25
 
26
26
  // contexts
27
27
 
28
- export * from '../context/CartesianProvider';
29
- export * from '../context/DrawingProvider';
30
- export * from '../context/InteractionProvider';
31
- export * from '../context/SeriesProvider';
32
- export * from '../context/ZAxisContextProvider';
33
- export * from '../context/PluginProvider';
34
- export { getAxisExtremum } from '../context/CartesianProvider/getAxisExtremum';
28
+ export * from "../context/CartesianProvider/index.js";
29
+ export * from "../context/DrawingProvider.js";
30
+ export * from "../context/InteractionProvider.js";
31
+ export * from "../context/SeriesProvider/index.js";
32
+ export * from "../context/ZAxisContextProvider.js";
33
+ export * from "../context/PluginProvider/index.js";
34
+ export { getAxisExtremum } from "../context/CartesianProvider/getAxisExtremum.js";
35
35
 
36
36
  // series configuration
37
- export * from '../models/seriesType/config';
38
- export * from '../models/seriesType/common';
39
- export * from '../models/helpers';
40
- export * from '../models/z-axis';
41
- export * from '../models/axis';
37
+ export * from "../models/seriesType/config.js";
38
+ export * from "../models/seriesType/common.js";
39
+ export * from "../models/helpers.js";
40
+ export * from "../models/z-axis.js";
41
+ export * from "../models/axis.js";
@@ -1,4 +1,4 @@
1
- import { cartesianSeriesTypes } from './configInit';
1
+ import { cartesianSeriesTypes } from "./configInit.js";
2
2
  export function isCartesianSeriesType(seriesType) {
3
3
  return cartesianSeriesTypes.getTypes().has(seriesType);
4
4
  }
@@ -0,0 +1 @@
1
+ export declare const useStringInterpolator: (path: string) => (t: number) => string;
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { interpolateString } from '@mui/x-charts-vendor/d3-interpolate';
3
- import { useSpring } from '@react-spring/web';
4
3
  function usePrevious(value) {
5
4
  const ref = React.useRef({
6
5
  currentPath: value,
@@ -14,20 +13,8 @@ function usePrevious(value) {
14
13
  }
15
14
  return ref.current;
16
15
  }
17
- export const useAnimatedPath = (path, skipAnimation) => {
16
+ export const useStringInterpolator = path => {
18
17
  const memoryRef = usePrevious(path);
19
18
  const interpolator = React.useMemo(() => memoryRef.previousPath ? interpolateString(memoryRef.previousPath, memoryRef.currentPath) : () => memoryRef.currentPath, [memoryRef.currentPath, memoryRef.previousPath]);
20
- const [{
21
- value
22
- }] = useSpring({
23
- from: {
24
- value: 0
25
- },
26
- to: {
27
- value: 1
28
- },
29
- reset: true,
30
- immediate: skipAnimation
31
- }, [memoryRef.currentPath]);
32
- return value.to(interpolator);
19
+ return interpolator;
33
20
  };
package/models/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './seriesType';
2
2
  export * from './layout';
3
3
  export * from './stacking';
4
4
  export type { AxisConfig, ChartsYAxisProps, ChartsXAxisProps, ScaleName, ContinuousScaleName, } from './axis';
5
+ export type { PropsFromSlot } from '@mui/x-internals/slots';
package/models/index.js CHANGED
@@ -1,4 +1,6 @@
1
- export * from './seriesType';
2
- export * from './layout';
3
- export * from './stacking';
1
+ export * from "./seriesType/index.js";
2
+ export * from "./layout.js";
3
+ export * from "./stacking.js";
4
+
5
+ // Utils shared across the X packages
4
6
  export {};
@@ -2,10 +2,10 @@
2
2
 
3
3
  // item identifier
4
4
 
5
- export * from './line';
6
- export * from './bar';
7
- export * from './scatter';
8
- export * from './pie';
5
+ export * from "./line.js";
6
+ export * from "./bar.js";
7
+ export * from "./scatter.js";
8
+ export * from "./pie.js";
9
9
  // Helpers
10
10
 
11
11
  export function isDefaultizedBarSeries(series) {
@@ -1,18 +1,20 @@
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 { useThemeProps } from '@mui/material/styles';
5
- import { BarPlot } from './BarPlot';
6
- import { ResponsiveChartContainer } from '../ResponsiveChartContainer';
7
- import { ChartsAxis } from '../ChartsAxis';
8
- import { ChartsTooltip } from '../ChartsTooltip';
9
- import { ChartsLegend } from '../ChartsLegend';
10
- import { ChartsAxisHighlight } from '../ChartsAxisHighlight';
11
- import { ChartsClipPath } from '../ChartsClipPath';
12
- import { ChartsGrid } from '../ChartsGrid';
13
- import { ChartsOnAxisClickHandler } from '../ChartsOnAxisClickHandler';
14
- import { ChartsOverlay } from '../ChartsOverlay/ChartsOverlay';
15
- import { useBarChartProps } from './useBarChartProps';
7
+ import { BarPlot } from "./BarPlot.js";
8
+ import { ResponsiveChartContainer } from "../ResponsiveChartContainer/index.js";
9
+ import { ChartsAxis } from "../ChartsAxis/index.js";
10
+ import { ChartsTooltip } from "../ChartsTooltip/index.js";
11
+ import { ChartsLegend } from "../ChartsLegend/index.js";
12
+ import { ChartsAxisHighlight } from "../ChartsAxisHighlight/index.js";
13
+ import { ChartsClipPath } from "../ChartsClipPath/index.js";
14
+ import { ChartsGrid } from "../ChartsGrid/index.js";
15
+ import { ChartsOnAxisClickHandler } from "../ChartsOnAxisClickHandler/index.js";
16
+ import { ChartsOverlay } from "../ChartsOverlay/ChartsOverlay.js";
17
+ import { useBarChartProps } from "./useBarChartProps.js";
16
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
19
  /**
18
20
  * Demos:
@@ -47,7 +49,7 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(inProps, ref) {
47
49
  return /*#__PURE__*/_jsxs(ResponsiveChartContainer, _extends({
48
50
  ref: ref
49
51
  }, chartContainerProps, {
50
- children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), props.grid && /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
52
+ children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
51
53
  children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
52
54
  })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
53
55
  }));
@@ -139,6 +141,18 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
139
141
  classes: PropTypes.object,
140
142
  direction: PropTypes.oneOf(['column', 'row']),
141
143
  hidden: PropTypes.bool,
144
+ itemGap: PropTypes.number,
145
+ itemMarkHeight: PropTypes.number,
146
+ itemMarkWidth: PropTypes.number,
147
+ labelStyle: PropTypes.object,
148
+ markGap: PropTypes.number,
149
+ onItemClick: PropTypes.func,
150
+ padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
151
+ bottom: PropTypes.number,
152
+ left: PropTypes.number,
153
+ right: PropTypes.number,
154
+ top: PropTypes.number
155
+ })]),
142
156
  position: PropTypes.shape({
143
157
  horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
144
158
  vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["style", "maskId"];
4
4
  import * as React from 'react';
5
5
  import { animated } from '@react-spring/web';
6
- import { getRadius } from './getRadius';
6
+ import { getRadius } from "./getRadius.js";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const buildInset = corners => `inset(0px round ${corners.topLeft}px ${corners.topRight}px ${corners.bottomRight}px ${corners.bottomLeft}px)`;
9
9
  function BarClipRect(props) {
@@ -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 = ["id", "dataIndex", "classes", "color", "slots", "slotProps", "style", "onClick"];
@@ -10,8 +12,8 @@ import { styled } from '@mui/material/styles';
10
12
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
11
13
  import { color as d3Color } from '@mui/x-charts-vendor/d3-color';
12
14
  import { animated } from '@react-spring/web';
13
- import { useInteractionItemProps } from '../hooks/useInteractionItemProps';
14
- import { useItemHighlighted } from '../context';
15
+ import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
16
+ import { useItemHighlighted } from "../context/index.js";
15
17
  import { jsx as _jsx } from "react/jsx-runtime";
16
18
  export function getBarElementUtilityClass(slot) {
17
19
  return generateUtilityClass('MuiBarElement', slot);
@@ -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 = ["seriesId", "dataIndex", "color", "isFaded", "isHighlighted", "classes"];
@@ -5,7 +7,7 @@ import * as React from 'react';
5
7
  import { styled, useThemeProps } from '@mui/material/styles';
6
8
  import { animated } from '@react-spring/web';
7
9
  import PropTypes from 'prop-types';
8
- import { barLabelClasses } from './barLabelClasses';
10
+ import { barLabelClasses } from "./barLabelClasses.js";
9
11
  import { jsx as _jsx } from "react/jsx-runtime";
10
12
  export const BarLabelComponent = styled(animated.text, {
11
13
  name: 'MuiBarLabel',
@@ -5,10 +5,10 @@ const _excluded = ["seriesId", "classes", "color", "style", "dataIndex", "barLab
5
5
  import * as React from 'react';
6
6
  import useSlotProps from '@mui/utils/useSlotProps';
7
7
  import PropTypes from 'prop-types';
8
- import { useUtilityClasses } from './barLabelClasses';
9
- import { getBarLabel } from './getBarLabel';
10
- import { BarLabel } from './BarLabel';
11
- import { useItemHighlighted } from '../../context';
8
+ import { useUtilityClasses } from "./barLabelClasses.js";
9
+ import { getBarLabel } from "./getBarLabel.js";
10
+ import { BarLabel } from "./BarLabel.js";
11
+ import { useItemHighlighted } from "../../context/index.js";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  /**
14
14
  * @ignore - internal component.
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["bars", "skipAnimation"];
4
4
  import * as React from 'react';
5
5
  import { useTransition } from '@react-spring/web';
6
- import { BarLabelItem } from './BarLabelItem';
6
+ import { BarLabelItem } from "./BarLabelItem.js";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const leaveStyle = ({
9
9
  layout,
@@ -1,2 +1,2 @@
1
- export { BarLabel } from './BarLabel';
2
- export { barLabelClasses, getBarLabelUtilityClass } from './barLabelClasses';
1
+ export { BarLabel } from "./BarLabel.js";
2
+ export { barLabelClasses, getBarLabelUtilityClass } from "./barLabelClasses.js";
@@ -1,17 +1,19 @@
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 = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
4
6
  import * as React from 'react';
5
7
  import PropTypes from 'prop-types';
6
8
  import { useTransition } from '@react-spring/web';
7
- import { useCartesianContext } from '../context/CartesianProvider';
8
- import { BarElement } from './BarElement';
9
- import getColor from './getColor';
10
- import { useChartId } from '../hooks';
11
- import { BarClipPath } from './BarClipPath';
12
- import { BarLabelPlot } from './BarLabel/BarLabelPlot';
13
- import { checkScaleErrors } from './checkScaleErrors';
14
- import { useBarSeries } from '../hooks/useSeries';
9
+ import { useCartesianContext } from "../context/CartesianProvider/index.js";
10
+ import { BarElement } from "./BarElement.js";
11
+ import getColor from "./getColor.js";
12
+ import { useChartId } from "../hooks/index.js";
13
+ import { BarClipPath } from "./BarClipPath.js";
14
+ import { BarLabelPlot } from "./BarLabel/BarLabelPlot.js";
15
+ import { checkScaleErrors } from "./checkScaleErrors.js";
16
+ import { useBarSeries } from "../hooks/useSeries.js";
15
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
18
  /**
17
19
  * Solution of the equations
@@ -1,5 +1,5 @@
1
- import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '../constants';
2
- import { isBandScaleConfig, isPointScaleConfig } from '../models/axis';
1
+ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../constants/index.js";
2
+ import { isBandScaleConfig, isPointScaleConfig } from "../models/axis.js";
3
3
  const getAxisMessage = (axisDirection, axisId) => {
4
4
  const axisName = `${axisDirection}-axis`;
5
5
  const axisIdName = `${axisDirection}Axis`;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape';
3
- import { getStackingGroups } from '../internals/stackSeries';
4
- import { defaultizeValueFormatter } from '../internals/defaultizeValueFormatter';
3
+ import { getStackingGroups } from "../internals/stackSeries.js";
4
+ import { defaultizeValueFormatter } from "../internals/defaultizeValueFormatter.js";
5
5
  let warnOnce = false;
6
6
  const formatter = (params, dataset) => {
7
7
  const {
@@ -1,4 +1,4 @@
1
- export * from './BarChart';
2
- export * from './BarPlot';
3
- export * from './BarElement';
4
- export * from './BarLabel';
1
+ export * from "./BarChart.js";
2
+ export * from "./BarPlot.js";
3
+ export * from "./BarElement.js";
4
+ export * from "./BarLabel/index.js";
@@ -1,4 +1,4 @@
1
- import { getLabel } from '../internals/getLabel';
1
+ import { getLabel } from "../internals/getLabel.js";
2
2
  const legendGetter = params => {
3
3
  const {
4
4
  seriesOrder,
@@ -10,9 +10,10 @@ const legendGetter = params => {
10
10
  return acc;
11
11
  }
12
12
  acc.push({
13
+ id: seriesId,
14
+ seriesId,
13
15
  color: series[seriesId].color,
14
- label: formattedLabel,
15
- id: seriesId
16
+ label: formattedLabel
16
17
  });
17
18
  return acc;
18
19
  }, []);
@@ -1,6 +1,6 @@
1
- import { getExtremumX, getExtremumY } from './extremums';
2
- import formatter from './formatter';
3
- import getColor from './getColor';
1
+ import { getExtremumX, getExtremumY } from "./extremums.js";
2
+ import formatter from "./formatter.js";
3
+ import getColor from "./getColor.js";
4
4
  export const plugin = {
5
5
  seriesType: 'bar',
6
6
  seriesFormatter: formatter,