@mui/x-charts 6.0.0-alpha.8 → 6.18.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 (286) hide show
  1. package/BarChart/BarChart.d.ts +19 -5
  2. package/BarChart/BarChart.js +52 -13
  3. package/BarChart/BarElement.d.ts +1319 -4
  4. package/BarChart/BarElement.js +10 -10
  5. package/BarChart/BarPlot.d.ts +17 -1
  6. package/BarChart/BarPlot.js +152 -66
  7. package/BarChart/formatter.js +2 -3
  8. package/BarChart/legend.js +1 -2
  9. package/CHANGELOG.md +786 -48
  10. package/ChartContainer/index.js +7 -5
  11. package/ChartsAxis/ChartsAxis.d.ts +9 -0
  12. package/ChartsAxis/ChartsAxis.js +28 -2
  13. package/ChartsAxis/axisClasses.d.ts +1 -1
  14. package/ChartsAxis/axisClasses.js +1 -2
  15. package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +21 -0
  16. package/ChartsAxisHighlight/ChartsAxisHighlight.js +61 -22
  17. package/ChartsClipPath/ChartsClipPath.d.ts +5 -0
  18. package/ChartsClipPath/ChartsClipPath.js +7 -2
  19. package/ChartsLegend/ChartsLegend.d.ts +44 -24
  20. package/ChartsLegend/ChartsLegend.js +192 -150
  21. package/ChartsLegend/chartsLegendClasses.js +1 -2
  22. package/ChartsLegend/utils.d.ts +1 -6
  23. package/ChartsSurface.d.ts +1 -1
  24. package/ChartsSurface.js +9 -18
  25. package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -0
  26. package/ChartsTooltip/ChartsAxisTooltipContent.js +46 -32
  27. package/ChartsTooltip/ChartsItemTooltipContent.d.ts +3 -2
  28. package/ChartsTooltip/ChartsItemTooltipContent.js +18 -9
  29. package/ChartsTooltip/ChartsTooltip.d.ts +32 -0
  30. package/ChartsTooltip/ChartsTooltip.js +62 -18
  31. package/ChartsTooltip/ChartsTooltipTable.d.ts +3 -10
  32. package/ChartsTooltip/ChartsTooltipTable.js +22 -20
  33. package/ChartsTooltip/tooltipClasses.js +1 -2
  34. package/ChartsTooltip/utils.js +2 -2
  35. package/ChartsXAxis/ChartsXAxis.d.ts +9 -0
  36. package/ChartsXAxis/ChartsXAxis.js +161 -40
  37. package/ChartsYAxis/ChartsYAxis.d.ts +9 -0
  38. package/ChartsYAxis/ChartsYAxis.js +86 -33
  39. package/LineChart/AreaElement.d.ts +12 -2
  40. package/LineChart/AreaElement.js +14 -6
  41. package/LineChart/AreaPlot.d.ts +11 -0
  42. package/LineChart/AreaPlot.js +27 -8
  43. package/LineChart/LineChart.d.ts +21 -3
  44. package/LineChart/LineChart.js +61 -14
  45. package/LineChart/LineElement.d.ts +12 -2
  46. package/LineChart/LineElement.js +14 -6
  47. package/LineChart/LineHighlightElement.d.ts +31 -0
  48. package/LineChart/LineHighlightElement.js +88 -0
  49. package/LineChart/LineHighlightPlot.d.ts +35 -0
  50. package/LineChart/LineHighlightPlot.js +110 -0
  51. package/LineChart/LinePlot.d.ts +10 -0
  52. package/LineChart/LinePlot.js +25 -12
  53. package/LineChart/MarkElement.d.ts +11 -1
  54. package/LineChart/MarkElement.js +15 -9
  55. package/LineChart/MarkPlot.d.ts +10 -0
  56. package/LineChart/MarkPlot.js +62 -15
  57. package/LineChart/formatter.js +5 -5
  58. package/LineChart/index.d.ts +2 -0
  59. package/LineChart/index.js +20 -0
  60. package/LineChart/legend.js +1 -2
  61. package/PieChart/PieArc.d.ts +12 -14
  62. package/PieChart/PieArc.js +28 -60
  63. package/PieChart/PieArcLabel.d.ts +9 -10
  64. package/PieChart/PieArcLabel.js +46 -38
  65. package/PieChart/PieArcLabelPlot.d.ts +28 -0
  66. package/PieChart/PieArcLabelPlot.js +99 -0
  67. package/PieChart/PieArcPlot.d.ts +35 -0
  68. package/PieChart/PieArcPlot.js +92 -0
  69. package/PieChart/PieChart.d.ts +19 -5
  70. package/PieChart/PieChart.js +61 -14
  71. package/PieChart/PiePlot.d.ts +15 -9
  72. package/PieChart/PiePlot.js +77 -55
  73. package/PieChart/dataTransform/transition.d.ts +4 -0
  74. package/PieChart/dataTransform/transition.js +136 -0
  75. package/PieChart/dataTransform/useTransformData.d.ts +15 -0
  76. package/PieChart/dataTransform/useTransformData.js +67 -0
  77. package/PieChart/formatter.js +1 -2
  78. package/PieChart/legend.js +1 -2
  79. package/README.md +8 -14
  80. package/ResponsiveChartContainer/index.js +7 -8
  81. package/ScatterChart/Scatter.d.ts +10 -0
  82. package/ScatterChart/Scatter.js +12 -2
  83. package/ScatterChart/ScatterChart.d.ts +16 -3
  84. package/ScatterChart/ScatterChart.js +43 -12
  85. package/ScatterChart/ScatterPlot.d.ts +10 -0
  86. package/ScatterChart/ScatterPlot.js +12 -2
  87. package/ScatterChart/formatter.js +1 -2
  88. package/ScatterChart/legend.js +1 -2
  89. package/SparkLineChart/SparkLineChart.d.ts +13 -3
  90. package/SparkLineChart/SparkLineChart.js +34 -18
  91. package/colorPalettes/colorPalettes.js +6 -12
  92. package/constants.js +5 -8
  93. package/context/CartesianContextProvider.d.ts +5 -0
  94. package/context/CartesianContextProvider.js +31 -16
  95. package/context/DrawingProvider.d.ts +7 -0
  96. package/context/DrawingProvider.js +12 -6
  97. package/context/HighlightProvider.js +3 -4
  98. package/context/InteractionProvider.js +3 -4
  99. package/context/SeriesContextProvider.js +3 -4
  100. package/esm/BarChart/BarChart.js +49 -9
  101. package/esm/BarChart/BarElement.js +7 -4
  102. package/esm/BarChart/BarPlot.js +152 -67
  103. package/esm/BarChart/formatter.js +1 -1
  104. package/esm/ChartContainer/index.js +3 -0
  105. package/esm/ChartsAxis/ChartsAxis.js +26 -0
  106. package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +57 -20
  107. package/esm/ChartsClipPath/ChartsClipPath.js +5 -0
  108. package/esm/ChartsLegend/ChartsLegend.js +188 -142
  109. package/esm/ChartsSurface.js +4 -12
  110. package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +44 -30
  111. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +15 -7
  112. package/esm/ChartsTooltip/ChartsTooltip.js +59 -14
  113. package/esm/ChartsTooltip/ChartsTooltipTable.js +17 -10
  114. package/esm/ChartsXAxis/ChartsXAxis.js +158 -37
  115. package/esm/ChartsYAxis/ChartsYAxis.js +83 -30
  116. package/esm/LineChart/AreaElement.js +10 -0
  117. package/esm/LineChart/AreaPlot.js +26 -6
  118. package/esm/LineChart/LineChart.js +58 -10
  119. package/esm/LineChart/LineElement.js +10 -0
  120. package/esm/LineChart/LineHighlightElement.js +78 -0
  121. package/esm/LineChart/LineHighlightPlot.js +103 -0
  122. package/esm/LineChart/LinePlot.js +25 -14
  123. package/esm/LineChart/MarkElement.js +12 -5
  124. package/esm/LineChart/MarkPlot.js +60 -13
  125. package/esm/LineChart/formatter.js +7 -3
  126. package/esm/LineChart/index.js +3 -1
  127. package/esm/PieChart/PieArc.js +26 -58
  128. package/esm/PieChart/PieArcLabel.js +43 -34
  129. package/esm/PieChart/PieArcLabelPlot.js +92 -0
  130. package/esm/PieChart/PieArcPlot.js +84 -0
  131. package/esm/PieChart/PieChart.js +59 -12
  132. package/esm/PieChart/PiePlot.js +76 -57
  133. package/esm/PieChart/dataTransform/transition.js +130 -0
  134. package/esm/PieChart/dataTransform/useTransformData.js +59 -0
  135. package/esm/ResponsiveChartContainer/index.js +3 -3
  136. package/esm/ScatterChart/Scatter.js +10 -0
  137. package/esm/ScatterChart/ScatterChart.js +40 -8
  138. package/esm/ScatterChart/ScatterPlot.js +10 -0
  139. package/esm/SparkLineChart/SparkLineChart.js +32 -15
  140. package/esm/constants.js +1 -1
  141. package/esm/context/CartesianContextProvider.js +30 -14
  142. package/esm/context/DrawingProvider.js +8 -0
  143. package/esm/hooks/useChartDimensions.js +2 -0
  144. package/esm/hooks/useMounted.js +16 -0
  145. package/esm/hooks/useReducedMotion.js +27 -0
  146. package/esm/hooks/useTicks.js +15 -9
  147. package/esm/internals/components/AxisSharedComponents.js +15 -70
  148. package/esm/internals/components/ChartsText.js +77 -0
  149. package/esm/internals/domUtils.js +113 -0
  150. package/esm/internals/geometry.js +36 -0
  151. package/hooks/useAxisEvents.js +2 -2
  152. package/hooks/useChartDimensions.d.ts +2 -0
  153. package/hooks/useChartDimensions.js +5 -4
  154. package/hooks/useDrawingArea.js +2 -2
  155. package/hooks/useInteractionItemProps.js +2 -2
  156. package/hooks/useMounted.d.ts +1 -0
  157. package/hooks/useMounted.js +25 -0
  158. package/hooks/useReducedMotion.d.ts +8 -0
  159. package/hooks/useReducedMotion.js +33 -0
  160. package/hooks/useScale.d.ts +2 -2
  161. package/hooks/useScale.js +2 -2
  162. package/hooks/useTicks.d.ts +19 -11
  163. package/hooks/useTicks.js +19 -14
  164. package/index.js +1 -1
  165. package/internals/components/AxisSharedComponents.d.ts +0 -4
  166. package/internals/components/AxisSharedComponents.js +18 -78
  167. package/internals/components/ChartsText.d.ts +35 -0
  168. package/internals/components/ChartsText.js +87 -0
  169. package/internals/defaultizeColor.d.ts +8 -1
  170. package/internals/defaultizeValueFormatter.js +1 -2
  171. package/internals/domUtils.d.ts +13 -0
  172. package/internals/domUtils.js +122 -0
  173. package/internals/geometry.d.ts +9 -0
  174. package/internals/geometry.js +42 -0
  175. package/internals/stackSeries.js +2 -4
  176. package/legacy/BarChart/BarChart.js +49 -9
  177. package/legacy/BarChart/BarElement.js +6 -3
  178. package/legacy/BarChart/BarPlot.js +151 -63
  179. package/legacy/BarChart/formatter.js +1 -1
  180. package/legacy/ChartContainer/index.js +3 -0
  181. package/legacy/ChartsAxis/ChartsAxis.js +26 -0
  182. package/legacy/ChartsAxisHighlight/ChartsAxisHighlight.js +60 -20
  183. package/legacy/ChartsClipPath/ChartsClipPath.js +5 -0
  184. package/legacy/ChartsLegend/ChartsLegend.js +203 -140
  185. package/legacy/ChartsSurface.js +3 -12
  186. package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +22 -10
  187. package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +15 -7
  188. package/legacy/ChartsTooltip/ChartsTooltip.js +62 -14
  189. package/legacy/ChartsTooltip/ChartsTooltipTable.js +34 -26
  190. package/legacy/ChartsXAxis/ChartsXAxis.js +162 -39
  191. package/legacy/ChartsYAxis/ChartsYAxis.js +83 -30
  192. package/legacy/LineChart/AreaElement.js +10 -0
  193. package/legacy/LineChart/AreaPlot.js +31 -7
  194. package/legacy/LineChart/LineChart.js +58 -10
  195. package/legacy/LineChart/LineElement.js +10 -0
  196. package/legacy/LineChart/LineHighlightElement.js +77 -0
  197. package/legacy/LineChart/LineHighlightPlot.js +96 -0
  198. package/legacy/LineChart/LinePlot.js +29 -12
  199. package/legacy/LineChart/MarkElement.js +12 -5
  200. package/legacy/LineChart/MarkPlot.js +50 -5
  201. package/legacy/LineChart/formatter.js +7 -3
  202. package/legacy/LineChart/index.js +3 -1
  203. package/legacy/PieChart/PieArc.js +30 -62
  204. package/legacy/PieChart/PieArcLabel.js +48 -34
  205. package/legacy/PieChart/PieArcLabelPlot.js +93 -0
  206. package/legacy/PieChart/PieArcPlot.js +84 -0
  207. package/legacy/PieChart/PieChart.js +59 -12
  208. package/legacy/PieChart/PiePlot.js +76 -59
  209. package/legacy/PieChart/dataTransform/transition.js +142 -0
  210. package/legacy/PieChart/dataTransform/useTransformData.js +60 -0
  211. package/legacy/ResponsiveChartContainer/index.js +3 -3
  212. package/legacy/ScatterChart/Scatter.js +10 -0
  213. package/legacy/ScatterChart/ScatterChart.js +40 -8
  214. package/legacy/ScatterChart/ScatterPlot.js +10 -0
  215. package/legacy/SparkLineChart/SparkLineChart.js +32 -13
  216. package/legacy/constants.js +1 -1
  217. package/legacy/context/CartesianContextProvider.js +30 -14
  218. package/legacy/context/DrawingProvider.js +8 -0
  219. package/legacy/hooks/useChartDimensions.js +2 -0
  220. package/legacy/hooks/useMounted.js +21 -0
  221. package/legacy/hooks/useReducedMotion.js +27 -0
  222. package/legacy/hooks/useTicks.js +16 -9
  223. package/legacy/index.js +1 -1
  224. package/legacy/internals/components/AxisSharedComponents.js +11 -65
  225. package/legacy/internals/components/ChartsText.js +79 -0
  226. package/legacy/internals/domUtils.js +121 -0
  227. package/legacy/internals/geometry.js +37 -0
  228. package/models/axis.d.ts +27 -9
  229. package/models/layout.d.ts +7 -6
  230. package/models/seriesType/line.d.ts +39 -1
  231. package/models/seriesType/pie.d.ts +5 -1
  232. package/modern/BarChart/BarChart.js +49 -9
  233. package/modern/BarChart/BarElement.js +7 -4
  234. package/modern/BarChart/BarPlot.js +149 -65
  235. package/modern/BarChart/formatter.js +1 -1
  236. package/modern/ChartContainer/index.js +3 -0
  237. package/modern/ChartsAxis/ChartsAxis.js +26 -0
  238. package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +57 -20
  239. package/modern/ChartsClipPath/ChartsClipPath.js +5 -0
  240. package/modern/ChartsLegend/ChartsLegend.js +188 -142
  241. package/modern/ChartsSurface.js +4 -12
  242. package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +44 -30
  243. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +15 -7
  244. package/modern/ChartsTooltip/ChartsTooltip.js +58 -14
  245. package/modern/ChartsTooltip/ChartsTooltipTable.js +17 -10
  246. package/modern/ChartsXAxis/ChartsXAxis.js +158 -37
  247. package/modern/ChartsYAxis/ChartsYAxis.js +83 -30
  248. package/modern/LineChart/AreaElement.js +10 -0
  249. package/modern/LineChart/AreaPlot.js +25 -6
  250. package/modern/LineChart/LineChart.js +58 -10
  251. package/modern/LineChart/LineElement.js +10 -0
  252. package/modern/LineChart/LineHighlightElement.js +78 -0
  253. package/modern/LineChart/LineHighlightPlot.js +102 -0
  254. package/modern/LineChart/LinePlot.js +23 -10
  255. package/modern/LineChart/MarkElement.js +12 -5
  256. package/modern/LineChart/MarkPlot.js +60 -13
  257. package/modern/LineChart/formatter.js +4 -3
  258. package/modern/LineChart/index.js +3 -1
  259. package/modern/PieChart/PieArc.js +26 -57
  260. package/modern/PieChart/PieArcLabel.js +43 -34
  261. package/modern/PieChart/PieArcLabelPlot.js +90 -0
  262. package/modern/PieChart/PieArcPlot.js +83 -0
  263. package/modern/PieChart/PieChart.js +59 -12
  264. package/modern/PieChart/PiePlot.js +76 -55
  265. package/modern/PieChart/dataTransform/transition.js +130 -0
  266. package/modern/PieChart/dataTransform/useTransformData.js +58 -0
  267. package/modern/ResponsiveChartContainer/index.js +3 -3
  268. package/modern/ScatterChart/Scatter.js +10 -0
  269. package/modern/ScatterChart/ScatterChart.js +40 -8
  270. package/modern/ScatterChart/ScatterPlot.js +10 -0
  271. package/modern/SparkLineChart/SparkLineChart.js +32 -15
  272. package/modern/constants.js +1 -1
  273. package/modern/context/CartesianContextProvider.js +29 -13
  274. package/modern/context/DrawingProvider.js +8 -0
  275. package/modern/hooks/useChartDimensions.js +2 -0
  276. package/modern/hooks/useMounted.js +16 -0
  277. package/modern/hooks/useReducedMotion.js +27 -0
  278. package/modern/hooks/useTicks.js +15 -9
  279. package/modern/index.js +1 -1
  280. package/modern/internals/components/AxisSharedComponents.js +15 -70
  281. package/modern/internals/components/ChartsText.js +77 -0
  282. package/modern/internals/domUtils.js +113 -0
  283. package/modern/internals/geometry.js +36 -0
  284. package/package.json +9 -6
  285. package/themeAugmentation/components.d.ts +1 -0
  286. package/themeAugmentation/overrides.d.ts +2 -0
