@mui/x-charts 6.0.0-alpha.14 → 6.0.0-alpha.16

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 (199) hide show
  1. package/BarChart/BarChart.d.ts +16 -2
  2. package/BarChart/BarChart.js +49 -11
  3. package/BarChart/BarElement.d.ts +1318 -3
  4. package/BarChart/BarElement.js +10 -8
  5. package/BarChart/BarPlot.d.ts +17 -1
  6. package/BarChart/BarPlot.js +152 -66
  7. package/CHANGELOG.md +169 -0
  8. package/ChartContainer/index.js +5 -2
  9. package/ChartsAxis/ChartsAxis.js +18 -2
  10. package/ChartsAxis/axisClasses.d.ts +1 -1
  11. package/ChartsAxisHighlight/ChartsAxisHighlight.js +2 -2
  12. package/ChartsClipPath/ChartsClipPath.js +2 -2
  13. package/ChartsLegend/ChartsLegend.d.ts +44 -24
  14. package/ChartsLegend/ChartsLegend.js +191 -145
  15. package/ChartsLegend/utils.d.ts +1 -6
  16. package/ChartsSurface.js +5 -13
  17. package/ChartsTooltip/ChartsAxisTooltipContent.js +2 -2
  18. package/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
  19. package/ChartsTooltip/ChartsTooltip.js +2 -2
  20. package/ChartsTooltip/utils.js +2 -2
  21. package/ChartsXAxis/ChartsXAxis.js +151 -40
  22. package/ChartsYAxis/ChartsYAxis.js +76 -33
  23. package/LineChart/AreaElement.d.ts +10 -0
  24. package/LineChart/AreaElement.js +12 -2
  25. package/LineChart/AreaPlot.d.ts +11 -0
  26. package/LineChart/AreaPlot.js +13 -2
  27. package/LineChart/LineChart.d.ts +13 -0
  28. package/LineChart/LineChart.js +40 -10
  29. package/LineChart/LineElement.d.ts +10 -0
  30. package/LineChart/LineElement.js +12 -2
  31. package/LineChart/LineHighlightElement.d.ts +10 -0
  32. package/LineChart/LineHighlightElement.js +12 -2
  33. package/LineChart/LineHighlightPlot.d.ts +10 -0
  34. package/LineChart/LineHighlightPlot.js +12 -2
  35. package/LineChart/LinePlot.d.ts +10 -0
  36. package/LineChart/LinePlot.js +12 -2
  37. package/LineChart/MarkElement.d.ts +10 -0
  38. package/LineChart/MarkElement.js +12 -2
  39. package/LineChart/MarkPlot.d.ts +10 -0
  40. package/LineChart/MarkPlot.js +12 -2
  41. package/PieChart/PieArc.js +2 -2
  42. package/PieChart/PieArcLabel.js +2 -2
  43. package/PieChart/PieChart.d.ts +13 -0
  44. package/PieChart/PieChart.js +41 -10
  45. package/PieChart/PiePlot.d.ts +10 -0
  46. package/PieChart/PiePlot.js +12 -2
  47. package/ResponsiveChartContainer/index.js +4 -4
  48. package/ScatterChart/Scatter.d.ts +10 -0
  49. package/ScatterChart/Scatter.js +12 -2
  50. package/ScatterChart/ScatterChart.d.ts +13 -0
  51. package/ScatterChart/ScatterChart.js +40 -10
  52. package/ScatterChart/ScatterPlot.d.ts +10 -0
  53. package/ScatterChart/ScatterPlot.js +12 -2
  54. package/SparkLineChart/SparkLineChart.d.ts +9 -0
  55. package/SparkLineChart/SparkLineChart.js +16 -2
  56. package/constants.js +1 -1
  57. package/context/CartesianContextProvider.js +20 -12
  58. package/context/DrawingProvider.d.ts +2 -0
  59. package/context/DrawingProvider.js +4 -2
  60. package/context/HighlightProvider.js +2 -2
  61. package/context/InteractionProvider.js +2 -2
  62. package/context/SeriesContextProvider.js +2 -2
  63. package/esm/BarChart/BarChart.js +47 -9
  64. package/esm/BarChart/BarElement.js +7 -4
  65. package/esm/BarChart/BarPlot.js +152 -67
  66. package/esm/ChartContainer/index.js +3 -0
  67. package/esm/ChartsAxis/ChartsAxis.js +16 -0
  68. package/esm/ChartsLegend/ChartsLegend.js +188 -142
  69. package/esm/ChartsSurface.js +3 -11
  70. package/esm/ChartsXAxis/ChartsXAxis.js +148 -37
  71. package/esm/ChartsYAxis/ChartsYAxis.js +73 -30
  72. package/esm/LineChart/AreaElement.js +10 -0
  73. package/esm/LineChart/AreaPlot.js +11 -0
  74. package/esm/LineChart/LineChart.js +38 -8
  75. package/esm/LineChart/LineElement.js +10 -0
  76. package/esm/LineChart/LineHighlightElement.js +10 -0
  77. package/esm/LineChart/LineHighlightPlot.js +10 -0
  78. package/esm/LineChart/LinePlot.js +10 -0
  79. package/esm/LineChart/MarkElement.js +10 -0
  80. package/esm/LineChart/MarkPlot.js +10 -0
  81. package/esm/PieChart/PieChart.js +39 -8
  82. package/esm/PieChart/PiePlot.js +10 -0
  83. package/esm/ResponsiveChartContainer/index.js +2 -2
  84. package/esm/ScatterChart/Scatter.js +10 -0
  85. package/esm/ScatterChart/ScatterChart.js +38 -8
  86. package/esm/ScatterChart/ScatterPlot.js +10 -0
  87. package/esm/SparkLineChart/SparkLineChart.js +14 -0
  88. package/esm/constants.js +1 -1
  89. package/esm/context/CartesianContextProvider.js +19 -11
  90. package/esm/context/DrawingProvider.js +2 -0
  91. package/esm/hooks/useChartDimensions.js +2 -0
  92. package/esm/hooks/useMounted.js +16 -0
  93. package/esm/hooks/useReducedMotion.js +27 -0
  94. package/esm/hooks/useTicks.js +15 -9
  95. package/esm/internals/components/AxisSharedComponents.js +15 -70
  96. package/esm/internals/components/ChartsText.js +75 -0
  97. package/esm/internals/domUtils.js +113 -0
  98. package/esm/internals/geometry.js +36 -0
  99. package/hooks/useAxisEvents.js +2 -2
  100. package/hooks/useChartDimensions.d.ts +2 -0
  101. package/hooks/useChartDimensions.js +4 -2
  102. package/hooks/useDrawingArea.js +2 -2
  103. package/hooks/useInteractionItemProps.js +2 -2
  104. package/hooks/useMounted.d.ts +1 -0
  105. package/hooks/useMounted.js +25 -0
  106. package/hooks/useReducedMotion.d.ts +8 -0
  107. package/hooks/useReducedMotion.js +33 -0
  108. package/hooks/useScale.d.ts +2 -2
  109. package/hooks/useScale.js +2 -2
  110. package/hooks/useTicks.d.ts +19 -11
  111. package/hooks/useTicks.js +18 -12
  112. package/index.js +1 -1
  113. package/internals/components/AxisSharedComponents.d.ts +0 -4
  114. package/internals/components/AxisSharedComponents.js +16 -71
  115. package/internals/components/ChartsText.d.ts +35 -0
  116. package/internals/components/ChartsText.js +85 -0
  117. package/internals/defaultizeColor.d.ts +1 -1
  118. package/internals/domUtils.d.ts +13 -0
  119. package/internals/domUtils.js +122 -0
  120. package/internals/geometry.d.ts +9 -0
  121. package/internals/geometry.js +42 -0
  122. package/legacy/BarChart/BarChart.js +47 -9
  123. package/legacy/BarChart/BarElement.js +6 -3
  124. package/legacy/BarChart/BarPlot.js +151 -63
  125. package/legacy/ChartContainer/index.js +3 -0
  126. package/legacy/ChartsAxis/ChartsAxis.js +16 -0
  127. package/legacy/ChartsLegend/ChartsLegend.js +203 -140
  128. package/legacy/ChartsSurface.js +2 -11
  129. package/legacy/ChartsXAxis/ChartsXAxis.js +152 -39
  130. package/legacy/ChartsYAxis/ChartsYAxis.js +73 -30
  131. package/legacy/LineChart/AreaElement.js +10 -0
  132. package/legacy/LineChart/AreaPlot.js +11 -0
  133. package/legacy/LineChart/LineChart.js +38 -8
  134. package/legacy/LineChart/LineElement.js +10 -0
  135. package/legacy/LineChart/LineHighlightElement.js +10 -0
  136. package/legacy/LineChart/LineHighlightPlot.js +10 -0
  137. package/legacy/LineChart/LinePlot.js +10 -0
  138. package/legacy/LineChart/MarkElement.js +10 -0
  139. package/legacy/LineChart/MarkPlot.js +10 -0
  140. package/legacy/PieChart/PieChart.js +39 -8
  141. package/legacy/PieChart/PiePlot.js +10 -0
  142. package/legacy/ResponsiveChartContainer/index.js +2 -2
  143. package/legacy/ScatterChart/Scatter.js +10 -0
  144. package/legacy/ScatterChart/ScatterChart.js +38 -8
  145. package/legacy/ScatterChart/ScatterPlot.js +10 -0
  146. package/legacy/SparkLineChart/SparkLineChart.js +14 -0
  147. package/legacy/constants.js +1 -1
  148. package/legacy/context/CartesianContextProvider.js +19 -11
  149. package/legacy/context/DrawingProvider.js +2 -0
  150. package/legacy/hooks/useChartDimensions.js +2 -0
  151. package/legacy/hooks/useMounted.js +21 -0
  152. package/legacy/hooks/useReducedMotion.js +27 -0
  153. package/legacy/hooks/useTicks.js +16 -9
  154. package/legacy/index.js +1 -1
  155. package/legacy/internals/components/AxisSharedComponents.js +9 -63
  156. package/legacy/internals/components/ChartsText.js +77 -0
  157. package/legacy/internals/domUtils.js +121 -0
  158. package/legacy/internals/geometry.js +37 -0
  159. package/models/axis.d.ts +25 -7
  160. package/models/layout.d.ts +7 -6
  161. package/models/seriesType/line.d.ts +2 -2
  162. package/modern/BarChart/BarChart.js +47 -9
  163. package/modern/BarChart/BarElement.js +7 -4
  164. package/modern/BarChart/BarPlot.js +149 -65
  165. package/modern/ChartContainer/index.js +3 -0
  166. package/modern/ChartsAxis/ChartsAxis.js +16 -0
  167. package/modern/ChartsLegend/ChartsLegend.js +188 -142
  168. package/modern/ChartsSurface.js +3 -11
  169. package/modern/ChartsXAxis/ChartsXAxis.js +148 -37
  170. package/modern/ChartsYAxis/ChartsYAxis.js +73 -30
  171. package/modern/LineChart/AreaElement.js +10 -0
  172. package/modern/LineChart/AreaPlot.js +11 -0
  173. package/modern/LineChart/LineChart.js +38 -8
  174. package/modern/LineChart/LineElement.js +10 -0
  175. package/modern/LineChart/LineHighlightElement.js +10 -0
  176. package/modern/LineChart/LineHighlightPlot.js +10 -0
  177. package/modern/LineChart/LinePlot.js +10 -0
  178. package/modern/LineChart/MarkElement.js +10 -0
  179. package/modern/LineChart/MarkPlot.js +10 -0
  180. package/modern/PieChart/PieChart.js +39 -8
  181. package/modern/PieChart/PiePlot.js +10 -0
  182. package/modern/ResponsiveChartContainer/index.js +2 -2
  183. package/modern/ScatterChart/Scatter.js +10 -0
  184. package/modern/ScatterChart/ScatterChart.js +38 -8
  185. package/modern/ScatterChart/ScatterPlot.js +10 -0
  186. package/modern/SparkLineChart/SparkLineChart.js +14 -0
  187. package/modern/constants.js +1 -1
  188. package/modern/context/CartesianContextProvider.js +19 -11
  189. package/modern/context/DrawingProvider.js +2 -0
  190. package/modern/hooks/useChartDimensions.js +2 -0
  191. package/modern/hooks/useMounted.js +16 -0
  192. package/modern/hooks/useReducedMotion.js +27 -0
  193. package/modern/hooks/useTicks.js +15 -9
  194. package/modern/index.js +1 -1
  195. package/modern/internals/components/AxisSharedComponents.js +15 -70
  196. package/modern/internals/components/ChartsText.js +75 -0
  197. package/modern/internals/domUtils.js +113 -0
  198. package/modern/internals/geometry.js +36 -0
  199. package/package.json +5 -3
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.BarElement = BarElement;
8
- exports.BarElementPath = void 0;
8
+ exports.barElementClasses = exports.BarElementPath = void 0;
9
9
  exports.getBarElementUtilityClass = getBarElementUtilityClass;
