@mui/x-charts 7.15.0 → 7.16.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 (470) hide show
  1. package/BarChart/BarChart.js +23 -12
  2. package/BarChart/BarClipPath.js +1 -1
  3. package/BarChart/BarElement.js +2 -2
  4. package/BarChart/BarLabel/BarLabel.js +1 -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 +8 -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 +1 -1
  13. package/BarChart/plugin.js +3 -3
  14. package/BarChart/useBarChartProps.js +1 -1
  15. package/CHANGELOG.md +98 -1
  16. package/ChartContainer/ChartContainer.js +9 -9
  17. package/ChartContainer/index.js +1 -1
  18. package/ChartContainer/useChartContainerProps.js +2 -2
  19. package/ChartContainer/useDefaultizeAxis.js +1 -1
  20. package/ChartsAxis/ChartsAxis.js +3 -3
  21. package/ChartsAxis/index.js +2 -2
  22. package/ChartsAxisHighlight/ChartsAxisHighlight.js +4 -4
  23. package/ChartsAxisHighlight/index.js +1 -1
  24. package/ChartsClipPath/ChartsClipPath.js +1 -1
  25. package/ChartsClipPath/index.js +1 -1
  26. package/ChartsGrid/ChartsGrid.js +18 -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 +59 -25
  36. package/ChartsLegend/ContinuousColorLegend.js +7 -7
  37. package/ChartsLegend/DefaultChartsLegend.d.ts +6 -1
  38. package/ChartsLegend/DefaultChartsLegend.js +7 -3
  39. package/ChartsLegend/LegendPerItem.d.ts +9 -6
  40. package/ChartsLegend/LegendPerItem.js +4 -8
  41. package/ChartsLegend/PiecewiseColorLegend.js +3 -8
  42. package/ChartsLegend/index.js +6 -6
  43. package/ChartsLegend/useAxis.js +2 -2
  44. package/ChartsLegend/utils.js +4 -4
  45. package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +4 -4
  46. package/ChartsOnAxisClickHandler/index.js +1 -1
  47. package/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
  48. package/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
  49. package/ChartsOverlay/ChartsOverlay.js +3 -3
  50. package/ChartsOverlay/index.js +3 -3
  51. package/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
  52. package/ChartsReferenceLine/ChartsXReferenceLine.js +5 -5
  53. package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -5
  54. package/ChartsReferenceLine/common.js +1 -1
  55. package/ChartsReferenceLine/index.js +2 -2
  56. package/ChartsSurface/ChartsSurface.js +1 -1
  57. package/ChartsSurface/index.js +1 -1
  58. package/ChartsText/ChartsText.js +1 -1
  59. package/ChartsText/index.js +1 -1
  60. package/ChartsTooltip/ChartsAxisTooltipContent.js +6 -6
  61. package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -1
  62. package/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
  63. package/ChartsTooltip/ChartsTooltip.d.ts +2 -2
  64. package/ChartsTooltip/ChartsTooltip.js +13 -11
  65. package/ChartsTooltip/ChartsTooltipTable.js +10 -5
  66. package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -5
  67. package/ChartsTooltip/DefaultChartsItemTooltipContent.js +3 -3
  68. package/ChartsTooltip/chartsTooltipClasses.d.ts +2 -0
  69. package/ChartsTooltip/chartsTooltipClasses.js +1 -1
  70. package/ChartsTooltip/index.js +7 -7
  71. package/ChartsTooltip/utils.js +1 -1
  72. package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +7 -7
  73. package/ChartsVoronoiHandler/index.js +1 -1
  74. package/ChartsXAxis/ChartsXAxis.js +18 -13
  75. package/ChartsXAxis/index.js +1 -1
  76. package/ChartsYAxis/ChartsYAxis.js +15 -10
  77. package/ChartsYAxis/index.js +1 -1
  78. package/Gauge/Gauge.js +5 -5
  79. package/Gauge/GaugeContainer.js +4 -4
  80. package/Gauge/GaugeProvider.js +3 -3
  81. package/Gauge/GaugeReferenceArc.js +1 -1
  82. package/Gauge/GaugeValueArc.js +1 -1
  83. package/Gauge/GaugeValueText.js +2 -2
  84. package/Gauge/index.js +7 -7
  85. package/LineChart/AnimatedArea.js +31 -14
  86. package/LineChart/AnimatedLine.js +32 -15
  87. package/LineChart/AreaElement.js +3 -3
  88. package/LineChart/AreaPlot.js +83 -78
  89. package/LineChart/LineChart.js +26 -15
  90. package/LineChart/LineElement.js +3 -3
  91. package/LineChart/LineHighlightPlot.js +8 -8
  92. package/LineChart/LinePlot.js +65 -60
  93. package/LineChart/MarkElement.js +4 -4
  94. package/LineChart/MarkPlot.js +9 -9
  95. package/LineChart/formatter.js +2 -2
  96. package/LineChart/index.js +11 -11
  97. package/LineChart/legend.js +1 -1
  98. package/LineChart/plugin.js +3 -3
  99. package/LineChart/useLineChartProps.js +1 -1
  100. package/PieChart/PieArc.js +1 -1
  101. package/PieChart/PieArcLabelPlot.js +4 -4
  102. package/PieChart/PieArcPlot.js +4 -4
  103. package/PieChart/PieChart.js +19 -8
  104. package/PieChart/PiePlot.js +6 -6
  105. package/PieChart/dataTransform/useTransformData.js +1 -1
  106. package/PieChart/formatter.js +1 -1
  107. package/PieChart/getPieCoordinates.js +1 -1
  108. package/PieChart/index.js +7 -7
  109. package/PieChart/legend.js +1 -1
  110. package/PieChart/plugin.js +2 -2
  111. package/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -3
  112. package/ResponsiveChartContainer/index.js +1 -1
  113. package/ResponsiveChartContainer/useResponsiveChartContainerProps.js +1 -1
  114. package/ScatterChart/Scatter.js +5 -5
  115. package/ScatterChart/ScatterChart.js +23 -12
  116. package/ScatterChart/ScatterPlot.js +5 -5
  117. package/ScatterChart/formatter.js +1 -1
  118. package/ScatterChart/index.js +3 -3
  119. package/ScatterChart/legend.js +1 -1
  120. package/ScatterChart/plugin.js +3 -3
  121. package/SparkLineChart/SparkLineChart.js +6 -6
  122. package/SparkLineChart/index.js +1 -1
  123. package/colorPalettes/index.js +1 -1
  124. package/context/CartesianProvider/CartesianProvider.js +6 -6
  125. package/context/CartesianProvider/computeValue.js +6 -6
  126. package/context/CartesianProvider/defaultizeAxis.js +1 -1
  127. package/context/CartesianProvider/index.js +5 -5
  128. package/context/CartesianProvider/useCartesianContext.js +1 -1
  129. package/context/DrawingProvider.js +1 -1
  130. package/context/HighlightedProvider/HighlightedProvider.js +4 -4
  131. package/context/HighlightedProvider/index.js +4 -4
  132. package/context/HighlightedProvider/useHighlighted.js +1 -1
  133. package/context/HighlightedProvider/useItemHighlighted.js +1 -1
  134. package/context/PluginProvider/PluginProvider.js +2 -2
  135. package/context/PluginProvider/index.js +10 -10
  136. package/context/PluginProvider/mergePlugins.js +4 -4
  137. package/context/PluginProvider/useColorProcessor.js +1 -1
  138. package/context/PluginProvider/useSeriesFormatter.js +1 -1
  139. package/context/PluginProvider/useXExtremumGetter.js +1 -1
  140. package/context/PluginProvider/useYExtremumGetter.js +1 -1
  141. package/context/SeriesProvider/SeriesProvider.js +4 -4
  142. package/context/SeriesProvider/index.js +4 -4
  143. package/context/SeriesProvider/processSeries.js +1 -1
  144. package/context/ZAxisContextProvider.js +1 -1
  145. package/context/index.js +2 -2
  146. package/hooks/index.js +7 -7
  147. package/hooks/useAxis.js +1 -1
  148. package/hooks/useAxisEvents.js +6 -6
  149. package/hooks/useChartDimensions.js +1 -1
  150. package/hooks/useChartId.js +1 -1
  151. package/hooks/useColorScale.js +2 -2
  152. package/hooks/useDrawingArea.js +1 -1
  153. package/hooks/useInteractionItemProps.js +2 -2
  154. package/hooks/useReducedMotion.js +13 -12
  155. package/hooks/useScale.js +2 -2
  156. package/hooks/useSeries.js +1 -1
  157. package/hooks/useSvgRef.js +1 -1
  158. package/hooks/useTicks.js +2 -2
  159. package/index.js +27 -27
  160. package/internals/components/AxisSharedComponents.js +1 -1
  161. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +5 -5
  162. package/internals/components/ChartsAxesGradients/index.js +1 -1
  163. package/internals/getWordsByLines.js +1 -1
  164. package/internals/index.js +31 -31
  165. package/internals/isCartesian.js +1 -1
  166. package/internals/useStringInterpolator.d.ts +1 -0
  167. package/internals/{useAnimatedPath.js → useStringInterpolator.js} +2 -15
  168. package/models/index.d.ts +1 -0
  169. package/models/index.js +5 -3
  170. package/models/seriesType/index.js +4 -4
  171. package/modern/BarChart/BarChart.js +23 -12
  172. package/modern/BarChart/BarClipPath.js +1 -1
  173. package/modern/BarChart/BarElement.js +2 -2
  174. package/modern/BarChart/BarLabel/BarLabel.js +1 -1
  175. package/modern/BarChart/BarLabel/BarLabelItem.js +4 -4
  176. package/modern/BarChart/BarLabel/BarLabelPlot.js +1 -1
  177. package/modern/BarChart/BarLabel/index.js +2 -2
  178. package/modern/BarChart/BarPlot.js +8 -8
  179. package/modern/BarChart/checkScaleErrors.js +2 -2
  180. package/modern/BarChart/formatter.js +2 -2
  181. package/modern/BarChart/index.js +4 -4
  182. package/modern/BarChart/legend.js +1 -1
  183. package/modern/BarChart/plugin.js +3 -3
  184. package/modern/BarChart/useBarChartProps.js +1 -1
  185. package/modern/ChartContainer/ChartContainer.js +9 -9
  186. package/modern/ChartContainer/index.js +1 -1
  187. package/modern/ChartContainer/useChartContainerProps.js +2 -2
  188. package/modern/ChartContainer/useDefaultizeAxis.js +1 -1
  189. package/modern/ChartsAxis/ChartsAxis.js +3 -3
  190. package/modern/ChartsAxis/index.js +2 -2
  191. package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +4 -4
  192. package/modern/ChartsAxisHighlight/index.js +1 -1
  193. package/modern/ChartsClipPath/ChartsClipPath.js +1 -1
  194. package/modern/ChartsClipPath/index.js +1 -1
  195. package/modern/ChartsGrid/ChartsGrid.js +18 -66
  196. package/modern/ChartsGrid/ChartsHorizontalGrid.js +36 -0
  197. package/modern/ChartsGrid/ChartsVerticalGrid.js +36 -0
  198. package/modern/ChartsGrid/index.js +2 -2
  199. package/modern/ChartsGrid/styledCommonents.js +22 -0
  200. package/modern/ChartsLegend/ChartsLegend.js +59 -25
  201. package/modern/ChartsLegend/ContinuousColorLegend.js +7 -7
  202. package/modern/ChartsLegend/DefaultChartsLegend.js +7 -3
  203. package/modern/ChartsLegend/LegendPerItem.js +4 -8
  204. package/modern/ChartsLegend/PiecewiseColorLegend.js +3 -8
  205. package/modern/ChartsLegend/index.js +6 -6
  206. package/modern/ChartsLegend/useAxis.js +2 -2
  207. package/modern/ChartsLegend/utils.js +4 -4
  208. package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +4 -4
  209. package/modern/ChartsOnAxisClickHandler/index.js +1 -1
  210. package/modern/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
  211. package/modern/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
  212. package/modern/ChartsOverlay/ChartsOverlay.js +3 -3
  213. package/modern/ChartsOverlay/index.js +3 -3
  214. package/modern/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
  215. package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +5 -5
  216. package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +5 -5
  217. package/modern/ChartsReferenceLine/common.js +1 -1
  218. package/modern/ChartsReferenceLine/index.js +2 -2
  219. package/modern/ChartsSurface/ChartsSurface.js +1 -1
  220. package/modern/ChartsSurface/index.js +1 -1
  221. package/modern/ChartsText/ChartsText.js +1 -1
  222. package/modern/ChartsText/index.js +1 -1
  223. package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +6 -6
  224. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
  225. package/modern/ChartsTooltip/ChartsTooltip.js +13 -11
  226. package/modern/ChartsTooltip/ChartsTooltipTable.js +10 -5
  227. package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -5
  228. package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +3 -3
  229. package/modern/ChartsTooltip/chartsTooltipClasses.js +1 -1
  230. package/modern/ChartsTooltip/index.js +7 -7
  231. package/modern/ChartsTooltip/utils.js +1 -1
  232. package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +7 -7
  233. package/modern/ChartsVoronoiHandler/index.js +1 -1
  234. package/modern/ChartsXAxis/ChartsXAxis.js +18 -13
  235. package/modern/ChartsXAxis/index.js +1 -1
  236. package/modern/ChartsYAxis/ChartsYAxis.js +15 -10
  237. package/modern/ChartsYAxis/index.js +1 -1
  238. package/modern/Gauge/Gauge.js +5 -5
  239. package/modern/Gauge/GaugeContainer.js +4 -4
  240. package/modern/Gauge/GaugeProvider.js +3 -3
  241. package/modern/Gauge/GaugeReferenceArc.js +1 -1
  242. package/modern/Gauge/GaugeValueArc.js +1 -1
  243. package/modern/Gauge/GaugeValueText.js +2 -2
  244. package/modern/Gauge/index.js +7 -7
  245. package/modern/LineChart/AnimatedArea.js +31 -14
  246. package/modern/LineChart/AnimatedLine.js +32 -15
  247. package/modern/LineChart/AreaElement.js +3 -3
  248. package/modern/LineChart/AreaPlot.js +83 -78
  249. package/modern/LineChart/LineChart.js +26 -15
  250. package/modern/LineChart/LineElement.js +3 -3
  251. package/modern/LineChart/LineHighlightPlot.js +8 -8
  252. package/modern/LineChart/LinePlot.js +65 -60
  253. package/modern/LineChart/MarkElement.js +4 -4
  254. package/modern/LineChart/MarkPlot.js +9 -9
  255. package/modern/LineChart/formatter.js +2 -2
  256. package/modern/LineChart/index.js +11 -11
  257. package/modern/LineChart/legend.js +1 -1
  258. package/modern/LineChart/plugin.js +3 -3
  259. package/modern/LineChart/useLineChartProps.js +1 -1
  260. package/modern/PieChart/PieArc.js +1 -1
  261. package/modern/PieChart/PieArcLabelPlot.js +4 -4
  262. package/modern/PieChart/PieArcPlot.js +4 -4
  263. package/modern/PieChart/PieChart.js +19 -8
  264. package/modern/PieChart/PiePlot.js +6 -6
  265. package/modern/PieChart/dataTransform/useTransformData.js +1 -1
  266. package/modern/PieChart/formatter.js +1 -1
  267. package/modern/PieChart/getPieCoordinates.js +1 -1
  268. package/modern/PieChart/index.js +7 -7
  269. package/modern/PieChart/legend.js +1 -1
  270. package/modern/PieChart/plugin.js +2 -2
  271. package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -3
  272. package/modern/ResponsiveChartContainer/index.js +1 -1
  273. package/modern/ResponsiveChartContainer/useResponsiveChartContainerProps.js +1 -1
  274. package/modern/ScatterChart/Scatter.js +5 -5
  275. package/modern/ScatterChart/ScatterChart.js +23 -12
  276. package/modern/ScatterChart/ScatterPlot.js +5 -5
  277. package/modern/ScatterChart/formatter.js +1 -1
  278. package/modern/ScatterChart/index.js +3 -3
  279. package/modern/ScatterChart/legend.js +1 -1
  280. package/modern/ScatterChart/plugin.js +3 -3
  281. package/modern/SparkLineChart/SparkLineChart.js +6 -6
  282. package/modern/SparkLineChart/index.js +1 -1
  283. package/modern/colorPalettes/index.js +1 -1
  284. package/modern/context/CartesianProvider/CartesianProvider.js +6 -6
  285. package/modern/context/CartesianProvider/computeValue.js +6 -6
  286. package/modern/context/CartesianProvider/defaultizeAxis.js +1 -1
  287. package/modern/context/CartesianProvider/index.js +5 -5
  288. package/modern/context/CartesianProvider/useCartesianContext.js +1 -1
  289. package/modern/context/DrawingProvider.js +1 -1
  290. package/modern/context/HighlightedProvider/HighlightedProvider.js +4 -4
  291. package/modern/context/HighlightedProvider/index.js +4 -4
  292. package/modern/context/HighlightedProvider/useHighlighted.js +1 -1
  293. package/modern/context/HighlightedProvider/useItemHighlighted.js +1 -1
  294. package/modern/context/PluginProvider/PluginProvider.js +2 -2
  295. package/modern/context/PluginProvider/index.js +10 -10
  296. package/modern/context/PluginProvider/mergePlugins.js +4 -4
  297. package/modern/context/PluginProvider/useColorProcessor.js +1 -1
  298. package/modern/context/PluginProvider/useSeriesFormatter.js +1 -1
  299. package/modern/context/PluginProvider/useXExtremumGetter.js +1 -1
  300. package/modern/context/PluginProvider/useYExtremumGetter.js +1 -1
  301. package/modern/context/SeriesProvider/SeriesProvider.js +4 -4
  302. package/modern/context/SeriesProvider/index.js +4 -4
  303. package/modern/context/SeriesProvider/processSeries.js +1 -1
  304. package/modern/context/ZAxisContextProvider.js +1 -1
  305. package/modern/context/index.js +2 -2
  306. package/modern/hooks/index.js +7 -7
  307. package/modern/hooks/useAxis.js +1 -1
  308. package/modern/hooks/useAxisEvents.js +6 -6
  309. package/modern/hooks/useChartDimensions.js +1 -1
  310. package/modern/hooks/useChartId.js +1 -1
  311. package/modern/hooks/useColorScale.js +2 -2
  312. package/modern/hooks/useDrawingArea.js +1 -1
  313. package/modern/hooks/useInteractionItemProps.js +2 -2
  314. package/modern/hooks/useReducedMotion.js +13 -12
  315. package/modern/hooks/useScale.js +2 -2
  316. package/modern/hooks/useSeries.js +1 -1
  317. package/modern/hooks/useSvgRef.js +1 -1
  318. package/modern/hooks/useTicks.js +2 -2
  319. package/modern/index.js +27 -27
  320. package/modern/internals/components/AxisSharedComponents.js +1 -1
  321. package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +5 -5
  322. package/modern/internals/components/ChartsAxesGradients/index.js +1 -1
  323. package/modern/internals/getWordsByLines.js +1 -1
  324. package/modern/internals/index.js +31 -31
  325. package/modern/internals/isCartesian.js +1 -1
  326. package/modern/internals/{useAnimatedPath.js → useStringInterpolator.js} +2 -15
  327. package/modern/models/index.js +5 -3
  328. package/modern/models/seriesType/index.js +4 -4
  329. package/modern/themeAugmentation/index.js +0 -3
  330. package/node/BarChart/BarChart.js +14 -4
  331. package/node/BarChart/BarClipPath.js +2 -3
  332. package/node/BarChart/BarElement.js +2 -3
  333. package/node/BarChart/BarLabel/BarLabel.js +2 -3
  334. package/node/BarChart/BarLabel/BarLabelItem.js +2 -3
  335. package/node/BarChart/BarLabel/BarLabelPlot.js +2 -3
  336. package/node/BarChart/BarLabel/barLabelClasses.js +1 -1
  337. package/node/BarChart/BarPlot.js +2 -3
  338. package/node/BarChart/formatter.js +1 -1
  339. package/node/BarChart/plugin.js +1 -1
  340. package/node/BarChart/useBarChartProps.js +1 -1
  341. package/node/ChartContainer/ChartContainer.js +2 -3
  342. package/node/ChartContainer/useChartContainerProps.js +2 -3
  343. package/node/ChartContainer/useDefaultizeAxis.js +2 -3
  344. package/node/ChartsAxis/ChartsAxis.js +2 -3
  345. package/node/ChartsAxisHighlight/ChartsAxisHighlight.js +2 -3
  346. package/node/ChartsClipPath/ChartsClipPath.js +2 -3
  347. package/node/ChartsGrid/ChartsGrid.js +17 -66
  348. package/node/ChartsGrid/ChartsHorizontalGrid.js +43 -0
  349. package/node/ChartsGrid/ChartsVerticalGrid.js +43 -0
  350. package/node/ChartsGrid/chartsGridClasses.js +1 -1
  351. package/node/ChartsGrid/styledCommonents.js +28 -0
  352. package/node/ChartsLegend/ChartsLegend.js +56 -23
  353. package/node/ChartsLegend/ContinuousColorLegend.js +2 -3
  354. package/node/ChartsLegend/DefaultChartsLegend.js +8 -5
  355. package/node/ChartsLegend/LegendPerItem.js +2 -7
  356. package/node/ChartsLegend/PiecewiseColorLegend.js +2 -8
  357. package/node/ChartsLegend/legendItemsPlacement.js +1 -1
  358. package/node/ChartsLegend/useAxis.js +1 -2
  359. package/node/ChartsLegend/utils.js +1 -1
  360. package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -3
  361. package/node/ChartsOverlay/ChartsLoadingOverlay.js +2 -3
  362. package/node/ChartsOverlay/ChartsNoDataOverlay.js +2 -3
  363. package/node/ChartsOverlay/ChartsOverlay.js +2 -3
  364. package/node/ChartsReferenceLine/ChartsReferenceLine.js +2 -3
  365. package/node/ChartsReferenceLine/ChartsXReferenceLine.js +2 -3
  366. package/node/ChartsReferenceLine/ChartsYReferenceLine.js +2 -3
  367. package/node/ChartsReferenceLine/chartsReferenceLineClasses.js +1 -1
  368. package/node/ChartsReferenceLine/common.js +1 -1
  369. package/node/ChartsSurface/ChartsSurface.js +2 -3
  370. package/node/ChartsText/ChartsText.js +2 -3
  371. package/node/ChartsTooltip/ChartsAxisTooltipContent.js +2 -3
  372. package/node/ChartsTooltip/ChartsItemTooltipContent.js +2 -3
  373. package/node/ChartsTooltip/ChartsTooltip.js +10 -9
  374. package/node/ChartsTooltip/ChartsTooltipTable.js +9 -4
  375. package/node/ChartsTooltip/DefaultChartsAxisTooltipContent.js +3 -4
  376. package/node/ChartsTooltip/DefaultChartsItemTooltipContent.js +3 -4
  377. package/node/ChartsTooltip/chartsTooltipClasses.js +1 -1
  378. package/node/ChartsTooltip/utils.js +2 -3
  379. package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -3
  380. package/node/ChartsXAxis/ChartsXAxis.js +8 -4
  381. package/node/ChartsYAxis/ChartsYAxis.js +8 -4
  382. package/node/Gauge/Gauge.js +2 -3
  383. package/node/Gauge/GaugeContainer.js +2 -3
  384. package/node/Gauge/GaugeProvider.js +1 -2
  385. package/node/Gauge/GaugeReferenceArc.js +2 -3
  386. package/node/Gauge/GaugeValueArc.js +2 -3
  387. package/node/Gauge/GaugeValueText.js +2 -3
  388. package/node/Gauge/gaugeClasses.js +1 -1
  389. package/node/LineChart/AnimatedArea.js +30 -14
  390. package/node/LineChart/AnimatedLine.js +30 -14
  391. package/node/LineChart/AreaElement.js +2 -3
  392. package/node/LineChart/AreaPlot.js +78 -74
  393. package/node/LineChart/LineChart.js +14 -4
  394. package/node/LineChart/LineElement.js +2 -3
  395. package/node/LineChart/LineHighlightElement.js +2 -3
  396. package/node/LineChart/LineHighlightPlot.js +2 -3
  397. package/node/LineChart/LinePlot.js +60 -56
  398. package/node/LineChart/MarkElement.js +2 -3
  399. package/node/LineChart/MarkPlot.js +2 -3
  400. package/node/LineChart/formatter.js +1 -1
  401. package/node/LineChart/plugin.js +1 -1
  402. package/node/LineChart/useLineChartProps.js +1 -1
  403. package/node/PieChart/PieArc.js +2 -3
  404. package/node/PieChart/PieArcLabel.js +2 -3
  405. package/node/PieChart/PieArcLabelPlot.js +2 -3
  406. package/node/PieChart/PieArcPlot.js +2 -3
  407. package/node/PieChart/PieChart.js +13 -3
  408. package/node/PieChart/PiePlot.js +2 -3
  409. package/node/PieChart/dataTransform/useTransformData.js +2 -3
  410. package/node/PieChart/formatter.js +1 -1
  411. package/node/PieChart/plugin.js +1 -1
  412. package/node/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -3
  413. package/node/ResponsiveChartContainer/useChartContainerDimensions.js +2 -3
  414. package/node/ResponsiveChartContainer/useResponsiveChartContainerProps.js +1 -1
  415. package/node/ScatterChart/Scatter.js +2 -3
  416. package/node/ScatterChart/ScatterChart.js +14 -4
  417. package/node/ScatterChart/ScatterPlot.js +2 -3
  418. package/node/ScatterChart/plugin.js +1 -1
  419. package/node/ScatterChart/useScatterChartProps.js +1 -1
  420. package/node/SparkLineChart/SparkLineChart.js +2 -3
  421. package/node/context/CartesianProvider/CartesianContext.js +1 -2
  422. package/node/context/CartesianProvider/CartesianProvider.js +1 -2
  423. package/node/context/CartesianProvider/computeValue.js +1 -1
  424. package/node/context/CartesianProvider/defaultizeAxis.js +1 -1
  425. package/node/context/CartesianProvider/useCartesianContext.js +1 -2
  426. package/node/context/DrawingProvider.js +2 -3
  427. package/node/context/HighlightedProvider/HighlightedContext.js +1 -2
  428. package/node/context/HighlightedProvider/HighlightedProvider.js +2 -3
  429. package/node/context/HighlightedProvider/useHighlighted.js +1 -2
  430. package/node/context/InteractionProvider.js +2 -3
  431. package/node/context/PluginProvider/PluginContext.js +1 -2
  432. package/node/context/PluginProvider/PluginProvider.js +1 -2
  433. package/node/context/PluginProvider/useColorProcessor.js +1 -2
  434. package/node/context/PluginProvider/useSeriesFormatter.js +1 -2
  435. package/node/context/PluginProvider/useXExtremumGetter.js +1 -2
  436. package/node/context/PluginProvider/useYExtremumGetter.js +1 -2
  437. package/node/context/SeriesProvider/SeriesContext.js +1 -2
  438. package/node/context/SeriesProvider/SeriesProvider.js +1 -2
  439. package/node/context/SeriesProvider/processSeries.js +1 -1
  440. package/node/context/ZAxisContextProvider.js +2 -3
  441. package/node/hooks/useAxisEvents.js +1 -2
  442. package/node/hooks/useChartDimensions.js +2 -3
  443. package/node/hooks/useChartId.js +1 -2
  444. package/node/hooks/useColorScale.js +1 -2
  445. package/node/hooks/useDrawingArea.js +1 -2
  446. package/node/hooks/useInteractionItemProps.js +1 -2
  447. package/node/hooks/useMounted.js +2 -3
  448. package/node/hooks/useReducedMotion.js +14 -12
  449. package/node/hooks/useSeries.js +1 -2
  450. package/node/hooks/useSvgRef.js +1 -2
  451. package/node/hooks/useTicks.js +1 -2
  452. package/node/index.js +1 -1
  453. package/node/internals/components/AxisSharedComponents.js +1 -1
  454. package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +2 -3
  455. package/node/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +1 -2
  456. package/node/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +1 -2
  457. package/node/internals/defaultizeColor.js +1 -1
  458. package/node/internals/defaultizeValueFormatter.js +1 -1
  459. package/node/internals/domUtils.js +1 -1
  460. package/node/internals/getWordsByLines.js +1 -1
  461. package/node/internals/useStringInterpolator.js +28 -0
  462. package/node/tests/firePointerEvent.js +1 -1
  463. package/node/themeAugmentation/index.js +1 -38
  464. package/package.json +4 -3
  465. package/themeAugmentation/components.d.ts +2 -0
  466. package/themeAugmentation/index.d.ts +3 -3
  467. package/themeAugmentation/index.js +0 -3
  468. package/themeAugmentation/overrides.d.ts +6 -4
  469. package/internals/useAnimatedPath.d.ts +0 -1
  470. package/node/internals/useAnimatedPath.js +0 -42
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { InteractionContext } from '../context/InteractionProvider';
3
- import { useHighlighted } from '../context';
2
+ import { InteractionContext } from "../context/InteractionProvider.js";
3
+ import { useHighlighted } from "../context/index.js";
4
4
  export const useInteractionItemProps = skip => {
5
5
  const {
6
6
  dispatch: dispatchInteraction
@@ -1,4 +1,10 @@
1
1
  import { useIsomorphicLayoutEffect, Globals } from '@react-spring/web';
2
+ const handleMediaChange = e => {
3
+ Globals.assign({
4
+ // Modification such the react-spring implementation such that this hook can remove animation but never activate animation.
5
+ skipAnimation: e.matches || undefined
6
+ });
7
+ };
2
8
 
3
9
  /**
4
10
  * Returns `boolean` or `null`, used to automatically
@@ -8,23 +14,18 @@ import { useIsomorphicLayoutEffect, Globals } from '@react-spring/web';
8
14
  * The return value, post-effect, is the value of their preferred setting
9
15
  */
10
16
  export const useReducedMotion = () => {
11
- // Taken from: https://github.com/pmndrs/react-spring/blob/02ec877bbfab0df46da0e4a47d5f68d3e731206a/packages/shared/src/hooks/useReducedMotion.ts#L13
17
+ // Taken from: https://github.com/pmndrs/react-spring/blob/fd65b605b85c3a24143c4ce9dd322fdfca9c66be/packages/shared/src/hooks/useReducedMotion.ts
12
18
 
13
19
  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
20
+ // Skip animation test/jsdom
21
+ const shouldSkipAnimation = !window?.matchMedia;
22
+ if (shouldSkipAnimation) {
23
+ handleMediaChange({
24
+ matches: true
18
25
  });
19
- return () => {};
26
+ return undefined;
20
27
  }
21
28
  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
29
  handleMediaChange(mql);
29
30
 
30
31
  // 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,5 @@
1
- import { isBandScale } from '../internals/isBandScale';
2
- import { useXAxis, useYAxis } from './useAxis';
1
+ import { isBandScale } from "../internals/isBandScale.js";
2
+ import { useXAxis, useYAxis } from "./useAxis.js";
3
3
 
4
4
  /**
5
5
  * For a given scale return a function that map value to their position.
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SeriesContext } from '../context/SeriesProvider';
2
+ import { SeriesContext } from "../context/SeriesProvider/index.js";
3
3
 
4
4
  /**
5
5
  * Get access to the internal state of series.
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SvgContext } from '../context/DrawingProvider';
2
+ import { SvgContext } from "../context/DrawingProvider.js";
3
3
  export function useSvgRef() {
4
4
  const {
5
5
  isInitialized,
package/hooks/useTicks.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { isBandScale } from '../internals/isBandScale';
3
- import { isInfinity } from '../internals/isInfinity';
2
+ import { isBandScale } from "../internals/isBandScale.js";
3
+ import { isInfinity } from "../internals/isInfinity.js";
4
4
  export function getTickNumber(params) {
5
5
  const {
6
6
  tickMaxStep,
package/index.js CHANGED
@@ -1,33 +1,33 @@
1
1
  /**
2
- * @mui/x-charts v7.15.0
2
+ * @mui/x-charts v7.16.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) {
@@ -2,17 +2,17 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  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';
5
+ import { BarPlot } from "./BarPlot.js";
6
+ import { ResponsiveChartContainer } from "../ResponsiveChartContainer/index.js";
7
+ import { ChartsAxis } from "../ChartsAxis/index.js";
8
+ import { ChartsTooltip } from "../ChartsTooltip/index.js";
9
+ import { ChartsLegend } from "../ChartsLegend/index.js";
10
+ import { ChartsAxisHighlight } from "../ChartsAxisHighlight/index.js";
11
+ import { ChartsClipPath } from "../ChartsClipPath/index.js";
12
+ import { ChartsGrid } from "../ChartsGrid/index.js";
13
+ import { ChartsOnAxisClickHandler } from "../ChartsOnAxisClickHandler/index.js";
14
+ import { ChartsOverlay } from "../ChartsOverlay/ChartsOverlay.js";
15
+ import { useBarChartProps } from "./useBarChartProps.js";
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  /**
18
18
  * Demos:
@@ -47,7 +47,7 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(inProps, ref) {
47
47
  return /*#__PURE__*/_jsxs(ResponsiveChartContainer, _extends({
48
48
  ref: ref
49
49
  }, chartContainerProps, {
50
- children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), props.grid && /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
50
+ children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
51
51
  children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
52
52
  })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
53
53
  }));
