@mui/x-charts 8.3.1 → 8.5.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 (204) hide show
  1. package/BarChart/BarChart.d.ts +9 -2
  2. package/BarChart/BarChart.js +11 -3
  3. package/BarChart/useBarChartProps.js +1 -1
  4. package/CHANGELOG.md +213 -0
  5. package/ChartContainer/ChartContainer.d.ts +21 -2
  6. package/ChartContainer/ChartContainer.js +17 -1
  7. package/ChartContainer/useChartContainerProps.js +7 -3
  8. package/ChartDataProvider/ChartDataProvider.d.ts +11 -1
  9. package/ChartDataProvider/ChartDataProvider.js +19 -2
  10. package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -0
  11. package/ChartDataProvider/useChartDataProviderProps.js +7 -3
  12. package/ChartsAxis/axisClasses.d.ts +5 -0
  13. package/ChartsAxis/axisClasses.js +1 -1
  14. package/ChartsLegend/ChartsLegend.js +1 -0
  15. package/ChartsLocalizationProvider/ChartsLocalizationProvider.js +1 -3
  16. package/ChartsSurface/ChartsSurface.js +1 -0
  17. package/ChartsXAxis/ChartsXAxis.js +7 -16
  18. package/ChartsYAxis/ChartsYAxis.js +4 -8
  19. package/Gauge/Gauge.js +1 -0
  20. package/Gauge/GaugeContainer.js +1 -0
  21. package/Gauge/GaugeProvider.js +1 -3
  22. package/LineChart/AnimatedLine.js +1 -0
  23. package/LineChart/LineChart.d.ts +9 -2
  24. package/LineChart/LineChart.js +11 -3
  25. package/LineChart/LineHighlightPlot.js +1 -4
  26. package/LineChart/MarkPlot.js +1 -4
  27. package/LineChart/useLineChartProps.js +1 -1
  28. package/PieChart/PieArc.js +1 -0
  29. package/PieChart/PieArcLabel.js +1 -0
  30. package/PieChart/PieChart.d.ts +10 -3
  31. package/PieChart/PieChart.js +18 -9
  32. package/RadarChart/RadarChart.d.ts +21 -3
  33. package/RadarChart/RadarChart.js +20 -4
  34. package/RadarChart/RadarChart.plugins.d.ts +5 -0
  35. package/RadarChart/RadarChart.plugins.js +10 -0
  36. package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +6 -11
  37. package/RadarChart/RadarDataProvider/RadarDataProvider.js +6 -116
  38. package/RadarChart/index.d.ts +2 -0
  39. package/RadarChart/index.js +15 -1
  40. package/RadarChart/useRadarChartProps.d.ts +2 -1
  41. package/RadarChart/useRadarChartProps.js +3 -1
  42. package/ScatterChart/Scatter.js +3 -11
  43. package/ScatterChart/ScatterChart.d.ts +9 -2
  44. package/ScatterChart/ScatterChart.js +13 -5
  45. package/ScatterChart/useScatterChartProps.js +4 -2
  46. package/SparkLineChart/SparkLineChart.d.ts +1 -1
  47. package/SparkLineChart/SparkLineChart.js +31 -26
  48. package/Toolbar/Toolbar.d.ts +9 -3
  49. package/Toolbar/Toolbar.js +23 -7
  50. package/Toolbar/Toolbar.types.d.ts +15 -0
  51. package/Toolbar/Toolbar.types.js +5 -0
  52. package/Toolbar/ToolbarButton.d.ts +8 -2
  53. package/Toolbar/ToolbarButton.js +25 -6
  54. package/Toolbar/chartToolbarClasses.d.ts +6 -0
  55. package/Toolbar/chartToolbarClasses.js +9 -0
  56. package/Toolbar/index.d.ts +3 -1
  57. package/Toolbar/index.js +22 -0
  58. package/Toolbar/internals/ChartsToolbar.d.ts +6 -0
  59. package/Toolbar/internals/ChartsToolbar.js +14 -0
  60. package/context/ChartProvider/ChartContext.js +1 -3
  61. package/context/ChartsSlotsContext.d.ts +20 -0
  62. package/context/ChartsSlotsContext.js +44 -0
  63. package/context/index.d.ts +2 -1
  64. package/context/index.js +11 -0
  65. package/context/useChartApiContext.d.ts +10 -0
  66. package/context/useChartApiContext.js +27 -0
  67. package/esm/BarChart/BarChart.d.ts +9 -2
  68. package/esm/BarChart/BarChart.js +11 -3
  69. package/esm/BarChart/useBarChartProps.js +1 -1
  70. package/esm/ChartContainer/ChartContainer.d.ts +21 -2
  71. package/esm/ChartContainer/ChartContainer.js +17 -1
  72. package/esm/ChartContainer/useChartContainerProps.js +7 -3
  73. package/esm/ChartDataProvider/ChartDataProvider.d.ts +11 -1
  74. package/esm/ChartDataProvider/ChartDataProvider.js +19 -2
  75. package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +2 -0
  76. package/esm/ChartDataProvider/useChartDataProviderProps.js +7 -3
  77. package/esm/ChartsAxis/axisClasses.d.ts +5 -0
  78. package/esm/ChartsAxis/axisClasses.js +1 -1
  79. package/esm/ChartsLegend/ChartsLegend.js +1 -0
  80. package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.js +1 -3
  81. package/esm/ChartsSurface/ChartsSurface.js +1 -0
  82. package/esm/ChartsXAxis/ChartsXAxis.js +7 -16
  83. package/esm/ChartsYAxis/ChartsYAxis.js +4 -8
  84. package/esm/Gauge/Gauge.js +1 -0
  85. package/esm/Gauge/GaugeContainer.js +1 -0
  86. package/esm/Gauge/GaugeProvider.js +1 -3
  87. package/esm/LineChart/AnimatedLine.js +1 -0
  88. package/esm/LineChart/LineChart.d.ts +9 -2
  89. package/esm/LineChart/LineChart.js +11 -3
  90. package/esm/LineChart/LineHighlightPlot.js +1 -4
  91. package/esm/LineChart/MarkPlot.js +1 -4
  92. package/esm/LineChart/useLineChartProps.js +1 -1
  93. package/esm/PieChart/PieArc.js +1 -0
  94. package/esm/PieChart/PieArcLabel.js +1 -0
  95. package/esm/PieChart/PieChart.d.ts +10 -3
  96. package/esm/PieChart/PieChart.js +16 -7
  97. package/esm/RadarChart/RadarChart.d.ts +21 -3
  98. package/esm/RadarChart/RadarChart.js +20 -4
  99. package/esm/RadarChart/RadarChart.plugins.d.ts +5 -0
  100. package/esm/RadarChart/RadarChart.plugins.js +4 -0
  101. package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +6 -11
  102. package/esm/RadarChart/RadarDataProvider/RadarDataProvider.js +5 -115
  103. package/esm/RadarChart/index.d.ts +2 -0
  104. package/esm/RadarChart/index.js +2 -0
  105. package/esm/RadarChart/useRadarChartProps.d.ts +2 -1
  106. package/esm/RadarChart/useRadarChartProps.js +3 -1
  107. package/esm/ScatterChart/Scatter.js +3 -11
  108. package/esm/ScatterChart/ScatterChart.d.ts +9 -2
  109. package/esm/ScatterChart/ScatterChart.js +13 -5
  110. package/esm/ScatterChart/useScatterChartProps.js +4 -2
  111. package/esm/SparkLineChart/SparkLineChart.d.ts +1 -1
  112. package/esm/SparkLineChart/SparkLineChart.js +31 -26
  113. package/esm/Toolbar/Toolbar.d.ts +9 -3
  114. package/esm/Toolbar/Toolbar.js +22 -7
  115. package/esm/Toolbar/Toolbar.types.d.ts +15 -0
  116. package/esm/Toolbar/Toolbar.types.js +1 -0
  117. package/esm/Toolbar/ToolbarButton.d.ts +8 -2
  118. package/esm/Toolbar/ToolbarButton.js +24 -5
  119. package/esm/Toolbar/chartToolbarClasses.d.ts +6 -0
  120. package/esm/Toolbar/chartToolbarClasses.js +2 -0
  121. package/esm/Toolbar/index.d.ts +3 -1
  122. package/esm/Toolbar/index.js +3 -1
  123. package/esm/Toolbar/internals/ChartsToolbar.d.ts +6 -0
  124. package/esm/Toolbar/internals/ChartsToolbar.js +8 -0
  125. package/esm/context/ChartProvider/ChartContext.js +1 -3
  126. package/esm/context/ChartsSlotsContext.d.ts +20 -0
  127. package/esm/context/ChartsSlotsContext.js +35 -0
  128. package/esm/context/index.d.ts +2 -1
  129. package/esm/context/index.js +1 -0
  130. package/esm/context/useChartApiContext.d.ts +10 -0
  131. package/esm/context/useChartApiContext.js +21 -0
  132. package/esm/hooks/index.d.ts +1 -0
  133. package/esm/hooks/index.js +1 -0
  134. package/esm/hooks/useTicks.js +2 -6
  135. package/esm/index.js +1 -1
  136. package/esm/internals/constants.d.ts +3 -1
  137. package/esm/internals/constants.js +2 -1
  138. package/esm/internals/consumeSlots.js +2 -1
  139. package/esm/internals/consumeThemeProps.js +3 -1
  140. package/esm/internals/dateHelpers.d.ts +15 -0
  141. package/esm/internals/dateHelpers.js +20 -0
  142. package/esm/internals/domUtils.d.ts +1 -2
  143. package/esm/internals/domUtils.js +8 -19
  144. package/esm/internals/index.d.ts +4 -1
  145. package/esm/internals/index.js +4 -1
  146. package/esm/internals/material/index.d.ts +2 -0
  147. package/esm/internals/plugins/allPlugins.d.ts +1 -0
  148. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +11 -17
  149. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +16 -13
  150. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +2 -8
  151. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -3
  152. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +14 -0
  153. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +5 -2
  154. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +4 -5
  155. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +1 -3
  156. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +5 -2
  157. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +83 -0
  158. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +8 -1
  159. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +17 -0
  160. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +5 -0
  161. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +11 -5
  162. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -8
  163. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -3
  164. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +2 -5
  165. package/esm/models/index.d.ts +2 -2
  166. package/esm/models/index.js +1 -0
  167. package/esm/models/slots/chartsBaseSlotProps.d.ts +1 -0
  168. package/hooks/index.d.ts +1 -0
  169. package/hooks/index.js +12 -0
  170. package/hooks/useTicks.js +2 -6
  171. package/index.js +1 -1
  172. package/internals/constants.d.ts +3 -1
  173. package/internals/constants.js +3 -2
  174. package/internals/consumeSlots.js +2 -1
  175. package/internals/consumeThemeProps.js +3 -1
  176. package/internals/dateHelpers.d.ts +15 -0
  177. package/internals/dateHelpers.js +28 -0
  178. package/internals/domUtils.d.ts +1 -2
  179. package/internals/domUtils.js +8 -20
  180. package/internals/index.d.ts +4 -1
  181. package/internals/index.js +44 -8
  182. package/internals/material/index.d.ts +2 -0
  183. package/internals/plugins/allPlugins.d.ts +1 -0
  184. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +11 -17
  185. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +16 -13
  186. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +5 -11
  187. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +7 -8
  188. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +14 -0
  189. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +6 -3
  190. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +4 -5
  191. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +1 -3
  192. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +5 -2
  193. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +83 -0
  194. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +9 -2
  195. package/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +17 -0
  196. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +5 -0
  197. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +11 -5
  198. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +5 -11
  199. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -3
  200. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +2 -5
  201. package/models/index.d.ts +2 -2
  202. package/models/index.js +11 -0
  203. package/models/slots/chartsBaseSlotProps.d.ts +1 -0
  204. package/package.json +3 -3
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { MakeOptional } from '@mui/x-internals/types';
3
+ import { ChartsSlotProps, ChartsSlots } from "../internals/material/index.js";
4
+ import { ChartsToolbarSlotProps, ChartsToolbarSlots } from "../Toolbar/index.js";
3
5
  import { BarPlotProps, BarPlotSlotProps, BarPlotSlots } from "./BarPlot.js";
