@mui/x-charts 8.18.0 → 8.20.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 (140) hide show
  1. package/BarChart/seriesConfig/bar/seriesProcessor.js +15 -9
  2. package/CHANGELOG.md +175 -0
  3. package/ChartsGrid/ChartsHorizontalGrid.js +5 -1
  4. package/ChartsGrid/ChartsVerticalGrid.js +5 -1
  5. package/ChartsSurface/ChartsSurface.js +5 -2
  6. package/ChartsTooltip/ChartsTooltipContainer.js +1 -1
  7. package/LineChart/seriesConfig/seriesProcessor.js +15 -10
  8. package/PieChart/PieArcPlot.js +5 -3
  9. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +2 -2
  10. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +2 -2
  11. package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.d.ts +7 -0
  12. package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.js +26 -0
  13. package/esm/BarChart/seriesConfig/bar/seriesProcessor.js +15 -9
  14. package/esm/ChartsGrid/ChartsHorizontalGrid.js +5 -1
  15. package/esm/ChartsGrid/ChartsVerticalGrid.js +5 -1
  16. package/esm/ChartsSurface/ChartsSurface.js +5 -2
  17. package/esm/ChartsTooltip/ChartsTooltipContainer.js +1 -1
  18. package/esm/LineChart/seriesConfig/seriesProcessor.js +15 -10
  19. package/esm/PieChart/PieArcPlot.js +5 -3
  20. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +1 -1
  21. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -1
  22. package/esm/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.d.ts +7 -0
  23. package/esm/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.js +18 -0
  24. package/esm/hooks/useBarSeries.js +3 -5
  25. package/esm/hooks/useInteractionItemProps.d.ts +0 -5
  26. package/esm/hooks/useInteractionItemProps.js +0 -11
  27. package/esm/hooks/useLineSeries.js +3 -5
  28. package/esm/hooks/usePieSeries.js +3 -5
  29. package/esm/hooks/useRadarSeries.js +3 -5
  30. package/esm/hooks/useScatterSeries.js +3 -5
  31. package/esm/hooks/useTicks.js +12 -3
  32. package/esm/index.d.ts +2 -1
  33. package/esm/index.js +2 -1
  34. package/esm/internals/domUtils.js +30 -14
  35. package/esm/internals/getScale.d.ts +2 -1
  36. package/esm/internals/index.d.ts +1 -1
  37. package/esm/internals/index.js +1 -1
  38. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.js +2 -2
  39. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +5 -6
  40. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +2 -2
  41. package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +2 -2
  42. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +4 -1
  43. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +3 -1
  44. package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +16 -10
  45. package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.js +20 -12
  46. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +5 -7
  47. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -4
  48. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +14 -5
  49. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -2
  50. package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +1 -1
  51. package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +15 -15
  52. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +1 -1
  53. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +5 -5
  54. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +3 -0
  55. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +11 -11
  56. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +5 -6
  57. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +7 -8
  58. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +2 -2
  59. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.js +2 -2
  60. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +16 -12
  61. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +15 -16
  62. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +4 -0
  63. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +8 -8
  64. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +1 -1
  65. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.js +4 -4
  66. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +15 -10
  67. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -11
  68. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +6 -6
  69. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +7 -8
  70. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.js +2 -2
  71. package/esm/internals/plugins/utils/selectors.d.ts +1 -14
  72. package/esm/internals/plugins/utils/selectors.js +1 -5
  73. package/esm/internals/seriesSelectorOfType.d.ts +20 -0
  74. package/esm/internals/seriesSelectorOfType.js +38 -0
  75. package/esm/models/seriesType/config.d.ts +2 -2
  76. package/esm/utils/index.d.ts +4 -0
  77. package/esm/utils/index.js +5 -0
  78. package/esm/utils/niceDomain.d.ts +20 -0
  79. package/esm/utils/niceDomain.js +24 -0
  80. package/hooks/useBarSeries.js +3 -6
  81. package/hooks/useInteractionItemProps.d.ts +0 -5
  82. package/hooks/useInteractionItemProps.js +1 -13
  83. package/hooks/useLineSeries.js +3 -6
  84. package/hooks/usePieSeries.js +3 -6
  85. package/hooks/useRadarSeries.js +3 -6
  86. package/hooks/useScatterSeries.js +3 -6
  87. package/hooks/useTicks.js +12 -3
  88. package/index.d.ts +2 -1
  89. package/index.js +13 -1
  90. package/internals/domUtils.js +30 -14
  91. package/internals/getScale.d.ts +2 -1
  92. package/internals/index.d.ts +1 -1
  93. package/internals/index.js +4 -4
  94. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.js +2 -2
  95. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +4 -5
  96. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +2 -2
  97. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +2 -2
  98. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +4 -1
  99. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +3 -1
  100. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +16 -10
  101. package/internals/plugins/corePlugins/useChartSeries/processSeries.js +23 -14
  102. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +4 -6
  103. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -4
  104. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +15 -6
  105. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -2
  106. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +1 -1
  107. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +15 -15
  108. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +1 -1
  109. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +5 -5
  110. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +3 -0
  111. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +11 -11
  112. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +4 -5
  113. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +6 -7
  114. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +2 -2
  115. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.js +2 -2
  116. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +16 -12
  117. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +14 -15
  118. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +4 -0
  119. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +8 -8
  120. package/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +1 -1
  121. package/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.js +4 -4
  122. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +15 -10
  123. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -11
  124. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +6 -6
  125. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +6 -7
  126. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.js +2 -2
  127. package/internals/plugins/utils/selectors.d.ts +1 -14
  128. package/internals/plugins/utils/selectors.js +1 -8
  129. package/internals/seriesSelectorOfType.d.ts +20 -0
  130. package/internals/seriesSelectorOfType.js +46 -0
  131. package/models/seriesType/config.d.ts +2 -2
  132. package/package.json +4 -4
  133. package/utils/index.d.ts +4 -0
  134. package/utils/index.js +16 -0
  135. package/utils/niceDomain.d.ts +20 -0
  136. package/utils/niceDomain.js +29 -0
  137. package/esm/internals/createSeriesSelectorOfType.d.ts +0 -4
  138. package/esm/internals/createSeriesSelectorOfType.js +0 -45
  139. package/internals/createSeriesSelectorOfType.d.ts +0 -4
  140. package/internals/createSeriesSelectorOfType.js +0 -53
