@mui/x-charts 7.4.0 → 7.5.1

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 (230) hide show
  1. package/BarChart/BarChart.js +24 -13
  2. package/BarChart/BarElement.d.ts +10 -5
  3. package/BarChart/BarElement.js +4 -3
  4. package/BarChart/BarLabel/BarLabel.d.ts +1342 -0
  5. package/BarChart/BarLabel/BarLabel.js +60 -0
  6. package/BarChart/BarLabel/BarLabel.types.d.ts +39 -0
  7. package/BarChart/BarLabel/BarLabel.types.js +5 -0
  8. package/BarChart/BarLabel/BarLabelItem.d.ts +53 -0
  9. package/BarChart/BarLabel/BarLabelItem.js +138 -0
  10. package/BarChart/BarLabel/BarLabelPlot.d.ts +16 -0
  11. package/BarChart/BarLabel/BarLabelPlot.js +110 -0
  12. package/BarChart/BarLabel/barLabelClasses.d.ts +13 -0
  13. package/BarChart/BarLabel/barLabelClasses.js +29 -0
  14. package/BarChart/BarLabel/getBarLabel.d.ts +10 -0
  15. package/BarChart/BarLabel/getBarLabel.js +31 -0
  16. package/BarChart/BarLabel/index.d.ts +6 -0
  17. package/BarChart/BarLabel/index.js +25 -0
  18. package/BarChart/BarPlot.d.ts +15 -4
  19. package/BarChart/BarPlot.js +18 -4
  20. package/BarChart/index.d.ts +1 -0
  21. package/BarChart/index.js +11 -0
  22. package/BarChart/legend.js +13 -6
  23. package/CHANGELOG.md +132 -5395
  24. package/ChartContainer/ChartContainer.js +11 -11
  25. package/ChartsAxis/ChartsAxis.js +1 -1
  26. package/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
  27. package/ChartsClipPath/ChartsClipPath.js +1 -1
  28. package/ChartsGrid/ChartsGrid.js +1 -1
  29. package/ChartsLegend/ChartsLegend.js +1 -1
  30. package/ChartsLegend/DefaultChartsLegend.js +1 -1
  31. package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
  32. package/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
  33. package/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
  34. package/ChartsOverlay/ChartsOverlay.d.ts +9 -0
  35. package/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
  36. package/ChartsSurface.js +1 -1
  37. package/ChartsText/ChartsText.js +1 -1
  38. package/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
  39. package/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
  40. package/ChartsTooltip/ChartsTooltip.js +1 -1
  41. package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
  42. package/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
  43. package/ChartsTooltip/utils.js +13 -8
  44. package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
  45. package/ChartsXAxis/ChartsXAxis.js +2 -3
  46. package/ChartsYAxis/ChartsYAxis.js +3 -3
  47. package/Gauge/Gauge.js +1 -1
  48. package/Gauge/GaugeContainer.js +1 -1
  49. package/Gauge/GaugeValueText.js +1 -1
  50. package/LineChart/AnimatedArea.js +1 -1
  51. package/LineChart/AnimatedLine.js +1 -1
  52. package/LineChart/AreaElement.d.ts +1 -1
  53. package/LineChart/AreaElement.js +4 -4
  54. package/LineChart/AreaPlot.js +4 -3
  55. package/LineChart/LineChart.js +12 -11
  56. package/LineChart/LineElement.d.ts +1 -1
  57. package/LineChart/LineElement.js +4 -4
  58. package/LineChart/LineHighlightElement.d.ts +1 -1
  59. package/LineChart/LineHighlightElement.js +1 -1
  60. package/LineChart/LineHighlightPlot.js +1 -1
  61. package/LineChart/LinePlot.js +1 -1
  62. package/LineChart/MarkElement.d.ts +1 -1
  63. package/LineChart/MarkElement.js +1 -16
  64. package/LineChart/MarkPlot.js +1 -1
  65. package/LineChart/legend.js +13 -6
  66. package/PieChart/PieArc.d.ts +1 -1
  67. package/PieChart/PieArc.js +1 -1
  68. package/PieChart/PieArcLabel.d.ts +1 -1
  69. package/PieChart/PieArcLabel.js +4 -2
  70. package/PieChart/PieArcLabelPlot.js +15 -6
  71. package/PieChart/PieArcPlot.js +2 -2
  72. package/PieChart/PieChart.js +12 -11
  73. package/PieChart/PiePlot.js +1 -1
  74. package/PieChart/formatter.js +4 -1
  75. package/PieChart/legend.js +15 -5
  76. package/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
  77. package/ScatterChart/Scatter.js +1 -1
  78. package/ScatterChart/ScatterChart.js +17 -16
  79. package/ScatterChart/ScatterPlot.js +1 -1
  80. package/ScatterChart/legend.js +13 -6
  81. package/SparkLineChart/SparkLineChart.d.ts +1 -1
  82. package/SparkLineChart/SparkLineChart.js +6 -6
  83. package/context/ZAxisContextProvider.js +6 -6
  84. package/esm/BarChart/BarChart.js +24 -13
  85. package/esm/BarChart/BarElement.js +4 -3
  86. package/esm/BarChart/BarLabel/BarLabel.js +51 -0
  87. package/esm/BarChart/BarLabel/BarLabel.types.js +1 -0
  88. package/esm/BarChart/BarLabel/BarLabelItem.js +130 -0
  89. package/esm/BarChart/BarLabel/BarLabelPlot.js +102 -0
  90. package/esm/BarChart/BarLabel/barLabelClasses.js +19 -0
  91. package/esm/BarChart/BarLabel/getBarLabel.js +24 -0
  92. package/esm/BarChart/BarLabel/index.js +2 -0
  93. package/esm/BarChart/BarPlot.js +18 -4
  94. package/esm/BarChart/index.js +2 -1
  95. package/esm/BarChart/legend.js +13 -6
  96. package/esm/ChartContainer/ChartContainer.js +11 -11
  97. package/esm/ChartsAxis/ChartsAxis.js +1 -1
  98. package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
  99. package/esm/ChartsClipPath/ChartsClipPath.js +1 -1
  100. package/esm/ChartsGrid/ChartsGrid.js +1 -1
  101. package/esm/ChartsLegend/ChartsLegend.js +1 -1
  102. package/esm/ChartsLegend/DefaultChartsLegend.js +1 -1
  103. package/esm/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
  104. package/esm/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
  105. package/esm/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
  106. package/esm/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
  107. package/esm/ChartsSurface.js +1 -1
  108. package/esm/ChartsText/ChartsText.js +1 -1
  109. package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
  110. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
  111. package/esm/ChartsTooltip/ChartsTooltip.js +1 -1
  112. package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
  113. package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
  114. package/esm/ChartsTooltip/utils.js +13 -8
  115. package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
  116. package/esm/ChartsXAxis/ChartsXAxis.js +2 -3
  117. package/esm/ChartsYAxis/ChartsYAxis.js +3 -3
  118. package/esm/Gauge/Gauge.js +1 -1
  119. package/esm/Gauge/GaugeContainer.js +1 -1
  120. package/esm/Gauge/GaugeValueText.js +1 -1
  121. package/esm/LineChart/AnimatedArea.js +1 -1
  122. package/esm/LineChart/AnimatedLine.js +1 -1
  123. package/esm/LineChart/AreaElement.js +4 -4
  124. package/esm/LineChart/AreaPlot.js +4 -3
  125. package/esm/LineChart/LineChart.js +12 -11
  126. package/esm/LineChart/LineElement.js +4 -4
  127. package/esm/LineChart/LineHighlightElement.js +1 -1
  128. package/esm/LineChart/LineHighlightPlot.js +1 -1
  129. package/esm/LineChart/LinePlot.js +1 -1
  130. package/esm/LineChart/MarkElement.js +1 -16
  131. package/esm/LineChart/MarkPlot.js +1 -1
  132. package/esm/LineChart/legend.js +13 -6
  133. package/esm/PieChart/PieArc.js +1 -1
  134. package/esm/PieChart/PieArcLabel.js +4 -2
  135. package/esm/PieChart/PieArcLabelPlot.js +15 -6
  136. package/esm/PieChart/PieArcPlot.js +2 -2
  137. package/esm/PieChart/PieChart.js +12 -11
  138. package/esm/PieChart/PiePlot.js +1 -1
  139. package/esm/PieChart/formatter.js +4 -1
  140. package/esm/PieChart/legend.js +15 -5
  141. package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
  142. package/esm/ScatterChart/Scatter.js +1 -1
  143. package/esm/ScatterChart/ScatterChart.js +17 -16
  144. package/esm/ScatterChart/ScatterPlot.js +1 -1
  145. package/esm/ScatterChart/legend.js +13 -6
  146. package/esm/SparkLineChart/SparkLineChart.js +6 -6
  147. package/esm/context/ZAxisContextProvider.js +6 -6
  148. package/esm/hooks/useAxisEvents.js +12 -7
  149. package/esm/internals/getLabel.js +3 -0
  150. package/hooks/useAxisEvents.js +12 -7
  151. package/index.js +1 -1
  152. package/internals/defaultizeColor.d.ts +7 -5
  153. package/internals/getLabel.d.ts +1 -0
  154. package/internals/getLabel.js +9 -0
  155. package/internals/utils.d.ts +1 -1
  156. package/models/seriesType/bar.d.ts +4 -1
  157. package/models/seriesType/line.d.ts +4 -1
  158. package/models/seriesType/pie.d.ts +9 -4
  159. package/models/seriesType/scatter.d.ts +4 -1
  160. package/modern/BarChart/BarChart.js +24 -13
  161. package/modern/BarChart/BarElement.js +4 -3
  162. package/modern/BarChart/BarLabel/BarLabel.js +51 -0
  163. package/modern/BarChart/BarLabel/BarLabel.types.js +1 -0
  164. package/modern/BarChart/BarLabel/BarLabelItem.js +130 -0
  165. package/modern/BarChart/BarLabel/BarLabelPlot.js +102 -0
  166. package/modern/BarChart/BarLabel/barLabelClasses.js +19 -0
  167. package/modern/BarChart/BarLabel/getBarLabel.js +24 -0
  168. package/modern/BarChart/BarLabel/index.js +2 -0
  169. package/modern/BarChart/BarPlot.js +18 -4
  170. package/modern/BarChart/index.js +2 -1
  171. package/modern/BarChart/legend.js +13 -6
  172. package/modern/ChartContainer/ChartContainer.js +11 -11
  173. package/modern/ChartsAxis/ChartsAxis.js +1 -1
  174. package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
  175. package/modern/ChartsClipPath/ChartsClipPath.js +1 -1
  176. package/modern/ChartsGrid/ChartsGrid.js +1 -1
  177. package/modern/ChartsLegend/ChartsLegend.js +1 -1
  178. package/modern/ChartsLegend/DefaultChartsLegend.js +1 -1
  179. package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
  180. package/modern/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
  181. package/modern/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
  182. package/modern/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
  183. package/modern/ChartsSurface.js +1 -1
  184. package/modern/ChartsText/ChartsText.js +1 -1
  185. package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
  186. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
  187. package/modern/ChartsTooltip/ChartsTooltip.js +1 -1
  188. package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
  189. package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
  190. package/modern/ChartsTooltip/utils.js +13 -8
  191. package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
  192. package/modern/ChartsXAxis/ChartsXAxis.js +2 -3
  193. package/modern/ChartsYAxis/ChartsYAxis.js +3 -3
  194. package/modern/Gauge/Gauge.js +1 -1
  195. package/modern/Gauge/GaugeContainer.js +1 -1
  196. package/modern/Gauge/GaugeValueText.js +1 -1
  197. package/modern/LineChart/AnimatedArea.js +1 -1
  198. package/modern/LineChart/AnimatedLine.js +1 -1
  199. package/modern/LineChart/AreaElement.js +4 -4
  200. package/modern/LineChart/AreaPlot.js +4 -3
  201. package/modern/LineChart/LineChart.js +12 -11
  202. package/modern/LineChart/LineElement.js +4 -4
  203. package/modern/LineChart/LineHighlightElement.js +1 -1
  204. package/modern/LineChart/LineHighlightPlot.js +1 -1
  205. package/modern/LineChart/LinePlot.js +1 -1
  206. package/modern/LineChart/MarkElement.js +1 -16
  207. package/modern/LineChart/MarkPlot.js +1 -1
  208. package/modern/LineChart/legend.js +13 -6
  209. package/modern/PieChart/PieArc.js +1 -1
  210. package/modern/PieChart/PieArcLabel.js +4 -2
  211. package/modern/PieChart/PieArcLabelPlot.js +15 -6
  212. package/modern/PieChart/PieArcPlot.js +2 -2
  213. package/modern/PieChart/PieChart.js +12 -11
  214. package/modern/PieChart/PiePlot.js +1 -1
  215. package/modern/PieChart/formatter.js +4 -1
  216. package/modern/PieChart/legend.js +15 -5
  217. package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
  218. package/modern/ScatterChart/Scatter.js +1 -1
  219. package/modern/ScatterChart/ScatterChart.js +17 -16
  220. package/modern/ScatterChart/ScatterPlot.js +1 -1
  221. package/modern/ScatterChart/legend.js +13 -6
  222. package/modern/SparkLineChart/SparkLineChart.js +6 -6
  223. package/modern/context/ZAxisContextProvider.js +6 -6
  224. package/modern/hooks/useAxisEvents.js +12 -7
  225. package/modern/index.js +1 -1
  226. package/modern/internals/getLabel.js +3 -0
  227. package/package.json +2 -2
  228. package/themeAugmentation/components.d.ts +4 -0
  229. package/themeAugmentation/overrides.d.ts +3 -0
  230. package/themeAugmentation/props.d.ts +2 -0