@@ -1,15 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["id", "dataIndex", "classes", "color", "highlightScope", "innerRadius", "outerRadius", "cornerRadius", "highlighted", "faded"];
3
+ var _excluded = ["id", "dataIndex", "classes", "color", "highlightScope", "onClick", "isFaded", "isHighlighted", "startAngle", "endAngle", "paddingAngle", "innerRadius", "outerRadius", "cornerRadius"];
4
4
  import * as React from 'react';
5
5
  import { arc as d3Arc } from 'd3-shape';
6
- import PropTypes from 'prop-types';
6
+ import { animated, to } from '@react-spring/web';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
8
  import generateUtilityClass from '@mui/utils/generateUtilityClass';
9
9
  import { styled } from '@mui/material/styles';
10
10
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
11
- import { InteractionContext } from '../context/InteractionProvider';
12
- import { getIsFaded, getIsHighlighted, useInteractionItemProps } from '../hooks/useInteractionItemProps';
11
+ import { useInteractionItemProps } from '../hooks/useInteractionItemProps';
13
12
  import { jsx as _jsx } from "react/jsx-runtime";
14
13
  export function getPieArcUtilityClass(slot) {
15
14
  return generateUtilityClass('MuiPieArc', slot);
@@ -25,54 +24,36 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
25
24
  };
