@mui/x-charts 7.0.0-beta.1 → 7.0.0-beta.3

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 (234) hide show
  1. package/BarChart/BarChart.d.ts +21 -5
  2. package/BarChart/BarChart.js +37 -13
  3. package/BarChart/BarElement.d.ts +20 -13
  4. package/BarChart/BarElement.js +1 -0
  5. package/BarChart/BarPlot.d.ts +3 -5
  6. package/BarChart/BarPlot.js +9 -10
  7. package/CHANGELOG.md +223 -1
  8. package/ChartContainer/ChartContainer.js +6 -4
  9. package/ChartsAxis/ChartsAxis.js +4 -4
  10. package/ChartsGrid/ChartsGrid.d.ts +30 -0
  11. package/ChartsGrid/ChartsGrid.js +128 -0
  12. package/ChartsGrid/chartsGridClasses.d.ts +13 -0
  13. package/ChartsGrid/chartsGridClasses.js +14 -0
  14. package/ChartsGrid/index.d.ts +2 -0
  15. package/ChartsGrid/index.js +27 -0
  16. package/ChartsGrid/package.json +6 -0
  17. package/ChartsLegend/ChartsLegend.d.ts +5 -54
  18. package/ChartsLegend/ChartsLegend.js +2 -307
  19. package/ChartsLegend/DefaultChartsLegend.d.ts +60 -0
  20. package/ChartsLegend/DefaultChartsLegend.js +294 -0
  21. package/ChartsLegend/index.d.ts +1 -0
  22. package/ChartsLegend/index.js +11 -0
  23. package/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
  24. package/ChartsReferenceLine/common.d.ts +2 -1
  25. package/ChartsSurface.js +6 -4
  26. package/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
  27. package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +1 -1
  28. package/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -1
  29. package/ChartsTooltip/utils.d.ts +1 -0
  30. package/ChartsTooltip/utils.js +7 -0
  31. package/ChartsXAxis/ChartsXAxis.js +15 -11
  32. package/ChartsYAxis/ChartsYAxis.js +3 -3
  33. package/Gauge/Gauge.d.ts +13 -0
  34. package/Gauge/Gauge.js +156 -0
  35. package/Gauge/GaugeContainer.d.ts +19 -0
  36. package/Gauge/GaugeContainer.js +216 -0
  37. package/Gauge/GaugeProvider.d.ts +117 -0
  38. package/Gauge/GaugeProvider.js +96 -0
  39. package/Gauge/GaugeReferenceArc.d.ts +2 -0
  40. package/Gauge/GaugeReferenceArc.js +44 -0
  41. package/Gauge/GaugeValueArc.d.ts +2 -0
  42. package/Gauge/GaugeValueArc.js +51 -0
  43. package/Gauge/GaugeValueText.d.ts +15 -0
  44. package/Gauge/GaugeValueText.js +77 -0
  45. package/Gauge/gaugeClasses.d.ts +14 -0
  46. package/Gauge/gaugeClasses.js +15 -0
  47. package/Gauge/index.d.ts +7 -0
  48. package/Gauge/index.js +87 -0
  49. package/Gauge/package.json +6 -0
  50. package/Gauge/utils.d.ts +19 -0
  51. package/Gauge/utils.js +75 -0
  52. package/LineChart/AnimatedArea.js +1 -1
  53. package/LineChart/AnimatedLine.js +1 -1
  54. package/LineChart/AreaElement.d.ts +2 -1
  55. package/LineChart/AreaElement.js +1 -1
  56. package/LineChart/LineChart.d.ts +24 -5
  57. package/LineChart/LineChart.js +41 -13
  58. package/LineChart/LineElement.d.ts +2 -1
  59. package/LineChart/LineElement.js +1 -1
  60. package/LineChart/LineHighlightElement.d.ts +3 -2
  61. package/LineChart/LineHighlightElement.js +2 -1
  62. package/LineChart/MarkElement.d.ts +3 -2
  63. package/LineChart/MarkElement.js +1 -0
  64. package/PieChart/PieArc.d.ts +7 -6
  65. package/PieChart/PieArc.js +10 -9
  66. package/PieChart/PieArcLabel.d.ts +3 -2
  67. package/PieChart/PieArcLabel.js +1 -0
  68. package/PieChart/PieArcLabelPlot.js +14 -14
  69. package/PieChart/PieArcPlot.js +1 -1
  70. package/PieChart/PieChart.d.ts +22 -0
  71. package/PieChart/PieChart.js +32 -8
  72. package/ResponsiveChartContainer/ResponsiveChartContainer.js +8 -70
  73. package/ResponsiveChartContainer/useChartContainerDimensions.d.ts +2 -0
  74. package/ResponsiveChartContainer/useChartContainerDimensions.js +76 -0
  75. package/ScatterChart/ScatterChart.d.ts +18 -0
  76. package/ScatterChart/ScatterChart.js +35 -8
  77. package/SparkLineChart/SparkLineChart.d.ts +1 -1
  78. package/SparkLineChart/SparkLineChart.js +5 -4
  79. package/context/CartesianContextProvider.js +8 -6
  80. package/esm/BarChart/BarChart.js +37 -13
  81. package/esm/BarChart/BarElement.js +1 -0
  82. package/esm/BarChart/BarPlot.js +8 -10
  83. package/esm/ChartContainer/ChartContainer.js +6 -4
  84. package/esm/ChartsAxis/ChartsAxis.js +4 -4
  85. package/esm/ChartsGrid/ChartsGrid.js +121 -0
  86. package/esm/ChartsGrid/chartsGridClasses.js +6 -0
  87. package/esm/ChartsGrid/index.js +2 -0
  88. package/esm/ChartsLegend/ChartsLegend.js +2 -307
  89. package/esm/ChartsLegend/DefaultChartsLegend.js +286 -0
  90. package/esm/ChartsLegend/index.js +1 -0
  91. package/esm/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
  92. package/esm/ChartsSurface.js +6 -4
  93. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
  94. package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
  95. package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -1
  96. package/esm/ChartsTooltip/utils.js +6 -0
  97. package/esm/ChartsXAxis/ChartsXAxis.js +14 -10
  98. package/esm/ChartsYAxis/ChartsYAxis.js +2 -2
  99. package/esm/Gauge/Gauge.js +149 -0
  100. package/esm/Gauge/GaugeContainer.js +211 -0
  101. package/esm/Gauge/GaugeProvider.js +85 -0
  102. package/esm/Gauge/GaugeReferenceArc.js +35 -0
  103. package/esm/Gauge/GaugeValueArc.js +42 -0
  104. package/esm/Gauge/GaugeValueText.js +69 -0
  105. package/esm/Gauge/gaugeClasses.js +7 -0
  106. package/esm/Gauge/index.js +7 -0
  107. package/esm/Gauge/utils.js +68 -0
  108. package/esm/LineChart/AnimatedArea.js +1 -1
  109. package/esm/LineChart/AnimatedLine.js +1 -1
  110. package/esm/LineChart/AreaElement.js +1 -1
  111. package/esm/LineChart/LineChart.js +41 -13
  112. package/esm/LineChart/LineElement.js +1 -1
  113. package/esm/LineChart/LineHighlightElement.js +2 -1
  114. package/esm/LineChart/MarkElement.js +1 -0
  115. package/esm/PieChart/PieArc.js +10 -9
  116. package/esm/PieChart/PieArcLabel.js +1 -0
  117. package/esm/PieChart/PieArcLabelPlot.js +14 -14
  118. package/esm/PieChart/PieArcPlot.js +1 -1
  119. package/esm/PieChart/PieChart.js +32 -8
  120. package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +8 -70
  121. package/esm/ResponsiveChartContainer/useChartContainerDimensions.js +66 -0
  122. package/esm/ScatterChart/ScatterChart.js +35 -8
  123. package/esm/SparkLineChart/SparkLineChart.js +5 -4
  124. package/esm/context/CartesianContextProvider.js +8 -6
  125. package/esm/hooks/useTicks.js +2 -3
  126. package/esm/index.js +2 -0
  127. package/hooks/useTicks.d.ts +1 -2
  128. package/hooks/useTicks.js +2 -3
  129. package/index.d.ts +2 -0
  130. package/index.js +23 -1
  131. package/internals/defaultizeColor.d.ts +16 -16
  132. package/internals/defaultizeValueFormatter.d.ts +4 -7
  133. package/internals/stackSeries.d.ts +4 -7
  134. package/legacy/BarChart/BarChart.js +37 -13
  135. package/legacy/BarChart/BarElement.js +1 -0
  136. package/legacy/BarChart/BarPlot.js +10 -10
  137. package/legacy/ChartContainer/ChartContainer.js +6 -4
  138. package/legacy/ChartsAxis/ChartsAxis.js +4 -4
  139. package/legacy/ChartsGrid/ChartsGrid.js +119 -0
  140. package/legacy/ChartsGrid/chartsGridClasses.js +6 -0
  141. package/legacy/ChartsGrid/index.js +2 -0
  142. package/legacy/ChartsLegend/ChartsLegend.js +2 -323
  143. package/legacy/ChartsLegend/DefaultChartsLegend.js +302 -0
  144. package/legacy/ChartsLegend/index.js +1 -0
  145. package/legacy/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
  146. package/legacy/ChartsSurface.js +5 -3
  147. package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
  148. package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
  149. package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -1
  150. package/legacy/ChartsTooltip/utils.js +6 -0
  151. package/legacy/ChartsXAxis/ChartsXAxis.js +13 -9
  152. package/legacy/ChartsYAxis/ChartsYAxis.js +2 -2
  153. package/legacy/Gauge/Gauge.js +146 -0
  154. package/legacy/Gauge/GaugeContainer.js +215 -0
  155. package/legacy/Gauge/GaugeProvider.js +87 -0
  156. package/legacy/Gauge/GaugeReferenceArc.js +37 -0
  157. package/legacy/Gauge/GaugeValueArc.js +44 -0
  158. package/legacy/Gauge/GaugeValueText.js +66 -0
  159. package/legacy/Gauge/gaugeClasses.js +7 -0
  160. package/legacy/Gauge/index.js +7 -0
  161. package/legacy/Gauge/utils.js +84 -0
  162. package/legacy/LineChart/AnimatedArea.js +1 -1
  163. package/legacy/LineChart/AnimatedLine.js +1 -1
  164. package/legacy/LineChart/AreaElement.js +1 -1
  165. package/legacy/LineChart/LineChart.js +41 -13
  166. package/legacy/LineChart/LineElement.js +1 -1
  167. package/legacy/LineChart/LineHighlightElement.js +2 -1
  168. package/legacy/LineChart/MarkElement.js +1 -0
  169. package/legacy/PieChart/PieArc.js +11 -10
  170. package/legacy/PieChart/PieArcLabel.js +1 -0
  171. package/legacy/PieChart/PieArcLabelPlot.js +15 -15
  172. package/legacy/PieChart/PieArcPlot.js +1 -1
  173. package/legacy/PieChart/PieChart.js +32 -8
  174. package/legacy/ResponsiveChartContainer/ResponsiveChartContainer.js +13 -81
  175. package/legacy/ResponsiveChartContainer/useChartContainerDimensions.js +73 -0
  176. package/legacy/ScatterChart/ScatterChart.js +35 -8
  177. package/legacy/SparkLineChart/SparkLineChart.js +6 -5
  178. package/legacy/context/CartesianContextProvider.js +8 -6
  179. package/legacy/hooks/useTicks.js +2 -3
  180. package/legacy/index.js +3 -1
  181. package/models/axis.d.ts +7 -2
  182. package/models/seriesType/common.d.ts +2 -1
  183. package/models/seriesType/config.d.ts +7 -12
  184. package/models/seriesType/line.d.ts +2 -2
  185. package/models/seriesType/pie.d.ts +7 -3
  186. package/models/seriesType/scatter.d.ts +5 -2
  187. package/modern/BarChart/BarChart.js +37 -13
  188. package/modern/BarChart/BarElement.js +1 -0
  189. package/modern/BarChart/BarPlot.js +8 -10
  190. package/modern/ChartContainer/ChartContainer.js +6 -4
  191. package/modern/ChartsAxis/ChartsAxis.js +4 -4
  192. package/modern/ChartsGrid/ChartsGrid.js +121 -0
  193. package/modern/ChartsGrid/chartsGridClasses.js +6 -0
  194. package/modern/ChartsGrid/index.js +2 -0
  195. package/modern/ChartsLegend/ChartsLegend.js +2 -307
  196. package/modern/ChartsLegend/DefaultChartsLegend.js +286 -0
  197. package/modern/ChartsLegend/index.js +1 -0
  198. package/modern/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
  199. package/modern/ChartsSurface.js +6 -4
  200. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
  201. package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
  202. package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -1
  203. package/modern/ChartsTooltip/utils.js +6 -0
  204. package/modern/ChartsXAxis/ChartsXAxis.js +14 -10
  205. package/modern/ChartsYAxis/ChartsYAxis.js +2 -2
  206. package/modern/Gauge/Gauge.js +149 -0
  207. package/modern/Gauge/GaugeContainer.js +208 -0
  208. package/modern/Gauge/GaugeProvider.js +85 -0
  209. package/modern/Gauge/GaugeReferenceArc.js +35 -0
  210. package/modern/Gauge/GaugeValueArc.js +42 -0
  211. package/modern/Gauge/GaugeValueText.js +69 -0
  212. package/modern/Gauge/gaugeClasses.js +7 -0
  213. package/modern/Gauge/index.js +7 -0
  214. package/modern/Gauge/utils.js +68 -0
  215. package/modern/LineChart/AnimatedArea.js +1 -1
  216. package/modern/LineChart/AnimatedLine.js +1 -1
  217. package/modern/LineChart/AreaElement.js +1 -1
  218. package/modern/LineChart/LineChart.js +41 -13
  219. package/modern/LineChart/LineElement.js +1 -1
  220. package/modern/LineChart/LineHighlightElement.js +2 -1
  221. package/modern/LineChart/MarkElement.js +1 -0
  222. package/modern/PieChart/PieArc.js +10 -9
  223. package/modern/PieChart/PieArcLabel.js +1 -0
  224. package/modern/PieChart/PieArcLabelPlot.js +14 -14
  225. package/modern/PieChart/PieArcPlot.js +1 -1
  226. package/modern/PieChart/PieChart.js +32 -8
  227. package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +8 -70
  228. package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +66 -0
  229. package/modern/ScatterChart/ScatterChart.js +35 -8
  230. package/modern/SparkLineChart/SparkLineChart.js +5 -4
  231. package/modern/context/CartesianContextProvider.js +8 -6
  232. package/modern/hooks/useTicks.js +2 -3
  233. package/modern/index.js +3 -1
  234. package/package.json +4 -4
