@mui/x-charts 8.0.0-beta.0 → 8.0.0-beta.2

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 (138) hide show
  1. package/BarChart/seriesConfig/extremums.js +2 -2
  2. package/BarChart/useBarChartProps.d.ts +2 -1
  3. package/BarChart/useBarChartProps.js +20 -13
  4. package/CHANGELOG.md +171 -0
  5. package/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
  6. package/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
  7. package/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
  8. package/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
  9. package/ChartsTooltip/ChartsTooltipContainer.js +2 -1
  10. package/ChartsTooltip/useAxisTooltip.js +2 -2
  11. package/LineChart/CircleMarkElement.js +2 -2
  12. package/LineChart/LineHighlightPlot.js +2 -2
  13. package/LineChart/MarkElement.js +2 -2
  14. package/LineChart/useLineChartProps.d.ts +2 -1
  15. package/LineChart/useLineChartProps.js +7 -4
  16. package/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
  17. package/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
  18. package/RadarChart/RadarGrid/RadarGrid.js +5 -1
  19. package/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
  20. package/RadarChart/RadarGrid/useRadarGridData.js +3 -0
  21. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
  22. package/ScatterChart/useScatterChartProps.d.ts +2 -1
  23. package/ScatterChart/useScatterChartProps.js +6 -3
  24. package/esm/BarChart/seriesConfig/extremums.js +2 -2
  25. package/esm/BarChart/useBarChartProps.d.ts +2 -1
  26. package/esm/BarChart/useBarChartProps.js +19 -13
  27. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
  28. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
  29. package/esm/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
  30. package/esm/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
  31. package/esm/ChartsTooltip/ChartsTooltipContainer.js +2 -1
  32. package/esm/ChartsTooltip/useAxisTooltip.js +1 -1
  33. package/esm/LineChart/CircleMarkElement.js +1 -1
  34. package/esm/LineChart/LineHighlightPlot.js +1 -1
  35. package/esm/LineChart/MarkElement.js +1 -1
  36. package/esm/LineChart/useLineChartProps.d.ts +2 -1
  37. package/esm/LineChart/useLineChartProps.js +6 -4
  38. package/esm/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
  39. package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
  40. package/esm/RadarChart/RadarGrid/RadarGrid.js +5 -1
  41. package/esm/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
  42. package/esm/RadarChart/RadarGrid/useRadarGridData.js +3 -0
  43. package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
  44. package/esm/ScatterChart/useScatterChartProps.d.ts +2 -1
  45. package/esm/ScatterChart/useScatterChartProps.js +5 -3
  46. package/esm/hooks/useAxis.d.ts +5 -5
  47. package/esm/hooks/useInteractionItemProps.js +1 -1
  48. package/esm/hooks/useScale.d.ts +2 -2
  49. package/esm/hooks/useScale.js +2 -2
  50. package/esm/index.js +1 -1
  51. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
  52. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +28 -22
  53. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
  54. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
  55. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +10 -43
  56. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +1 -0
  57. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +41 -0
  58. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
  59. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
  60. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +4 -10
  61. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
  62. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
  63. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +8 -0
  64. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
  65. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +18 -13
  66. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +17 -33
  67. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
  68. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +22 -0
  69. package/hooks/useAxis.d.ts +5 -5
  70. package/hooks/useInteractionItemProps.js +1 -1
  71. package/hooks/useScale.d.ts +2 -2
  72. package/hooks/useScale.js +2 -2
  73. package/index.js +1 -1
  74. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
  75. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +29 -22
  76. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
  77. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
  78. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +8 -41
  79. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +1 -0
  80. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +47 -0
  81. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
  82. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
  83. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +5 -11
  84. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
  85. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
  86. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +17 -0
  87. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
  88. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +19 -13
  89. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +17 -33
  90. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
  91. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +28 -0
  92. package/modern/BarChart/seriesConfig/extremums.js +2 -2
  93. package/modern/BarChart/useBarChartProps.d.ts +2 -1
  94. package/modern/BarChart/useBarChartProps.js +19 -13
  95. package/modern/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
  96. package/modern/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
  97. package/modern/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
  98. package/modern/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
  99. package/modern/ChartsTooltip/ChartsTooltipContainer.js +2 -1
  100. package/modern/ChartsTooltip/useAxisTooltip.js +1 -1
  101. package/modern/LineChart/CircleMarkElement.js +1 -1
  102. package/modern/LineChart/LineHighlightPlot.js +1 -1
  103. package/modern/LineChart/MarkElement.js +1 -1
  104. package/modern/LineChart/useLineChartProps.d.ts +2 -1
  105. package/modern/LineChart/useLineChartProps.js +6 -4
  106. package/modern/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
  107. package/modern/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
  108. package/modern/RadarChart/RadarGrid/RadarGrid.js +5 -1
  109. package/modern/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
  110. package/modern/RadarChart/RadarGrid/useRadarGridData.js +3 -0
  111. package/modern/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
  112. package/modern/ScatterChart/useScatterChartProps.d.ts +2 -1
  113. package/modern/ScatterChart/useScatterChartProps.js +5 -3
  114. package/modern/hooks/useAxis.d.ts +5 -5
  115. package/modern/hooks/useInteractionItemProps.js +1 -1
  116. package/modern/hooks/useScale.d.ts +2 -2
  117. package/modern/hooks/useScale.js +2 -2
  118. package/modern/index.js +1 -1
  119. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
  120. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +28 -22
  121. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
  122. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
  123. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +10 -43
  124. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +1 -0
  125. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +41 -0
  126. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
  127. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
  128. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +4 -10
  129. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
  130. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
  131. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +8 -0
  132. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
  133. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +18 -13
  134. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +17 -33
  135. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
  136. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +22 -0
  137. package/package.json +3 -3
  138. package/tsconfig.build.tsbuildinfo +1 -1