4
6
  import { ChartContainerProps } from "../ChartContainer/index.js";
5
7
  import { ChartsAxisProps } from "../ChartsAxis/index.js";
@@ -11,8 +13,8 @@ import { ChartsAxisSlots, ChartsAxisSlotProps } from "../models/axis.js";
11
13
  import { ChartsGridProps } from "../ChartsGrid/index.js";
12
14
  import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from "../ChartsOverlay/ChartsOverlay.js";
13
15
  import { BarChartPluginsSignatures } from "./BarChart.plugins.js";
14
- export interface BarChartSlots extends ChartsAxisSlots, BarPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots {}
15
- export interface BarChartSlotProps extends ChartsAxisSlotProps, BarPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps {}
16
+ export interface BarChartSlots extends ChartsAxisSlots, BarPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
17
+ export interface BarChartSlotProps extends ChartsAxisSlotProps, BarPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
16
18
  export interface BarChartProps extends Omit<ChartContainerProps<'bar', BarChartPluginsSignatures>, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<BarPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
17
19
  /**
18
20
  * The series to display in the bar chart.
@@ -50,6 +52,11 @@ export interface BarChartProps extends Omit<ChartContainerProps<'bar', BarChartP
50
52
  * @default 'vertical'
51
53
  */
52
54
  layout?: BarSeriesType['layout'];