26
25
  return composeClasses(slots, getPieArcUtilityClass, classes);
27
26
  };
28
- var PieArcRoot = styled('path', {
27
+ var PieArcRoot = styled(animated.path, {
29
28
  name: 'MuiPieArc',
30
29
  slot: 'Root',
31
30
  overridesResolver: function overridesResolver(_, styles) {
32
31
  return styles.arc;
33
32
  }
34
33
  })(function (_ref) {
35
- var ownerState = _ref.ownerState,
36
- theme = _ref.theme;
34
+ var theme = _ref.theme;
37
35
  return {
38
- stroke: theme.palette.background.paper,
36
+ stroke: (theme.vars || theme).palette.background.paper,
39
37
  strokeWidth: 1,
40
- strokeLinejoin: 'round',
41
- fill: ownerState.color,
42
- opacity: ownerState.isFaded ? 0.3 : 1
38
+ strokeLinejoin: 'round'
43
39
  };
44
40
  });
45
41
  export default function PieArc(props) {
46
- var _attibuesOverride$inn, _attibuesOverride$out, _attibuesOverride$cor;
47
42
  var id = props.id,
48
43
  dataIndex = props.dataIndex,
49
44
  innerClasses = props.classes,
50
45
  color = props.color,
51
46
  highlightScope = props.highlightScope,
52
- _props$innerRadius = props.innerRadius,
53
- baseInnerRadius = _props$innerRadius === void 0 ? 0 : _props$innerRadius,
54
- baseOuterRadius = props.outerRadius,
55
- _props$cornerRadius = props.cornerRadius,
56
- baseCornerRadius = _props$cornerRadius === void 0 ? 0 : _props$cornerRadius,
57
- highlighted = props.highlighted,
58
- _props$faded = props.faded,
59
- faded = _props$faded === void 0 ? {
60
- additionalRadius: -5
61
- } : _props$faded,
47
+ onClick = props.onClick,
48
+ isFaded = props.isFaded,
49
+ isHighlighted = props.isHighlighted,
50
+ startAngle = props.startAngle,
51
+ endAngle = props.endAngle,
52
+ paddingAngle = props.paddingAngle,
53
+ innerRadius = props.innerRadius,
54
+ outerRadius = props.outerRadius,
55
+ cornerRadius = props.cornerRadius,
62
56
  other = _objectWithoutProperties(props, _excluded);
63
- var getInteractionItemProps = useInteractionItemProps(highlightScope);
64
- var _React$useContext = React.useContext(InteractionContext),
65
- item = _React$useContext.item;
66
- var isHighlighted = getIsHighlighted(item, {
67
- type: 'pie',
68
- seriesId: id,
69
- dataIndex: dataIndex
70
- }, highlightScope);
71
- var isFaded = !isHighlighted && getIsFaded(item, {
72
- type: 'pie',
73
- seriesId: id,
74
- dataIndex: dataIndex
75
- }, highlightScope);
76
57
  var ownerState = {
77
58
  id: id,
78
59
  dataIndex: dataIndex,
@@ -82,37 +63,24 @@ export default function PieArc(props) {
82
63
  isHighlighted: isHighlighted
83
64
  };
84
65
  var classes = useUtilityClasses(ownerState);
85
- var attibuesOverride = _extends({
86
- additionalRadius: 0
87
- }, isFaded && faded || isHighlighted && highlighted || {});
88
- var innerRadius = Math.max(0, (_attibuesOverride$inn = attibuesOverride.innerRadius) != null ? _attibuesOverride$inn : baseInnerRadius);
89
- var outerRadius = Math.max(0, (_attibuesOverride$out = attibuesOverride.outerRadius) != null ? _attibuesOverride$out : baseOuterRadius + attibuesOverride.additionalRadius);
90
- var cornerRadius = (_attibuesOverride$cor = attibuesOverride.cornerRadius) != null ? _attibuesOverride$cor : baseCornerRadius;
66
+ var getInteractionItemProps = useInteractionItemProps(highlightScope);
91
67
  return /*#__PURE__*/_jsx(PieArcRoot, _extends({
92
- d: d3Arc().cornerRadius(cornerRadius)(_extends({}, other, {
93
- innerRadius: innerRadius,
94
- outerRadius: outerRadius
95
- })),
68
+ d: to([startAngle, endAngle, paddingAngle, innerRadius, outerRadius, cornerRadius], function (sA, eA, pA, iR, oR, cR) {
69
+ return d3Arc().cornerRadius(cR)({
70
+ padAngle: pA,
71
+ startAngle: sA,
72
+ endAngle: eA,
73
+ innerRadius: iR,
74
+ outerRadius: oR
75
+ });
76
+ }),
77
+ onClick: onClick,
78
+ cursor: onClick ? 'pointer' : 'unset',
96
79
  ownerState: ownerState,
97
80
  className: classes.root
98
- }, getInteractionItemProps({
81
+ }, other, getInteractionItemProps({
99
82
  type: 'pie',
100
83
  seriesId: id,
101
84
  dataIndex: dataIndex
102
85
  })));
103
- }
104
- process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
105
- // ----------------------------- Warning --------------------------------
106
- // | These PropTypes are generated from the TypeScript type definitions |
107
- // | To update them edit the TypeScript types and run "yarn proptypes" |
108
- // ----------------------------------------------------------------------
109
- classes: PropTypes.object,
110
- cornerRadius: PropTypes.number,
111
- dataIndex: PropTypes.number.isRequired,
112
- highlightScope: PropTypes.shape({
113
- faded: PropTypes.oneOf(['global', 'none', 'series']),
114
- highlighted: PropTypes.oneOf(['item', 'none', 'series'])
115
- }),
116
- innerRadius: PropTypes.number,
117
- outerRadius: PropTypes.number.isRequired
118
- } : void 0;
86
+ }
@@ -1,15 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["id", "dataIndex", "classes", "color", "highlightScope", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel"];
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ var _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
4
5
  import * as React from 'react';
6
+ import { animated, to } from '@react-spring/web';
5
7
  import { arc as d3Arc } from 'd3-shape';
6
8
  import PropTypes from 'prop-types';
7
9
  import composeClasses from '@mui/utils/composeClasses';
8
10
  import generateUtilityClass from '@mui/utils/generateUtilityClass';
9
11
  import { styled } from '@mui/material/styles';
10
12
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
11
- import { InteractionContext } from '../context/InteractionProvider';
12
- import { getIsFaded, getIsHighlighted } from '../hooks/useInteractionItemProps';
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  export function getPieArcLabelUtilityClass(slot) {
15
15
  return generateUtilityClass('MuiPieArcLabel', slot);
@@ -25,7 +25,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
25
25
  };
26
26
  return composeClasses(slots, getPieArcLabelUtilityClass, classes);
27
27
  };
28
- var PieArcLabelRoot = styled('text', {
28
+ var PieArcLabelRoot = styled(animated.text, {
29
29
  name: 'MuiPieArcLabel',
30
30
  slot: 'Root',
31
31
  overridesResolver: function overridesResolver(_, styles) {
@@ -34,54 +34,68 @@ var PieArcLabelRoot = styled('text', {
34
34
  })(function (_ref) {
35
35
  var theme = _ref.theme;
36
36
  return {
37
- fill: theme.palette.text.primary,
38
- textAnchor: 'middle'
37
+ fill: (theme.vars || theme).palette.text.primary,
38
+ textAnchor: 'middle',
39
+ dominantBaseline: 'middle'
39
40
  };
40
41
  });
42
+ /**
43
+ * Helper to compute label position.
44
+ * It's not an inline function because we need it in inerpolation.
45
+ */
46
+ var getLabelPosition = function getLabelPosition(formattedArcLabel, variable) {
47
+ return function (startAngle, endAngle, padAngle, innerRadius, outerRadius, cornerRadius) {
48
+ if (!formattedArcLabel) {
49
+ return 0;
50
+ }
51
+ var _ref2 = d3Arc().cornerRadius(cornerRadius).centroid({
52
+ padAngle: padAngle,
53
+ startAngle: startAngle,
54
+ endAngle: endAngle,
55
+ innerRadius: innerRadius,
56
+ outerRadius: outerRadius
57
+ }),
58
+ _ref3 = _slicedToArray(_ref2, 2),
59
+ x = _ref3[0],
60
+ y = _ref3[1];
61
+ if (variable === 'x') {
62
+ return x;
63
+ }
64
+ return y;
65
+ };
66
+ };
41
67
  export default function PieArcLabel(props) {
42
68
  var id = props.id,
43
- dataIndex = props.dataIndex,
44
69
  innerClasses = props.classes,
45
70
  color = props.color,
46
- highlightScope = props.highlightScope,
47
- _props$innerRadius = props.innerRadius,
48
- innerRadius = _props$innerRadius === void 0 ? 0 : _props$innerRadius,
71
+ startAngle = props.startAngle,
72
+ endAngle = props.endAngle,
73
+ paddingAngle = props.paddingAngle,
74
+ innerRadius = props.innerRadius,
49
75
  outerRadius = props.outerRadius,
50
- _props$cornerRadius = props.cornerRadius,
51
- cornerRadius = _props$cornerRadius === void 0 ? 0 : _props$cornerRadius,
76
+ cornerRadius = props.cornerRadius,
52
77
  formattedArcLabel = props.formattedArcLabel,
78
+ isHighlighted = props.isHighlighted,
79
+ isFaded = props.isFaded,
80
+ style = props.style,
53
81
  other = _objectWithoutProperties(props, _excluded);
54
- var _React$useContext = React.useContext(InteractionContext),
55
- item = _React$useContext.item;
56
- var isHighlighted = getIsHighlighted(item, {
57
- type: 'pie',
58
- seriesId: id,
59
- dataIndex: dataIndex
60
- }, highlightScope);
61
- var isFaded = !isHighlighted && getIsFaded(item, {
62
- type: 'pie',
63
- seriesId: id,
64
- dataIndex: dataIndex
65
- }, highlightScope);
66
82
  var ownerState = {
67
83
  id: id,
68
- dataIndex: dataIndex,
69
84
  classes: innerClasses,
70
85
  color: color,
71
86
  isFaded: isFaded,
72
87
  isHighlighted: isHighlighted
73
88
  };
74
89
  var classes = useUtilityClasses(ownerState);
75
- var arcLabelPosition = formattedArcLabel ? d3Arc().cornerRadius(cornerRadius).centroid(_extends({}, other, {
76
- innerRadius: innerRadius,
77
- outerRadius: outerRadius
78
- })) : [0, 0];
79
- return /*#__PURE__*/_jsx(PieArcLabelRoot, {
80
- className: classes.root,
81
- x: arcLabelPosition[0],
82
- y: arcLabelPosition[1],
90
+ return /*#__PURE__*/_jsx(PieArcLabelRoot, _extends({
91
+ className: classes.root
92
+ }, other, {
93
+ style: _extends({
94
+ x: to([startAngle, endAngle, paddingAngle, innerRadius, outerRadius, cornerRadius], getLabelPosition(formattedArcLabel, 'x')),
95
+ y: to([startAngle, endAngle, paddingAngle, innerRadius, outerRadius, cornerRadius], getLabelPosition(formattedArcLabel, 'y'))
96
+ }, style),
83
97
  children: formattedArcLabel
84
- });
98
+ }));
85
99
  }
86
100
  process.env.NODE_ENV !== "production" ? PieArcLabel.propTypes = {
87
101
  // ----------------------------- Warning --------------------------------
@@ -0,0 +1,93 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlightScope", "highlighted", "faded", "data", "arcLabel", "arcLabelMinAngle", "skipAnimation"],
4
+ _excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "outerRadius", "cornerRadius"];
5
+ import * as React from 'react';
6
+ import { useTransition } from '@react-spring/web';
7
+ import { defaultLabelTransitionConfig } from './dataTransform/transition';
8
+ import { useTransformData } from './dataTransform/useTransformData';
9
+ import PieArcLabel from './PieArcLabel';
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ var RATIO = 180 / Math.PI;
12
+ function getItemLabel(arcLabel, arcLabelMinAngle, item) {
13
+ if (!arcLabel) {
14
+ return null;
15
+ }
16
+ var angle = (item.endAngle - item.startAngle) * RATIO;
17
+ if (angle < arcLabelMinAngle) {
18
+ return null;
19
+ }
20
+ if (typeof arcLabel === 'string') {
21
+ var _item$arcLabel;
22
+ return (_item$arcLabel = item[arcLabel]) == null ? void 0 : _item$arcLabel.toString();
23
+ }
24
+ return arcLabel(item);
25
+ }
26
+ export function PieArcLabelPlot(props) {
27
+ var _slots$pieArcLabel;
28
+ var slots = props.slots,
29
+ slotProps = props.slotProps,
30
+ _props$innerRadius = props.innerRadius,
31
+ innerRadius = _props$innerRadius === void 0 ? 0 : _props$innerRadius,
32
+ outerRadius = props.outerRadius,
33
+ _props$cornerRadius = props.cornerRadius,
34
+ cornerRadius = _props$cornerRadius === void 0 ? 0 : _props$cornerRadius,
35
+ _props$paddingAngle = props.paddingAngle,
36
+ paddingAngle = _props$paddingAngle === void 0 ? 0 : _props$paddingAngle,
37
+ id = props.id,
38
+ highlightScope = props.highlightScope,
39
+ highlighted = props.highlighted,
40
+ _props$faded = props.faded,
41
+ faded = _props$faded === void 0 ? {
42
+ additionalRadius: -5
43
+ } : _props$faded,
44
+ data = props.data,
45
+ arcLabel = props.arcLabel,
46
+ _props$arcLabelMinAng = props.arcLabelMinAngle,
47
+ arcLabelMinAngle = _props$arcLabelMinAng === void 0 ? 0 : _props$arcLabelMinAng,
48
+ skipAnimation = props.skipAnimation,
49
+ other = _objectWithoutProperties(props, _excluded);
50
+ var transformedData = useTransformData({
51
+ innerRadius: innerRadius,
52
+ outerRadius: outerRadius,
53
+ cornerRadius: cornerRadius,
54
+ paddingAngle: paddingAngle,
55
+ id: id,
56
+ highlightScope: highlightScope,
57
+ highlighted: highlighted,
58
+ faded: faded,
59
+ data: data
60
+ });
61
+ var transition = useTransition(transformedData, _extends({}, defaultLabelTransitionConfig, {
62
+ immediate: skipAnimation
63
+ }));
64
+ if (data.length === 0) {
65
+ return null;
66
+ }
67
+ var ArcLabel = (_slots$pieArcLabel = slots == null ? void 0 : slots.pieArcLabel) != null ? _slots$pieArcLabel : PieArcLabel;
68
+ return /*#__PURE__*/_jsx("g", _extends({}, other, {
69
+ children: transition(function (_ref, item) {
70
+ var startAngle = _ref.startAngle,
71
+ endAngle = _ref.endAngle,
72
+ pA = _ref.paddingAngle,
73
+ iR = _ref.innerRadius,
74
+ oR = _ref.outerRadius,
75
+ cR = _ref.cornerRadius,
76
+ style = _objectWithoutProperties(_ref, _excluded2);
77
+ return /*#__PURE__*/_jsx(ArcLabel, _extends({
78
+ startAngle: startAngle,
79
+ endAngle: endAngle,
80
+ paddingAngle: pA,
81
+ innerRadius: iR,
82
+ outerRadius: oR,
83
+ cornerRadius: cR,
84
+ style: style,
85
+ id: id,
86
+ color: item.color,
87
+ isFaded: item.isFaded,
88
+ isHighlighted: item.isHighlighted,
89
+ formattedArcLabel: getItemLabel(arcLabel, arcLabelMinAngle, item)
90
+ }, slotProps == null ? void 0 : slotProps.pieArcLabel));
91
+ })
92
+ }));
93
+ }
@@ -0,0 +1,84 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlightScope", "highlighted", "faded", "data", "onClick", "skipAnimation"],
4
+ _excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "outerRadius", "cornerRadius"];
5
+ import * as React from 'react';
6
+ import { useTransition } from '@react-spring/web';
7
+ import PieArc from './PieArc';
8
+ import { defaultTransitionConfig } from './dataTransform/transition';
9
+ import { useTransformData } from './dataTransform/useTransformData';
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ export function PieArcPlot(props) {
12
+ var _slots$pieArc;
13
+ var slots = props.slots,
14
+ slotProps = props.slotProps,
15
+ _props$innerRadius = props.innerRadius,
16
+ innerRadius = _props$innerRadius === void 0 ? 0 : _props$innerRadius,
17
+ outerRadius = props.outerRadius,
18
+ _props$cornerRadius = props.cornerRadius,
19
+ cornerRadius = _props$cornerRadius === void 0 ? 0 : _props$cornerRadius,
20
+ _props$paddingAngle = props.paddingAngle,
21
+ paddingAngle = _props$paddingAngle === void 0 ? 0 : _props$paddingAngle,
22
+ id = props.id,
23
+ highlightScope = props.highlightScope,
24
+ highlighted = props.highlighted,
25
+ _props$faded = props.faded,
26
+ faded = _props$faded === void 0 ? {
27
+ additionalRadius: -5
28
+ } : _props$faded,
29
+ data = props.data,
30
+ onClick = props.onClick,
31
+ skipAnimation = props.skipAnimation,
32
+ other = _objectWithoutProperties(props, _excluded);
33
+ var transformedData = useTransformData({
34
+ innerRadius: innerRadius,
35
+ outerRadius: outerRadius,
36
+ cornerRadius: cornerRadius,
37
+ paddingAngle: paddingAngle,
38
+ id: id,
39
+ highlightScope: highlightScope,
40
+ highlighted: highlighted,
41
+ faded: faded,
42
+ data: data
43
+ });
44
+ var transition = useTransition(transformedData, _extends({}, defaultTransitionConfig, {
45
+ immediate: skipAnimation
46
+ }));
47
+ if (data.length === 0) {
48
+ return null;
49
+ }
50
+ var Arc = (_slots$pieArc = slots == null ? void 0 : slots.pieArc) != null ? _slots$pieArc : PieArc;
51
+ return /*#__PURE__*/_jsx("g", _extends({}, other, {
52
+ children: transition(function (_ref, item, _, index) {
53
+ var startAngle = _ref.startAngle,
54
+ endAngle = _ref.endAngle,
55
+ pA = _ref.paddingAngle,
56
+ iR = _ref.innerRadius,
57
+ oR = _ref.outerRadius,
58
+ cR = _ref.cornerRadius,
59
+ style = _objectWithoutProperties(_ref, _excluded2);
60
+ return /*#__PURE__*/_jsx(Arc, _extends({
61
+ startAngle: startAngle,
62
+ endAngle: endAngle,
63
+ paddingAngle: pA,
64
+ innerRadius: iR,
65
+ outerRadius: oR,
66
+ cornerRadius: cR,
67
+ style: style,
68
+ id: id,
69
+ color: item.color,
70
+ dataIndex: index,
71
+ highlightScope: highlightScope,
72
+ isFaded: item.isFaded,
73
+ isHighlighted: item.isHighlighted,
74
+ onClick: onClick && function (event) {
75
+ onClick(event, {
76
+ type: 'pie',
77
+ seriesId: id,
78
+ dataIndex: index
79
+ }, item);
80
+ }
81
+ }, slotProps == null ? void 0 : slotProps.pieArc));
82
+ })
83
+ }));
84
+ }
@@ -17,6 +17,17 @@ var defaultMargin = {
17
17
  left: 5,
18
18
  right: 100
19
19
  };
20
+
21
+ /**
22
+ * Demos:
23
+ *
24
+ * - [Pie](https://mui.com/x/react-charts/pie/)
25
+ * - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
26
+ *
27
+ * API:
28
+ *
29
+ * - [PieChart API](https://mui.com/x/api/charts/pie-chart/)
30
+ */
20
31
  function PieChart(props) {
21
32
  var xAxis = props.xAxis,
22
33
  yAxis = props.yAxis,
@@ -35,6 +46,7 @@ function PieChart(props) {
35
46
  x: 'none',
36
47
  y: 'none'
37
48
  } : _props$axisHighlight,
49
+ skipAnimation = props.skipAnimation,
38
50
  _props$legend = props.legend,
39
51
  legend = _props$legend === void 0 ? {
40
52
  direction: 'column',
@@ -53,7 +65,8 @@ function PieChart(props) {
53
65
  bottomAxis = _props$bottomAxis === void 0 ? null : _props$bottomAxis,
54
66
  children = props.children,
55
67
  slots = props.slots,
56
- slotProps = props.slotProps;
68
+ slotProps = props.slotProps,
69
+ onClick = props.onClick;
57
70
  var margin = _extends({}, defaultMargin, marginProps);
58
71
  return /*#__PURE__*/_jsxs(ResponsiveChartContainer, {
59
72
  series: series.map(function (s) {
@@ -86,7 +99,9 @@ function PieChart(props) {
86
99
  slotProps: slotProps
87
100
  }), /*#__PURE__*/_jsx(PiePlot, {
88
101
  slots: slots,
89
- slotProps: slotProps
102
+ slotProps: slotProps,
103
+ onClick: onClick,
104
+ skipAnimation: skipAnimation
90
105
  }), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legend, {
91
106
  slots: slots,
92
107
  slotProps: slotProps
@@ -115,11 +130,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
115
130
  fill: PropTypes.string,
116
131
  label: PropTypes.string,
117
132
  labelFontSize: PropTypes.number,
133
+ labelStyle: PropTypes.object,
118
134
  position: PropTypes.oneOf(['bottom', 'top']),
119
135
  slotProps: PropTypes.object,
120
136
  slots: PropTypes.object,
121
137
  stroke: PropTypes.string,
122
138
  tickFontSize: PropTypes.number,
139
+ tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
140
+ tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
141
+ tickLabelStyle: PropTypes.object,
123
142
  tickMaxStep: PropTypes.number,
124
143
  tickMinStep: PropTypes.number,
125
144
  tickNumber: PropTypes.number,
@@ -148,33 +167,33 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
148
167
  fill: PropTypes.string,
149
168
  label: PropTypes.string,
150
169
  labelFontSize: PropTypes.number,
170
+ labelStyle: PropTypes.object,
151
171
  position: PropTypes.oneOf(['left', 'right']),
152
172
  slotProps: PropTypes.object,
153
173
  slots: PropTypes.object,
154
174
  stroke: PropTypes.string,
155
175
  tickFontSize: PropTypes.number,
176
+ tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
177
+ tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
178
+ tickLabelStyle: PropTypes.object,
156
179
  tickMaxStep: PropTypes.number,
157
180
  tickMinStep: PropTypes.number,
158
181
  tickNumber: PropTypes.number,
159
182
  tickSize: PropTypes.number
160
183
  }), PropTypes.string]),
184
+ /**
185
+ * @deprecated Consider using `slotProps.legend` instead.
186
+ */
161
187
  legend: PropTypes.shape({
162
188
  classes: PropTypes.object,
163
189
  direction: PropTypes.oneOf(['column', 'row']),
164
190
  hidden: PropTypes.bool,
165
- itemWidth: PropTypes.number,
166
- markSize: PropTypes.number,
167
- offset: PropTypes.shape({
168
- x: PropTypes.number,
169
- y: PropTypes.number
170
- }),
171
191
  position: PropTypes.shape({
172
192
  horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
173
193
  vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
174
194
  }),
175
195
  slotProps: PropTypes.object,
176
- slots: PropTypes.object,
177
- spacing: PropTypes.number
196
+ slots: PropTypes.object
178
197
  }),
179
198
  margin: PropTypes.shape({
180
199
  bottom: PropTypes.number,
@@ -182,6 +201,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
182
201
  right: PropTypes.number,
183
202
  top: PropTypes.number
184
203
  }),
204
+ onClick: PropTypes.func,
185
205
  /**
186
206
  * Indicate which axis to display the right of the charts.
187
207
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -195,11 +215,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
195
215
  fill: PropTypes.string,
196
216
  label: PropTypes.string,
197
217
  labelFontSize: PropTypes.number,
218
+ labelStyle: PropTypes.object,
198
219
  position: PropTypes.oneOf(['left', 'right']),
199
220
  slotProps: PropTypes.object,
200
221
  slots: PropTypes.object,
201
222
  stroke: PropTypes.string,
202
223
  tickFontSize: PropTypes.number,
224
+ tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
225
+ tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
226
+ tickLabelStyle: PropTypes.object,
203
227
  tickMaxStep: PropTypes.number,
204
228
  tickMinStep: PropTypes.number,
205
229
  tickNumber: PropTypes.number,
@@ -221,15 +245,19 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
221
245
  endAngle: PropTypes.number,
222
246
  faded: PropTypes.shape({
223
247
  additionalRadius: PropTypes.number,
248
+ color: PropTypes.string,
224
249
  cornerRadius: PropTypes.number,
225
250
  innerRadius: PropTypes.number,
226
- outerRadius: PropTypes.number
251
+ outerRadius: PropTypes.number,
252
+ paddingAngle: PropTypes.number
227
253
  }),
228
254
  highlighted: PropTypes.shape({
229
255
  additionalRadius: PropTypes.number,
256
+ color: PropTypes.string,
230
257
  cornerRadius: PropTypes.number,
231
258
  innerRadius: PropTypes.number,
232
- outerRadius: PropTypes.number
259
+ outerRadius: PropTypes.number,
260
+ paddingAngle: PropTypes.number
233
261
  }),
234
262
  highlightScope: PropTypes.shape({
235
263
  faded: PropTypes.oneOf(['global', 'none', 'series']),
@@ -244,6 +272,11 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
244
272
  type: PropTypes.oneOf(['pie']),
245
273
  valueFormatter: PropTypes.func
246
274
  })).isRequired,
275
+ /**
276
+ * If `true`, animations are skiped.
277
+ * @default false
278
+ */
279
+ skipAnimation: PropTypes.bool,
247
280
  /**
248
281
  * The props used for each component slot.
249
282
  * @default {}
@@ -256,6 +289,8 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
256
289
  axisContent: PropTypes.elementType,
257
290
  classes: PropTypes.object,
258
291
  itemContent: PropTypes.elementType,
292
+ slotProps: PropTypes.object,
293
+ slots: PropTypes.object,
259
294
  trigger: PropTypes.oneOf(['axis', 'item', 'none'])
260
295
  }),
261
296
  /**
@@ -271,11 +306,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
271
306
  fill: PropTypes.string,
272
307
  label: PropTypes.string,
273
308
  labelFontSize: PropTypes.number,
309
+ labelStyle: PropTypes.object,
274
310
  position: PropTypes.oneOf(['bottom', 'top']),
275
311
  slotProps: PropTypes.object,
276
312
  slots: PropTypes.object,
277
313
  stroke: PropTypes.string,
278
314
  tickFontSize: PropTypes.number,
315
+ tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
316
+ tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
317
+ tickLabelStyle: PropTypes.object,
279
318
  tickMaxStep: PropTypes.number,
280
319
  tickMinStep: PropTypes.number,
281
320
  tickNumber: PropTypes.number,
@@ -300,6 +339,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
300
339
  id: PropTypes.string,
301
340
  label: PropTypes.string,
302
341
  labelFontSize: PropTypes.number,
342
+ labelStyle: PropTypes.object,
303
343
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
304
344
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
305
345
  position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
@@ -308,6 +348,9 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
308
348
  slots: PropTypes.object,
309
349
  stroke: PropTypes.string,
310
350
  tickFontSize: PropTypes.number,
351
+ tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
352
+ tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
353
+ tickLabelStyle: PropTypes.object,
311
354
  tickMaxStep: PropTypes.number,
312
355
  tickMinStep: PropTypes.number,
313
356
  tickNumber: PropTypes.number,
@@ -326,6 +369,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
326
369
  id: PropTypes.string,
327
370
  label: PropTypes.string,
328
371
  labelFontSize: PropTypes.number,
372
+ labelStyle: PropTypes.object,
329
373
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
330
374
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
331
375
  position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
@@ -334,6 +378,9 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
334
378
  slots: PropTypes.object,
335
379
  stroke: PropTypes.string,
336
380
  tickFontSize: PropTypes.number,
381
+ tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
382
+ tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
383
+ tickLabelStyle: PropTypes.object,
337
384
  tickMaxStep: PropTypes.number,
338
385
  tickMinStep: PropTypes.number,
339
386
  tickNumber: PropTypes.number,