@@ -139,6 +139,17 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
139
139
  classes: PropTypes.object,
140
140
  direction: PropTypes.oneOf(['column', 'row']),
141
141
  hidden: PropTypes.bool,
142
+ itemGap: PropTypes.number,
143
+ itemMarkHeight: PropTypes.number,
144
+ itemMarkWidth: PropTypes.number,
145
+ labelStyle: PropTypes.object,
146
+ markGap: PropTypes.number,
147
+ padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
148
+ bottom: PropTypes.number,
149
+ left: PropTypes.number,
150
+ right: PropTypes.number,
151
+ top: PropTypes.number
152
+ })]),
142
153
  position: PropTypes.shape({
143
154
  horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
144
155
  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) {
@@ -10,8 +10,8 @@ import { styled } from '@mui/material/styles';
10
10
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
11
11
  import { color as d3Color } from '@mui/x-charts-vendor/d3-color';
12
12
  import { animated } from '@react-spring/web';
13
- import { useInteractionItemProps } from '../hooks/useInteractionItemProps';
14
- import { useItemHighlighted } from '../context';
13
+ import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
14
+ import { useItemHighlighted } from "../context/index.js";
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
16
  export function getBarElementUtilityClass(slot) {
17
17
  return generateUtilityClass('MuiBarElement', slot);
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import { styled, useThemeProps } from '@mui/material/styles';
6
6
  import { animated } from '@react-spring/web';
7
7
  import PropTypes from 'prop-types';
8
- import { barLabelClasses } from './barLabelClasses';
8
+ import { barLabelClasses } from "./barLabelClasses.js";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  export const BarLabelComponent = styled(animated.text, {
11
11
  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";
@@ -4,14 +4,14 @@ const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  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';
7
+ import { useCartesianContext } from "../context/CartesianProvider/index.js";
8
+ import { BarElement } from "./BarElement.js";
9
+ import getColor from "./getColor.js";
10
+ import { useChartId } from "../hooks/index.js";
11
+ import { BarClipPath } from "./BarClipPath.js";
12
+ import { BarLabelPlot } from "./BarLabel/BarLabelPlot.js";
13
+ import { checkScaleErrors } from "./checkScaleErrors.js";
14
+ import { useBarSeries } from "../hooks/useSeries.js";
15
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  /**
17
17
  * 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,
@@ -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,
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "tooltip", "onAxisClick", "axisHighlight", "legend", "grid", "topAxis", "leftAxis", "rightAxis", "bottomAxis", "children", "slots", "slotProps", "skipAnimation", "loading", "layout", "onItemClick", "highlightedItem", "onHighlightChange", "borderRadius", "barLabel", "className"];
4
4
  import useId from '@mui/utils/useId';
5
- import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '../constants';
5
+ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../constants/index.js";
6
6
  /**
7
7
  * A helper function that extracts BarChartProps from the input props
8
8
  * and returns an object with props for the children components of BarChart.
@@ -1,15 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { DrawingProvider } from '../context/DrawingProvider';
5
- import { SeriesProvider } from '../context/SeriesProvider';
6
- import { InteractionProvider } from '../context/InteractionProvider';
7
- import { ChartsSurface } from '../ChartsSurface';
8
- import { CartesianProvider } from '../context/CartesianProvider';
9
- import { ChartsAxesGradients } from '../internals/components/ChartsAxesGradients';
10
- import { HighlightedProvider, ZAxisContextProvider } from '../context';
11
- import { PluginProvider } from '../context/PluginProvider';
12
- import { useChartContainerProps } from './useChartContainerProps';
4
+ import { DrawingProvider } from "../context/DrawingProvider.js";
5
+ import { SeriesProvider } from "../context/SeriesProvider/index.js";
6
+ import { InteractionProvider } from "../context/InteractionProvider.js";
7
+ import { ChartsSurface } from "../ChartsSurface/index.js";
8
+ import { CartesianProvider } from "../context/CartesianProvider/index.js";
9
+ import { ChartsAxesGradients } from "../internals/components/ChartsAxesGradients/index.js";
10
+ import { HighlightedProvider, ZAxisContextProvider } from "../context/index.js";
11
+ import { PluginProvider } from "../context/PluginProvider/index.js";
12
+ import { useChartContainerProps } from "./useChartContainerProps.js";
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(props, ref) {
15
15
  const {
@@ -1 +1 @@
1
- export * from './ChartContainer';
1
+ export * from "./ChartContainer.js";
@@ -3,8 +3,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["width", "height", "series", "margin", "xAxis", "yAxis", "zAxis", "colors", "dataset", "sx", "title", "desc", "disableAxisListener", "highlightedItem", "onHighlightChange", "plugins", "children"];
4
4
  import * as React from 'react';
5
5
  import useForkRef from '@mui/utils/useForkRef';
6
- import { useDefaultizeAxis } from './useDefaultizeAxis';
7
- import { useReducedMotion } from '../hooks/useReducedMotion';
6
+ import { useDefaultizeAxis } from "./useDefaultizeAxis.js";
7
+ import { useReducedMotion } from "../hooks/useReducedMotion.js";
8
8
  export const useChartContainerProps = (props, ref) => {
9
9
  const {
10
10
  width,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '../constants';
3
+ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../constants/index.js";
4
4
  const defaultizeAxis = (inAxis, dataset, axisName) => {
5
5
  const DEFAULT_AXIS_KEY = axisName === 'x' ? DEFAULT_X_AXIS_KEY : DEFAULT_Y_AXIS_KEY;
6
6
  return [...(inAxis?.map((axis, index) => _extends({