55
+ /**
56
+ * If true, shows the default chart toolbar.
57
+ * @default false
58
+ */
59
+ showToolbar?: boolean;
53
60
  }
54
61
  /**
55
62
  * Demos:
@@ -24,6 +24,7 @@ var _ChartDataProvider = require("../ChartDataProvider");
24
24
  var _ChartsSurface = require("../ChartsSurface");
25
25
  var _useChartContainerProps = require("../ChartContainer/useChartContainerProps");
26
26
  var _ChartsWrapper = require("../internals/components/ChartsWrapper");
27
+ var _ChartsToolbar = require("../Toolbar/internals/ChartsToolbar");
27
28
  var _jsxRuntime = require("react/jsx-runtime");
28
29
  /**
29
30
  * Demos:
@@ -59,16 +60,18 @@ const BarChart = exports.BarChart = /*#__PURE__*/React.forwardRef(function BarCh
59
60
  chartsSurfaceProps
60
61
  } = (0, _useChartContainerProps.useChartContainerProps)(chartContainerProps, ref);
61
62
  const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
63
+ const Toolbar = props.slots?.toolbar ?? _ChartsToolbar.ChartsToolbar;
62
64
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProvider.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
63
65
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
64
- children: [!props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
66
+ children: [props.showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, {}) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
65
67
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
66
68
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_BarPlot.BarPlot, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
67
- })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), children]
68
- }))]
69
+ })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), children]
70
+ })), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip))]
69
71
  }))
70
72
  }));
71
73
  });
74
+ if (process.env.NODE_ENV !== "production") BarChart.displayName = "BarChart";
72
75
  process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
73
76
  // ----------------------------- Warning --------------------------------
74
77
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -195,6 +198,11 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
195
198
  * An array of [[BarSeriesType]] objects.
196
199
  */
197
200
  series: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