@@ -42,8 +42,8 @@ const getValueExtremum = direction => params => {
42
42
  isDefaultAxis
43
43
  } = params;
44
44
  return Object.keys(series).filter(seriesId => {
45
- const yAxisId = series[seriesId].yAxisId;
46
- return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;
45
+ const axisId = direction === 'x' ? series[seriesId].xAxisId : series[seriesId].yAxisId;
46
+ return axisId === axis.id || isDefaultAxis && axisId === undefined;
47
47
  }).reduce((acc, seriesId) => {
48
48
  const {
49
49
  stackedData
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import type { BarChartProps } from './BarChart';
2
3
  import { ChartContainerProps } from "../ChartContainer/index.js";
3
4
  import { BarPlotProps } from "./BarPlot.js";
@@ -29,5 +30,5 @@ export declare const useBarChartProps: (props: BarChartProps) => {
29
30
  chartsAxisProps: ChartsAxisProps;
30
31
  axisHighlightProps: ChartsAxisHighlightProps;
31
32
  legendProps: ChartsLegendSlotExtension;
32
- children: import("react").ReactNode;
33
+ children: React.ReactNode;
33
34
  };
@@ -2,12 +2,14 @@
2
2
  'use client';
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
6
  Object.defineProperty(exports, "__esModule", {
6
7
  value: true
7
8
  });
8
9
  exports.useBarChartProps = void 0;
9
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
+ var React = _interopRequireWildcard(require("react"));
11
13
  var _useId = _interopRequireDefault(require("@mui/utils/useId"));
12
14
  var _constants = require("../constants");
13
15
  var _BarChart = require("./BarChart.plugins");
@@ -49,29 +51,34 @@ const useBarChartProps = props => {
49
51
  const id = (0, _useId.default)();
50
52
  const clipPathId = `${id}-clip-path`;
51
53
  const hasHorizontalSeries = layout === 'horizontal' || layout === undefined && series.some(item => item.layout === 'horizontal');
52
- const defaultAxisConfig = {
54
+ const defaultBandXAxis = React.useMemo(() => [{
55
+ id: _constants.DEFAULT_X_AXIS_KEY,
53
56
  scaleType: 'band',
54
57
  data: Array.from({
55
58
  length: Math.max(...series.map(s => (s.data ?? dataset ?? []).length))
56
59
  }, (_, index) => index)
57
- };
60
+ }], [dataset, series]);
61
+ const defaultBandYAxis = React.useMemo(() => [{
62
+ id: _constants.DEFAULT_Y_AXIS_KEY,
63
+ scaleType: 'band',
64
+ data: Array.from({
65
+ length: Math.max(...series.map(s => (s.data ?? dataset ?? []).length))
66
+ }, (_, index) => index)
67
+ }], [dataset, series]);
68
+ const seriesWithDefault = React.useMemo(() => series.map(s => (0, _extends2.default)({
69
+ type: 'bar'
70
+ }, s, {
71
+ layout: hasHorizontalSeries ? 'horizontal' : 'vertical'
72
+ })), [hasHorizontalSeries, series]);
58
73
  const chartContainerProps = (0, _extends2.default)({}, rest, {
59
- series: series.map(s => (0, _extends2.default)({
60
- type: 'bar'
61
- }, s, {
62
- layout: hasHorizontalSeries ? 'horizontal' : 'vertical'
63
- })),
74
+ series: seriesWithDefault,
64
75
  width,
65
76
  height,
66
77
  margin,
67
78
  colors,
68
79
  dataset,
69
- xAxis: xAxis ?? (hasHorizontalSeries ? undefined : [(0, _extends2.default)({
70
- id: _constants.DEFAULT_X_AXIS_KEY
71
- }, defaultAxisConfig)]),
72
- yAxis: yAxis ?? (hasHorizontalSeries ? [(0, _extends2.default)({
73
- id: _constants.DEFAULT_Y_AXIS_KEY
74
- }, defaultAxisConfig)] : undefined),
80
+ xAxis: xAxis ?? (hasHorizontalSeries ? undefined : defaultBandXAxis),
81
+ yAxis: yAxis ?? (hasHorizontalSeries ? defaultBandYAxis : undefined),
75
82
  highlightedItem,
76
83
  onHighlightChange,
77
84
  disableAxisListener: slotProps?.tooltip?.trigger !== 'axis' && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
package/CHANGELOG.md CHANGED
@@ -5,6 +5,177 @@
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.0.0-beta.2
9
+
10
+ _Mar 27, 2025_
11
+
12
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🔍 Update the Data Grid quick filter to be collapsed when not in use
15
+ - 🐞 Bugfixes
16
+
17
+ Special thanks go out to the community members for their valuable contributions:
18
+ @lhilgert9.
19
+ Following are all team members who have contributed to this release:
20
+ @alexfauquette, @arminmeh, @flaviendelangle, @hasdfa, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @mnajdova, @romgrk.
21
+
22
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
23
+
24
+ ### Data Grid
25
+
26
+ #### `@mui/x-data-grid@8.0.0-beta.2`
27
+
28
+ - [DataGrid] Fix error caused by trying to render rows that are not in the state anymore (#17057) @arminmeh
29
+ - [DataGrid] Refactor: remove more material (#16922) @romgrk
30
+ - [DataGrid] Update Quick Filter component to be expandable (#16862) @KenanYusuf
31
+ - [DataGrid] Fix crash when used with `@mui/styled-engine-sc` (#17154) @KenanYusuf
32
+
33
+ #### `@mui/x-data-grid-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
34
+
35
+ Same changes as in `@mui/x-data-grid@8.0.0-beta.2`, plus:
36
+
37
+ - [DataGridPro] Data source: Allow expanding groups with unknown children (#17144) @MBilalShafi
38
+
39
+ #### `@mui/x-data-grid-premium@8.0.0-beta.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
40
+
41
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.2`.
42
+
43
+ ### Date and Time Pickers
44
+
45
+ #### `@mui/x-date-pickers@8.0.0-beta.2`
46
+
47
+ - [fields] Extract the props of each field slot into a standalone hook for easier re-use (#17114) @flaviendelangle
48
+ - [pickers] Fix visual regression in Date Range Calendar's day (#17148) @flaviendelangle
49
+ - [pickers] Remove all code duplication to apply default values to validation props (#17038) @flaviendelangle
50
+
51
+ #### `@mui/x-date-pickers-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
52
+
53
+ Same changes as in `@mui/x-date-pickers@8.0.0-beta.2`.
54
+
55
+ ### Charts
56
+
57
+ #### `@mui/x-charts@8.0.0-beta.2`
58
+
59
+ - [charts] Memoize axes and series with default (#17156) @alexfauquette
60
+ - [charts] Add pie benchmark (#17115) @JCQuintas
61
+ - [charts] Fix CSS vars support for dark theme (#17106) @alexfauquette
62
+ - [charts] Fix radar hover (#17134) @alexfauquette
63
+ - [charts] Move axis interaction to selectors (#17039) @alexfauquette
64
+ - [charts] Fix Pie benchmark (#17125) @JCQuintas
65
+
66
+ #### `@mui/x-charts-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
67
+
68
+ Same changes as in `@mui/x-charts@8.0.0-beta.2`.
69
+
70
+ ### Tree View
71
+
72
+ #### `@mui/x-tree-view@8.0.0-beta.2`
73
+
74
+ Internal changes.
75
+
76
+ #### `@mui/x-tree-view-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
77
+
78
+ Same changes as in `@mui/x-tree-view@8.0.0-beta.2`.
79
+
80
+ ### `@mui/x-codemod@8.0.0-beta.1`
81
+
82
+ - [codemod] Add Data Grid codemods (#17121, #17124) @MBilalShafi
83
+
84
+ ### Docs
85
+
86
+ - [docs] Fix example import for `ExportExcel` component (#17110) @KenanYusuf
87
+
88
+ ### Core
89
+
90
+ - [code-infra] Remove `@mui/styles` dependency & patches (#17071) @mnajdova
91
+ - [code-infra] Add more tests to slow screenshot tests (#17075) @JCQuintas
92
+ - [code-infra] Fix pickers codecov (#17120) @JCQuintas
93
+ - [code-infra] Move `isDeepEqual` to @mui/x-internals (#17129) @JCQuintas
94
+ - [code-infra] Remove `test_regressions` step from React 18 pipeline (#17108) @LukasTy
95
+ - [code-infra] Update some data-grid tests for vitest (#17078, #17104, #17146) @JCQuintas
96
+ - [code-infra] Update some date-pickers tests for vitest (#17083) @JCQuintas
97
+ - [infra] Update `issue-status-label-handler.yml` @michelengelen
98
+ - [infra] Added reusable issue status label handler workflow (#17145) @michelengelen
99
+ - [infra] Switch to reusable 'stale issues/PRs' workflow (#17107) @michelengelen
100
+ - [telemetry] Improve request body size, update dependencies, and optimize SSR handling (#17008) @hasdfa
101
+
102
+ ## 8.0.0-beta.1
103
+
104
+ _Mar 21, 2025_
105
+
106
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
107
+
108
+ - 🐞 Bugfixes
109
+
110
+ Special thanks go out to the community members for their valuable contributions:
111
+ @jyash97.
112
+ Following are all team members who have contributed to this release:
113
+ @alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf.
114
+
115
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
116
+
117
+ ### Data Grid
118
+
119
+ #### `@mui/x-data-grid@8.0.0-beta.1`
120
+
121
+ - [DataGrid] Fix error caused by `forwardRef` to `ClickAwayListener` (#17049) @arminmeh
122
+ - [DataGrid] Fix error while editing rows with custom id (#17048) @arminmeh
123
+
124
+ #### `@mui/x-data-grid-pro@8.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
125
+
126
+ Same changes as in `@mui/x-data-grid@8.0.0-beta.1`, plus:
127
+
128
+ - [DataGridPro] Fix header select checkbox state with `checkboxSelectionVisibleOnly` and `paginationMode="server"` (#17026) @arminmeh
129
+
130
+ #### `@mui/x-data-grid-premium@8.0.0-beta.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
131
+
132
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.1`, plus:
133
+
134
+ - [DataGridPremium] Update column state correctly when grouping mode is updated with one grouping column (#17069) @arminmeh
135
+
136
+ ### Date and Time Pickers
137
+
138
+ #### `@mui/x-date-pickers@8.0.0-beta.1`
139
+
140
+ - [fields] Clean the `useField` hook (part 1) (#16944) @flaviendelangle
141
+ - [fields] Improve the check for year in `doesSectionFormatHaveLeadingZeros` (#17051) @flaviendelangle
142
+ - [pickers] Deprecate the `disableOpenPicker` prop (#17040) @flaviendelangle
143
+ - [pickers] Simplify the `cleanLeadingZeros` method (#17063) @flaviendelangle
144
+ - [pickers] Use the new `ownerState` in `PickersDay` and `DateRangePickerDay` (#17035) @flaviendelangle
145
+
146
+ #### `@mui/x-date-pickers-pro@8.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
147
+
148
+ Same changes as in `@mui/x-date-pickers@8.0.0-beta.1`, plus:
149
+
150
+ - [DateRangePicker] Use desktop media query constant on range pickers (#17052) @flaviendelangle
151
+
152
+ ### Charts
153
+
154
+ #### `@mui/x-charts@8.0.0-beta.1`
155
+
156
+ - [charts] Fix horizontal bar with multiple axes (#17059) @alexfauquette
157
+
158
+ #### `@mui/x-charts-pro@8.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
159
+
160
+ Same changes as in `@mui/x-charts@8.0.0-beta.1`, plus:
161
+
162
+ - [charts-pro] Allow disabling Heatmap tooltip (#17060) @JCQuintas
163
+
164
+ ### Tree View
165
+
166
+ #### `@mui/x-tree-view@8.0.0-beta.1`
167
+
168
+ Internal changes.
169
+
170
+ #### `@mui/x-tree-view-pro@8.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
171
+
172
+ Same changes as in `@mui/x-tree-view@8.0.0-beta.1`.
173
+
174
+ ### Docs
175
+
176
+ - [docs] Fix 404 (#17033) @alexfauquette
177
+ - [docs] Fix Data Grid advanced list view demo (#17064) @KenanYusuf
178
+
8
179
  ## 8.0.0-beta.0
9
180
 
10
181
  <img width="100%" alt="MUI X v8 Beta is live" src="https://github.com/user-attachments/assets/61ec4dd8-c946-456b-8b45-d51de8772f5d">
@@ -11,7 +11,7 @@ var _useScale = require("../hooks/useScale");
11
11
  var _isBandScale = require("../internals/isBandScale");
12
12
  var _useSelector = require("../internals/store/useSelector");
13
13
  var _useStore = require("../internals/store/useStore");
14
- var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
14
+ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
15
15
  var _hooks = require("../hooks");
16
16
  var _ChartsAxisHighlightPath = require("./ChartsAxisHighlightPath");
17
17
  var _jsxRuntime = require("react/jsx-runtime");
@@ -28,26 +28,26 @@ var _jsxRuntime = require("react/jsx-runtime");
28
28
  } = (0, _hooks.useDrawingArea)();
29
29
  const xScale = (0, _useScale.useXScale)();
30
30
  const store = (0, _useStore.useStore)();
31
- const axisX = (0, _useSelector.useSelector)(store, _useChartInteraction.selectorChartsInteractionXAxis);
31
+ const axisXValue = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxisValue);
32
32
  const getXPosition = (0, _useScale.getValueToPositionMapper)(xScale);
33
- const isBandScaleX = type === 'band' && axisX !== null && (0, _isBandScale.isBandScale)(xScale);
33
+ const isBandScaleX = type === 'band' && axisXValue !== null && (0, _isBandScale.isBandScale)(xScale);
34
34
  if (process.env.NODE_ENV !== 'production') {
35
- const isError = isBandScaleX && xScale(axisX.value) === undefined;
35
+ const isError = isBandScaleX && xScale(axisXValue) === undefined;
36
36
  if (isError) {
37
37
  console.error([`MUI X: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
38
38
  }
39
39
  }
40
40
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
41
- children: [isBandScaleX && xScale(axisX.value) !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath
41
+ children: [isBandScaleX && xScale(axisXValue) !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath
42
42
  // @ts-expect-error, xScale value is checked in the statement above
43
43
  , {
44
- d: `M ${xScale(axisX.value) - (xScale.step() - xScale.bandwidth()) / 2} ${top} l ${xScale.step()} 0 l 0 ${height} l ${-xScale.step()} 0 Z`,
44
+ d: `M ${xScale(axisXValue) - (xScale.step() - xScale.bandwidth()) / 2} ${top} l ${xScale.step()} 0 l 0 ${height} l ${-xScale.step()} 0 Z`,
45
45
  className: classes.root,
46
46
  ownerState: {
47
47
  axisHighlight: 'band'
48
48
  }
49
- }), type === 'line' && axisX !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
50
- d: `M ${getXPosition(axisX.value)} ${top} L ${getXPosition(axisX.value)} ${top + height}`,
49
+ }), type === 'line' && axisXValue !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
50
+ d: `M ${getXPosition(axisXValue)} ${top} L ${getXPosition(axisXValue)} ${top + height}`,
51
51
  className: classes.root,
52
52
  ownerState: {
53
53
  axisHighlight: 'line'
@@ -11,7 +11,7 @@ var _useScale = require("../hooks/useScale");
11
11
  var _isBandScale = require("../internals/isBandScale");
12
12
  var _useSelector = require("../internals/store/useSelector");
13
13
  var _useStore = require("../internals/store/useStore");
14
- var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
14
+ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
15
15
  var _hooks = require("../hooks");
16
16
  var _ChartsAxisHighlightPath = require("./ChartsAxisHighlightPath");
17
17
  var _jsxRuntime = require("react/jsx-runtime");
@@ -28,26 +28,26 @@ var _jsxRuntime = require("react/jsx-runtime");
28
28
  } = (0, _hooks.useDrawingArea)();
29
29
  const yScale = (0, _useScale.useYScale)();
30
30
  const store = (0, _useStore.useStore)();
31
- const axisY = (0, _useSelector.useSelector)(store, _useChartInteraction.selectorChartsInteractionYAxis);
31
+ const axisYValue = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionYAxisValue);
32
32
  const getYPosition = (0, _useScale.getValueToPositionMapper)(yScale);
33
- const isBandScaleY = type === 'band' && axisY !== null && (0, _isBandScale.isBandScale)(yScale);
33
+ const isBandScaleY = type === 'band' && axisYValue !== null && (0, _isBandScale.isBandScale)(yScale);
34
34
  if (process.env.NODE_ENV !== 'production') {
35
- const isError = isBandScaleY && yScale(axisY.value) === undefined;
35
+ const isError = isBandScaleY && yScale(axisYValue) === undefined;
36
36
  if (isError) {
37
37
  console.error([`MUI X: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
38
38
  }
39
39
  }
40
40
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
41
- children: [isBandScaleY && yScale(axisY.value) !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
41
+ children: [isBandScaleY && yScale(axisYValue) !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
42
42
  d: `M ${left} ${
43
43
  // @ts-expect-error, yScale value is checked in the statement above
44
- yScale(axisY.value) - (yScale.step() - yScale.bandwidth()) / 2} l 0 ${yScale.step()} l ${width} 0 l 0 ${-yScale.step()} Z`,
44
+ yScale(axisYValue) - (yScale.step() - yScale.bandwidth()) / 2} l 0 ${yScale.step()} l ${width} 0 l 0 ${-yScale.step()} Z`,
45
45
  className: classes.root,
46
46
  ownerState: {
47
47
  axisHighlight: 'band'
48
48
  }
49
- }), type === 'line' && axisY !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
50
- d: `M ${left} ${getYPosition(axisY.value)} L ${left + width} ${getYPosition(axisY.value)}`,
49
+ }), type === 'line' && axisYValue !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightPath.ChartsAxisHighlightPath, {
50
+ d: `M ${left} ${getYPosition(axisYValue)} L ${left + width} ${getYPosition(axisYValue)}`,
51
51
  className: classes.root,
52
52
  ownerState: {
53
53
  axisHighlight: 'line'
@@ -18,7 +18,7 @@ const StyledText = (0, _styles.styled)('text')(({
18
18
  theme
19
19
  }) => (0, _extends2.default)({}, theme.typography.body2, {
20
20
  stroke: 'none',
21
- fill: theme.palette.text.primary,
21
+ fill: (theme.vars || theme).palette.text.primary,
22
22
  shapeRendering: 'crispEdges',
23
23
  textAnchor: 'middle',
24
24
  dominantBaseline: 'middle'
@@ -18,7 +18,7 @@ const StyledText = (0, _styles.styled)('text')(({
18
18
  theme
19
19
  }) => (0, _extends2.default)({}, theme.typography.body2, {
20
20
  stroke: 'none',
21
- fill: theme.palette.text.primary,
21
+ fill: (theme.vars || theme).palette.text.primary,
22
22
  shapeRendering: 'crispEdges',
23
23
  textAnchor: 'middle',
24
24
  dominantBaseline: 'middle'
@@ -22,6 +22,7 @@ var _useSelector = require("../internals/store/useSelector");
22
22
  var _useStore = require("../internals/store/useStore");
23
23
  var _hooks = require("../hooks");
24
24
  var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
25
+ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
25
26
  var _jsxRuntime = require("react/jsx-runtime");
26
27
  const _excluded = ["trigger", "classes", "children"];
27
28
  const ChartsTooltipRoot = (0, _styles.styled)(_Popper.default, {
@@ -67,7 +68,7 @@ function ChartsTooltipContainer(inProps) {
67
68
  const store = (0, _useStore.useStore)();
68
69
  const isOpen = (0, _useSelector.useSelector)(store,
69
70
  // eslint-disable-next-line no-nested-ternary
70
- trigger === 'axis' ? axisHasData(xAxis) ? _useChartInteraction.selectorChartsInteractionXAxisIsDefined : _useChartInteraction.selectorChartsInteractionYAxisIsDefined : _useChartInteraction.selectorChartsInteractionItemIsDefined);
71
+ trigger === 'axis' ? axisHasData(xAxis) ? _useChartCartesianAxis.selectorChartsInteractionXAxisIsDefined : _useChartCartesianAxis.selectorChartsInteractionYAxisIsDefined : _useChartInteraction.selectorChartsInteractionItemIsDefined);
71
72
  const popperOpen = pointerType !== null && isOpen; // tooltipHasData;
72
73
 
73
74
  React.useEffect(() => {
@@ -14,13 +14,13 @@ var _isCartesian = require("../internals/isCartesian");
14
14
  var _utils = require("./utils");
15
15
  var _useAxis = require("../hooks/useAxis");
16
16
  var _useZAxis = require("../hooks/useZAxis");
17
- var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
17
+ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
18
18
  function useAxisTooltip() {
19
19
  const defaultXAxis = (0, _useAxis.useXAxis)();
20
20
  const defaultYAxis = (0, _useAxis.useYAxis)();
21
21
  const xAxisHasData = defaultXAxis.data !== undefined && defaultXAxis.data.length !== 0;
22
22
  const store = (0, _useStore.useStore)();
23
- const axisData = (0, _useSelector.useSelector)(store, xAxisHasData ? _useChartInteraction.selectorChartsInteractionXAxis : _useChartInteraction.selectorChartsInteractionYAxis);
23
+ const axisData = (0, _useSelector.useSelector)(store, xAxisHasData ? _useChartCartesianAxis.selectorChartsInteractionXAxis : _useChartCartesianAxis.selectorChartsInteractionYAxis);
24
24
  const series = (0, _useSeries.useSeries)();
25
25
  const {
26
26
  xAxis
@@ -17,7 +17,7 @@ var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
17
17
  var _useItemHighlighted = require("../hooks/useItemHighlighted");
18
18
  var _markElementClasses = require("./markElementClasses");
19
19
  var _useSelector = require("../internals/store/useSelector");
20
- var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
20
+ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
21
21
  var _useStore = require("../internals/store/useStore");
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
23
  const _excluded = ["x", "y", "id", "classes", "color", "dataIndex", "onClick", "skipAnimation"];
@@ -58,7 +58,7 @@ function CircleMarkElement(props) {
58
58
  seriesId: id
59
59
  });
60
60
  const store = (0, _useStore.useStore)();
61
- const xAxisIdentifier = (0, _useSelector.useSelector)(store, _useChartInteraction.selectorChartsInteractionXAxis);
61
+ const xAxisIdentifier = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxis);
62
62
  const cx = (0, _web.useSpringValue)(x, {
63
63
  immediate: skipAnimation
64
64
  });
@@ -19,7 +19,7 @@ var _constants = require("../constants");
19
19
  var _useLineSeries = require("../hooks/useLineSeries");
20
20
  var _getColor = _interopRequireDefault(require("./seriesConfig/getColor"));
21
21
  var _ChartProvider = require("../context/ChartProvider");
22
- var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
22
+ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
23
23
  var _useAxis = require("../hooks/useAxis");
24
24
  var _jsxRuntime = require("react/jsx-runtime");
25
25
  const _excluded = ["slots", "slotProps"];
@@ -52,7 +52,7 @@ function LineHighlightPlot(props) {
52
52
  instance
53
53
  } = (0, _ChartProvider.useChartContext)();
54
54
  const store = (0, _useStore.useStore)();
55
- const xAxisIdentifier = (0, _useSelector.useSelector)(store, _useChartInteraction.selectorChartsInteractionXAxis);
55
+ const xAxisIdentifier = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxis);
56
56
  const highlightedIndex = xAxisIdentifier?.index;
57
57
  if (highlightedIndex === undefined) {
58
58
  return null;
@@ -18,7 +18,7 @@ var _getSymbol = require("../internals/getSymbol");
18
18
  var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
19
19
  var _useItemHighlighted = require("../hooks/useItemHighlighted");
20
20
  var _markElementClasses = require("./markElementClasses");
21
- var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
21
+ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
22
22
  var _useSelector = require("../internals/store/useSelector");
23
23
  var _useStore = require("../internals/store/useStore");
24
24
  var _jsxRuntime = require("react/jsx-runtime");
@@ -70,7 +70,7 @@ function MarkElement(props) {
70
70
  seriesId: id
71
71
  });
72
72
  const store = (0, _useStore.useStore)();
73
- const xAxisIdentifier = (0, _useSelector.useSelector)(store, _useChartInteraction.selectorChartsInteractionXAxis);
73
+ const xAxisIdentifier = (0, _useSelector.useSelector)(store, _useChartCartesianAxis.selectorChartsInteractionXAxis);
74
74
  const cx = (0, _web.useSpringValue)(x, {
75
75
  immediate: skipAnimation
76
76
  });
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { ChartsAxisProps } from "../ChartsAxis/index.js";
2
3
  import { ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js";
3
4
  import { ChartsClipPathProps } from "../ChartsClipPath/index.js";
@@ -35,5 +36,5 @@ export declare const useLineChartProps: (props: LineChartProps) => {
35
36
  axisHighlightProps: ChartsAxisHighlightProps;
36
37
  lineHighlightPlotProps: LineHighlightPlotProps;
37
38
  legendProps: ChartsLegendSlotExtension;
38
- children: import("react").ReactNode;
39
+ children: React.ReactNode;
39
40
  };
@@ -2,12 +2,14 @@
2
2
  'use client';
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
6
  Object.defineProperty(exports, "__esModule", {
6
7
  value: true
7
8
  });
8
9
  exports.useLineChartProps = void 0;
9
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
+ var React = _interopRequireWildcard(require("react"));
11
13
  var _useId = _interopRequireDefault(require("@mui/utils/useId"));
12
14
  var _constants = require("../constants");
13
15
  var _LineChart = require("./LineChart.plugins");
@@ -48,11 +50,12 @@ const useLineChartProps = props => {
48
50
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
49
51
  const id = (0, _useId.default)();
50
52
  const clipPathId = `${id}-clip-path`;
53
+ const seriesWithDefault = React.useMemo(() => series.map(s => (0, _extends2.default)({
54
+ disableHighlight: !!disableLineItemHighlight,
55
+ type: 'line'
56
+ }, s)), [disableLineItemHighlight, series]);
51
57
  const chartContainerProps = (0, _extends2.default)({}, other, {
52
- series: series.map(s => (0, _extends2.default)({
53
- disableHighlight: !!disableLineItemHighlight,
54
- type: 'line'
55
- }, s)),
58
+ series: seriesWithDefault,
56
59
  width,
57
60
  height,
58
61
  margin,
@@ -11,7 +11,7 @@ var _useSelector = require("../../internals/store/useSelector");
11
11
  var _useStore = require("../../internals/store/useStore");
12
12
  var _useChartContext = require("../../context/ChartProvider/useChartContext");
13
13
  var _useChartPolarAxis = require("../../internals/plugins/featurePlugins/useChartPolarAxis");
14
- var _useChartInteraction = require("../../internals/plugins/featurePlugins/useChartInteraction");
14
+ var _useChartPolarInteraction = require("../../internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors");
15
15
  function useRadarAxisHighlight(params) {
16
16
  const {
17
17
  includesNeighbors = false
@@ -26,10 +26,14 @@ function useRadarAxisHighlight(params) {
26
26
  instance
27
27
  } = (0, _useChartContext.useChartContext)();
28
28
  const store = (0, _useStore.useStore)();
29
- const xAxisIdentifier = (0, _useSelector.useSelector)(store, _useChartInteraction.selectorChartsInteractionXAxis);
29
+ const rotationAxisIndex = (0, _useSelector.useSelector)(store, _useChartPolarInteraction.selectorChartsInteractionRotationAxisIndex);
30
+ const rotationAxisValue = (0, _useSelector.useSelector)(store, _useChartPolarInteraction.selectorChartsInteractionRotationAxisValue);
30
31
  const center = (0, _useSelector.useSelector)(store, _useChartPolarAxis.selectorChartPolarCenter);
31
- const highlightedIndex = xAxisIdentifier?.index;
32
- if (highlightedIndex === undefined) {
32
+ const highlightedIndex = rotationAxisIndex;
33
+ if (!rotationScale) {
34
+ return null;
35
+ }
36
+ if (highlightedIndex === null || highlightedIndex === -1) {
33
37
  return null;
34
38
  }
35
39
  if (radarSeries === undefined || radarSeries.length === 0) {
@@ -37,7 +41,7 @@ function useRadarAxisHighlight(params) {
37
41
  }
38
42
  const metric = radiusAxisIds[highlightedIndex];
39
43
  const radiusScale = radiusAxis[metric].scale;
40
- const angle = rotationScale(xAxisIdentifier?.value);
44
+ const angle = rotationScale(rotationAxisValue);
41
45
  const radius = radiusScale.range()[1];
42
46
  return {
43
47
  center,
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { RadarGridProps } from "./RadarGrid.types.js";
3
- declare function RadarGrid(props: RadarGridProps): React.JSX.Element;
3
+ declare function RadarGrid(props: RadarGridProps): React.JSX.Element | null;
4
4
  declare namespace RadarGrid {
5
5
  var propTypes: any;
6
6
  }
@@ -17,11 +17,15 @@ function RadarGrid(props) {
17
17
  divisions = 5,
18
18
  shape = 'sharp'
19
19
  } = props;
20
+ const gridData = (0, _useRadarGridData.useRadarGridData)();
21
+ if (gridData === null) {
22
+ return null;
23
+ }
20
24
  const {
21
25
  center,
22
26
  corners,
23
27
  radius
24
- } = (0, _useRadarGridData.useRadarGridData)();
28
+ } = gridData;
25
29
  return shape === 'sharp' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_SharpRadarGrid.SharpRadarGrid, {
26
30
  divisions: divisions,
27
31
  corners: corners,
@@ -8,4 +8,4 @@ export declare function useRadarGridData(): {
8
8
  y: number;
9
9
  }[];
10
10
  radius: number;
11
- };
11
+ } | null;
@@ -19,6 +19,9 @@ function useRadarGridData() {
19
19
  const drawingArea = (0, _useDrawingArea.useDrawingArea)();
20
20
  const cx = drawingArea.left + drawingArea.width / 2;
21
21
  const cy = drawingArea.top + drawingArea.height / 2;
22
+ if (!rotationScale || rotationScale.domain().length === 0) {
23
+ return null;
24
+ }
22
25
  const metrics = rotationScale.domain();
23
26
  const angles = metrics.map(key => rotationScale(key));
24
27
  return {
@@ -29,8 +29,8 @@ function useRadarSeriesData(querySeriesId) {
29
29
  isFaded: isItemFaded,
30
30
  isHighlighted: isItemHighlighted
31
31
  } = (0, _useItemHighlightedGetter.useItemHighlightedGetter)();
32
- const metrics = rotationScale.domain();
33
- const angles = metrics.map(key => rotationScale(key));
32
+ const metrics = rotationScale?.domain() ?? [];
33
+ const angles = metrics.map(key => rotationScale?.(key));
34
34
  return radarSeries.map(series => {
35
35
  const seriesId = series.id;
36
36
  const isSeriesHighlighted = isItemHighlighted({
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { ChartsAxisProps } from "../ChartsAxis/index.js";
2
3
  import { ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js";
3
4
  import { ChartsGridProps } from "../ChartsGrid/index.js";
@@ -24,5 +25,5 @@ export declare const useScatterChartProps: (props: ScatterChartProps) => {
24
25
  overlayProps: ChartsOverlayProps;
25
26
  legendProps: ChartsLegendSlotExtension;
26
27
  axisHighlightProps: ChartsAxisHighlightProps;
27
- children: import("react").ReactNode;
28
+ children: React.ReactNode;
28
29
  };