@@ -34,6 +34,20 @@ const seriesProcessor = (params, dataset) => {
34
34
  } else if (dataset === undefined) {
35
35
  throw new Error([`MUI X Charts: bar series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\n'));
36
36
  }
37
+ if (process.env.NODE_ENV !== 'production') {
38
+ if (!data && dataset) {
39
+ const dataKey = series[id].dataKey;
40
+ if (!dataKey) {
41
+ throw new Error([`MUI X Charts: bar series with id='${id}' has no data and no dataKey.`, 'You must provide a dataKey when using the dataset prop.'].join('\n'));
42
+ }
43
+ dataset.forEach((entry, index) => {
44
+ const value = entry[dataKey];
45
+ if (value != null && typeof value !== 'number') {
46
+ (0, _warning.warnOnce)([`MUI X Charts: your dataset key "${dataKey}" is used for plotting bars, but the dataset contains the non-null non-numerical element "${value}" at index ${index}.`, 'Bar plots only support numeric and null values.'].join('\n'));
47
+ }
48
+ });
49
+ }
50
+ }
37
51
  });
38
52
  const completedSeries = {};
39
53
  stackingGroups.forEach(stackingGroup => {
@@ -59,15 +73,7 @@ const seriesProcessor = (params, dataset) => {
59
73
  }, series[id], {
60
74
  data: dataKey ? dataset.map(data => {
61
75
  const value = data[dataKey];
62
- if (typeof value !== 'number') {
63
- if (process.env.NODE_ENV !== 'production') {
64
- if (value !== null) {
65
- (0, _warning.warnOnce)([`MUI X Charts: your dataset key "${dataKey}" is used for plotting bars, but contains nonnumerical elements.`, 'Bar plots only support numbers and null values.']);
66
- }
67
- }
68
- return null;
69
- }
70
- return value;
76
+ return typeof value === 'number' ? value : null;
71
77
  }) : series[id].data,
72
78
  stackedData: stackedSeries[index].map(([a, b]) => [a, b])
73
79
  });
package/CHANGELOG.md CHANGED
@@ -5,6 +5,181 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.20.0
9
+
10
+ _Nov 26, 2025_
11
+
12
+ We'd like to extend a big thank you to the 8 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🔃 Data Grid tree data now supports row reordering. See the [Drag-and-drop tree data reordering](https://mui.com/x/react-data-grid/tree-data/#drag-and-drop-tree-data-reordering) section for more details.
15
+ - 🐞 Bugfixes
16
+
17
+ The following team members contributed to this release:
18
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @siriwatknp, @JCQuintas, @MBilalShafi, @prakhargupta1
19
+
20
+ ### Data Grid
21
+
22
+ #### `@mui/x-data-grid@8.20.0`
23
+
24
+ - [DataGrid] Fix RTL virtualization to display columns when viewport width is larger than the grid (#20409) @siriwatknp
25
+ - [DataGrid] Fix row range selection (#20442) @arminmeh
26
+ - [DataGrid] Initialize data grid core packages (#20276) @cherniavskii
27
+ - [DataGrid] Improve accessibility of the sort icon (#20430) @arminmeh
28
+ - [DataGrid] Use `viewport` as a boundary for the `BasePopper` flip (#20311) @arminmeh
29
+
30
+ #### `@mui/x-data-grid-pro@8.20.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
31
+
32
+ Same changes as in `@mui/x-data-grid@8.20.0`, plus:
33
+
34
+ - [DataGridPro] Avoid automatic scroll back to the focused header filter after it leaves the viewport (#20416) @arminmeh
35
+ - [DataGridPro] Tree data row reordering (#19401) @MBilalShafi
36
+
37
+ #### `@mui/x-data-grid-premium@8.20.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
38
+
39
+ Same changes as in `@mui/x-data-grid-pro@8.20.0`.
40
+
41
+ ### Charts
42
+
43
+ #### `@mui/x-charts@8.20.0`
44
+
45
+ - [charts] Fix item tooltip position with node anchor (#20421) @alexfauquette
46
+ - [charts] Fix radar item tooltip closing bug (#20429) @alexfauquette
47
+ - [charts] Move series processing to selector (#20388) @JCQuintas
48
+ - [charts] Prevent pointer out from removing controlled highlight (#20385) @alexfauquette
49
+
50
+ #### `@mui/x-charts-pro@8.20.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
51
+
52
+ Same changes as in `@mui/x-charts@8.20.0`, plus:
53
+
54
+ - [charts-pro] Fix Content-Security-Policy nonce not being correctly set on export (#20395) @bernardobelchior
55
+ - [charts-pro] Improve vertical zoom slider thumb on mobile (#20439) @bernardobelchior
56
+ - [charts-pro] Provide arguments to the `AreaPlotRoot` styled component (#20414) @arminmeh
57
+ - [charts-pro] Remove grid outside the drawing area (#20412) @alexfauquette
58
+
59
+ #### `@mui/x-charts-premium@8.20.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
60
+
61
+ Same changes as in `@mui/x-charts-pro@8.20.0`, plus:
62
+
63
+ - [charts-premium] Add explicit return type to `ChartsRenderer` for better compatibility with React 18 (#20413) @arminmeh
64
+
65
+ ### Docs
66
+
67
+ - [docs] Add `llms.txt` link to the sidebar (#20312) @siriwatknp
68
+ - [docs] Add a line chart demo for the Overview section (#20239) @prakhargupta1
69
+
70
+ ## 8.19.0
71
+
72
+ _Nov 20, 2025_
73
+
74
+ We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
75
+
76
+ - 🔎 Add pan on `wheel` to the charts zoom
77
+ - ⌨️ Allow opt-in to [tab navigation](https://mui.com/x/react-data-grid/accessibility/#tab-navigation) inside the Data Grid.
78
+ - ⚙️ New way of defining [action columns](https://mui.com/x/react-data-grid/column-definition/#ActionsWithModalGrid.tsx) in the Data Grid that makes it easier to keep `columns` prop stable.
79
+ - 🐞 Bugfixes
80
+ - 📚 Documentation improvements
81
+
82
+ Special thanks go out to these community members for their valuable contributions:
83
+ @lauri865, @noobyogi0010, @sai6855
84
+
85
+ The following team members contributed to this release:
86
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mj12albert, @noraleonte, @rita-codes, @siriwatknp, @ZeeshanTamboli
87
+
88
+ ### Data Grid
89
+
90
+ #### `@mui/x-data-grid@8.19.0`
91
+
92
+ - [DataGrid] Add `tabNavigation` prop to control tab navigation in the grid (#20286) @arminmeh
93
+ - [DataGrid] Allow to focus disabled checkbox cells (#19959) @mj12albert
94
+ - [DataGrid] Alternative actions column definition API (#15041) @cherniavskii
95
+ - [DataGrid] Fix failing tests (#20332) @cherniavskii
96
+ - [DataGrid] Prevent Safari 26 error in the event handler (#20369) @arminmeh
97
+ - [DataGrid] Undeprecate the `autoHeight` prop (#20363) @cherniavskii
98
+ - [DataGrid] Fix print export grid dimensions with dynamic row height and print styles (#19835) @cherniavskii
99
+
100
+ #### `@mui/x-data-grid-pro@8.19.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
101
+
102
+ Same changes as in `@mui/x-data-grid@8.19.0`.
103
+
104
+ #### `@mui/x-data-grid-premium@8.19.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
105
+
106
+ Same changes as in `@mui/x-data-grid-pro@8.19.0`, plus:
107
+
108
+ - [DataGridPremium] Fix aggregation with sorting (#19892) @lauri865
109
+ - [DataGridPremium] Lock `ExcelJS` version (#20329) @cherniavskii
110
+
111
+ ### Date and Time Pickers
112
+
113
+ #### `@mui/x-date-pickers@8.19.0`
114
+
115
+ - [pickers] Do not loose `slotProps.field.slotProps` (#20322) @flaviendelangle
116
+
117
+ #### `@mui/x-date-pickers-pro@8.19.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
118
+
119
+ Same changes as in `@mui/x-date-pickers@8.19.0`.
120
+
121
+ ### Charts
122
+
123
+ #### `@mui/x-charts@8.19.0`
124
+
125
+ - [charts] Expose `niceDomain` utility (#20250) @bernardobelchior
126
+ - [charts] Fix benchmark regression by downgrading to JSDOM v26 (#20405) @bernardobelchior
127
+ - [charts] Fix Pie Chart keyboard focus highlight (#20358) @JCQuintas
128
+ - [charts] Memoize series selectors (#20326) @JCQuintas
129
+ - [charts] Relax dataset type (#20294) @bernardobelchior
130
+ - [charts] Remove `touch-action: pan-y` when zoom is disabled (#20204) @bernardobelchior
131
+ - [charts] Use `getBBox()` for correct SVG sizes in firefox (#20309) @JCQuintas
132
+ - [charts] Use directly selector from `@mui/x-internals` (#20365) @alexfauquette
133
+ - [charts] Fix unnecessary errors in dev mode (#20380) @JCQuintas
134
+
135
+ #### `@mui/x-charts-pro@8.19.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
136
+
137
+ Same changes as in `@mui/x-charts@8.19.0`, plus:
138
+
139
+ - [charts-pro] Add pan on `wheel` to zoom (#19998) @JCQuintas
140
+ - [charts-pro] Fix zoom slider preview having an opaque background in dark mode (#20367) @bernardobelchior
141
+
142
+ #### `@mui/x-charts-premium@8.19.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
143
+
144
+ Same changes as in `@mui/x-charts-pro@8.19.0`.
145
+
146
+ ### Tree View
147
+
148
+ #### `@mui/x-tree-view@8.19.0`
149
+
150
+ - [tree view] Enable lazy load when children count is not know in tree view (#18680) @noobyogi0010
151
+ - [tree view] Fix unwanted behaviors on the item re-ordering (#20368) @flaviendelangle
152
+
153
+ #### `@mui/x-tree-view-pro@8.19.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
154
+
155
+ Same changes as in `@mui/x-tree-view@8.19.0`.
156
+
157
+ ### Codemod
158
+
159
+ #### `@mui/x-codemod@8.19.0`
160
+
161
+ Internal changes.
162
+
163
+ ### Docs
164
+
165
+ - [docs] Add minimum Typescript version to migration guide (#20320) @siriwatknp
166
+ - [docs] Fix Autosizing documentation (#20348) @siriwatknp
167
+ - [docs] Fix separator opacity in demo (#20293) @sai6855
168
+ - [docs] Replace deprecated `LoadingButton` with `Button` component (#20208) @Janpot
169
+
170
+ ### Core
171
+
172
+ - [code-infra] Add new broken links checker (#20120) @Janpot
173
+ - [code-infra] Disable Codspeed pipeline (#20370) @JCQuintas
174
+ - [code-infra] Optimize `checkMaterialVersion` (#20307) @Janpot
175
+ - [code-infra] Use utils from code-infra for changelog and PR creation (#20406) @brijeshb42
176
+ - [docs-infra] Revert `@docsearch/react` (#20313) @Janpot
177
+
178
+ ### Miscellaneous
179
+
180
+ - [test] Fix browser tests skipping some projects (#20318) @cherniavskii
181
+ - [test] Update `use-react-version` pnpm script (#20319) @cherniavskii
182
+
8
183
  ## 8.18.0
9
184
 
10
185
  <!-- generated comparing v8.17.0..master -->
@@ -8,11 +8,15 @@ exports.ChartsGridHorizontal = ChartsGridHorizontal;
8
8
  var React = _interopRequireWildcard(require("react"));
9
9
  var _useTicks = require("../hooks/useTicks");
10
10
  var _styledComponents = require("./styledComponents");
11
+ var _ChartProvider = require("../context/ChartProvider");
11
12
  var _jsxRuntime = require("react/jsx-runtime");
12
13
  /**
13
14
  * @ignore - internal component.
14
15
  */
15
16
  function ChartsGridHorizontal(props) {
17
+ const {
18
+ instance
19
+ } = (0, _ChartProvider.useChartContext)();
16
20
  const {
17
21
  axis,
18
22
  start,
@@ -34,7 +38,7 @@ function ChartsGridHorizontal(props) {
34
38
  children: yTicks.map(({
35
39
  value,
36
40
  offset
37
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.GridLine, {
41
+ }) => !instance.isYInside(offset) ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.GridLine, {
38
42
  y1: offset,
39
43
  y2: offset,
40
44
  x1: start,
@@ -8,11 +8,15 @@ exports.ChartsGridVertical = ChartsGridVertical;
8
8
  var React = _interopRequireWildcard(require("react"));
9
9
  var _useTicks = require("../hooks/useTicks");
10
10
  var _styledComponents = require("./styledComponents");
11
+ var _ChartProvider = require("../context/ChartProvider");
11
12
  var _jsxRuntime = require("react/jsx-runtime");
12
13
  /**
13
14
  * @ignore - internal component.
14
15
  */
15
16
  function ChartsGridVertical(props) {
17
+ const {
18
+ instance
19
+ } = (0, _ChartProvider.useChartContext)();
16
20
  const {
17
21
  axis,
18
22
  start,
@@ -34,7 +38,7 @@ function ChartsGridVertical(props) {
34
38
  children: xTicks.map(({
35
39
  value,
36
40
  offset
37
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.GridLine, {
41
+ }) => !instance.isXInside(offset) ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.GridLine, {
38
42
  y1: start,
39
43
  y2: end,
40
44
  x1: offset,
@@ -21,6 +21,7 @@ var _useStore = require("../internals/store/useStore");
21
21
  var _useChartDimensions = require("../internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors");
22
22
  var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
23
23
  var _chartsSurfaceClasses = require("./chartsSurfaceClasses");
24
+ var _useChartCartesianAxisRendering = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors");
24
25
  var _jsxRuntime = require("react/jsx-runtime");
25
26
  const _excluded = ["children", "className", "title", "desc"];
26
27
  const ChartsSurfaceStyles = (0, _styles.styled)('svg', {
@@ -40,7 +41,7 @@ const ChartsSurfaceStyles = (0, _styles.styled)('svg', {
40
41
  overflow: 'hidden',
41
42
  // This prevents default touch actions when using the svg on mobile devices.
42
43
  // For example, prevent page scroll & zoom.
43
- touchAction: 'pan-y',
44
+ touchAction: ownerState.hasZoom ? 'pan-y' : undefined,
44
45
  userSelect: 'none',
45
46
  gridArea: 'chart',
46
47
  '&:focus': {
@@ -81,6 +82,7 @@ const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(func
81
82
  const propsHeight = (0, _useSelector.useSelector)(store, _useChartDimensions.selectorChartPropsHeight);
82
83
  const isKeyboardNavigationEnabled = (0, _useSelector.useSelector)(store, _useChartKeyboardNavigation.selectorChartsIsKeyboardNavigationEnabled);
83
84
  const hasFocusedItem = (0, _useSelector.useSelector)(store, _useChartKeyboardNavigation.selectorChartsHasFocusedItem);
85
+ const hasZoom = (0, _useSelector.useSelector)(store, _useChartCartesianAxisRendering.selectorChartHasZoom);
84
86
  const svgRef = (0, _useSvgRef.useSvgRef)();
85
87
  const handleRef = (0, _useForkRef.default)(svgRef, ref);
86
88
  const themeProps = (0, _styles.useThemeProps)({
@@ -99,7 +101,8 @@ const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(func
99
101
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ChartsSurfaceStyles, (0, _extends2.default)({
100
102
  ownerState: {
101
103
  width: propsWidth,
102
- height: propsHeight
104
+ height: propsHeight,
105
+ hasZoom
103
106
  },
104
107
  viewBox: `${0} ${0} ${svgWidth} ${svgHeight}`,
105
108
  className: (0, _clsx.default)(classes.root, className),
@@ -92,7 +92,7 @@ function ChartsTooltipContainer(inProps) {
92
92
  const isOpen = (0, _useSelector.useSelector)(store, getIsOpenSelector(trigger, axisSystem, shouldPreventBecauseOfBrush));
93
93
  const lastInteraction = (0, _useSelector.useSelector)(store, _useChartInteraction.selectorChartsLastInteraction);
94
94
  const computedAnchor = lastInteraction === 'keyboard' ? 'node' : anchor;
95
- const itemPosition = (0, _useSelector.useSelector)(store, trigger === 'item' && computedAnchor === 'node' ? _useChartInteraction.selectorChartsTooltipItemPosition : () => null, [position]);
95
+ const itemPosition = (0, _useSelector.useSelector)(store, trigger === 'item' && computedAnchor === 'node' ? _useChartInteraction.selectorChartsTooltipItemPosition : () => null, position);
96
96
  React.useEffect(() => {
97
97
  const svgElement = svgRef.current;
98
98
  if (svgElement === null) {
@@ -10,7 +10,6 @@ var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
10
10
  var _warning = require("@mui/x-internals/warning");
11
11
  var _stackSeries = require("../../internals/stackSeries");
12
12
  var _defaultizeValueFormatter = require("../../internals/defaultizeValueFormatter");
13
- // For now it's a copy past of bar charts formatter, but maybe will diverge later
14
13
  const seriesProcessor = (params, dataset) => {
15
14
  const {
16
15
  seriesOrder,
@@ -39,6 +38,20 @@ const seriesProcessor = (params, dataset) => {
39
38
  } else if (dataset === undefined && process.env.NODE_ENV !== 'production') {
40
39
  throw new Error([`MUI X Charts: line series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\n'));
41
40
  }
41
+ if (process.env.NODE_ENV !== 'production') {
42
+ if (!data && dataset) {
43
+ const dataKey = series[id].dataKey;
44
+ if (!dataKey) {
45
+ throw new Error([`MUI X Charts: line series with id='${id}' has no data and no dataKey.`, 'You must provide a dataKey when using the dataset prop.'].join('\n'));
46
+ }
47
+ dataset.forEach((entry, index) => {
48
+ const value = entry[dataKey];
49
+ if (value != null && typeof value !== 'number') {
50
+ (0, _warning.warnOnce)([`MUI X Charts: your dataset key "${dataKey}" is used for plotting lines, but the dataset contains the non-null non-numerical element "${value}" at index ${index}.`, 'Line plots only support numeric and null values.'].join('\n'));
51
+ }
52
+ });
53
+ }
54
+ }
42
55
  });
43
56
  const completedSeries = {};
44
57
  stackingGroups.forEach(stackingGroup => {
@@ -61,15 +74,7 @@ const seriesProcessor = (params, dataset) => {
61
74
  }, series[id], {
62
75
  data: dataKey ? dataset.map(data => {
63
76
  const value = data[dataKey];
64
- if (typeof value !== 'number') {
65
- if (process.env.NODE_ENV !== 'production') {
66
- if (value !== null) {
67
- (0, _warning.warnOnce)([`MUI X Charts: Your dataset key "${dataKey}" is used for plotting line, but contains nonnumerical elements.`, 'Line plots only support numbers and null values.']);
68
- }
69
- }
70
- return null;
71
- }
72
- return value;
77
+ return typeof value === 'number' ? value : null;
73
78
  }) : series[id].data,
74
79
  stackedData: stackedSeries[index].map(([a, b]) => [a, b])
75
80
  });
@@ -47,9 +47,11 @@ function PieArcPlot(props) {
47
47
  data
48
48
  });
49
49
  const {
50
- dataIndex: focusedIndex = -1
50
+ dataIndex,
51
+ seriesId,
52
+ seriesType
51
53
  } = (0, _useFocusedItem.useFocusedItem)() ?? {};
52
- const focusedItem = focusedIndex !== -1 ? transformedData[focusedIndex] : null;
54
+ const focusedItem = dataIndex !== undefined && seriesId === id && seriesType === 'pie' ? transformedData[dataIndex] : null;
53
55
  if (data.length === 0) {
54
56
  return null;
55
57
  }
@@ -90,7 +92,7 @@ function PieArcPlot(props) {
90
92
  stroke: (theme.vars ?? theme).palette.text.primary,
91
93
  id: id,
92
94
  className: _PieArc.pieArcClasses.focusIndicator,
93
- dataIndex: focusedIndex,
95
+ dataIndex: focusedItem.dataIndex,
94
96
  isFaded: false,
95
97
  isHighlighted: false,
96
98
  isFocused: false,
@@ -16,7 +16,7 @@ var _useRadarSeriesData = require("./useRadarSeriesData");
16
16
  var _getAreaPath = require("./getAreaPath");
17
17
  var _radarSeriesPlotClasses = require("./radarSeriesPlotClasses");
18
18
  var _useItemHighlightedGetter = require("../../hooks/useItemHighlightedGetter");
19
- var _useInteractionItemProps = require("../../hooks/useInteractionItemProps");
19
+ var _useInteractionAllItemProps = require("./useInteractionAllItemProps");
20
20
  var _useRadarRotationIndex = require("./useRadarRotationIndex");
21
21
  var _jsxRuntime = require("react/jsx-runtime");
22
22
  const _excluded = ["seriesId", "onItemClick"];
@@ -54,7 +54,7 @@ function RadarSeriesArea(props) {
54
54
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
55
55
  const seriesCoordinates = (0, _useRadarSeriesData.useRadarSeriesData)(seriesId);
56
56
  const getRotationIndex = (0, _useRadarRotationIndex.useRadarRotationIndex)();
57
- const interactionProps = (0, _useInteractionItemProps.useInteractionAllItemProps)(seriesCoordinates);
57
+ const interactionProps = (0, _useInteractionAllItemProps.useInteractionAllItemProps)(seriesCoordinates);
58
58
  const {
59
59
  isFaded,
60
60
  isHighlighted
@@ -8,7 +8,7 @@ exports.RadarSeriesPlot = RadarSeriesPlot;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _useRadarSeriesData = require("./useRadarSeriesData");
11
- var _useInteractionItemProps = require("../../hooks/useInteractionItemProps");
11
+ var _useInteractionAllItemProps = require("./useInteractionAllItemProps");
12
12
  var _useItemHighlightedGetter = require("../../hooks/useItemHighlightedGetter");
13
13
  var _radarSeriesPlotClasses = require("./radarSeriesPlotClasses");
14
14
  var _RadarSeriesArea = require("./RadarSeriesArea");
@@ -24,7 +24,7 @@ function RadarSeriesPlot(props) {
24
24
  } = props;
25
25
  const seriesCoordinates = (0, _useRadarSeriesData.useRadarSeriesData)(inSeriesId);
26
26
  const getRotationIndex = (0, _useRadarRotationIndex.useRadarRotationIndex)();
27
- const interactionProps = (0, _useInteractionItemProps.useInteractionAllItemProps)(seriesCoordinates);
27
+ const interactionProps = (0, _useInteractionAllItemProps.useInteractionAllItemProps)(seriesCoordinates);
28
28
  const {
29
29
  isFaded,
30
30
  isHighlighted
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { SeriesItemIdentifierWithData } from "../../models/seriesType/index.js";
3
+ export declare const useInteractionAllItemProps: (data: SeriesItemIdentifierWithData<"radar">[], skip?: boolean) => {
4
+ onPointerEnter?: () => void;
5
+ onPointerLeave?: () => void;
6
+ onPointerDown?: (event: React.PointerEvent) => void;
7
+ }[];
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useInteractionAllItemProps = void 0;
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _useChartContext = require("../../context/ChartProvider/useChartContext");
10
+ var _useInteractionItemProps = require("../../hooks/useInteractionItemProps");
11
+ const useInteractionAllItemProps = (data, skip) => {
12
+ const {
13
+ instance
14
+ } = (0, _useChartContext.useChartContext)();
15
+ const results = React.useMemo(() => {
16
+ return data.map(item => {
17
+ return skip ? {} : (0, _useInteractionItemProps.getInteractionItemProps)(instance, {
18
+ type: 'radar',
19
+ seriesId: item.seriesId,
20
+ dataIndex: item.dataIndex
21
+ });
22
+ });
23
+ }, [data, instance, skip]);
24
+ return results;
25
+ };
26
+ exports.useInteractionAllItemProps = useInteractionAllItemProps;
@@ -27,6 +27,20 @@ const seriesProcessor = (params, dataset) => {
27
27
  } else if (dataset === undefined) {
28
28
  throw new Error([`MUI X Charts: bar series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\n'));
29
29
  }
30
+ if (process.env.NODE_ENV !== 'production') {
31
+ if (!data && dataset) {
32
+ const dataKey = series[id].dataKey;
33
+ if (!dataKey) {
34
+ throw new Error([`MUI X Charts: bar series with id='${id}' has no data and no dataKey.`, 'You must provide a dataKey when using the dataset prop.'].join('\n'));
35
+ }
36
+ dataset.forEach((entry, index) => {
37
+ const value = entry[dataKey];
38
+ if (value != null && typeof value !== 'number') {
39
+ warnOnce([`MUI X Charts: your dataset key "${dataKey}" is used for plotting bars, but the dataset contains the non-null non-numerical element "${value}" at index ${index}.`, 'Bar plots only support numeric and null values.'].join('\n'));
40
+ }
41
+ });
42
+ }
43
+ }
30
44
  });
31
45
  const completedSeries = {};
32
46
  stackingGroups.forEach(stackingGroup => {
@@ -52,15 +66,7 @@ const seriesProcessor = (params, dataset) => {
52
66
  }, series[id], {
53
67
  data: dataKey ? dataset.map(data => {
54
68
  const value = data[dataKey];
55
- if (typeof value !== 'number') {
56
- if (process.env.NODE_ENV !== 'production') {
57
- if (value !== null) {
58
- warnOnce([`MUI X Charts: your dataset key "${dataKey}" is used for plotting bars, but contains nonnumerical elements.`, 'Bar plots only support numbers and null values.']);
59
- }
60
- }
61
- return null;
62
- }
63
- return value;
69
+ return typeof value === 'number' ? value : null;
64
70
  }) : series[id].data,
65
71
  stackedData: stackedSeries[index].map(([a, b]) => [a, b])
66
72
  });
@@ -1,11 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import { useTicks } from "../hooks/useTicks.js";
3
3
  import { GridLine } from "./styledComponents.js";
4
+ import { useChartContext } from "../context/ChartProvider/index.js";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  /**
6
7
  * @ignore - internal component.
7
8
  */
8
9
  export function ChartsGridHorizontal(props) {
10
+ const {
11
+ instance
12
+ } = useChartContext();
9
13
  const {
10
14
  axis,
11
15
  start,
@@ -27,7 +31,7 @@ export function ChartsGridHorizontal(props) {
27
31
  children: yTicks.map(({
28
32
  value,
29
33
  offset
30
- }) => /*#__PURE__*/_jsx(GridLine, {
34
+ }) => !instance.isYInside(offset) ? null : /*#__PURE__*/_jsx(GridLine, {
31
35
  y1: offset,
32
36
  y2: offset,
33
37
  x1: start,
@@ -1,11 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import { useTicks } from "../hooks/useTicks.js";
3
3
  import { GridLine } from "./styledComponents.js";
4
+ import { useChartContext } from "../context/ChartProvider/index.js";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  /**
6
7
  * @ignore - internal component.
7
8
  */
8
9
  export function ChartsGridVertical(props) {
10
+ const {
11
+ instance
12
+ } = useChartContext();
9
13
  const {
10
14
  axis,
11
15
  start,
@@ -27,7 +31,7 @@ export function ChartsGridVertical(props) {
27
31
  children: xTicks.map(({
28
32
  value,
29
33
  offset
30
- }) => /*#__PURE__*/_jsx(GridLine, {
34
+ }) => !instance.isXInside(offset) ? null : /*#__PURE__*/_jsx(GridLine, {
31
35
  y1: start,
32
36
  y2: end,
33
37
  x1: offset,
@@ -15,6 +15,7 @@ import { useStore } from "../internals/store/useStore.js";
15
15
  import { selectorChartPropsHeight, selectorChartPropsWidth, selectorChartSvgWidth, selectorChartSvgHeight } from "../internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js";
16
16
  import { selectorChartsHasFocusedItem, selectorChartsIsKeyboardNavigationEnabled } from "../internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js";
17
17
  import { useUtilityClasses } from "./chartsSurfaceClasses.js";
18
+ import { selectorChartHasZoom } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js";
18
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
20
  const ChartsSurfaceStyles = styled('svg', {
20
21
  name: 'MuiChartsSurface',
@@ -33,7 +34,7 @@ const ChartsSurfaceStyles = styled('svg', {
33
34
  overflow: 'hidden',
34
35
  // This prevents default touch actions when using the svg on mobile devices.
35
36
  // For example, prevent page scroll & zoom.
36
- touchAction: 'pan-y',
37
+ touchAction: ownerState.hasZoom ? 'pan-y' : undefined,
37
38
  userSelect: 'none',
38
39
  gridArea: 'chart',
39
40
  '&:focus': {
@@ -74,6 +75,7 @@ const ChartsSurface = /*#__PURE__*/React.forwardRef(function ChartsSurface(inPro
74
75
  const propsHeight = useSelector(store, selectorChartPropsHeight);
75
76
  const isKeyboardNavigationEnabled = useSelector(store, selectorChartsIsKeyboardNavigationEnabled);
76
77
  const hasFocusedItem = useSelector(store, selectorChartsHasFocusedItem);
78
+ const hasZoom = useSelector(store, selectorChartHasZoom);
77
79
  const svgRef = useSvgRef();
78
80
  const handleRef = useForkRef(svgRef, ref);
79
81
  const themeProps = useThemeProps({
@@ -92,7 +94,8 @@ const ChartsSurface = /*#__PURE__*/React.forwardRef(function ChartsSurface(inPro
92
94
  return /*#__PURE__*/_jsxs(ChartsSurfaceStyles, _extends({
93
95
  ownerState: {
94
96
  width: propsWidth,
95
- height: propsHeight
97
+ height: propsHeight,
98
+ hasZoom
96
99
  },
97
100
  viewBox: `${0} ${0} ${svgWidth} ${svgHeight}`,
98
101
  className: clsx(classes.root, className),
@@ -85,7 +85,7 @@ function ChartsTooltipContainer(inProps) {
85
85
  const isOpen = useSelector(store, getIsOpenSelector(trigger, axisSystem, shouldPreventBecauseOfBrush));
86
86
  const lastInteraction = useSelector(store, selectorChartsLastInteraction);
87
87
  const computedAnchor = lastInteraction === 'keyboard' ? 'node' : anchor;
88
- const itemPosition = useSelector(store, trigger === 'item' && computedAnchor === 'node' ? selectorChartsTooltipItemPosition : () => null, [position]);
88
+ const itemPosition = useSelector(store, trigger === 'item' && computedAnchor === 'node' ? selectorChartsTooltipItemPosition : () => null, position);
89
89
  React.useEffect(() => {
90
90
  const svgElement = svgRef.current;
91
91
  if (svgElement === null) {
@@ -3,7 +3,6 @@ import { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape';
3
3
  import { warnOnce } from '@mui/x-internals/warning';
4
4
  import { getStackingGroups } from "../../internals/stackSeries.js";
5
5
  import { defaultizeValueFormatter } from "../../internals/defaultizeValueFormatter.js";
6
- // For now it's a copy past of bar charts formatter, but maybe will diverge later
7
6
  const seriesProcessor = (params, dataset) => {
8
7
  const {
9
8
  seriesOrder,
@@ -32,6 +31,20 @@ const seriesProcessor = (params, dataset) => {
32
31
  } else if (dataset === undefined && process.env.NODE_ENV !== 'production') {
33
32
  throw new Error([`MUI X Charts: line series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\n'));
34
33
  }
34
+ if (process.env.NODE_ENV !== 'production') {
35
+ if (!data && dataset) {
36
+ const dataKey = series[id].dataKey;
37
+ if (!dataKey) {
38
+ throw new Error([`MUI X Charts: line series with id='${id}' has no data and no dataKey.`, 'You must provide a dataKey when using the dataset prop.'].join('\n'));
39
+ }
40
+ dataset.forEach((entry, index) => {
41
+ const value = entry[dataKey];
42
+ if (value != null && typeof value !== 'number') {
43
+ warnOnce([`MUI X Charts: your dataset key "${dataKey}" is used for plotting lines, but the dataset contains the non-null non-numerical element "${value}" at index ${index}.`, 'Line plots only support numeric and null values.'].join('\n'));
44
+ }
45
+ });
46
+ }
47
+ }
35
48
  });
36
49
  const completedSeries = {};
37
50
  stackingGroups.forEach(stackingGroup => {
@@ -54,15 +67,7 @@ const seriesProcessor = (params, dataset) => {
54
67
  }, series[id], {
55
68
  data: dataKey ? dataset.map(data => {
56
69
  const value = data[dataKey];
57
- if (typeof value !== 'number') {
58
- if (process.env.NODE_ENV !== 'production') {
59
- if (value !== null) {
60
- warnOnce([`MUI X Charts: Your dataset key "${dataKey}" is used for plotting line, but contains nonnumerical elements.`, 'Line plots only support numbers and null values.']);
61
- }
62
- }
63
- return null;
64
- }
65
- return value;
70
+ return typeof value === 'number' ? value : null;
66
71
  }) : series[id].data,
67
72
  stackedData: stackedSeries[index].map(([a, b]) => [a, b])
68
73
  });