201
+ /**
202
+ * If true, shows the default chart toolbar.
203
+ * @default false
204
+ */
205
+ showToolbar: _propTypes.default.bool,
198
206
  /**
199
207
  * If `true`, animations are skipped.
200
208
  * If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
@@ -13,7 +13,7 @@ var React = _interopRequireWildcard(require("react"));
13
13
  var _useId = _interopRequireDefault(require("@mui/utils/useId"));
14
14
  var _constants = require("../constants");
15
15
  var _BarChart = require("./BarChart.plugins");
16
- const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "axisHighlight", "grid", "children", "slots", "slotProps", "skipAnimation", "loading", "layout", "onItemClick", "highlightedItem", "onHighlightChange", "borderRadius", "barLabel", "className", "hideLegend"];
16
+ const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "axisHighlight", "grid", "children", "slots", "slotProps", "skipAnimation", "loading", "layout", "onItemClick", "highlightedItem", "onHighlightChange", "borderRadius", "barLabel", "className", "hideLegend", "showToolbar"];
17
17
  /**
18
18
  * A helper function that extracts BarChartProps from the input props
19
19
  * and returns an object with props for the children components of BarChart.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,219 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.5.0
9
+
10
+ _May 29, 2025_
11
+
12
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Add support for exporting `RadarChartPro`, `FunnelChart` and `Heatmap` as image and PDF.
15
+ - 📊 `RadarChart` is now stable.
16
+
17
+ Special thanks go out to the community members for their valuable contributions:
18
+ @xBlizZer, @sai6855, @alisasanib.
19
+ Following are all team members who have contributed to this release:
20
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @oliviertassinari.
21
+
22
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
23
+
24
+ ### Data Grid
25
+
26
+ #### `@mui/x-data-grid@8.5.0`
27
+
28
+ - [DataGrid] Avoid ResizeObserver loop error (#17984) @cherniavskii
29
+ - [DataGrid] Fix column management `toggleColumn` event type (#18023) @KenanYusuf
30
+ - [DataGrid] Remove unnecessary `any` type (#17979) @sai6855
31
+
32
+ #### `@mui/x-data-grid-pro@8.5.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
33
+
34
+ Same changes as in `@mui/x-data-grid@8.5.0`, plus:
35
+
36
+ - [DataGridPro] Allow multi sorting without modifier key (#17925) @cherniavskii
37
+ - [DataGridPro] Row reordering icon improvements (#17947) @KenanYusuf
38
+ - [DataGridPro] Fix pinned columns order in column management (#17950) @alisasanib
39
+
40
+ #### `@mui/x-data-grid-premium@8.5.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
41
+
42
+ Same changes as in `@mui/x-data-grid-pro@8.5.0`, plus:
43
+
44
+ - [DataGridPremium] Export `GridApiPremium` type (#18037) @arminmeh
45
+
46
+ ### Date and Time Pickers
47
+
48
+ #### `@mui/x-date-pickers@8.5.0`
49
+
50
+ Internal changes.
51
+
52
+ #### `@mui/x-date-pickers-pro@8.5.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
53
+
54
+ Same changes as in `@mui/x-date-pickers@8.5.0`, plus:
55
+
56
+ - [DateRangePicker] Allow to override the format in the field (#17972) @flaviendelangle
57
+
58
+ ### Charts
59
+
60
+ #### `@mui/x-charts@8.5.0`
61
+
62
+ - [charts] Add `render` prop to charts toolbar components (#17649) @bernardobelchior
63
+ - [charts] Add configurable slots to toolbar (#17712) @bernardobelchior
64
+ - [charts] Export `useFunnelSeries` and `useRadarSeries` (#18034) @JCQuintas
65
+ - [charts] Expose `ChartApi` through context (#18004) @bernardobelchior
66
+ - [charts] Mark Radar chart as stable (#17946) @alexfauquette
67
+ - [charts] Only update store if interaction item is different (#17851) @bernardobelchior
68
+ - [charts] Reuse shared date utils (#18014) @JCQuintas
69
+ - [charts] Use Map for string cache instead of object (#17982) @bernardobelchior
70
+ - [charts] Fix Population pyramid demo (#17987) @oliviertassinari
71
+
72
+ #### `@mui/x-charts-pro@8.5.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
73
+
74
+ Same changes as in `@mui/x-charts@8.5.0`, plus:
75
+
76
+ - [charts-pro] Add range selection to zoom slider (#17949) @bernardobelchior
77
+ - [charts-pro] Allow configuring zoom slider tooltip (#18030) @bernardobelchior
78
+ - [charts-pro] Allow exporting a funnel chart (#17957) @bernardobelchior
79
+ - [charts-pro] Allow exporting a heatmap chart (#17916) @bernardobelchior
80
+ - [charts-pro] Allow exporting a radar chart (#17968) @bernardobelchior
81
+ - [charts-pro] Always show both zoom slider tooltips (#18027) @bernardobelchior
82
+ - [charts-pro] Show zoom slider tooltip when selecting range (#18028) @bernardobelchior
83
+ - [charts-pro] Split `ChartAxisZoomSlider` into smaller files (#18011) @bernardobelchior
84
+ - [charts-pro] Update zoom slider range selection cursor (#17977) @bernardobelchior
85
+ - [charts-pro] Add support for Heatmap legend (#17943) @alexfauquette
86
+
87
+ ### Tree View
88
+
89
+ #### `@mui/x-tree-view@8.5.0`
90
+
91
+ Internal changes.
92
+
93
+ #### `@mui/x-tree-view-pro@8.5.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
94
+
95
+ Same changes as in `@mui/x-tree-view@8.5.0`.
96
+
97
+ ### Docs
98
+
99
+ - [docs] Fix derived column pivoting demo crash (#17944) @arminmeh
100
+ - [docs] Fix light/dark mode blink on pickers overview (#18002) @alexfauquette
101
+ - [docs] Fix scatter shape demo causing horizontal overflow (#17974) @bernardobelchior
102
+
103
+ ### Core
104
+
105
+ - [code-infra] Add bundle size monitor (#17754) @Janpot
106
+ - [code-infra] Enable `babel-plugin-display-name` in vitest (#17903) @JCQuintas
107
+ - [infra] Remove last deprecated `ponyfillGlobal` usage (#18003) @LukasTy
108
+ - [infra] Use `babel-plugin-display-name` from npm (#18040) @LukasTy
109
+ - [x-telemetry] Remove deprecated `ponyfillGlobal` (#17986) @xBlizZer
110
+
111
+ ## 8.4.0
112
+
113
+ _May 21, 2025_
114
+
115
+ We'd like to offer a big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
116
+
117
+ - 🔺 Support regular [`pyramid` variation in the `<FunnelChart />` component](https://mui.com/x/react-charts/funnel/#pyramid-chart):
118
+
119
+ <img width="398" alt="Pyramid funnel chart" src="https://github.com/user-attachments/assets/90ccb221-3a48-4ffa-8878-89c6db16da86" />
120
+
121
+ - 📚 Documentation improvements
122
+ - 🌎 Improve Icelandic (is-IS) locale on the Data Grid
123
+ - 🐞 Bugfixes
124
+
125
+ Special thanks go out to the community members for their valuable contributions:
126
+ @aizerin, @arminmeh, @campmarc, @jyash97, @mapache-salvaje, @noraleonte, @nusr, @ragnarr18, @romgrk, @whereisrmsqhs.
127
+ Following are all team members who have contributed to this release:
128
+ @alexfauquette, @bernardobelchior, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @rita-codes.
129
+
130
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
131
+
132
+ ### Data Grid
133
+
134
+ #### `@mui/x-data-grid@8.4.0`
135
+
136
+ - [DataGrid] Fix content rendering for large rows while using automatic page size (#14737) @campmarc
137
+ - [DataGrid] Fix disabled typography variants crashing grid (#17934) @KenanYusuf
138
+ - [DataGrid] Fix tree data demo crash (#17904) @MBilalShafi
139
+ - [DataGrid] Use `exclude` selection model type if quick filter does not have actual values (#17899) @arminmeh
140
+ - [DataGrid] Fix clipboard copy behavior for cell ranges with empty cells (#16797) @nusr
141
+ - [l10n] Improve Icelandic (is-IS) locale (#17915) @ragnarr18
142
+
143
+ #### `@mui/x-data-grid-pro@8.4.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
144
+
145
+ Same changes as in `@mui/x-data-grid@8.4.0`, plus:
146
+
147
+ - [DataGridPro] Add `aria-expanded` attribute to the master detail toggle button (#17122) @whereisrmsqhs
148
+ - [DataGridPro] Preserve row state during server-side lazy loading (#17743) @arminmeh
149
+ - [DataGridPro] Prevent text selection when reordering rows (#16568) @jyash97
150
+
151
+ #### `@mui/x-data-grid-premium@8.4.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
152
+
153
+ Same changes as in `@mui/x-data-grid-pro@8.4.0`.
154
+
155
+ ### Date and Time Pickers
156
+
157
+ #### `@mui/x-date-pickers@8.4.0`
158
+
159
+ - [fields] Ensure fresh `disabled` value is used when focusing or clicking (#17914) @aizerin
160
+ - [fields] Improve the field controlled edition (#17816) @flaviendelangle
161
+ - [pickers] Fix `PickersTextField` overflow (#17942) @noraleonte
162
+
163
+ #### `@mui/x-date-pickers-pro@8.4.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
164
+
165
+ Same changes as in `@mui/x-date-pickers@8.4.0`.
166
+
167
+ ### Charts
168
+
169
+ #### `@mui/x-charts@8.4.0`
170
+
171
+ - [charts] Add grouped axes demo (#17848) @bernardobelchior
172
+ - [charts] Enable tooltip disable portal (#17871) @alexfauquette
173
+ - [charts] Improve performance in scatter chart (#17849) @bernardobelchior
174
+ - [charts] Recreate `isPointInside` less often (#17850) @bernardobelchior
175
+ - [charts] Try fix for flaky `useAnimate` test (#17777) @JCQuintas
176
+ - [charts] Add `isXInside` and `isYInside` (#17911) @bernardobelchior
177
+
178
+ #### `@mui/x-charts-pro@8.4.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
179
+
180
+ Same changes as in `@mui/x-charts@8.4.0`, plus:
181
+
182
+ - [charts-pro] Add size for zoom slider (#17736) @bernardobelchior
183
+ - [charts-pro] Add zoom slider tooltip (#17733) @bernardobelchior
184
+ - [charts-pro] Clean and document Heatmap Tooltip (#17933) @alexfauquette
185
+ - [charts-pro] Introduce `Pyramid` chart (#17783) @JCQuintas
186
+ - [charts-pro] Update zoom slider nomenclature (#17938) @bernardobelchior
187
+ - [charts-pro] Fix error when importing rasterizehtml (#17897) @bernardobelchior
188
+
189
+ ### Tree View
190
+
191
+ #### `@mui/x-tree-view@8.4.0`
192
+
193
+ - [TreeView] Add `getItemChildren` prop in `RichTreeView` (#17894) @rita-codes
194
+ - [TreeView] Add a method in the `apiRef` to toggle the editing status of an item (#17768) @rita-codes
195
+ - [TreeView] Add missing sx prop on the Tree Item component (#17930) @flaviendelangle
196
+
197
+ #### `@mui/x-tree-view-pro@8.4.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
198
+
199
+ Same changes as in `@mui/x-tree-view@8.4.0`.
200
+
201
+ ### Docs
202
+
203
+ - [docs] Add a recipe for drag and drop row grouping (#17638) @KenanYusuf
204
+ - [docs] Add introductory text to Data Grid component pages (#17902) @KenanYusuf
205
+ - [docs] Refactor embedded CodeSandbox on Data Grid—Quickstart page (#17749) @rita-codes
206
+ - [docs] Remove double border on Data Grid—Quickstart demo (#17932) @rita-codes
207
+ - [docs] Standardize `apiRef` copy (#17776) @mapache-salvaje
208
+ - [docs][DataGrid] Revise server-side data docs (#17007) @mapache-salvaje
209
+ - [docs][DataGrid] Audit and revise the tree data doc (#17650) @mapache-salvaje
210
+ - [docs][pickers] Fix migration guide references to range fields (#17861) @LukasTy
211
+ - [docs][charts] Reorganize the Tooltip documentation (#17917) @alexfauquette
212
+
213
+ ### Core
214
+
215
+ - [core] refactor: remove manual `displayName` (#17845) @romgrk
216
+ - [code-infra] Document how to use `vitest` cli (#17847) @JCQuintas
217
+ - [code-infra] Increase charts export test timeout (#17909) @JCQuintas
218
+ - [code-infra] Set `isolatedModules=true` in tsconfig (#17781) @JCQuintas
219
+ - [infra] Ensure proper docs preview path resolution (#17863) @LukasTy
220
+
8
221
  ## 8.3.1
9
222
 
10
223
  _May 14, 2025_
@@ -1,11 +1,30 @@
1
1
  import * as React from 'react';
2
+ import { PieChartPluginSignatures } from "../PieChart/PieChart.plugins.js";
3
+ import { BarChartPluginsSignatures } from "../BarChart/BarChart.plugins.js";
4
+ import { ScatterChartPluginsSignatures } from "../ScatterChart/ScatterChart.plugins.js";
5
+ import { LineChartPluginsSignatures } from "../LineChart/LineChart.plugins.js";
2
6
  import { ChartSeriesType } from "../models/seriesType/config.js";
3
7
  import { ChartDataProviderProps } from "../ChartDataProvider/index.js";
4
8
  import { ChartsSurfaceProps } from "../ChartsSurface/index.js";
5
- import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
9
+ import { AllPluginSignatures, DefaultPluginSignatures } from "../internals/plugins/allPlugins.js";
6
10
  import { ChartAnyPluginSignature } from "../internals/plugins/models/plugin.js";
11
+ import { ChartPublicAPI } from "../internals/plugins/models/index.js";
7
12
  export type ChartContainerProps<SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<SeriesType>> = Omit<ChartDataProviderProps<SeriesType, TSignatures>, 'children'> & ChartsSurfaceProps;
8
- export type ChartApi = NonNullable<NonNullable<ChartContainerProps['apiRef']>['current']>;
13
+ type PluginsPerSeriesType = {
14
+ line: LineChartPluginsSignatures;
15
+ scatter: ScatterChartPluginsSignatures;
16
+ bar: BarChartPluginsSignatures;
17
+ pie: PieChartPluginSignatures;
18
+ composition: DefaultPluginSignatures;
19
+ };
20
+ /**
21
+ * The API of the chart `apiRef` object.
22
+ * The chart type can be passed as the first generic parameter to narrow down the API to the specific chart type.
23
+ * @example ChartApi<'bar'>
24
+ * If the chart is being created using composition, the `composition` value can be used.
25
+ * @example ChartApi<'composition'>
26
+ */
27
+ export type ChartApi<TSeries extends keyof PluginsPerSeriesType | undefined = undefined, TSignatures extends readonly ChartAnyPluginSignature[] = (TSeries extends keyof PluginsPerSeriesType ? PluginsPerSeriesType[TSeries] : AllPluginSignatures)> = ChartPublicAPI<TSignatures>;
9
28
  /**
10
29
  * It sets up the data providers as well as the `<svg>` for the chart.
11
30
  *
@@ -14,6 +14,14 @@ var _ChartDataProvider = require("../ChartDataProvider");
14
14
  var _useChartContainerProps = require("./useChartContainerProps");
15
15
  var _ChartsSurface = require("../ChartsSurface");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
+ /**
18
+ * The API of the chart `apiRef` object.
19
+ * The chart type can be passed as the first generic parameter to narrow down the API to the specific chart type.
20
+ * @example ChartApi<'bar'>
21
+ * If the chart is being created using composition, the `composition` value can be used.
22
+ * @example ChartApi<'composition'>
23
+ */
24
+
17
25
  /**
18
26
  * It sets up the data providers as well as the `<svg>` for the chart.
19
27
  *
@@ -52,7 +60,7 @@ const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(fu
52
60
  });
53
61
 
54
62
  // @ts-ignore
55
-
63
+ if (process.env.NODE_ENV !== "production") ChartContainer.displayName = "ChartContainer";
56
64
  process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
57
65
  // ----------------------------- Warning --------------------------------
58
66
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -593,6 +601,14 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
593
601
  * If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
594
602
  */