@@ -64,7 +64,7 @@ const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(pro
64
64
  process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
65
65
  // ----------------------------- Warning --------------------------------
66
66
  // | These PropTypes are generated from the TypeScript type definitions |
67
- // | To update them edit the TypeScript types and run "yarn proptypes" |
67
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
68
68
  // ----------------------------------------------------------------------
69
69
  children: PropTypes.node,
70
70
  className: PropTypes.string,
@@ -127,6 +127,11 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
127
127
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
128
128
  classes: PropTypes.object,
129
129
  colorMap: PropTypes.oneOfType([PropTypes.shape({
130
+ colors: PropTypes.arrayOf(PropTypes.string).isRequired,
131
+ type: PropTypes.oneOf(['ordinal']).isRequired,
132
+ unknownColor: PropTypes.string,
133
+ values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
134
+ }), PropTypes.shape({
130
135
  color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
131
136
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
132
137
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -135,11 +140,6 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
135
140
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
136
141
  thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
137
142
  type: PropTypes.oneOf(['piecewise']).isRequired
138
- }), PropTypes.shape({
139
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
140
- type: PropTypes.oneOf(['ordinal']).isRequired,
141
- unknownColor: PropTypes.string,
142
- values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
143
143
  })]),
144
144
  data: PropTypes.array,
145
145
  dataKey: PropTypes.string,
@@ -180,6 +180,11 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
180
180
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
181
181
  classes: PropTypes.object,
182
182
  colorMap: PropTypes.oneOfType([PropTypes.shape({
183
+ colors: PropTypes.arrayOf(PropTypes.string).isRequired,
184
+ type: PropTypes.oneOf(['ordinal']).isRequired,
185
+ unknownColor: PropTypes.string,
186
+ values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
187
+ }), PropTypes.shape({
183
188
  color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
184
189
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
185
190
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -188,11 +193,6 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
188
193
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
189
194
  thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
190
195
  type: PropTypes.oneOf(['piecewise']).isRequired
191
- }), PropTypes.shape({
192
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
193
- type: PropTypes.oneOf(['ordinal']).isRequired,
194
- unknownColor: PropTypes.string,
195
- values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
196
196
  })]),
197
197
  data: PropTypes.array,
198
198
  dataKey: PropTypes.string,
@@ -91,7 +91,7 @@ function ChartsAxis(props) {
91
91
  process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
92
92
  // ----------------------------- Warning --------------------------------
93
93
  // | These PropTypes are generated from the TypeScript type definitions |
94
- // | To update them edit the TypeScript types and run "yarn proptypes" |
94
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
95
95
  // ----------------------------------------------------------------------
96
96
  /**
97
97
  * Indicate which axis to display the bottom of the charts.
@@ -97,7 +97,7 @@ function ChartsAxisHighlight(props) {
97
97
  process.env.NODE_ENV !== "production" ? ChartsAxisHighlight.propTypes = {
98
98
  // ----------------------------- Warning --------------------------------
99
99
  // | These PropTypes are generated from the TypeScript type definitions |
100
- // | To update them edit the TypeScript types and run "yarn proptypes" |
100
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
101
101
  // ----------------------------------------------------------------------
102
102
  x: PropTypes.oneOf(['band', 'line', 'none']),
103
103
  y: PropTypes.oneOf(['band', 'line', 'none'])
@@ -38,7 +38,7 @@ function ChartsClipPath(props) {
38
38
  process.env.NODE_ENV !== "production" ? ChartsClipPath.propTypes = {
39
39
  // ----------------------------- Warning --------------------------------
40
40
  // | These PropTypes are generated from the TypeScript type definitions |
41
- // | To update them edit the TypeScript types and run "yarn proptypes" |
41
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
42
42
  // ----------------------------------------------------------------------
43
43
  id: PropTypes.string.isRequired,
44
44
  offset: PropTypes.shape({
@@ -113,7 +113,7 @@ function ChartsGrid(props) {
113
113
  process.env.NODE_ENV !== "production" ? ChartsGrid.propTypes = {
114
114
  // ----------------------------- Warning --------------------------------
115
115
  // | These PropTypes are generated from the TypeScript type definitions |
116
- // | To update them edit the TypeScript types and run "yarn proptypes" |
116
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
117
117
  // ----------------------------------------------------------------------
118
118
  /**
119
119
  * Override or extend the styles applied to the component.
@@ -69,7 +69,7 @@ function ChartsLegend(inProps) {
69
69
  process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
70
70
  // ----------------------------- Warning --------------------------------
71
71
  // | These PropTypes are generated from the TypeScript type definitions |
72
- // | To update them edit the TypeScript types and run "yarn proptypes" |
72
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
73
73
  // ----------------------------------------------------------------------
74
74
  /**
75
75
  * Override or extend the styles applied to the component.
@@ -204,7 +204,7 @@ function DefaultChartsLegend(props) {
204
204
  process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
205
205
  // ----------------------------- Warning --------------------------------
206
206
  // | These PropTypes are generated from the TypeScript type definitions |
207
- // | To update them edit the TypeScript types and run "yarn proptypes" |
207
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
208
208
  // ----------------------------------------------------------------------
209
209
  /**
210
210
  * Override or extend the styles applied to the component.
@@ -62,7 +62,7 @@ function ChartsOnAxisClickHandler(props) {
62
62
  process.env.NODE_ENV !== "production" ? ChartsOnAxisClickHandler.propTypes = {
63
63
  // ----------------------------- Warning --------------------------------
64
64
  // | These PropTypes are generated from the TypeScript type definitions |
65
- // | To update them edit the TypeScript types and run "yarn proptypes" |
65
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
66
66
  // ----------------------------------------------------------------------
67
67
  /**
68
68
  * The function called for onClick events.
@@ -1,5 +1,5 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["message"];
4
4
  import * as React from 'react';
5
5
  import { styled } from '@mui/material/styles';
@@ -7,7 +7,7 @@ import { useDrawingArea } from '../hooks/useDrawingArea';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const StyledText = styled('text')(({
9
9
  theme
10
- }) => ({
10
+ }) => _extends({}, theme.typography.body2, {
11
11
  stroke: 'none',
12
12
  fill: theme.palette.text.primary,
13
13
  shapeRendering: 'crispEdges',
@@ -29,6 +29,6 @@ export function ChartsLoadingOverlay(props) {
29
29
  x: left + width / 2,
30
30
  y: top + height / 2
31
31
  }, other, {
32
- children: message ?? 'Loading data ...'
32
+ children: message ?? 'Loading data'
33
33
  }));
34
34
  }
@@ -1,5 +1,5 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["message"];
4
4
  import * as React from 'react';
5
5
  import { styled } from '@mui/material/styles';
@@ -7,7 +7,7 @@ import { useDrawingArea } from '../hooks/useDrawingArea';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const StyledText = styled('text')(({
9
9
  theme
10
- }) => ({
10
+ }) => _extends({}, theme.typography.body2, {
11
11
  stroke: 'none',
12
12
  fill: theme.palette.text.primary,
13
13
  shapeRendering: 'crispEdges',
@@ -23,7 +23,7 @@ function ChartsReferenceLine(props) {
23
23
  process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes = {
24
24
  // ----------------------------- Warning --------------------------------
25
25
  // | These PropTypes are generated from the TypeScript type definitions |
26
- // | To update them edit the TypeScript types and run "yarn proptypes" |
26
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
27
27
  // ----------------------------------------------------------------------
28
28
  /**
29
29
  * The id of the axis used for the reference value.
@@ -44,7 +44,7 @@ const ChartsSurface = /*#__PURE__*/React.forwardRef(function ChartsSurface(props
44
44
  process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes = {
45
45
  // ----------------------------- Warning --------------------------------
46
46
  // | These PropTypes are generated from the TypeScript type definitions |
47
- // | To update them edit the TypeScript types and run "yarn proptypes" |
47
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
48
48
  // ----------------------------------------------------------------------
49
49
  children: PropTypes.node,
50
50
  className: PropTypes.string,
@@ -70,7 +70,7 @@ function ChartsText(props) {
70
70
  process.env.NODE_ENV !== "production" ? ChartsText.propTypes = {
71
71
  // ----------------------------- Warning --------------------------------
72
72
  // | These PropTypes are generated from the TypeScript type definitions |
73
- // | To update them edit the TypeScript types and run "yarn proptypes" |
73
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
74
74
  // ----------------------------------------------------------------------
75
75
  /**
76
76
  * Height of a text line (in `em`).
@@ -80,7 +80,7 @@ function ChartsAxisTooltipContent(props) {
80
80
  process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
81
81
  // ----------------------------- Warning --------------------------------
82
82
  // | These PropTypes are generated from the TypeScript type definitions |
83
- // | To update them edit the TypeScript types and run "yarn proptypes" |
83
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
84
84
  // ----------------------------------------------------------------------
85
85
  axisData: PropTypes.shape({
86
86
  x: PropTypes.shape({
@@ -60,7 +60,7 @@ function ChartsItemTooltipContent(props) {
60
60
  process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
61
61
  // ----------------------------- Warning --------------------------------
62
62
  // | These PropTypes are generated from the TypeScript type definitions |
63
- // | To update them edit the TypeScript types and run "yarn proptypes" |
63
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
64
64
  // ----------------------------------------------------------------------
65
65
  classes: PropTypes.object.isRequired,
66
66
  content: PropTypes.elementType,
@@ -110,7 +110,7 @@ function ChartsTooltip(props) {
110
110
  process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
111
111
  // ----------------------------- Warning --------------------------------
112
112
  // | These PropTypes are generated from the TypeScript type definitions |
113
- // | To update them edit the TypeScript types and run "yarn proptypes" |
113
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
114
114
  // ----------------------------------------------------------------------
115
115
  /**
116
116
  * Component to override the tooltip content when trigger is set to 'axis'.
@@ -4,6 +4,7 @@ import clsx from 'clsx';
4
4
  import Typography from '@mui/material/Typography';
5
5
  import { ChartsTooltipCell, ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipMark, ChartsTooltipRow } from './ChartsTooltipTable';
6
6
  import { isCartesianSeries, utcFormatter } from './utils';
7
+ import { getLabel } from '../internals/getLabel';
7
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
9
  function DefaultChartsAxisTooltipContent(props) {
9
10
  const {
@@ -50,6 +51,7 @@ function DefaultChartsAxisTooltipContent(props) {
50
51
  if (formattedValue == null) {
51
52
  return null;
52
53
  }
54
+ const formattedLabel = getLabel(label, 'tooltip');
53
55
  return /*#__PURE__*/_jsxs(ChartsTooltipRow, {
54
56
  className: classes.row,
55
57
  children: [/*#__PURE__*/_jsx(ChartsTooltipCell, {
@@ -60,8 +62,8 @@ function DefaultChartsAxisTooltipContent(props) {
60
62
  })
61
63
  }), /*#__PURE__*/_jsx(ChartsTooltipCell, {
62
64
  className: clsx(classes.labelCell, classes.cell),
63
- children: label ? /*#__PURE__*/_jsx(Typography, {
64
- children: label
65
+ children: formattedLabel ? /*#__PURE__*/_jsx(Typography, {
66
+ children: formattedLabel
65
67
  }) : null
66
68
  }), /*#__PURE__*/_jsx(ChartsTooltipCell, {
67
69
  className: clsx(classes.valueCell, classes.cell),
@@ -78,7 +80,7 @@ function DefaultChartsAxisTooltipContent(props) {
78
80
  process.env.NODE_ENV !== "production" ? DefaultChartsAxisTooltipContent.propTypes = {
79
81
  // ----------------------------- Warning --------------------------------
80
82
  // | These PropTypes are generated from the TypeScript type definitions |
81
- // | To update them edit the TypeScript types and run "yarn proptypes" |
83
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
82
84
  // ----------------------------------------------------------------------
83
85
  /**
84
86
  * The properties of the triggered axis.
@@ -1,7 +1,9 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import * as React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import clsx from 'clsx';
4
5
  import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltipPaper, ChartsTooltipRow } from './ChartsTooltipTable';
6
+ import { getLabel } from '../internals/getLabel';
5
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
8
  function DefaultChartsItemTooltipContent(props) {
7
9
  const {
@@ -19,12 +21,14 @@ function DefaultChartsItemTooltipContent(props) {
19
21
  color
20
22
  } = series.type === 'pie' ? {
21
23
  color: getColor(itemData.dataIndex),
22
- displayedLabel: series.data[itemData.dataIndex].label
24
+ displayedLabel: getLabel(series.data[itemData.dataIndex].label, 'tooltip')
23
25
  } : {
24
26
  color: getColor(itemData.dataIndex) ?? series.color,
25
- displayedLabel: series.label
27
+ displayedLabel: getLabel(series.label, 'tooltip')
26
28
  };
27
- const value = series.data[itemData.dataIndex];
29
+ const value = series.type === 'pie' ? _extends({}, series.data[itemData.dataIndex], {
30
+ label: getLabel(series.data[itemData.dataIndex].label, 'tooltip')
31
+ }) : series.data[itemData.dataIndex];
28
32
  const formattedValue = series.valueFormatter?.(value, {
29
33
  dataIndex: itemData.dataIndex
30
34
  });
@@ -57,7 +61,7 @@ function DefaultChartsItemTooltipContent(props) {
57
61
  process.env.NODE_ENV !== "production" ? DefaultChartsItemTooltipContent.propTypes = {
58
62
  // ----------------------------- Warning --------------------------------
59
63
  // | These PropTypes are generated from the TypeScript type definitions |
60
- // | To update them edit the TypeScript types and run "yarn proptypes" |
64
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
61
65
  // ----------------------------------------------------------------------
62
66
  /**
63
67
  * Override or extend the styles applied to the component.
@@ -53,20 +53,25 @@ export function useMouseTracker() {
53
53
  if (element === null) {
54
54
  return () => {};
55
55
  }
56
- const handleMouseOut = () => {
56
+ const handleOut = () => {
57
57
  setMousePosition(null);
58
58
  };
59
- const handleMouseMove = event => {
59
+ const handleMove = event => {
60
+ const target = 'targetTouches' in event ? event.targetTouches[0] : event;
60
61
  setMousePosition({
61
- x: event.clientX,
62
- y: event.clientY
62
+ x: target.clientX,
63
+ y: target.clientY
63
64
  });
64
65
  };
65
- element.addEventListener('mouseout', handleMouseOut);
66
- element.addEventListener('mousemove', handleMouseMove);
66
+ element.addEventListener('mouseout', handleOut);
67
+ element.addEventListener('mousemove', handleMove);
68
+ element.addEventListener('touchend', handleOut);
69
+ element.addEventListener('touchmove', handleMove);
67
70
  return () => {
68
- element.removeEventListener('mouseout', handleMouseOut);
69
- element.removeEventListener('mousemove', handleMouseMove);
71
+ element.removeEventListener('mouseout', handleOut);
72
+ element.removeEventListener('mousemove', handleMove);
73
+ element.addEventListener('touchend', handleOut);
74
+ element.addEventListener('touchmove', handleMove);
70
75
  };
71
76
  }, [svgRef]);
72
77
  return mousePosition;
@@ -195,7 +195,7 @@ function ChartsVoronoiHandler(props) {
195
195
  process.env.NODE_ENV !== "production" ? ChartsVoronoiHandler.propTypes = {
196
196
  // ----------------------------- Warning --------------------------------
197
197
  // | These PropTypes are generated from the TypeScript type definitions |
198
- // | To update them edit the TypeScript types and run "yarn proptypes" |
198
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
199
199
  // ----------------------------------------------------------------------
200
200
  /**
201
201
  * Callback fired when clicking on a scatter item.
@@ -167,8 +167,7 @@ function ChartsXAxis(inProps) {
167
167
  textAnchor: 'middle',
168
168
  dominantBaseline: position === 'bottom' ? 'hanging' : 'auto',
169
169
  fontSize: tickFontSize ?? 12
170
- }, tickLabelStyle),
171
- className: classes.tickLabel
170
+ }, tickLabelStyle)
172
171
  },
173
172
  className: classes.tickLabel,
174
173
  ownerState: {}
@@ -249,7 +248,7 @@ function ChartsXAxis(inProps) {
249
248
  process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
250
249
  // ----------------------------- Warning --------------------------------
251
250
  // | These PropTypes are generated from the TypeScript type definitions |
252
- // | To update them edit the TypeScript types and run "yarn proptypes" |
251
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
253
252
  // ----------------------------------------------------------------------
254
253
  /**
255
254
  * The id of the axis to render.
@@ -120,9 +120,9 @@ function ChartsYAxis(inProps) {
120
120
  fontSize: tickFontSize,
121
121
  textAnchor: position === 'right' ? 'start' : 'end',
122
122
  dominantBaseline: 'central'
123
- }, tickLabelStyle),
124
- className: classes.tickLabel
123
+ }, tickLabelStyle)
125
124
  },
125
+ className: classes.tickLabel,
126
126
  ownerState: {}
127
127
  });
128
128
  const axisLabelProps = useSlotProps({
@@ -184,7 +184,7 @@ function ChartsYAxis(inProps) {
184
184
  process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
185
185
  // ----------------------------- Warning --------------------------------
186
186
  // | These PropTypes are generated from the TypeScript type definitions |
187
- // | To update them edit the TypeScript types and run "yarn proptypes" |
187
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
188
188
  // ----------------------------------------------------------------------
189
189
  /**
190
190
  * The id of the axis to render.
@@ -44,7 +44,7 @@ function Gauge(props) {
44
44
  process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
45
45
  // ----------------------------- Warning --------------------------------
46
46
  // | These PropTypes are generated from the TypeScript type definitions |
47
- // | To update them edit the TypeScript types and run "yarn proptypes" |
47
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
48
48
  // ----------------------------------------------------------------------
49
49
  children: PropTypes.node,
50
50
  classes: PropTypes.object,
@@ -106,7 +106,7 @@ const GaugeContainer = /*#__PURE__*/React.forwardRef(function GaugeContainer(pro
106
106
  process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
107
107
  // ----------------------------- Warning --------------------------------
108
108
  // | These PropTypes are generated from the TypeScript type definitions |
109
- // | To update them edit the TypeScript types and run "yarn proptypes" |
109
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
110
110
  // ----------------------------------------------------------------------
111
111
  children: PropTypes.node,
112
112
  className: PropTypes.string,
@@ -48,7 +48,7 @@ function GaugeValueText(props) {
48
48
  process.env.NODE_ENV !== "production" ? GaugeValueText.propTypes = {
49
49
  // ----------------------------- Warning --------------------------------
50
50
  // | These PropTypes are generated from the TypeScript type definitions |
51
- // | To update them edit the TypeScript types and run "yarn proptypes" |
51
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
52
52
  // ----------------------------------------------------------------------
53
53
  /**
54
54
  * Height of a text line (in `em`).
@@ -83,7 +83,7 @@ function AnimatedArea(props) {
83
83
  process.env.NODE_ENV !== "production" ? AnimatedArea.propTypes = {
84
84
  // ----------------------------- Warning --------------------------------
85
85
  // | These PropTypes are generated from the TypeScript type definitions |
86
- // | To update them edit the TypeScript types and run "yarn proptypes" |
86
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
87
87
  // ----------------------------------------------------------------------
88
88
  d: PropTypes.string.isRequired,
89
89
  ownerState: PropTypes.shape({
@@ -86,7 +86,7 @@ function AnimatedLine(props) {
86
86
  process.env.NODE_ENV !== "production" ? AnimatedLine.propTypes = {
87
87
  // ----------------------------- Warning --------------------------------
88
88
  // | These PropTypes are generated from the TypeScript type definitions |
89
- // | To update them edit the TypeScript types and run "yarn proptypes" |
89
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
90
90
  // ----------------------------------------------------------------------
91
91
  d: PropTypes.string.isRequired,
92
92
  ownerState: PropTypes.shape({
@@ -74,22 +74,22 @@ function AreaElement(props) {
74
74
  const areaProps = useSlotProps({
75
75
  elementType: Area,
76
76
  externalSlotProps: slotProps?.area,
77
- additionalProps: _extends({}, other, getInteractionItemProps({
77
+ additionalProps: _extends({}, getInteractionItemProps({
78
78
  type: 'line',
79
79
  seriesId: id
80
80
  }), {
81
- className: classes.root,
82
81
  onClick,
83
82
  cursor: onClick ? 'pointer' : 'unset'
84
83
  }),
84
+ className: classes.root,
85
85
  ownerState
86
86
  });
87
- return /*#__PURE__*/_jsx(Area, _extends({}, areaProps));
87
+ return /*#__PURE__*/_jsx(Area, _extends({}, other, areaProps));
88
88
  }
89
89
  process.env.NODE_ENV !== "production" ? AreaElement.propTypes = {
90
90
  // ----------------------------- Warning --------------------------------
91
91
  // | These PropTypes are generated from the TypeScript type definitions |
92
- // | To update them edit the TypeScript types and run "yarn proptypes" |
92
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
93
93
  // ----------------------------------------------------------------------
94
94
  classes: PropTypes.object,
95
95
  color: PropTypes.string.isRequired,
@@ -33,7 +33,8 @@ const useAggregatedData = () => {
33
33
  return stackingGroups.flatMap(({
34
34
  ids: groupIds
35
35
  }) => {
36
- return groupIds.flatMap(seriesId => {
36
+ return [...groupIds].reverse() // Revert stacked area for a more pleasant animation
37
+ .map(seriesId => {
37
38
  const {
38
39
  xAxisKey = defaultXAxisId,
39
40
  yAxisKey = defaultYAxisId,
@@ -92,7 +93,7 @@ function AreaPlot(props) {
92
93
  const getGradientId = useChartGradient();
93
94
  const completedData = useAggregatedData();
94
95
  return /*#__PURE__*/_jsx("g", _extends({}, other, {
95
- children: completedData.reverse().map(({
96
+ children: completedData.map(({
96
97
  d,
97
98
  seriesId,
98
99
  color,
@@ -118,7 +119,7 @@ function AreaPlot(props) {
118
119
  process.env.NODE_ENV !== "production" ? AreaPlot.propTypes = {
119
120
  // ----------------------------- Warning --------------------------------
120
121
  // | These PropTypes are generated from the TypeScript type definitions |
121
- // | To update them edit the TypeScript types and run "yarn proptypes" |
122
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
122
123
  // ----------------------------------------------------------------------
123
124
  /**
124
125
  * Callback fired when a line area item is clicked.
@@ -133,7 +133,7 @@ const LineChart = /*#__PURE__*/React.forwardRef(function LineChart(props, ref) {
133
133
  process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
134
134
  // ----------------------------- Warning --------------------------------
135
135
  // | These PropTypes are generated from the TypeScript type definitions |
136
- // | To update them edit the TypeScript types and run "yarn proptypes" |
136
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
137
137
  // ----------------------------------------------------------------------
138
138
  /**
139
139
  * The configuration of axes highlight.
@@ -205,6 +205,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
205
205
  }),
206
206
  /**
207
207
  * If `true`, a loading overlay is displayed.
208
+ * @default false
208
209
  */
209
210
  loading: PropTypes.bool,
210
211
  /**
@@ -304,6 +305,11 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
304
305
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
305
306
  classes: PropTypes.object,
306
307
  colorMap: PropTypes.oneOfType([PropTypes.shape({
308
+ colors: PropTypes.arrayOf(PropTypes.string).isRequired,
309
+ type: PropTypes.oneOf(['ordinal']).isRequired,
310
+ unknownColor: PropTypes.string,
311
+ values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
312
+ }), PropTypes.shape({
307
313
  color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
308
314
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
309
315
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -312,11 +318,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
312
318
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
313
319
  thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
314
320
  type: PropTypes.oneOf(['piecewise']).isRequired
315
- }), PropTypes.shape({
316
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
317
- type: PropTypes.oneOf(['ordinal']).isRequired,
318
- unknownColor: PropTypes.string,
319
- values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
320
321
  })]),
321
322
  data: PropTypes.array,
322
323
  dataKey: PropTypes.string,
@@ -357,6 +358,11 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
357
358
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
358
359
  classes: PropTypes.object,
359
360
  colorMap: PropTypes.oneOfType([PropTypes.shape({
361
+ colors: PropTypes.arrayOf(PropTypes.string).isRequired,
362
+ type: PropTypes.oneOf(['ordinal']).isRequired,
363
+ unknownColor: PropTypes.string,
364
+ values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
365
+ }), PropTypes.shape({
360
366
  color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
361
367
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
362
368
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -365,11 +371,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
365
371
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
366
372
  thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
367
373
  type: PropTypes.oneOf(['piecewise']).isRequired
368
- }), PropTypes.shape({
369
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
370
- type: PropTypes.oneOf(['ordinal']).isRequired,
371
- unknownColor: PropTypes.string,
372
- values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
373
374
  })]),
374
375
  data: PropTypes.array,
375
376
  dataKey: PropTypes.string,
@@ -74,22 +74,22 @@ function LineElement(props) {
74
74
  const lineProps = useSlotProps({
75
75
  elementType: Line,
76
76
  externalSlotProps: slotProps?.line,
77
- additionalProps: _extends({}, other, getInteractionItemProps({
77
+ additionalProps: _extends({}, getInteractionItemProps({
78
78
  type: 'line',
79
79
  seriesId: id
80
80
  }), {
81
- className: classes.root,
82
81
  onClick,
83
82
  cursor: onClick ? 'pointer' : 'unset'
84
83
  }),
84
+ className: classes.root,
85
85
  ownerState
86
86
  });
87
- return /*#__PURE__*/_jsx(Line, _extends({}, lineProps));
87
+ return /*#__PURE__*/_jsx(Line, _extends({}, other, lineProps));
88
88
  }
89
89
  process.env.NODE_ENV !== "production" ? LineElement.propTypes = {
90
90
  // ----------------------------- Warning --------------------------------
91
91
  // | These PropTypes are generated from the TypeScript type definitions |
92
- // | To update them edit the TypeScript types and run "yarn proptypes" |
92
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
93
93
  // ----------------------------------------------------------------------
94
94
  classes: PropTypes.object,
95
95
  color: PropTypes.string.isRequired,
@@ -72,7 +72,7 @@ function LineHighlightElement(props) {
72
72
  process.env.NODE_ENV !== "production" ? LineHighlightElement.propTypes = {
73
73
  // ----------------------------- Warning --------------------------------
74
74
  // | These PropTypes are generated from the TypeScript type definitions |
75
- // | To update them edit the TypeScript types and run "yarn proptypes" |
75
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
76
76
  // ----------------------------------------------------------------------
77
77
  classes: PropTypes.object,
78
78
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
@@ -90,7 +90,7 @@ function LineHighlightPlot(props) {
90
90
  process.env.NODE_ENV !== "production" ? LineHighlightPlot.propTypes = {
91
91
  // ----------------------------- Warning --------------------------------
92
92
  // | These PropTypes are generated from the TypeScript type definitions |
93
- // | To update them edit the TypeScript types and run "yarn proptypes" |
93
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
94
94
  // ----------------------------------------------------------------------
95
95
  /**
96
96
  * The props used for each component slot.
@@ -117,7 +117,7 @@ function LinePlot(props) {
117
117
  process.env.NODE_ENV !== "production" ? LinePlot.propTypes = {
118
118
  // ----------------------------- Warning --------------------------------
119
119
  // | These PropTypes are generated from the TypeScript type definitions |
120
- // | To update them edit the TypeScript types and run "yarn proptypes" |
120
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
121
121
  // ----------------------------------------------------------------------
122
122
  /**
123
123
  * Callback fired when a line item is clicked.