10
- exports.lineElementClasses = void 0;
11
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
13
12
  var React = _interopRequireWildcard(require("react"));
@@ -17,16 +16,17 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
17
16
  var _styles = require("@mui/material/styles");
18
17
  var _d3Color = require("d3-color");
19
18
  var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
19
+ var _web = require("@react-spring/web");
20
20
  var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
21
21
  var _InteractionProvider = require("../context/InteractionProvider");
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
- const _excluded = ["id", "dataIndex", "classes", "color", "highlightScope", "slots", "slotProps"];
24
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+ const _excluded = ["id", "dataIndex", "classes", "color", "highlightScope", "slots", "slotProps", "style"];
24
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
25
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
26
  function getBarElementUtilityClass(slot) {
27
27
  return (0, _generateUtilityClass.default)('MuiBarElement', slot);
28
28
  }
29
- const lineElementClasses = exports.lineElementClasses = (0, _generateUtilityClasses.default)('MuiBarElement', ['root']);
29
+ const barElementClasses = exports.barElementClasses = (0, _generateUtilityClasses.default)('MuiBarElement', ['root']);
30
30
  const useUtilityClasses = ownerState => {
31
31
  const {
32
32
  classes,
@@ -37,7 +37,7 @@ const useUtilityClasses = ownerState => {
37
37
  };
38
38
  return (0, _composeClasses.default)(slots, getBarElementUtilityClass, classes);
39
39
  };
40
- const BarElementPath = exports.BarElementPath = (0, _styles.styled)('rect', {
40
+ const BarElementPath = exports.BarElementPath = (0, _styles.styled)(_web.animated.rect, {
41
41
  name: 'MuiBarElement',
42
42
  slot: 'Root',
43
43
  overridesResolver: (_, styles) => styles.root
@@ -58,7 +58,8 @@ function BarElement(props) {
58
58
  color,
59
59
  highlightScope,
60
60
  slots,
61
- slotProps
61
+ slotProps,
62
+ style
62
63
  } = props,
63
64
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
64
65
  const getInteractionItemProps = (0, _useInteractionItemProps.useInteractionItemProps)(highlightScope);
@@ -93,6 +94,7 @@ function BarElement(props) {
93
94
  seriesId: id,
94
95
  dataIndex
95
96
  }), {
97
+ style,
96
98
  className: classes.root
97
99
  }),
98
100
  ownerState
@@ -7,8 +7,24 @@ export interface BarPlotSlotComponentProps {
7
7
  bar?: Partial<BarElementProps>;
8
8
  }
9
9
  export interface BarPlotProps extends Pick<BarElementProps, 'slots' | 'slotProps'> {
10
+ /**
11
+ * If `true`, animations are skiped.
12
+ * @default false
13
+ */
14
+ skipAnimation?: boolean;
10
15
  }
11
- declare function BarPlot(props: BarPlotProps): React.JSX.Element | null;
16
+ /**
17
+ * Demos:
18
+ *
19
+ * - [Bars](https://mui.com/x/react-charts/bars/)
20
+ * - [Bar demonstration](https://mui.com/x/react-charts/bar-demo/)
21
+ * - [Stacking](https://mui.com/x/react-charts/stacking/)
22
+ *
23
+ * API:
24
+ *
25
+ * - [BarPlot API](https://mui.com/x/api/charts/bar-plot/)
26
+ */
27
+ declare function BarPlot(props: BarPlotProps): React.JSX.Element;
12
28
  declare namespace BarPlot {
13
29
  var propTypes: any;
14
30
  }
@@ -5,16 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.BarPlot = BarPlot;
8
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var React = _interopRequireWildcard(require("react"));
10
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _web = require("@react-spring/web");
11
13
  var _SeriesContextProvider = require("../context/SeriesContextProvider");
12
14
  var _CartesianContextProvider = require("../context/CartesianContextProvider");
13
15
  var _BarElement = require("./BarElement");
14
16
  var _axis = require("../models/axis");
15
17
  var _jsxRuntime = require("react/jsx-runtime");
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
+ const _excluded = ["skipAnimation"];
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
21
  /**
19
22
  * Solution of the equations
20
23
  * W = barWidth * N + offset * (N-1)
@@ -23,7 +26,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
26
  * @param numberOfGroups The number of bars to place in that space.
24
27
  * @param gapRatio The ratio of the gap between bars over the bar width.
25
28
  * @returns The bar width and the offset between bars.
26
- */function getBandSize({
29
+ */
30
+ function getBandSize({
27
31
  bandWidth: W,
28
32
  numberOfGroups: N,
29
33
  gapRatio: r
@@ -41,12 +45,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
41
45
  offset
42
46
  };
43
47
  }
44
- function BarPlot(props) {
45
- const seriesData = React.useContext(_SeriesContextProvider.SeriesContext).bar;
48
+ const useCompletedData = () => {
49
+ const seriesData = React.useContext(_SeriesContextProvider.SeriesContext).bar ?? {
50
+ series: {},
51
+ stackingGroups: [],
52
+ seriesOrder: []
53
+ };
46
54
  const axisData = React.useContext(_CartesianContextProvider.CartesianContext);
47
- if (seriesData === undefined) {
48
- return null;
49
- }
50
55
  const {
51
56
  series,
52
57
  stackingGroups
@@ -59,66 +64,142 @@ function BarPlot(props) {
59
64
  } = axisData;
60
65
  const defaultXAxisId = xAxisIds[0];
61
66
  const defaultYAxisId = yAxisIds[0];
62
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
63
- children: stackingGroups.flatMap(({
64
- ids: groupIds
65
- }, groupIndex) => {
66
- return groupIds.flatMap(seriesId => {
67
- const xAxisKey = series[seriesId].xAxisKey ?? defaultXAxisId;
68
- const yAxisKey = series[seriesId].yAxisKey ?? defaultYAxisId;
69
- const xAxisConfig = xAxis[xAxisKey];
70
- const yAxisConfig = yAxis[yAxisKey];
71
- const verticalLayout = series[seriesId].layout === 'vertical';
72
- let baseScaleConfig;
73
- if (verticalLayout) {
74
- if (!(0, _axis.isBandScaleConfig)(xAxisConfig)) {
75
- throw new Error(`Axis with id "${xAxisKey}" shoud be of type "band" to display the bar series of id "${seriesId}"`);
76
- }
77
- if (xAxis[xAxisKey].data === undefined) {
78
- throw new Error(`Axis with id "${xAxisKey}" shoud have data property`);
79
- }
80
- baseScaleConfig = xAxisConfig;
81
- } else {
82
- if (!(0, _axis.isBandScaleConfig)(yAxisConfig)) {
83
- throw new Error(`Axis with id "${yAxisKey}" shoud be of type "band" to display the bar series of id "${seriesId}"`);
84
- }
85
- if (yAxis[yAxisKey].data === undefined) {
86
- throw new Error(`Axis with id "${xAxisKey}" shoud have data property`);
87
- }
88
- baseScaleConfig = yAxisConfig;
67
+ const data = stackingGroups.flatMap(({
68
+ ids: groupIds
69
+ }, groupIndex) => {
70
+ return groupIds.flatMap(seriesId => {
71
+ const xAxisKey = series[seriesId].xAxisKey ?? defaultXAxisId;
72
+ const yAxisKey = series[seriesId].yAxisKey ?? defaultYAxisId;
73
+ const xAxisConfig = xAxis[xAxisKey];
74
+ const yAxisConfig = yAxis[yAxisKey];
75
+ const verticalLayout = series[seriesId].layout === 'vertical';
76
+ let baseScaleConfig;
77
+ if (verticalLayout) {
78
+ if (!(0, _axis.isBandScaleConfig)(xAxisConfig)) {
79
+ throw new Error(`Axis with id "${xAxisKey}" shoud be of type "band" to display the bar series of id "${seriesId}"`);
80
+ }
81
+ if (xAxis[xAxisKey].data === undefined) {
82
+ throw new Error(`Axis with id "${xAxisKey}" shoud have data property`);
89
83
  }
90
- const xScale = xAxisConfig.scale;
91
- const yScale = yAxisConfig.scale;
92
- const bandWidth = baseScaleConfig.scale.bandwidth();
93
- const {
94
- barWidth,
95
- offset
96
- } = getBandSize({
97
- bandWidth,
98
- numberOfGroups: stackingGroups.length,
99
- gapRatio: baseScaleConfig.barGapRatio
100
- });
101
- const barOffset = groupIndex * (barWidth + offset);
102
- const {
103
- stackedData,
104
- color
105
- } = series[seriesId];
106
- return stackedData.map((values, dataIndex) => {
107
- const baseline = Math.min(...values);
108
- const value = Math.max(...values);
109
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarElement.BarElement, (0, _extends2.default)({
110
- id: seriesId,
111
- dataIndex: dataIndex,
112
- x: verticalLayout ? xScale(xAxis[xAxisKey].data?.[dataIndex]) + barOffset : xScale(baseline),
113
- y: verticalLayout ? yScale(value) : yScale(yAxis[yAxisKey].data?.[dataIndex]) + barOffset,
114
- height: verticalLayout ? Math.abs(yScale(baseline) - yScale(value)) : barWidth,
115
- width: verticalLayout ? barWidth : Math.abs(xScale(baseline) - xScale(value)),
116
- color: color,
117
- highlightScope: series[seriesId].highlightScope
118
- }, props), `${seriesId}-${dataIndex}`);
119
- });
84
+ baseScaleConfig = xAxisConfig;
85
+ } else {
86
+ if (!(0, _axis.isBandScaleConfig)(yAxisConfig)) {
87
+ throw new Error(`Axis with id "${yAxisKey}" shoud be of type "band" to display the bar series of id "${seriesId}"`);
88
+ }
89
+ if (yAxis[yAxisKey].data === undefined) {
90
+ throw new Error(`Axis with id "${xAxisKey}" shoud have data property`);
91
+ }
92
+ baseScaleConfig = yAxisConfig;
93
+ }
94
+ const xScale = xAxisConfig.scale;
95
+ const yScale = yAxisConfig.scale;
96
+ const bandWidth = baseScaleConfig.scale.bandwidth();
97
+ const {
98
+ barWidth,
99
+ offset
100
+ } = getBandSize({
101
+ bandWidth,
102
+ numberOfGroups: stackingGroups.length,
103
+ gapRatio: baseScaleConfig.barGapRatio
104
+ });
105
+ const barOffset = groupIndex * (barWidth + offset);
106
+ const {
107
+ stackedData,
108
+ color
109
+ } = series[seriesId];
110
+ return stackedData.map((values, dataIndex) => {
111
+ const bottom = Math.min(...values);
112
+ const top = Math.max(...values);
113
+ return {
114
+ bottom,
115
+ top,
116
+ seriesId,
117
+ dataIndex,
118
+ layout: series[seriesId].layout,
119
+ x: verticalLayout ? xScale(xAxis[xAxisKey].data?.[dataIndex]) + barOffset : xScale(bottom),
120
+ y: verticalLayout ? yScale(top) : yScale(yAxis[yAxisKey].data?.[dataIndex]) + barOffset,
121
+ xOrigin: xScale(0),
122
+ yOrigin: yScale(0),
123
+ height: verticalLayout ? Math.abs(yScale(bottom) - yScale(top)) : barWidth,
124
+ width: verticalLayout ? barWidth : Math.abs(xScale(bottom) - xScale(top)),
125
+ color,
126
+ highlightScope: series[seriesId].highlightScope
127
+ };
120
128
  });
121
- })
129
+ });
130
+ });
131
+ return data;
132
+ };
133
+ const getOutStyle = ({
134
+ layout,
135
+ yOrigin,
136
+ x,
137
+ width,
138
+ y,
139
+ xOrigin,
140
+ height
141
+ }) => (0, _extends2.default)({}, layout === 'vertical' ? {
142
+ y: yOrigin,
143
+ x,
144
+ height: 0,
145
+ width
146
+ } : {
147
+ y,
148
+ x: xOrigin,
149
+ height,
150
+ width: 0
151
+ });
152
+ const getInStyle = ({
153
+ x,
154
+ width,
155
+ y,
156
+ height
157
+ }) => ({
158
+ y,
159
+ x,
160
+ height,
161
+ width
162
+ });
163
+
164
+ /**
165
+ * Demos:
166
+ *
167
+ * - [Bars](https://mui.com/x/react-charts/bars/)
168
+ * - [Bar demonstration](https://mui.com/x/react-charts/bar-demo/)
169
+ * - [Stacking](https://mui.com/x/react-charts/stacking/)
170
+ *
171
+ * API:
172
+ *
173
+ * - [BarPlot API](https://mui.com/x/api/charts/bar-plot/)
174
+ */
175
+ function BarPlot(props) {
176
+ const completedData = useCompletedData();
177
+ const {
178
+ skipAnimation
179
+ } = props,
180
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
181
+ const transition = (0, _web.useTransition)(completedData, {
182
+ keys: bar => `${bar.seriesId}-${bar.dataIndex}`,
183
+ from: getOutStyle,
184
+ leave: getOutStyle,
185
+ enter: getInStyle,
186
+ update: getInStyle,
187
+ immediate: skipAnimation
188
+ });
189
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
190
+ children: transition((style, {
191
+ seriesId,
192
+ dataIndex,
193
+ color,
194
+ highlightScope
195
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarElement.BarElement, (0, _extends2.default)({
196
+ id: seriesId,
197
+ dataIndex: dataIndex,
198
+ highlightScope: highlightScope,
199
+ color: color
200
+ }, other, {
201
+ style: style
202
+ })))
122
203
  });
123
204
  }
124
205
  process.env.NODE_ENV !== "production" ? BarPlot.propTypes = {
@@ -126,6 +207,11 @@ process.env.NODE_ENV !== "production" ? BarPlot.propTypes = {
126
207
  // | These PropTypes are generated from the TypeScript type definitions |
127
208
  // | To update them edit the TypeScript types and run "yarn proptypes" |
128
209
  // ----------------------------------------------------------------------
210
+ /**
211
+ * If `true`, animations are skiped.
212
+ * @default false
213
+ */
214
+ skipAnimation: _propTypes.default.bool,
129
215
  /**
130
216
  * The props used for each component slot.
131
217
  * @default {}
package/CHANGELOG.md CHANGED
@@ -3,6 +3,175 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.16.3
7
+
8
+ _Oct 20, 2023_
9
+
10
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🎁 Add a Data Grid recipe for saving & restoring state
13
+ - 💫 Support animations on the bar chart
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@6.16.3`
20
+
21
+ - [DataGrid] Allow passing readonly arrays to `columns` and `sortingOrder` props (#10686) @pcorpet
22
+
23
+ #### `@mui/x-data-grid-pro@6.16.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
24
+
25
+ Same changes as in `@mui/x-data-grid@6.16.3`.
26
+
27
+ #### `@mui/x-data-grid-premium@6.16.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
28
+
29
+ Same changes as in `@mui/x-data-grid-pro@6.16.3`.
30
+
31
+ ### Date Pickers
32
+
33
+ #### `@mui/x-date-pickers@6.16.3`
34
+
35
+ - [fields] Correctly respect leading zeroes on seconds section (#10713) @flaviendelangle
36
+ - [fields] Use `onChange` instead of `onKeyPress` for Backspace editing (#10494) @flaviendelangle
37
+ - [pickers] Add reference links to DatePicker components (#10626) @michelengelen
38
+ - [pickers] Add reference links to clock components (#10645) @michelengelen
39
+ - [pickers] Add reference links to misc picker components (#10647) @michelengelen
40
+ - [pickers] Add reference links to toolbar components (#10646) @michelengelen
41
+ - [pickers] POC: Change the props received by the `FakeTextField` component (#10687) @flaviendelangle
42
+
43
+ #### `@mui/x-date-pickers-pro@6.16.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
44
+
45
+ Same changes as in `@mui/x-date-pickers@6.16.3`, plus:
46
+
47
+ - [DateRangePicker] Fix touch based range dragging (#10664) @michelengelen
48
+
49
+ ### Charts / `@mui/x-charts@6.0.0-alpha.16`
50
+
51
+ - [charts] Add reference links to area + bar chart components (#10652) @michelengelen
52
+ - [charts] Add reference links to line chart + sparkline components (#10650) @michelengelen
53
+ - [charts] Add reference links to pie + scatter chart components (#10653) @michelengelen
54
+ - [charts] Render only when `width` and `height` are resolved (#10714) @alexfauquette
55
+ - [charts] Support animation on `BarChart` (#9926) @alexfauquette
56
+ - [charts] Use new text component to avoid tick label overflow on x-axis (#10648) @alexfauquette
57
+
58
+ ### Docs
59
+
60
+ - [docs] Add a recipe for saving and restoring `state` externally (#10722) @michelengelen
61
+ - [docs] Add example about how to add an axis (#10709) @alexfauquette
62
+ - [docs] Customization Playground - fix DesktopDatePicker sx props and styled examples (#10665) @noraleonte
63
+ - [docs] Improve meta description @oliviertassinari
64
+ - [docs] Make overview demo work in codesandbox (#10661) @alexfauquette
65
+
66
+ ### Core
67
+
68
+ - [core] Update React renovate group with `@types` (#10723) @LukasTy
69
+ - [core] Update `styled-components` (#10733) @LukasTy
70
+
71
+ ## 6.16.2
72
+
73
+ _Oct 12, 2023_
74
+
75
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
76
+
77
+ - 📊 Chart's legend text management has been reworked and contains breaking changes (#10138) @alexfauquette
78
+ - 📝 Add [Bulk editing](https://mui.com/x/react-data-grid/recipes-editing/#bulk-editing) demo (#10333) @cherniavskii
79
+ - 🚀 Column grouping now works smoothly with column pinning (#10518) @MBilalShafi
80
+ - 🌍 Improve Arabic (ar-SD) and Spanish (es-ES) locales
81
+ - 🐞 Bugfixes
82
+ - 📚 Documentation improvements
83
+
84
+ ### Data Grid
85
+
86
+ #### `@mui/x-data-grid@6.16.2`
87
+
88
+ - [DataGrid] Fix `LazyLoading` demo crash (#10621) @MBilalShafi
89
+ - [DataGrid] Fix cells overlapping the scrollbar in iOS Safari (#10633) @cherniavskii
90
+ - [DataGrid] Fix `getRowId is not defined` error (#10613) @romgrk
91
+ - [DataGrid] Get quick filter to work OOTB with `date` and `dateTime` fields (#10636) @MBilalShafi
92
+ - [DataGrid] Make cursor for selectable cells to be `default` unless editable (#9997) @gitstart
93
+ - [DataGrid] Remove unnecessary syntax in JSDoc (#10567) @Lev-Shapiro
94
+ - [DataGrid] Update row hover behavior to match native hover (#10623) @cherniavskii
95
+ - [l10n] Improve Arabic (ar-SD) locale (#10625) @alabenyahia
96
+
97
+ #### `@mui/x-data-grid-pro@6.16.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
98
+
99
+ Same changes as in `@mui/x-data-grid@6.16.2`, plus:
100
+
101
+ - [DataGridPro] Improve column grouping and column pinning friendship (#10518) @MBilalShafi
102
+
103
+ #### `@mui/x-data-grid-premium@6.16.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
104
+
105
+ Same changes as in `@mui/x-data-grid-pro@6.16.2`.
106
+
107
+ ### Date Pickers
108
+
109
+ #### `@mui/x-date-pickers@6.16.2`
110
+
111
+ - [DateTimePicker] Add support for `DigitalClock` view renderer (#10624) @LukasTy
112
+ - [fields] Bootstrap the multi-HTML input component (#10638) @flaviendelangle
113
+ - [pickers] Fix timezone `UTC` false positive (#10586) @alexfauquette
114
+ - [l10n] Improve Spanish (es-ES) locale (#10588) @eduardodallmann
115
+
116
+ #### `@mui/x-date-pickers-pro@6.16.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
117
+
118
+ Same changes as in `@mui/x-date-pickers@6.16.2`.
119
+
120
+ ### Charts / `@mui/x-charts@6.0.0-alpha.15`
121
+
122
+ #### Breaking changes
123
+
124
+ The charts have a new text display mechanism.
125
+ It adds line break support and avoids overlapping text in the legend.
126
+ This comes with some breaking changes.
127
+
128
+ - The DOM structure is modified. An intermediary `<tspan />` element has been added. This can impact how your style is applied.
129
+ ```diff
130
+ - <text>The label</text>
131
+ + <text><tspan>The label</tspan></text>
132
+ ```
133
+
134
+ - The top margin has been reduced from 100 to 50 to benefit from the denser legend.
135
+
136
+ - To accurately compute the text size and then place it, styling should be provided as a JS object. For example, to set the legend font size, you should do:
137
+ ```jsx
138
+ <PieChart
139
+ {/** ... */}
140
+ slotProps={{
141
+ legend: {
142
+ labelStyle: {
143
+ fontSize: 16,
144
+ },
145
+ },
146
+ }}
147
+ />
148
+ ```
149
+ Support for other text elements (axis labels and tick labels) will be implemented in follow-up PR.
150
+
151
+ #### Changes
152
+
153
+ - [charts] Fix typo between internal/external variable (#10640) @alexfauquette
154
+ - [charts] Improve the management of the text (#10138) @alexfauquette
155
+
156
+ ### Docs
157
+
158
+ - [docs] Add bulk editing demo (#10333) @cherniavskii
159
+ - [docs] Add reference links to DateRangePicker components (#10629) @michelengelen
160
+ - [docs] Add reference links to DateTimePicker components (#10628) @michelengelen
161
+ - [docs] Add reference links to picker field components (#10631) @michelengelen
162
+ - [docs] Added reference links to TimePicker components (#10627) @michelengelen
163
+ - [docs] Avoid Pickers playground error due to empty views (#10654) @LukasTy
164
+ - [docs] Fix DataGrid[Pro/Premium] reference links (#10620) @michelengelen
165
+
166
+ ### Core
167
+
168
+ - [core] Bump monorepo (#10619) @alexfauquette
169
+ - [core] Update `no-response` workflow (#10491) @MBilalShafi
170
+ - [core] Update the issue templates to reflect the new support workflow (#10651) @MBilalShafi
171
+ - [test] Fix `testEval` not invoking test assertions (#10587) @cherniavskii
172
+ - [test] Fix dev mode warning (#10610) @oliviertassinari
173
+ - [test] Set UUID chance seed in visual tests (#10609) @oliviertassinari
174
+
6
175
  ## 6.16.1
7
176
 
8
177
  _Oct 6, 2023_
@@ -10,12 +10,13 @@ var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
10
10
  var _DrawingProvider = require("../context/DrawingProvider");
11
11
  var _SeriesContextProvider = require("../context/SeriesContextProvider");
12
12
  var _InteractionProvider = require("../context/InteractionProvider");
13
+ var _useReducedMotion = require("../hooks/useReducedMotion");
13
14
  var _ChartsSurface = require("../ChartsSurface");
14
15
  var _CartesianContextProvider = require("../context/CartesianContextProvider");
15
16
  var _HighlightProvider = require("../context/HighlightProvider");
16
17
  var _jsxRuntime = require("react/jsx-runtime");
17
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
20
  const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(props, ref) {
20
21
  const {
21
22
  width,
@@ -34,6 +35,8 @@ const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(fu
34
35
  } = props;
35
36
  const svgRef = React.useRef(null);
36
37
  const handleRef = (0, _useForkRef.default)(ref, svgRef);
38
+ (0, _useReducedMotion.useReducedMotion)(); // a11y reduce motion (see: https://react-spring.dev/docs/utilities/use-reduced-motion)
39
+
37
40
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawingProvider.DrawingProvider, {
38
41
  width: width,
39
42
  height: height,
@@ -12,8 +12,8 @@ var _CartesianContextProvider = require("../context/CartesianContextProvider");
12
12
  var _ChartsXAxis = require("../ChartsXAxis");
13
13
  var _ChartsYAxis = require("../ChartsYAxis");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
17
  const getAxisId = propsValue => {
18
18
  if (propsValue == null) {
19
19
  return null;
@@ -105,11 +105,15 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
105
105
  fill: _propTypes.default.string,
106
106
  label: _propTypes.default.string,
107
107
  labelFontSize: _propTypes.default.number,
108
+ labelStyle: _propTypes.default.object,
108
109
  position: _propTypes.default.oneOf(['bottom', 'top']),
109
110
  slotProps: _propTypes.default.object,
110
111
  slots: _propTypes.default.object,
111
112
  stroke: _propTypes.default.string,
112
113
  tickFontSize: _propTypes.default.number,
114
+ tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
115
+ tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
116
+ tickLabelStyle: _propTypes.default.object,
113
117
  tickMaxStep: _propTypes.default.number,
114
118
  tickMinStep: _propTypes.default.number,
115
119
  tickNumber: _propTypes.default.number,
@@ -128,11 +132,15 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
128
132
  fill: _propTypes.default.string,
129
133
  label: _propTypes.default.string,
130
134
  labelFontSize: _propTypes.default.number,
135
+ labelStyle: _propTypes.default.object,
131
136
  position: _propTypes.default.oneOf(['left', 'right']),
132
137
  slotProps: _propTypes.default.object,
133
138
  slots: _propTypes.default.object,
134
139
  stroke: _propTypes.default.string,
135
140
  tickFontSize: _propTypes.default.number,
141
+ tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
142
+ tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
143
+ tickLabelStyle: _propTypes.default.object,
136
144
  tickMaxStep: _propTypes.default.number,
137
145
  tickMinStep: _propTypes.default.number,
138
146
  tickNumber: _propTypes.default.number,
@@ -151,11 +159,15 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
151
159
  fill: _propTypes.default.string,
152
160
  label: _propTypes.default.string,
153
161
  labelFontSize: _propTypes.default.number,
162
+ labelStyle: _propTypes.default.object,
154
163
  position: _propTypes.default.oneOf(['left', 'right']),
155
164
  slotProps: _propTypes.default.object,
156
165
  slots: _propTypes.default.object,
157
166
  stroke: _propTypes.default.string,
158
167
  tickFontSize: _propTypes.default.number,
168
+ tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
169
+ tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
170
+ tickLabelStyle: _propTypes.default.object,
159
171
  tickMaxStep: _propTypes.default.number,
160
172
  tickMinStep: _propTypes.default.number,
161
173
  tickNumber: _propTypes.default.number,
@@ -184,11 +196,15 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
184
196
  fill: _propTypes.default.string,
185
197
  label: _propTypes.default.string,
186
198
  labelFontSize: _propTypes.default.number,
199
+ labelStyle: _propTypes.default.object,
187
200
  position: _propTypes.default.oneOf(['bottom', 'top']),
188
201
  slotProps: _propTypes.default.object,
189
202
  slots: _propTypes.default.object,
190
203
  stroke: _propTypes.default.string,
191
204
  tickFontSize: _propTypes.default.number,
205
+ tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
206
+ tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
207
+ tickLabelStyle: _propTypes.default.object,
192
208
  tickMaxStep: _propTypes.default.number,
193
209
  tickMinStep: _propTypes.default.number,
194
210
  tickNumber: _propTypes.default.number,
@@ -9,7 +9,7 @@ export interface ChartsAxisClasses {
9
9
  tick: string;
10
10
  /** Styles applied to ticks label. */
11
11
  tickLabel: string;
12
- /** Styles applied to the axis label. */
12
+ /** Styles applied to the group containing the axis label. */
13
13
  label: string;
14
14
  /** Styles applied to x axes. */
15
15
  directionX: string;