595
603
  skipAnimation: _propTypes.default.bool,
604
+ /**
605
+ * The props for the slots.
606
+ */
607
+ slotProps: _propTypes.default.object,
608
+ /**
609
+ * Slots to customize charts' components.
610
+ */
611
+ slots: _propTypes.default.object,
596
612
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
597
613
  theme: _propTypes.default.oneOf(['dark', 'light']),
598
614
  title: _propTypes.default.string,
@@ -9,7 +9,7 @@ exports.useChartContainerProps = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
  var _allPlugins = require("../internals/plugins/allPlugins");
12
- const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "disableVoronoi", "voronoiMaxRadius", "onItemClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "rotationAxis", "radiusAxis", "skipAnimation", "seriesConfig", "plugins", "localeText"];
12
+ const _excluded = ["width", "height", "margin", "children", "series", "colors", "dataset", "desc", "onAxisClick", "disableVoronoi", "voronoiMaxRadius", "onItemClick", "disableAxisListener", "highlightedItem", "onHighlightChange", "sx", "title", "xAxis", "yAxis", "zAxis", "rotationAxis", "radiusAxis", "skipAnimation", "seriesConfig", "plugins", "localeText", "slots", "slotProps"];
13
13
  const useChartContainerProps = (props, ref) => {
14
14
  const _ref = props,
15
15
  {
@@ -38,7 +38,9 @@ const useChartContainerProps = (props, ref) => {
38
38
  skipAnimation,
39
39
  seriesConfig,
40
40
  plugins,
41
- localeText
41
+ localeText,
42
+ slots,
43
+ slotProps
42
44
  } = _ref,
43
45
  other = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
44
46
  const chartsSurfaceProps = (0, _extends2.default)({
@@ -69,7 +71,9 @@ const useChartContainerProps = (props, ref) => {
69
71
  height,
70
72
  localeText,
71
73
  seriesConfig,
72
- plugins: plugins ?? _allPlugins.DEFAULT_PLUGINS
74
+ plugins: plugins ?? _allPlugins.DEFAULT_PLUGINS,
75
+ slots,
76
+ slotProps
73
77
  };
74
78
  return {
75
79
  chartDataProviderProps,
@@ -1,10 +1,20 @@
1
1
  import * as React from 'react';
2
+ import { ChartsSlotProps, ChartsSlots } from "../internals/material/index.js";
2
3
  import { ChartProviderProps } from "../context/ChartProvider/index.js";
3
4
  import { ChartSeriesType } from "../models/seriesType/config.js";
4
5
  import { ChartAnyPluginSignature } from "../internals/plugins/models/plugin.js";
5
6
  import { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
6
7
  import { ChartsLocalizationProviderProps } from "../ChartsLocalizationProvider/index.js";
7
- export type ChartDataProviderProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = React.PropsWithChildren<ChartProviderProps<TSeries, TSignatures>['pluginParams'] & Pick<ChartProviderProps<TSeries, TSignatures>, 'seriesConfig' | 'plugins'>> & ChartsLocalizationProviderProps;
8
+ export type ChartDataProviderProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = React.PropsWithChildren<ChartProviderProps<TSeries, TSignatures>['pluginParams'] & Pick<ChartProviderProps<TSeries, TSignatures>, 'seriesConfig' | 'plugins'>> & ChartsLocalizationProviderProps & {
9
+ /**
10
+ * Slots to customize charts' components.
11
+ */
12
+ slots?: Partial<ChartsSlots>;
13
+ /**
14
+ * The props for the slots.
15
+ */
16
+ slotProps?: Partial<ChartsSlotProps>;
17
+ };
8
18
  /**
9
19
  * Orchestrates the data providers for the chart components and hooks.
10
20
  *
@@ -10,6 +10,8 @@ exports.ChartDataProvider = ChartDataProvider;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _material = require("../internals/material");
14
+ var _ChartsSlotsContext = require("../context/ChartsSlotsContext");
13
15
  var _useChartDataProviderProps = require("./useChartDataProviderProps");
14
16
  var _ChartProvider = require("../context/ChartProvider");
15
17
  var _ChartsLocalizationProvider = require("../ChartsLocalizationProvider");
@@ -45,12 +47,19 @@ function ChartDataProvider(props) {
45
47
  const {
46
48
  children,
47
49
  localeText,
48
- chartProviderProps
50
+ chartProviderProps,
51
+ slots,
52
+ slotProps
49
53
  } = (0, _useChartDataProviderProps.useChartDataProviderProps)(props);
50
54
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartProvider.ChartProvider, (0, _extends2.default)({}, chartProviderProps, {
51
55
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLocalizationProvider.ChartsLocalizationProvider, {
52
56
  localeText: localeText,
53
- children: children
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsSlotsContext.ChartsSlotsProvider, {
58
+ slots: slots,
59
+ slotProps: slotProps,
60
+ defaultSlots: _material.defaultSlotsMaterial,
61
+ children: children
62
+ })
54
63
  })
55
64
  }));
56
65
  }
@@ -107,6 +116,14 @@ process.env.NODE_ENV !== "production" ? ChartDataProvider.propTypes = {
107
116
  * If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
108
117
  */
109
118
  skipAnimation: _propTypes.default.bool,
119
+ /**
120
+ * The props for the slots.
121
+ */
122
+ slotProps: _propTypes.default.object,
123
+ /**
124
+ * Slots to customize charts' components.
125
+ */
126
+ slots: _propTypes.default.object,
110
127
  theme: _propTypes.default.oneOf(['dark', 'light']),
111
128
  /**
112
129
  * The width of the chart in px. If not defined, it takes the width of the parent element.
@@ -8,4 +8,6 @@ export declare const useChartDataProviderProps: <TSeries extends ChartSeriesType
8
8
  children: import("react").ReactNode;
9
9
  localeText: Partial<import("../locales/index.js").ChartsLocaleText> | undefined;
10
10
  chartProviderProps: ChartProviderProps<TSeries, TSignatures>;
11
+ slots: Partial<import("../internals/index.js").ChartsSlots> | undefined;
12
+ slotProps: Partial<import("../internals/index.js").ChartsSlotProps> | undefined;
11
13
  };
@@ -10,13 +10,15 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
  var _styles = require("@mui/material/styles");
12
12
  var _allPlugins = require("../internals/plugins/allPlugins");
13
- const _excluded = ["children", "localeText", "plugins", "seriesConfig"];
13
+ const _excluded = ["children", "localeText", "plugins", "seriesConfig", "slots", "slotProps"];
14
14
  const useChartDataProviderProps = props => {
15
15
  const {
16
16
  children,
17
17
  localeText,
18
18
  plugins = _allPlugins.DEFAULT_PLUGINS,
19
- seriesConfig
19
+ seriesConfig,
20
+ slots,
21
+ slotProps
20
22
  } = props,
21
23
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
22
24
  const theme = (0, _styles.useTheme)();
@@ -30,7 +32,9 @@ const useChartDataProviderProps = props => {
30
32
  return {
31
33
  children,
32
34
  localeText,
33
- chartProviderProps
35
+ chartProviderProps,
36
+ slots,
37
+ slotProps
34
38
  };
35
39
  };
36
40
  exports.useChartDataProviderProps = useChartDataProviderProps;
@@ -27,6 +27,11 @@ export interface ChartsAxisClasses {
27
27
  left: string;
28
28
  /** Styles applied to the right axis. */
29
29
  right: string;
30
+ /**
31
+ * Styles applied to the root element for the axis with the given ID.
32
+ * Needs to be suffixed with the axis ID: `.${axisClasses.id}-${axisId}`.
33
+ */
34
+ id: string;
30
35
  }
31
36
  export type ChartsAxisClassKey = keyof ChartsAxisClasses;
32
37
  export declare function getAxisUtilityClass(slot: string): string;
@@ -11,4 +11,4 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
11
11
  function getAxisUtilityClass(slot) {
12
12
  return (0, _generateUtilityClass.default)('MuiChartsAxis', slot);
13
13
  }
14
- const axisClasses = exports.axisClasses = (0, _generateUtilityClasses.default)('MuiChartsAxis', ['root', 'line', 'tickContainer', 'tick', 'tickLabel', 'label', 'directionX', 'directionY', 'top', 'bottom', 'left', 'right']);
14
+ const axisClasses = exports.axisClasses = (0, _generateUtilityClasses.default)('MuiChartsAxis', ['root', 'line', 'tickContainer', 'tick', 'tickLabel', 'label', 'directionX', 'directionY', 'top', 'bottom', 'left', 'right', 'id']);
@@ -107,6 +107,7 @@ const ChartsLegend = exports.ChartsLegend = (0, _consumeSlots.consumeSlots)('Mui
107
107
  })
108
108
  }));
109
109
  }));