package/Gauge/index.js ADDED
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ useGaugeState: true
8
+ };
9
+ Object.defineProperty(exports, "useGaugeState", {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _GaugeProvider.useGaugeState;
13
+ }
14
+ });
15
+ var _Gauge = require("./Gauge");
16
+ Object.keys(_Gauge).forEach(function (key) {
17
+ if (key === "default" || key === "__esModule") return;
18
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
19
+ if (key in exports && exports[key] === _Gauge[key]) return;
20
+ Object.defineProperty(exports, key, {
21
+ enumerable: true,
22
+ get: function () {
23
+ return _Gauge[key];
24
+ }
25
+ });
26
+ });
27
+ var _GaugeContainer = require("./GaugeContainer");
28
+ Object.keys(_GaugeContainer).forEach(function (key) {
29
+ if (key === "default" || key === "__esModule") return;
30
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
+ if (key in exports && exports[key] === _GaugeContainer[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _GaugeContainer[key];
36
+ }
37
+ });
38
+ });
39
+ var _GaugeValueText = require("./GaugeValueText");
40
+ Object.keys(_GaugeValueText).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
43
+ if (key in exports && exports[key] === _GaugeValueText[key]) return;
44
+ Object.defineProperty(exports, key, {
45
+ enumerable: true,
46
+ get: function () {
47
+ return _GaugeValueText[key];
48
+ }
49
+ });
50
+ });
51
+ var _GaugeValueArc = require("./GaugeValueArc");
52
+ Object.keys(_GaugeValueArc).forEach(function (key) {
53
+ if (key === "default" || key === "__esModule") return;
54
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
55
+ if (key in exports && exports[key] === _GaugeValueArc[key]) return;
56
+ Object.defineProperty(exports, key, {
57
+ enumerable: true,
58
+ get: function () {
59
+ return _GaugeValueArc[key];
60
+ }
61
+ });
62
+ });
63
+ var _GaugeReferenceArc = require("./GaugeReferenceArc");
64
+ Object.keys(_GaugeReferenceArc).forEach(function (key) {
65
+ if (key === "default" || key === "__esModule") return;
66
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
67
+ if (key in exports && exports[key] === _GaugeReferenceArc[key]) return;
68
+ Object.defineProperty(exports, key, {
69
+ enumerable: true,
70
+ get: function () {
71
+ return _GaugeReferenceArc[key];
72
+ }
73
+ });
74
+ });
75
+ var _gaugeClasses = require("./gaugeClasses");
76
+ Object.keys(_gaugeClasses).forEach(function (key) {
77
+ if (key === "default" || key === "__esModule") return;
78
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
79
+ if (key in exports && exports[key] === _gaugeClasses[key]) return;
80
+ Object.defineProperty(exports, key, {
81
+ enumerable: true,
82
+ get: function () {
83
+ return _gaugeClasses[key];
84
+ }
85
+ });
86
+ });
87
+ var _GaugeProvider = require("./GaugeProvider");
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "../esm/Gauge/index.js",
4
+ "main": "./index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Retruns the ratio of the arc bounding box and its center.
3
+ * @param startAngle The start angle (in deg)
4
+ * @param endAngle The end angle (in deg)
5
+ */
6
+ export declare function getArcRatios(startAngle: number, endAngle: number): {
7
+ cx: number;
8
+ cy: number;
9
+ minX: number;
10
+ maxX: number;
11
+ minY: number;
12
+ maxY: number;
13
+ };
14
+ export declare function getAvailableRadius(cx: number, cy: number, width: number, height: number, { minX, maxX, minY, maxY, }: {
15
+ minX: number;
16
+ maxX: number;
17
+ minY: number;
18
+ maxY: number;
19
+ }): number;
package/Gauge/utils.js ADDED
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getArcRatios = getArcRatios;
7
+ exports.getAvailableRadius = getAvailableRadius;
8
+ function deg2rad(angle) {
9
+ return Math.PI * angle / 180;
10
+ }
11
+ function getPoint(angle) {
12
+ const radAngle = deg2rad(angle);
13
+ return [Math.sin(radAngle), -Math.cos(radAngle)];
14
+ }
15
+
16
+ /**
17
+ * Retruns the ratio of the arc bounding box and its center.
18
+ * @param startAngle The start angle (in deg)
19
+ * @param endAngle The end angle (in deg)
20
+ */
21
+ function getArcRatios(startAngle, endAngle) {
22
+ // Set the start, end and center point.
23
+ const points = [[0, 0], getPoint(startAngle), getPoint(endAngle)];
24
+
25
+ // Add cardinal points included in the arc
26
+ const minAngle = Math.min(startAngle, endAngle);
27
+ const maxAngle = Math.max(startAngle, endAngle);
28
+ const initialAngle = Math.floor(minAngle / 90) * 90;
29
+ for (let step = 1; step <= 4; step += 1) {
30
+ const cartinalAngle = initialAngle + step * 90;
31
+ if (cartinalAngle < maxAngle) {
32
+ points.push(getPoint(cartinalAngle));
33
+ }
34
+ }
35
+ const minX = Math.min(...points.map(([x]) => x));
36
+ const maxX = Math.max(...points.map(([x]) => x));
37
+ const minY = Math.min(...points.map(([, y]) => y));
38
+ const maxY = Math.max(...points.map(([, y]) => y));
39
+ return {
40
+ cx: -minX / (maxX - minX),
41
+ cy: -minY / (maxY - minY),
42
+ minX,
43
+ maxX,
44
+ minY,
45
+ maxY
46
+ };
47
+ }
48
+ function getAvailableRadius(cx, cy, width, height, {
49
+ minX,
50
+ maxX,
51
+ minY,
52
+ maxY
53
+ }) {
54
+ return Math.min(...[{
55
+ ratio: Math.abs(minX),
56
+ space: cx
57
+ }, {
58
+ ratio: Math.abs(maxX),
59
+ space: width - cx
60
+ }, {
61
+ ratio: Math.abs(minY),
62
+ space: cy
63
+ }, {
64
+ ratio: Math.abs(maxY),
65
+ space: height - cy
66
+ }].map(({
67
+ ratio,
68
+ space
69
+ }) => {
70
+ if (ratio < 0.00001) {
71
+ return Infinity;
72
+ }
73
+ return space / ratio;
74
+ }));
75
+ }
@@ -99,7 +99,7 @@ process.env.NODE_ENV !== "production" ? AnimatedArea.propTypes = {
99
99
  ownerState: _propTypes.default.shape({
100
100
  classes: _propTypes.default.object,
101
101
  color: _propTypes.default.string.isRequired,
102
- id: _propTypes.default.string.isRequired,
102
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
103
103
  isFaded: _propTypes.default.bool.isRequired,
104
104
  isHighlighted: _propTypes.default.bool.isRequired
105
105
  }).isRequired,
@@ -101,7 +101,7 @@ process.env.NODE_ENV !== "production" ? AnimatedLine.propTypes = {
101
101
  ownerState: _propTypes.default.shape({
102
102
  classes: _propTypes.default.object,
103
103
  color: _propTypes.default.string.isRequired,
104
- id: _propTypes.default.string.isRequired,
104
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
105
105
  isFaded: _propTypes.default.bool.isRequired,
106
106
  isHighlighted: _propTypes.default.bool.isRequired
107
107
  }).isRequired,
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { HighlightScope } from '../context/HighlightProvider';
3
3
  import { AnimatedAreaProps } from './AnimatedArea';
4
+ import { SeriesId } from '../models/seriesType/common';
4
5
  export interface AreaElementClasses {
5
6
  /** Styles applied to the root element. */
6
7
  root: string;
@@ -11,7 +12,7 @@ export interface AreaElementClasses {
11
12
  }
12
13
  export type AreaElementClassKey = keyof AreaElementClasses;
13
14
  export interface AreaElementOwnerState {
14
- id: string;
15
+ id: SeriesId;
15
16
  color: string;
16
17
  isFaded: boolean;
17
18
  isHighlighted: boolean;
@@ -107,7 +107,7 @@ process.env.NODE_ENV !== "production" ? AreaElement.propTypes = {
107
107
  faded: _propTypes.default.oneOf(['global', 'none', 'series']),
108
108
  highlighted: _propTypes.default.oneOf(['item', 'none', 'series'])
109
109
  }),
110
- id: _propTypes.default.string.isRequired,
110
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
111
111
  /**
112
112
  * If `true`, animations are skipped.
113
113
  * @default false
@@ -11,20 +11,30 @@ import { ChartsLegendProps, ChartsLegendSlotProps, ChartsLegendSlots } from '../
11
11
  import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
12
12
  import { ChartsAxisSlotProps, ChartsAxisSlots } from '../models/axis';
13
13
  import { LineHighlightPlotSlots, LineHighlightPlotSlotProps } from './LineHighlightPlot';
14
+ import { ChartsGridProps } from '../ChartsGrid';
14
15
  import { ChartsOnAxisClickHandlerProps } from '../ChartsOnAxisClickHandler';
15
16
  export interface LineChartSlots extends ChartsAxisSlots, AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, ChartsLegendSlots, ChartsTooltipSlots {
16
17
  }
17
18
  export interface LineChartSlotProps extends ChartsAxisSlotProps, AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps {
18
19
  }
19
20
  export interface LineChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, ChartsOnAxisClickHandlerProps {
21
+ /**
22
+ * The series to display in the line chart.
23
+ */
20
24
  series: MakeOptional<LineSeriesType, 'type'>[];
25
+ /**
26
+ * The configuration of the tooltip.
27
+ * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
28
+ * @default { trigger: 'item' }
29
+ */
21
30
  tooltip?: ChartsTooltipProps;
22
31
  /**
23
- * Object `{ x, y }` that defines how the charts highlight the mouse position along the x- and y-axes.
24
- * The two properties accept the following values:
25
- * - 'none': display nothing.
26
- * - 'line': display a line at the current mouse position.
27
- * - 'band': display a band at the current mouse position. Only available with band scale.
32
+ * Option to display a cartesian grid in the background.
33
+ */
34
+ grid?: Pick<ChartsGridProps, 'vertical' | 'horizontal'>;
35
+ /**
36
+ * The configuration of axes highlight.
37
+ * @see See {@link https://mui.com/x/react-charts/tooltip/#highlights highlight docs} for more details.
28
38
  * @default { x: 'line' }
29
39
  */
30
40
  axisHighlight?: ChartsAxisHighlightProps;
@@ -46,8 +56,17 @@ export interface LineChartProps extends Omit<ResponsiveChartContainerProps, 'ser
46
56
  * @default {}
47
57
  */
48
58
  slotProps?: LineChartSlotProps;
59
+ /**
60
+ * Callback fired when an area element is clicked.
61
+ */
49
62
  onAreaClick?: AreaPlotProps['onItemClick'];
63
+ /**
64
+ * Callback fired when a line element is clicked.
65
+ */
50
66
  onLineClick?: LinePlotProps['onItemClick'];
67
+ /**
68
+ * Callback fired when a mark element is clicked.
69
+ */
51
70
  onMarkClick?: MarkPlotProps['onItemClick'];
52
71
  /**
53
72
  * If `true`, animations are skipped.
@@ -20,6 +20,7 @@ var _ChartsLegend = require("../ChartsLegend");
20
20
  var _ChartsAxisHighlight = require("../ChartsAxisHighlight");
21
21
  var _ChartsClipPath = require("../ChartsClipPath");
22
22
  var _LineHighlightPlot = require("./LineHighlightPlot");
23
+ var _ChartsGrid = require("../ChartsGrid");
23
24
  var _ChartsOnAxisClickHandler = require("../ChartsOnAxisClickHandler");
24
25
  var _jsxRuntime = require("react/jsx-runtime");
25
26
  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); }
@@ -55,6 +56,7 @@ const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function Lin
55
56
  },
56
57
  disableLineItemHighlight,
57
58
  legend,
59
+ grid,
58
60
  topAxis,
59
61
  leftAxis,
60
62
  rightAxis,
@@ -89,6 +91,9 @@ const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function Lin
89
91
  disableAxisListener: tooltip?.trigger !== 'axis' && axisHighlight?.x === 'none' && axisHighlight?.y === 'none' && !onAxisClick,
90
92
  children: [onAxisClick && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOnAxisClickHandler.ChartsOnAxisClickHandler, {
91
93
  onAxisClick: onAxisClick
94
+ }), grid && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, {
95
+ vertical: grid.vertical,
96
+ horizontal: grid.horizontal
92
97
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
93
98
  clipPath: `url(#${clipPathId})`,
94
99
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AreaPlot.AreaPlot, {
@@ -134,11 +139,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
134
139
  // | To update them edit the TypeScript types and run "yarn proptypes" |
135
140
  // ----------------------------------------------------------------------
136
141
  /**
137
- * Object `{ x, y }` that defines how the charts highlight the mouse position along the x- and y-axes.
138
- * The two properties accept the following values:
139
- * - 'none': display nothing.
140
- * - 'line': display a line at the current mouse position.
141
- * - 'band': display a band at the current mouse position. Only available with band scale.
142
+ * The configuration of axes highlight.
143
+ * @see See {@link https://mui.com/x/react-charts/tooltip/#highlights highlight docs} for more details.
142
144
  * @default { x: 'line' }
143
145
  */
144
146
  axisHighlight: _propTypes.default.shape({
@@ -151,7 +153,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
151
153
  * @default xAxisIds[0] The id of the first provided axis
152
154
  */
153
155
  bottomAxis: _propTypes.default.oneOfType([_propTypes.default.shape({
154
- axisId: _propTypes.default.string,
156
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
155
157
  classes: _propTypes.default.object,
156
158
  disableLine: _propTypes.default.bool,
157
159
  disableTicks: _propTypes.default.bool,
@@ -194,6 +196,13 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
194
196
  * If `true`, render the line highlight item.
195
197
  */
196
198
  disableLineItemHighlight: _propTypes.default.bool,
199
+ /**
200
+ * Option to display a cartesian grid in the background.
201
+ */
202
+ grid: _propTypes.default.shape({
203
+ horizontal: _propTypes.default.bool,
204
+ vertical: _propTypes.default.bool
205
+ }),
197
206
  /**
198
207
  * The height of the chart in px. If not defined, it takes the height of the parent element.
199
208
  * @default undefined
@@ -205,7 +214,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
205
214
  * @default yAxisIds[0] The id of the first provided axis
206
215
  */
207
216
  leftAxis: _propTypes.default.oneOfType([_propTypes.default.shape({
208
- axisId: _propTypes.default.string,
217
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
209
218
  classes: _propTypes.default.object,
210
219
  disableLine: _propTypes.default.bool,
211
220
  disableTicks: _propTypes.default.bool,
@@ -252,6 +261,9 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
252
261
  right: _propTypes.default.number,
253
262
  top: _propTypes.default.number
254
263
  }),
264
+ /**
265
+ * Callback fired when an area element is clicked.
266
+ */
255
267
  onAreaClick: _propTypes.default.func,
256
268
  /**
257
269
  * The function called for onClick events.
@@ -260,7 +272,13 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
260
272
  * @param {null | AxisData} data The data about the clicked axis and items associated with it.
261
273
  */
262
274
  onAxisClick: _propTypes.default.func,
275
+ /**
276
+ * Callback fired when a line element is clicked.
277
+ */
263
278
  onLineClick: _propTypes.default.func,
279
+ /**
280
+ * Callback fired when a mark element is clicked.
281
+ */
264
282
  onMarkClick: _propTypes.default.func,
265
283
  /**
266
284
  * Indicate which axis to display the right of the charts.
@@ -268,7 +286,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
268
286
  * @default null
269
287
  */
270
288
  rightAxis: _propTypes.default.oneOfType([_propTypes.default.shape({
271
- axisId: _propTypes.default.string,
289
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
272
290
  classes: _propTypes.default.object,
273
291
  disableLine: _propTypes.default.bool,
274
292
  disableTicks: _propTypes.default.bool,
@@ -289,6 +307,9 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
289
307
  tickNumber: _propTypes.default.number,
290
308
  tickSize: _propTypes.default.number
291
309
  }), _propTypes.default.string]),
310
+ /**
311
+ * The series to display in the line chart.
312
+ */
292
313
  series: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
293
314
  /**
294
315
  * If `true`, animations are skipped.
@@ -307,6 +328,11 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
307
328
  slots: _propTypes.default.object,
308
329
  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]),
309
330
  title: _propTypes.default.string,
331
+ /**
332
+ * The configuration of the tooltip.
333
+ * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
334
+ * @default { trigger: 'item' }
335
+ */
310
336
  tooltip: _propTypes.default.shape({
311
337
  axisContent: _propTypes.default.elementType,
312
338
  classes: _propTypes.default.object,
@@ -321,7 +347,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
321
347
  * @default null
322
348
  */
323
349
  topAxis: _propTypes.default.oneOfType([_propTypes.default.shape({
324
- axisId: _propTypes.default.string,
350
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
325
351
  classes: _propTypes.default.object,
326
352
  disableLine: _propTypes.default.bool,
327
353
  disableTicks: _propTypes.default.bool,
@@ -358,7 +384,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
358
384
  * If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
359
385
  */
360
386
  xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
361
- axisId: _propTypes.default.string,
387
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
362
388
  classes: _propTypes.default.object,
363
389
  data: _propTypes.default.array,
364
390
  dataKey: _propTypes.default.string,
@@ -366,13 +392,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
366
392
  disableTicks: _propTypes.default.bool,
367
393
  fill: _propTypes.default.string,
368
394
  hideTooltip: _propTypes.default.bool,
369
- id: _propTypes.default.string,
395
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
370
396
  label: _propTypes.default.string,
371
397
  labelFontSize: _propTypes.default.number,
372
398
  labelStyle: _propTypes.default.object,
373
399
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
374
400
  min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
375
401
  position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
402
+ reverse: _propTypes.default.bool,
376
403
  scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
377
404
  slotProps: _propTypes.default.object,
378
405
  slots: _propTypes.default.object,
@@ -392,7 +419,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
392
419
  * If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
393
420
  */
394
421
  yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
395
- axisId: _propTypes.default.string,
422
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
396
423
  classes: _propTypes.default.object,
397
424
  data: _propTypes.default.array,
398
425
  dataKey: _propTypes.default.string,
@@ -400,13 +427,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
400
427
  disableTicks: _propTypes.default.bool,
401
428
  fill: _propTypes.default.string,
402
429
  hideTooltip: _propTypes.default.bool,
403
- id: _propTypes.default.string,
430
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
404
431
  label: _propTypes.default.string,
405
432
  labelFontSize: _propTypes.default.number,
406
433
  labelStyle: _propTypes.default.object,
407
434
  max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
408
435
  min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
409
436
  position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
437
+ reverse: _propTypes.default.bool,
410
438
  scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
411
439
  slotProps: _propTypes.default.object,
412
440
  slots: _propTypes.default.object,
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { HighlightScope } from '../context/HighlightProvider';
3
3
  import { AnimatedLineProps } from './AnimatedLine';
4
+ import { SeriesId } from '../models/seriesType/common';
4
5
  export interface LineElementClasses {
5
6
  /** Styles applied to the root element. */
6
7
  root: string;
@@ -11,7 +12,7 @@ export interface LineElementClasses {
11
12
  }
12
13
  export type LineElementClassKey = keyof LineElementClasses;
13
14
  export interface LineElementOwnerState {
14
- id: string;
15
+ id: SeriesId;
15
16
  color: string;
16
17
  isFaded: boolean;
17
18
  isHighlighted: boolean;
@@ -107,7 +107,7 @@ process.env.NODE_ENV !== "production" ? LineElement.propTypes = {
107
107
  faded: _propTypes.default.oneOf(['global', 'none', 'series']),
108
108
  highlighted: _propTypes.default.oneOf(['item', 'none', 'series'])
109
109
  }),
110
- id: _propTypes.default.string.isRequired,
110
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
111
111
  /**
112
112
  * If `true`, animations are skipped.
113
113
  * @default false
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
+ import { SeriesId } from '../models/seriesType/common';
2
3
  export interface LineHighlightElementClasses {
3
4
  /** Styles applied to the root element. */
4
5
  root: string;
5
6
  }
6
7
  export type HighlightElementClassKey = keyof LineHighlightElementClasses;
7
8
  interface LineHighlightElementOwnerState {
8
- id: string;
9
+ id: SeriesId;
9
10
  color: string;
10
11
  x: number;
11
12
  y: number;
@@ -13,7 +14,7 @@ interface LineHighlightElementOwnerState {
13
14
  }
14
15
  export declare function getHighlightElementUtilityClass(slot: string): string;
15
16
  export declare const lineHighlightElementClasses: LineHighlightElementClasses;
16
- export type LineHighlightElementProps = LineHighlightElementOwnerState & React.ComponentPropsWithoutRef<'circle'> & {};
17
+ export type LineHighlightElementProps = LineHighlightElementOwnerState & Omit<React.ComponentPropsWithoutRef<'circle'>, 'id'> & {};
17
18
  /**
18
19
  * Demos:
19
20
  *
@@ -85,5 +85,6 @@ process.env.NODE_ENV !== "production" ? LineHighlightElement.propTypes = {
85
85
  // | These PropTypes are generated from the TypeScript type definitions |
86
86
  // | To update them edit the TypeScript types and run "yarn proptypes" |
87
87
  // ----------------------------------------------------------------------
88
- classes: _propTypes.default.object
88
+ classes: _propTypes.default.object,
89
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired
89
90
  } : void 0;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { HighlightScope } from '../context/HighlightProvider';
3
+ import { SeriesId } from '../models/seriesType/common';
3
4
  export interface MarkElementClasses {
4
5
  /** Styles applied to the root element. */
5
6
  root: string;
@@ -10,7 +11,7 @@ export interface MarkElementClasses {
10
11
  }
11
12
  export type MarkElementClassKey = keyof MarkElementClasses;
12
13
  interface MarkElementOwnerState {
13
- id: string;
14
+ id: SeriesId;
14
15
  color: string;
15
16
  isFaded: boolean;
16
17
  isHighlighted: boolean;
@@ -18,7 +19,7 @@ interface MarkElementOwnerState {
18
19
  }
19
20
  export declare function getMarkElementUtilityClass(slot: string): string;
20
21
  export declare const markElementClasses: MarkElementClasses;
21
- export type MarkElementProps = Omit<MarkElementOwnerState, 'isFaded' | 'isHighlighted'> & React.ComponentPropsWithoutRef<'path'> & {
22
+ export type MarkElementProps = Omit<MarkElementOwnerState, 'isFaded' | 'isHighlighted'> & Omit<React.ComponentPropsWithoutRef<'path'>, 'id'> & {
22
23
  /**
23
24
  * If `true`, animations are skipped.
24
25
  * @default false
@@ -147,6 +147,7 @@ process.env.NODE_ENV !== "production" ? MarkElement.propTypes = {
147
147
  faded: _propTypes.default.oneOf(['global', 'none', 'series']),
148
148
  highlighted: _propTypes.default.oneOf(['item', 'none', 'series'])
149
149
  }),
150
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
150
151
  /**
151
152
  * The shape of the marker.
152
153
  */
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SpringValue } from '@react-spring/web';
3
3
  import { HighlightScope } from '../context/HighlightProvider';
4
+ import { PieItemId } from '../models';
4
5
  export interface PieArcClasses {
5
6
  /** Styles applied to the root element. */
6
7
  root: string;
@@ -11,7 +12,7 @@ export interface PieArcClasses {
11
12
  }
12
13
  export type PieArcClassKey = keyof PieArcClasses;
13
14
  interface PieArcOwnerState {
14
- id: string;
15
+ id: PieItemId;
15
16
  dataIndex: number;
16
17
  color: string;
17
18
  isFaded: boolean;
@@ -20,15 +21,15 @@ interface PieArcOwnerState {
20
21
  }
21
22
  export declare function getPieArcUtilityClass(slot: string): string;
22
23
  export declare const pieArcClasses: PieArcClasses;
23
- export type PieArcProps = PieArcOwnerState & React.ComponentPropsWithoutRef<'path'> & {
24
- startAngle: SpringValue<number>;
24
+ export type PieArcProps = Omit<React.ComponentPropsWithoutRef<'path'>, 'id'> & PieArcOwnerState & {
25
+ cornerRadius: SpringValue<number>;
25
26
  endAngle: SpringValue<number>;
27
+ highlightScope?: Partial<HighlightScope>;
26
28
  innerRadius: SpringValue<number>;
29
+ onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>) => void;
27
30
  outerRadius: SpringValue<number>;
28
- cornerRadius: SpringValue<number>;
29
31
  paddingAngle: SpringValue<number>;
30
- highlightScope?: Partial<HighlightScope>;
31
- onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>) => void;
32
+ startAngle: SpringValue<number>;
32
33
  };
33
34
  declare function PieArc(props: PieArcProps): React.JSX.Element;
34
35
  declare namespace PieArc {
@@ -19,7 +19,7 @@ var _styles = require("@mui/material/styles");
19
19
  var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
20
20
  var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
21
21
  var _jsxRuntime = require("react/jsx-runtime");
22
- const _excluded = ["id", "dataIndex", "classes", "color", "highlightScope", "onClick", "isFaded", "isHighlighted", "startAngle", "endAngle", "paddingAngle", "innerRadius", "outerRadius", "cornerRadius"];
22
+ const _excluded = ["classes", "color", "cornerRadius", "dataIndex", "endAngle", "highlightScope", "id", "innerRadius", "isFaded", "isHighlighted", "onClick", "outerRadius", "paddingAngle", "startAngle"];
23
23
  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); }
24
24
  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; }
25
25
  function getPieArcUtilityClass(slot) {
@@ -51,20 +51,20 @@ const PieArcRoot = (0, _styles.styled)(_web.animated.path, {
51
51
  }));
52
52
  function PieArc(props) {
53
53
  const {
54
- id,
55
- dataIndex,
56
54
  classes: innerClasses,
57
55
  color,
56
+ cornerRadius,
57
+ dataIndex,
58
+ endAngle,
58
59
  highlightScope,
59
- onClick,
60
+ id,
61
+ innerRadius,
60
62
  isFaded,
61
63
  isHighlighted,
62
- startAngle,
63
- endAngle,
64
- paddingAngle,
65
- innerRadius,
64
+ onClick,
66
65
  outerRadius,
67
- cornerRadius
66
+ paddingAngle,
67
+ startAngle
68
68
  } = props,
69
69
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
70
70
  const ownerState = {
@@ -106,6 +106,7 @@ process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
106
106
  faded: _propTypes.default.oneOf(['global', 'none', 'series']),
107
107
  highlighted: _propTypes.default.oneOf(['item', 'none', 'series'])
108
108
  }),
109
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
109
110
  isFaded: _propTypes.default.bool.isRequired,
110
111
  isHighlighted: _propTypes.default.bool.isRequired
111
112
  } : void 0;