110
+ if (process.env.NODE_ENV !== "production") ChartsLegend.displayName = "ChartsLegend";
110
111
  process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
111
112
  // ----------------------------- Warning --------------------------------
112
113
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -17,9 +17,7 @@ var _enUS = require("../locales/enUS");
17
17
  var _jsxRuntime = require("react/jsx-runtime");
18
18
  const _excluded = ["localeText"];
19
19
  const ChartsLocalizationContext = exports.ChartsLocalizationContext = /*#__PURE__*/React.createContext(null);
20
- if (process.env.NODE_ENV !== 'production') {
21
- ChartsLocalizationContext.displayName = 'ChartsLocalizationContext';
22
- }
20
+ if (process.env.NODE_ENV !== "production") ChartsLocalizationContext.displayName = "ChartsLocalizationContext";
23
21
  /**
24
22
  * Demos:
25
23
  *
@@ -93,6 +93,7 @@ const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(func
93
93
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxesGradients.ChartsAxesGradients, {}), hasIntrinsicSize && children]
94
94
  }));
95
95
  });
96
+ if (process.env.NODE_ENV !== "production") ChartsSurface.displayName = "ChartsSurface";
96
97
  process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes = {
97
98
  // ----------------------------- Warning --------------------------------
98
99
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -38,10 +38,11 @@ const _excluded = ["scale", "tickNumber", "reverse"];
38
38
  const useUtilityClasses = ownerState => {
39
39
  const {
40
40
  classes,
41
- position
41
+ position,
42
+ id
42
43
  } = ownerState;
43
44
  const slots = {
44
- root: ['root', 'directionX', position],
45
+ root: ['root', 'directionX', position, `id-${id}`],
45
46
  line: ['line'],
46
47
  tickContainer: ['tickContainer'],
47
48
  tick: ['tick'],
@@ -63,7 +64,7 @@ function getVisibleLabels(xTicks, {
63
64
  tickLabelMinGap,
64
65
  reverse,
65
66
  isMounted,
66
- isPointInside
67
+ isXInside
67
68
  }) {
68
69
  const getTickLabelSize = tick => {
69
70
  if (!isMounted || tick.formattedValue === undefined) {
@@ -98,7 +99,7 @@ function getVisibleLabels(xTicks, {
98
99
  if (labelIndex > 0 && direction * textPosition < direction * (previousTextLimit + tickLabelMinGap)) {
99
100
  return false;
100
101
  }
101
- if (!isPointInside(textPosition)) {
102
+ if (!isXInside(textPosition)) {
102
103
  return false;
103
104
  }
104
105
 
@@ -266,12 +267,7 @@ function ChartsXAxis(inProps) {
266
267
  tickLabelMinGap,
267
268
  reverse,
268
269
  isMounted,
269
- isPointInside: x => instance.isPointInside({
270
- x,
271
- y: -1
272
- }, {
273
- direction: 'x'
274
- })
270
+ isXInside: instance.isXInside
275
271
  });
276
272
  const axisLabelProps = (0, _useSlotProps.default)({
277
273
  elementType: Label,
@@ -319,12 +315,7 @@ function ChartsXAxis(inProps) {
319
315
  } = item;
320
316
  const xTickLabel = labelOffset ?? 0;
321
317
  const yTickLabel = positionSign * (tickSize + TICK_LABEL_GAP);
322
- const showTick = instance.isPointInside({
323
- x: tickOffset,
324
- y: -1
325
- }, {
326
- direction: 'x'
327
- });
318
+ const showTick = instance.isXInside(tickOffset);
328
319
  const tickLabel = tickLabels.get(item);
329
320
  const showTickLabel = visibleLabels.has(item);
330
321
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {