@mui/x-charts 6.0.0-alpha.7 → 6.0.0-alpha.8
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.
- package/BarChart/BarChart.d.ts +1 -0
- package/BarChart/BarChart.js +26 -13
- package/BarChart/BarPlot.js +25 -15
- package/BarChart/extremums.js +19 -3
- package/BarChart/formatter.js +3 -1
- package/CHANGELOG.md +154 -31
- package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +3 -2
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +11 -3
- package/ChartsTooltip/ChartsAxisTooltipContent.js +13 -9
- package/LineChart/LineChart.js +1 -1
- package/LineChart/MarkPlot.js +7 -4
- package/PieChart/PieChart.js +1 -1
- package/ScatterChart/ScatterChart.js +1 -1
- package/SparkLineChart/SparkLineChart.js +1 -1
- package/context/CartesianContextProvider.js +4 -4
- package/esm/BarChart/BarChart.js +30 -17
- package/esm/BarChart/BarPlot.js +26 -16
- package/esm/BarChart/extremums.js +18 -2
- package/esm/BarChart/formatter.js +3 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +11 -3
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +13 -9
- package/esm/LineChart/LineChart.js +1 -1
- package/esm/LineChart/MarkPlot.js +7 -4
- package/esm/PieChart/PieChart.js +1 -1
- package/esm/ScatterChart/ScatterChart.js +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +1 -1
- package/esm/context/CartesianContextProvider.js +4 -4
- package/esm/hooks/useAxisEvents.js +21 -38
- package/esm/hooks/useTicks.js +2 -2
- package/hooks/useAxisEvents.js +21 -38
- package/hooks/useTicks.js +2 -2
- package/index.js +1 -1
- package/internals/defaultizeColor.d.ts +1 -0
- package/legacy/BarChart/BarChart.js +35 -20
- package/legacy/BarChart/BarPlot.js +26 -16
- package/legacy/BarChart/extremums.js +22 -2
- package/legacy/BarChart/formatter.js +3 -1
- package/legacy/ChartsAxisHighlight/ChartsAxisHighlight.js +11 -3
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +13 -9
- package/legacy/LineChart/LineChart.js +1 -1
- package/legacy/LineChart/MarkPlot.js +5 -2
- package/legacy/PieChart/PieChart.js +1 -1
- package/legacy/ScatterChart/ScatterChart.js +1 -1
- package/legacy/SparkLineChart/SparkLineChart.js +1 -1
- package/legacy/context/CartesianContextProvider.js +4 -4
- package/legacy/hooks/useAxisEvents.js +21 -37
- package/legacy/hooks/useTicks.js +2 -2
- package/legacy/index.js +1 -1
- package/models/seriesType/bar.d.ts +6 -1
- package/modern/BarChart/BarChart.js +27 -14
- package/modern/BarChart/BarPlot.js +25 -15
- package/modern/BarChart/extremums.js +18 -2
- package/modern/BarChart/formatter.js +3 -1
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +11 -3
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +13 -9
- package/modern/LineChart/LineChart.js +1 -1
- package/modern/LineChart/MarkPlot.js +7 -4
- package/modern/PieChart/PieChart.js +1 -1
- package/modern/ScatterChart/ScatterChart.js +1 -1
- package/modern/SparkLineChart/SparkLineChart.js +1 -1
- package/modern/context/CartesianContextProvider.js +4 -4
- package/modern/hooks/useAxisEvents.js +21 -38
- package/modern/hooks/useTicks.js +2 -2
- package/modern/index.js +1 -1
- package/package.json +4 -4
package/BarChart/BarChart.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface BarChartProps extends Omit<ResponsiveChartContainerProps, 'seri
|
|
|
27
27
|
* @default {}
|
|
28
28
|
*/
|
|
29
29
|
slotProps?: BarChartSlotComponentProps;
|
|
30
|
+
layout?: BarSeriesType['layout'];
|
|
30
31
|
}
|
|
31
32
|
declare const BarChart: React.ForwardRefExoticComponent<BarChartProps & React.RefAttributes<unknown>>;
|
|
32
33
|
export { BarChart };
|
package/BarChart/BarChart.js
CHANGED
|
@@ -31,6 +31,7 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(props, ref) {
|
|
|
31
31
|
colors,
|
|
32
32
|
dataset,
|
|
33
33
|
sx,
|
|
34
|
+
layout,
|
|
34
35
|
tooltip,
|
|
35
36
|
axisHighlight,
|
|
36
37
|
legend,
|
|
@@ -44,22 +45,34 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(props, ref) {
|
|
|
44
45
|
} = props;
|
|
45
46
|
const id = (0, _useId.default)();
|
|
46
47
|
const clipPathId = `${id}-clip-path`;
|
|
48
|
+
const hasHorizontalSeries = layout === 'horizontal' || layout === undefined && series.some(item => item.layout === 'horizontal');
|
|
49
|
+
const defaultAxisConfig = {
|
|
50
|
+
scaleType: 'band',
|
|
51
|
+
data: Array.from({
|
|
52
|
+
length: Math.max(...series.map(s => (s.data ?? dataset ?? []).length))
|
|
53
|
+
}, (_, index) => index)
|
|
54
|
+
};
|
|
55
|
+
const defaultizedAxisHighlight = (0, _extends2.default)({}, hasHorizontalSeries ? {
|
|
56
|
+
y: 'band'
|
|
57
|
+
} : {
|
|
58
|
+
x: 'band'
|
|
59
|
+
}, axisHighlight);
|
|
47
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ResponsiveChartContainer.ResponsiveChartContainer, {
|
|
48
61
|
ref: ref,
|
|
49
62
|
series: series.map(s => (0, _extends2.default)({
|
|
50
63
|
type: 'bar'
|
|
51
|
-
}, s
|
|
64
|
+
}, s, {
|
|
65
|
+
layout: hasHorizontalSeries ? 'horizontal' : 'vertical'
|
|
66
|
+
})),
|
|
52
67
|
width: width,
|
|
53
68
|
height: height,
|
|
54
69
|
margin: margin,
|
|
55
|
-
xAxis: xAxis ?? [{
|
|
56
|
-
id: _constants.DEFAULT_X_AXIS_KEY
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}],
|
|
62
|
-
yAxis: yAxis,
|
|
70
|
+
xAxis: xAxis ?? (hasHorizontalSeries ? undefined : [(0, _extends2.default)({
|
|
71
|
+
id: _constants.DEFAULT_X_AXIS_KEY
|
|
72
|
+
}, defaultAxisConfig)]),
|
|
73
|
+
yAxis: yAxis ?? (hasHorizontalSeries ? [(0, _extends2.default)({
|
|
74
|
+
id: _constants.DEFAULT_Y_AXIS_KEY
|
|
75
|
+
}, defaultAxisConfig)] : undefined),
|
|
63
76
|
colors: colors,
|
|
64
77
|
dataset: dataset,
|
|
65
78
|
sx: sx,
|
|
@@ -80,9 +93,7 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(props, ref) {
|
|
|
80
93
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legend, {
|
|
81
94
|
slots: slots,
|
|
82
95
|
slotProps: slotProps
|
|
83
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({
|
|
84
|
-
x: "band"
|
|
85
|
-
}, axisHighlight)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltip, (0, _extends2.default)({}, tooltip, {
|
|
96
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, defaultizedAxisHighlight)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltip, (0, _extends2.default)({}, tooltip, {
|
|
86
97
|
slots: slots,
|
|
87
98
|
slotProps: slotProps
|
|
88
99
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, {
|
|
@@ -98,7 +109,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
98
109
|
// ----------------------------------------------------------------------
|
|
99
110
|
axisHighlight: _propTypes.default.shape({
|
|
100
111
|
x: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
101
|
-
y: _propTypes.default.oneOf(['line', 'none'])
|
|
112
|
+
y: _propTypes.default.oneOf(['band', 'line', 'none'])
|
|
102
113
|
}),
|
|
103
114
|
/**
|
|
104
115
|
* Indicate which axis to display the bottom of the charts.
|
|
@@ -133,6 +144,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
133
144
|
desc: _propTypes.default.string,
|
|
134
145
|
disableAxisListener: _propTypes.default.bool,
|
|
135
146
|
height: _propTypes.default.number,
|
|
147
|
+
layout: _propTypes.default.oneOf(['horizontal', 'vertical']),
|
|
136
148
|
/**
|
|
137
149
|
* Indicate which axis to display the left of the charts.
|
|
138
150
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -213,6 +225,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
213
225
|
}),
|
|
214
226
|
id: _propTypes.default.string,
|
|
215
227
|
label: _propTypes.default.string,
|
|
228
|
+
layout: _propTypes.default.oneOf(['horizontal', 'vertical']),
|
|
216
229
|
stack: _propTypes.default.string,
|
|
217
230
|
stackOffset: _propTypes.default.oneOf(['diverging', 'expand', 'none', 'silhouette', 'wiggle']),
|
|
218
231
|
stackOrder: _propTypes.default.oneOf(['appearance', 'ascending', 'descending', 'insideOut', 'none', 'reverse']),
|
package/BarChart/BarPlot.js
CHANGED
|
@@ -68,27 +68,37 @@ function BarPlot(props) {
|
|
|
68
68
|
const yAxisKey = series[seriesId].yAxisKey ?? defaultYAxisId;
|
|
69
69
|
const xAxisConfig = xAxis[xAxisKey];
|
|
70
70
|
const yAxisConfig = yAxis[yAxisKey];
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
const verticalLayout = series[seriesId].layout === 'vertical';
|
|
72
|
+
let baseScaleConfig;
|
|
73
|
+
if (verticalLayout) {
|
|
74
|
+
if (!(0, _axis.isBandScaleConfig)(xAxisConfig)) {
|
|
75
|
+
throw new Error(`Axis with id "${xAxisKey}" shoud be of type "band" to display the bar series of id "${seriesId}"`);
|
|
76
|
+
}
|
|
77
|
+
if (xAxis[xAxisKey].data === undefined) {
|
|
78
|
+
throw new Error(`Axis with id "${xAxisKey}" shoud have data property`);
|
|
79
|
+
}
|
|
80
|
+
baseScaleConfig = xAxisConfig;
|
|
81
|
+
} else {
|
|
82
|
+
if (!(0, _axis.isBandScaleConfig)(yAxisConfig)) {
|
|
83
|
+
throw new Error(`Axis with id "${yAxisKey}" shoud be of type "band" to display the bar series of id "${seriesId}"`);
|
|
84
|
+
}
|
|
85
|
+
if (yAxis[yAxisKey].data === undefined) {
|
|
86
|
+
throw new Error(`Axis with id "${xAxisKey}" shoud have data property`);
|
|
87
|
+
}
|
|
88
|
+
baseScaleConfig = yAxisConfig;
|
|
76
89
|
}
|
|
77
90
|
const xScale = xAxisConfig.scale;
|
|
78
91
|
const yScale = yAxisConfig.scale;
|
|
79
|
-
|
|
80
|
-
// Currently assuming all bars are vertical
|
|
81
|
-
const bandWidth = xScale.bandwidth();
|
|
92
|
+
const bandWidth = baseScaleConfig.scale.bandwidth();
|
|
82
93
|
const {
|
|
83
94
|
barWidth,
|
|
84
95
|
offset
|
|
85
96
|
} = getBandSize({
|
|
86
97
|
bandWidth,
|
|
87
98
|
numberOfGroups: stackingGroups.length,
|
|
88
|
-
gapRatio:
|
|
99
|
+
gapRatio: baseScaleConfig.barGapRatio
|
|
89
100
|
});
|
|
90
|
-
|
|
91
|
-
// @ts-ignore TODO: fix when adding a correct API for customisation
|
|
101
|
+
const barOffset = groupIndex * (barWidth + offset);
|
|
92
102
|
const {
|
|
93
103
|
stackedData,
|
|
94
104
|
color
|
|
@@ -99,10 +109,10 @@ function BarPlot(props) {
|
|
|
99
109
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarElement.BarElement, (0, _extends2.default)({
|
|
100
110
|
id: seriesId,
|
|
101
111
|
dataIndex: dataIndex,
|
|
102
|
-
x: xScale(xAxis[xAxisKey].data?.[dataIndex]) +
|
|
103
|
-
y: yScale(value),
|
|
104
|
-
height: yScale(baseline) - yScale(value),
|
|
105
|
-
width: barWidth,
|
|
112
|
+
x: verticalLayout ? xScale(xAxis[xAxisKey].data?.[dataIndex]) + barOffset : xScale(baseline),
|
|
113
|
+
y: verticalLayout ? yScale(value) : yScale(yAxis[yAxisKey].data?.[dataIndex]) + barOffset,
|
|
114
|
+
height: verticalLayout ? Math.abs(yScale(baseline) - yScale(value)) : barWidth,
|
|
115
|
+
width: verticalLayout ? barWidth : Math.abs(xScale(baseline) - xScale(value)),
|
|
106
116
|
color: color,
|
|
107
117
|
highlightScope: series[seriesId].highlightScope
|
|
108
118
|
}, props), `${seriesId}-${dataIndex}`);
|
package/BarChart/extremums.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getExtremumY = exports.getExtremumX = void 0;
|
|
7
|
-
const
|
|
7
|
+
const getBaseExtremum = params => {
|
|
8
8
|
const {
|
|
9
9
|
axis
|
|
10
10
|
} = params;
|
|
@@ -12,8 +12,7 @@ const getExtremumX = params => {
|
|
|
12
12
|
const maxX = Math.max(...(axis.data ?? []));
|
|
13
13
|
return [minX, maxX];
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
const getExtremumY = params => {
|
|
15
|
+
const getValueExtremum = params => {
|
|
17
16
|
const {
|
|
18
17
|
series,
|
|
19
18
|
axis,
|
|
@@ -24,4 +23,21 @@ const getExtremumY = params => {
|
|
|
24
23
|
return [acc[0] === null ? seriesMin : Math.min(seriesMin, acc[0]), acc[1] === null ? seriesMax : Math.max(seriesMax, acc[1])];
|
|
25
24
|
}, [null, null]);
|
|
26
25
|
};
|
|
26
|
+
const getExtremumX = params => {
|
|
27
|
+
// Notice that bar should be all horizontal or all vertical.
|
|
28
|
+
// Don't think it's a problem for now
|
|
29
|
+
const isHorizontal = Object.keys(params.series).some(seriesId => params.series[seriesId].layout === 'horizontal');
|
|
30
|
+
if (isHorizontal) {
|
|
31
|
+
return getValueExtremum(params);
|
|
32
|
+
}
|
|
33
|
+
return getBaseExtremum(params);
|
|
34
|
+
};
|
|
35
|
+
exports.getExtremumX = getExtremumX;
|
|
36
|
+
const getExtremumY = params => {
|
|
37
|
+
const isHorizontal = Object.keys(params.series).some(seriesId => params.series[seriesId].layout === 'horizontal');
|
|
38
|
+
if (isHorizontal) {
|
|
39
|
+
return getBaseExtremum(params);
|
|
40
|
+
}
|
|
41
|
+
return getValueExtremum(params);
|
|
42
|
+
};
|
|
27
43
|
exports.getExtremumY = getExtremumY;
|
package/BarChart/formatter.js
CHANGED
|
@@ -49,7 +49,9 @@ const formatter = (params, dataset) => {
|
|
|
49
49
|
})).order(stackingOrder).offset(stackingOffset)(d3Dataset);
|
|
50
50
|
ids.forEach((id, index) => {
|
|
51
51
|
const dataKey = series[id].dataKey;
|
|
52
|
-
completedSeries[id] = (0, _extends2.default)({
|
|
52
|
+
completedSeries[id] = (0, _extends2.default)({
|
|
53
|
+
layout: 'vertical'
|
|
54
|
+
}, series[id], {
|
|
53
55
|
data: dataKey ? dataset.map(d => d[dataKey]) : series[id].data,
|
|
54
56
|
stackedData: stackedSeries[index].map(([a, b]) => [a, b])
|
|
55
57
|
});
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,129 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.12.0
|
|
7
|
+
|
|
8
|
+
_Aug 25, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 📊 Support horizontal bar chart
|
|
13
|
+
- 💫 Improved animations on Android devices
|
|
14
|
+
- 🌍 Improve Ukrainian (uk-UA) locale on the data grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
### Data Grid
|
|
19
|
+
|
|
20
|
+
#### `@mui/x-data-grid@v6.12.0`
|
|
21
|
+
|
|
22
|
+
- [DataGrid] Allow print export for more than 100 rows (#10045) @MBilalShafi
|
|
23
|
+
- [l10n] Improve Ukrainian (uk-UA) locale (#10076) @mkundos
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid-pro@v6.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
26
|
+
|
|
27
|
+
Same changes as in `@mui/x-data-grid@v6.12.0`.
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-premium@v6.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid-pro@v6.12.0`.
|
|
32
|
+
|
|
33
|
+
### Date Pickers
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-date-pickers@v6.12.0`
|
|
36
|
+
|
|
37
|
+
- [fields] Do not clamp day of month (#9973) @flaviendelangle
|
|
38
|
+
- [pickers] Fix `ownerState` on `desktopPaper` slot props (#10103) @LukasTy
|
|
39
|
+
- [pickers] Fix to `transform-origin` when popper opens to `top` (#10069) @LukasTy
|
|
40
|
+
- [pickers] Fix `YearCalendar` scrolling (#10135) @LukasTy
|
|
41
|
+
- [pickers] Improve the typing of the adapter `dateWithTimezone` method (#10029) @flaviendelangle
|
|
42
|
+
- [pickers] Make `openPickerButton` toggle picker (#10109) @noraleonte
|
|
43
|
+
- [pickers] Update `reduceAnimations` default rule (#9864) @LukasTy
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers-pro@v6.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-date-pickers@v6.12.0`.
|
|
48
|
+
|
|
49
|
+
### Charts / `@mui/x-charts@6.12.0`
|
|
50
|
+
|
|
51
|
+
- [charts] Fix import issue (#10111) @alexfauquette
|
|
52
|
+
- [charts] Fix `slotProps` propagation (#10105) @alexfauquette
|
|
53
|
+
- [charts] Support horizontal bar chart (#9992) @alexfauquette
|
|
54
|
+
|
|
55
|
+
### Docs
|
|
56
|
+
|
|
57
|
+
- [docs] Address charts docs feedback (#10119) @alexfauquette
|
|
58
|
+
- [docs] Capitalization convention pickers @oliviertassinari
|
|
59
|
+
- [docs] Fix a11y issue on plan links (#10026) @oliviertassinari
|
|
60
|
+
- [docs] Fix some charts horizontal overflow on mobile devices (#10082) @cupok
|
|
61
|
+
- [docs] Fix typo in quick filter @oliviertassinari
|
|
62
|
+
- [docs] Fix typo in the timezone page (#10073) @flaviendelangle
|
|
63
|
+
|
|
64
|
+
### Core
|
|
65
|
+
|
|
66
|
+
- [core] Bump monorepo (#10129) @LukasTy
|
|
67
|
+
- [core] Document a bit `useLazyRef` @oliviertassinari
|
|
68
|
+
- [core] Enable strict type checking options in the top-level tsconfig (#9925) @cherniavskii
|
|
69
|
+
- [core] Increase global e2e timeout (#10134) @LukasTy
|
|
70
|
+
- [core] Remove outdated link (#10125) @oliviertassinari
|
|
71
|
+
- [core] Update `no-response` workflow (#10102) @DanailH
|
|
72
|
+
|
|
73
|
+
## 6.11.2
|
|
74
|
+
|
|
75
|
+
_Aug 17, 2023_
|
|
76
|
+
|
|
77
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
78
|
+
|
|
79
|
+
- 🏎️ Lower the filtering delay in the grid
|
|
80
|
+
- 🌍 Improve Spanish (es-ES) locale on the data grid
|
|
81
|
+
- 🐞 Bugfixes
|
|
82
|
+
- 📚 Documentation improvements
|
|
83
|
+
|
|
84
|
+
### Data Grid
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-data-grid@v6.11.2`
|
|
87
|
+
|
|
88
|
+
- [DataGrid] Fix `eval` blocked by CSP (#9863) @romgrk
|
|
89
|
+
- [DataGrid] Fix row id bug (#10051) @romgrk
|
|
90
|
+
- [DataGrid] Honor `disableExport` flag in Print Export (#10044) @MBilalShafi
|
|
91
|
+
- [DataGrid] Lower filter debounce delay (#9712) @romgrk
|
|
92
|
+
- [DataGrid] Unhide potential ref binding issue (#9965) @oliviertassinari
|
|
93
|
+
- [l10n] Improve Chinese (zh-CN) and Chinese(traditional) (zh-TW) locales (#9999) @MyNameIsTakenOMG
|
|
94
|
+
- [l10n] Improve Spanish (es-ES) locale (#10037) @Macampu420
|
|
95
|
+
|
|
96
|
+
#### `@mui/x-data-grid-pro@v6.11.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
97
|
+
|
|
98
|
+
Same changes as in `@mui/x-data-grid@v6.11.2`.
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-data-grid-premium@v6.11.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
101
|
+
|
|
102
|
+
Same changes as in `@mui/x-data-grid-pro@v6.11.2`.
|
|
103
|
+
|
|
104
|
+
### Date Pickers
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-date-pickers@v6.11.2`
|
|
107
|
+
|
|
108
|
+
- [pickers] Fix month switcher RTL (#10003) @alexfauquette
|
|
109
|
+
- [pickers] Follow-up on using device motion reduction preference (#9858) @LukasTy
|
|
110
|
+
- [pickers] Pass the shortcut information in the `onChange` context (#9985) @flaviendelangle
|
|
111
|
+
- [pickers] Replace `Grid` toolbar component with a styled `div` (#10052) @LukasTy
|
|
112
|
+
|
|
113
|
+
#### `@mui/x-date-pickers-pro@v6.11.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
114
|
+
|
|
115
|
+
Same changes as in `@mui/x-date-pickers@v6.11.2`.
|
|
116
|
+
|
|
117
|
+
### Docs
|
|
118
|
+
|
|
119
|
+
- [docs] Add migration guide for the Tree View (#9987) @flaviendelangle
|
|
120
|
+
- [docs] Fix en-US changelog @oliviertassinari
|
|
121
|
+
- [docs] Update column types (#10040) @romgrk
|
|
122
|
+
|
|
123
|
+
### Core
|
|
124
|
+
|
|
125
|
+
- [core] Remove unnecessary Box (#9831) @oliviertassinari
|
|
126
|
+
- [core] Set GitHub Action top level permission @oliviertassinari
|
|
127
|
+
- [core] Split the pickers test utils (#9976) @flaviendelangle
|
|
128
|
+
|
|
6
129
|
## 6.11.1
|
|
7
130
|
|
|
8
131
|
_Aug 11, 2023_
|
|
@@ -21,11 +144,11 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
21
144
|
|
|
22
145
|
- [DataGrid] `getCellAggregationResult`: Handle `null` `rowNode` case (#9915) @romgrk
|
|
23
146
|
|
|
24
|
-
#### `@mui/x-data-grid-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link)
|
|
147
|
+
#### `@mui/x-data-grid-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
25
148
|
|
|
26
149
|
Same changes as in `@mui/x-data-grid@6.11.1`.
|
|
27
150
|
|
|
28
|
-
#### `@mui/x-data-grid-premium@6.11.1` [](https://mui.com/r/x-premium-svg-link)
|
|
151
|
+
#### `@mui/x-data-grid-premium@6.11.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
29
152
|
|
|
30
153
|
Same changes as in `@mui/x-data-grid-pro@6.11.1`.
|
|
31
154
|
|
|
@@ -40,7 +163,7 @@ Same changes as in `@mui/x-data-grid-pro@6.11.1`.
|
|
|
40
163
|
- [l10n] Improve Finnish (fi-FI) locale (#9795) @kurkle
|
|
41
164
|
- [l10n] Improve Icelandic (is-IS) locale (#9639) @magnimarels
|
|
42
165
|
|
|
43
|
-
#### `@mui/x-date-pickers-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link)
|
|
166
|
+
#### `@mui/x-date-pickers-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
44
167
|
|
|
45
168
|
Same changes as in `@mui/x-date-pickers@6.11.1`.
|
|
46
169
|
|
|
@@ -90,11 +213,11 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
90
213
|
- [l10n] Improve Finnish (fi-FI) locale (#9848) @sambbaahh
|
|
91
214
|
- [l10n] Improve Italian (it-IT) locale (#9627) @fabio-rizzello-omnia
|
|
92
215
|
|
|
93
|
-
#### `@mui/x-data-grid-pro@v6.11.0` [](https://mui.com/r/x-pro-svg-link)
|
|
216
|
+
#### `@mui/x-data-grid-pro@v6.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
94
217
|
|
|
95
218
|
Same changes as in `@mui/x-data-grid@v6.11.0`.
|
|
96
219
|
|
|
97
|
-
#### `@mui/x-data-grid-premium@v6.11.0` [](https://mui.com/r/x-premium-svg-link)
|
|
220
|
+
#### `@mui/x-data-grid-premium@v6.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
98
221
|
|
|
99
222
|
Same changes as in `@mui/x-data-grid-pro@v6.11.0`.
|
|
100
223
|
|
|
@@ -113,7 +236,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.11.0`.
|
|
|
113
236
|
- [pickers] Fix offset management on dayjs adapter (#9884) @flaviendelangle
|
|
114
237
|
- [pickers] Use device motion reduction preference (#9823) @LukasTy
|
|
115
238
|
|
|
116
|
-
#### `@mui/x-date-pickers-pro@v6.11.0` [](https://mui.com/r/x-pro-svg-link)
|
|
239
|
+
#### `@mui/x-date-pickers-pro@v6.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
117
240
|
|
|
118
241
|
Same changes as in `@mui/x-date-pickers@v6.11.0`.
|
|
119
242
|
|
|
@@ -176,11 +299,11 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
176
299
|
- [DataGrid] Keep focused cell in the DOM (#7357) @yaredtsy
|
|
177
300
|
- [l10n] Improve Finnish (fi-FI) locale (#9746) @sambbaahh
|
|
178
301
|
|
|
179
|
-
#### `@mui/x-data-grid-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link)
|
|
302
|
+
#### `@mui/x-data-grid-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
180
303
|
|
|
181
304
|
Same changes as in `@mui/x-data-grid@v6.10.2`.
|
|
182
305
|
|
|
183
|
-
#### `@mui/x-data-grid-premium@v6.10.2` [](https://mui.com/r/x-premium-svg-link)
|
|
306
|
+
#### `@mui/x-data-grid-premium@v6.10.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
184
307
|
|
|
185
308
|
Same changes as in `@mui/x-data-grid-pro@v6.10.2`, plus:
|
|
186
309
|
|
|
@@ -192,7 +315,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.10.2`, plus:
|
|
|
192
315
|
|
|
193
316
|
- [pickers] Remove the `endOfDate` from `DigitalClock` timeOptions (#9800) @noraleonte
|
|
194
317
|
|
|
195
|
-
#### `@mui/x-date-pickers-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link)
|
|
318
|
+
#### `@mui/x-date-pickers-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
196
319
|
|
|
197
320
|
Same changes as in `@mui/x-date-pickers@v6.10.2`.
|
|
198
321
|
|
|
@@ -244,14 +367,14 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
244
367
|
- [DataGrid] Update focused cell on page change via keyboard (#9203) @m4theushw
|
|
245
368
|
- [DataGrid] Wait for remote stylesheets to load before print (#9665) @cherniavskii
|
|
246
369
|
|
|
247
|
-
#### `@mui/x-data-grid-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link)
|
|
370
|
+
#### `@mui/x-data-grid-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
248
371
|
|
|
249
372
|
Same changes as in `@mui/x-data-grid@v6.10.1`, plus:
|
|
250
373
|
|
|
251
374
|
- [DataGridPro] Improve tree data performance (#9682) @cherniavskii
|
|
252
375
|
- [DataGridPro] Prevent affecting cells from child DataGrid when resizing a column (#9670) @m4theushw
|
|
253
376
|
|
|
254
|
-
#### `@mui/x-data-grid-premium@v6.10.1` [](https://mui.com/r/x-premium-svg-link)
|
|
377
|
+
#### `@mui/x-data-grid-premium@v6.10.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
255
378
|
|
|
256
379
|
Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
|
|
257
380
|
|
|
@@ -262,7 +385,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
|
|
|
262
385
|
- [fields] Fix `format` and `value` update order (#9715) @LukasTy
|
|
263
386
|
- [pickers] Remove `require` usage in comment (#9675) @LukasTy
|
|
264
387
|
|
|
265
|
-
#### `@mui/x-date-pickers-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link)
|
|
388
|
+
#### `@mui/x-date-pickers-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
266
389
|
|
|
267
390
|
Same changes as in `@mui/x-date-pickers@v6.10.1`.
|
|
268
391
|
|
|
@@ -313,11 +436,11 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
313
436
|
- [DataGrid] Make `rowExpansionChange` event public (#9611) @MBilalShafi
|
|
314
437
|
- [l10n] Improve Polish (pl-PL) locale (#9625) @ch1llysense
|
|
315
438
|
|
|
316
|
-
#### `@mui/x-data-grid-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link)
|
|
439
|
+
#### `@mui/x-data-grid-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
317
440
|
|
|
318
441
|
Same changes as in `@mui/x-data-grid@6.10.0`.
|
|
319
442
|
|
|
320
|
-
#### `@mui/x-data-grid-premium@6.10.0` [](https://mui.com/r/x-premium-svg-link)
|
|
443
|
+
#### `@mui/x-data-grid-premium@6.10.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
321
444
|
|
|
322
445
|
Same changes as in `@mui/x-data-grid-pro@6.10.0`.
|
|
323
446
|
|
|
@@ -328,7 +451,7 @@ Same changes as in `@mui/x-data-grid-pro@6.10.0`.
|
|
|
328
451
|
- [pickers] Fix date calendar issues (#9652) @LukasTy
|
|
329
452
|
- [l10n] Improve Norwegian (nb-NO) locale (#9608) @JosteinBrevik
|
|
330
453
|
|
|
331
|
-
#### `@mui/x-date-pickers-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link)
|
|
454
|
+
#### `@mui/x-date-pickers-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
332
455
|
|
|
333
456
|
Same changes as in `@mui/x-date-pickers@6.10.0`.
|
|
334
457
|
|
|
@@ -381,11 +504,11 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
381
504
|
- [DataGrid] Correctly reflect `TablePagination`'s `rowsPerPageOptions` shape to `pageSizeOptions` (#9438) @burakkgunduzz
|
|
382
505
|
- [l10n] Improve Spanish (es-ES) locale (#9500) @fufex
|
|
383
506
|
|
|
384
|
-
#### `@mui/x-data-grid-pro@6.9.2` [](https://mui.com/r/x-pro-svg-link)
|
|
507
|
+
#### `@mui/x-data-grid-pro@6.9.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
385
508
|
|
|
386
509
|
Same changes as in `@mui/x-data-grid@6.9.2`.
|
|
387
510
|
|
|
388
|
-
#### `@mui/x-data-grid-premium@6.9.2` [](https://mui.com/r/x-premium-svg-link)
|
|
511
|
+
#### `@mui/x-data-grid-premium@6.9.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
389
512
|
|
|
390
513
|
Same changes as in `@mui/x-data-grid-pro@6.9.2`, plus:
|
|
391
514
|
|
|
@@ -398,7 +521,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.2`, plus:
|
|
|
398
521
|
- [pickers] Forward digital clock classes (#9555) @YoonjiJang
|
|
399
522
|
- [pickers] Rename `internal` folder to `internals` on `@mui/x-date-picker-pro` (#9571) @flaviendelangle
|
|
400
523
|
|
|
401
|
-
#### `@mui/x-date-pickers-pro@6.9.2` [](https://mui.com/r/x-pro-svg-link)
|
|
524
|
+
#### `@mui/x-date-pickers-pro@6.9.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
402
525
|
|
|
403
526
|
Same changes as in `@mui/x-date-pickers@6.9.2`.
|
|
404
527
|
|
|
@@ -446,14 +569,14 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
446
569
|
- [DataGrid] Fix `Maximum call stack size exceeded` error when using fractional width (#9516) @cherniavskii
|
|
447
570
|
- [l10n] Improve Romanian (ro-RO) and Hungarian (hu-HU) translations (#9436) @noraleonte
|
|
448
571
|
|
|
449
|
-
#### `@mui/x-data-grid-pro@6.9.1` [](https://mui.com/r/x-pro-svg-link)
|
|
572
|
+
#### `@mui/x-data-grid-pro@6.9.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
450
573
|
|
|
451
574
|
Same changes as in `@mui/x-data-grid@6.9.1`, plus:
|
|
452
575
|
|
|
453
576
|
- [DataGridPro] Don't throw error in column pinning (#9507) @romgrk
|
|
454
577
|
- [DataGridPro] Fix bug with `checkboxSelection` and treeData/grouping (#9418) @romgrk
|
|
455
578
|
|
|
456
|
-
#### `@mui/x-data-grid-premium@6.9.1` [](https://mui.com/r/x-premium-svg-link)
|
|
579
|
+
#### `@mui/x-data-grid-premium@6.9.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
457
580
|
|
|
458
581
|
Same changes as in `@mui/x-data-grid-pro@6.9.1`.
|
|
459
582
|
|
|
@@ -467,7 +590,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.1`.
|
|
|
467
590
|
- [l10n] Add Chinese (Hong Kong) (zh-HK) locale (#9468) @samchiu90
|
|
468
591
|
- [l10n] Improve Romanian (ro-RO) translations (#9436) @noraleonte
|
|
469
592
|
|
|
470
|
-
#### `@mui/x-date-pickers-pro@6.9.1` [](https://mui.com/r/x-pro-svg-link)
|
|
593
|
+
#### `@mui/x-date-pickers-pro@6.9.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
471
594
|
|
|
472
595
|
Same changes as in `@mui/x-date-pickers@6.9.1`.
|
|
473
596
|
|
|
@@ -531,11 +654,11 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
531
654
|
- [DataGrid] Use container dimensions from `getComputedStyle` (#9236) @m4theushw
|
|
532
655
|
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#9404) @julioAz
|
|
533
656
|
|
|
534
|
-
#### `@mui/x-data-grid-pro@6.9.0` [](https://mui.com/r/x-pro-svg-link)
|
|
657
|
+
#### `@mui/x-data-grid-pro@6.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
535
658
|
|
|
536
659
|
Same changes as in `@mui/x-data-grid@6.9.0`.
|
|
537
660
|
|
|
538
|
-
#### `@mui/x-data-grid-premium@6.9.0` [](https://mui.com/r/x-premium-svg-link)
|
|
661
|
+
#### `@mui/x-data-grid-premium@6.9.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
539
662
|
|
|
540
663
|
Same changes as in `@mui/x-data-grid-pro@6.9.0`.
|
|
541
664
|
|
|
@@ -551,7 +674,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.0`.
|
|
|
551
674
|
- [pickers] Reduce date range calendar vertical border width (#9368) @oliviertassinari
|
|
552
675
|
- [pickers] Reset fields internal state when pasting value (#9385) @alexfauquette
|
|
553
676
|
|
|
554
|
-
#### `@mui/x-date-pickers-pro@6.9.0` [](https://mui.com/r/x-pro-svg-link)
|
|
677
|
+
#### `@mui/x-date-pickers-pro@6.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
555
678
|
|
|
556
679
|
Same changes as in `@mui/x-date-pickers@6.9.0`.
|
|
557
680
|
|
|
@@ -607,11 +730,11 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
607
730
|
- [DataGrid] Scroll performance improvements (#9037) @romgrk
|
|
608
731
|
- [l10n] Improve Greek (el-GR) locale (#9292) @clytras
|
|
609
732
|
|
|
610
|
-
#### `@mui/x-data-grid-pro@6.8.0` [](https://mui.com/r/x-pro-svg-link)
|
|
733
|
+
#### `@mui/x-data-grid-pro@6.8.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
611
734
|
|
|
612
735
|
Same changes as in `@mui/x-data-grid@6.8.0`.
|
|
613
736
|
|
|
614
|
-
#### `@mui/x-data-grid-premium@6.8.0` [](https://mui.com/r/x-premium-svg-link)
|
|
737
|
+
#### `@mui/x-data-grid-premium@6.8.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
615
738
|
|
|
616
739
|
Same changes as in `@mui/x-data-grid-pro@6.8.0`.
|
|
617
740
|
|
|
@@ -624,7 +747,7 @@ Same changes as in `@mui/x-data-grid-pro@6.8.0`.
|
|
|
624
747
|
- [pickers] Close the calendar when a shortcut is selected (#9080) @flaviendelangle
|
|
625
748
|
- [pickers] Fix disabling for digital clock (#9300) @alexfauquette
|
|
626
749
|
|
|
627
|
-
#### `@mui/x-date-pickers-pro@6.8.0` [](https://mui.com/r/x-pro-svg-link)
|
|
750
|
+
#### `@mui/x-date-pickers-pro@6.8.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
628
751
|
|
|
629
752
|
Same changes as in `@mui/x-date-pickers@6.8.0`.
|
|
630
753
|
|
|
@@ -700,13 +823,13 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
700
823
|
- [l10n] Improve German (de-DE) locale (#9259) @ximex
|
|
701
824
|
- [l10n] Improve Turkish (tr-TR) locale (#9237) @MCErtan
|
|
702
825
|
|
|
703
|
-
#### `@mui/x-data-grid-pro@6.7.0` [](https://mui.com/r/x-pro-svg-link)
|
|
826
|
+
#### `@mui/x-data-grid-pro@6.7.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
704
827
|
|
|
705
828
|
Same changes as in `@mui/x-data-grid@6.7.0`, plus:
|
|
706
829
|
|
|
707
830
|
- [DataGridPro] Improve header filter menu visuals (#9181) @MBilalShafi
|
|
708
831
|
|
|
709
|
-
#### `@mui/x-data-grid-premium@6.7.0` [](https://mui.com/r/x-premium-svg-link)
|
|
832
|
+
#### `@mui/x-data-grid-premium@6.7.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
710
833
|
|
|
711
834
|
Same changes as in `@mui/x-data-grid-pro@6.7.0`, plus:
|
|
712
835
|
|
|
@@ -720,7 +843,7 @@ Same changes as in `@mui/x-data-grid-pro@6.7.0`, plus:
|
|
|
720
843
|
- [l10n] Improve German (de-DE) locale (#9258) @ximex
|
|
721
844
|
- [pickers] Apply dynamic default format depending on views for all desktop and mobile pickers (#9126) @flaviendelangle
|
|
722
845
|
|
|
723
|
-
#### `@mui/x-date-pickers-pro@6.7.0` [](https://mui.com/r/x-pro-svg-link)
|
|
846
|
+
#### `@mui/x-date-pickers-pro@6.7.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
724
847
|
|
|
725
848
|
Same changes as in `@mui/x-date-pickers@6.7.0`, plus:
|
|
726
849
|
|
|
@@ -2872,7 +2995,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
2872
2995
|
|
|
2873
2996
|
#### Changes
|
|
2874
2997
|
|
|
2875
|
-
- [DateRangePicker] Fix input focused style and mobile
|
|
2998
|
+
- [DateRangePicker] Fix input focused style and mobile behavior (#6645) @LukasTy
|
|
2876
2999
|
- [fields] Update sections when the locale changes (#6649) @flaviendelangle
|
|
2877
3000
|
- [pickers] Add Ukrainian (uk-UA) locale (#6661) @Dufran
|
|
2878
3001
|
- [pickers] Allow non-controlled usage of the calendar components (#6643) @flaviendelangle
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
type AxisHighlight = 'none' | 'line' | 'band';
|
|
2
3
|
export type ChartsAxisHighlightProps = {
|
|
3
|
-
x?:
|
|
4
|
-
y?:
|
|
4
|
+
x?: AxisHighlight;
|
|
5
|
+
y?: AxisHighlight;
|
|
5
6
|
};
|
|
6
7
|
declare function ChartsAxisHighlight(props: ChartsAxisHighlightProps): React.JSX.Element;
|
|
7
8
|
declare namespace ChartsAxisHighlight {
|
|
@@ -33,6 +33,7 @@ function ChartsAxisHighlight(props) {
|
|
|
33
33
|
axis
|
|
34
34
|
} = React.useContext(_InteractionProvider.InteractionContext);
|
|
35
35
|
const getXPosition = (0, _useScale.getValueToPositionMapper)(xScale);
|
|
36
|
+
const getYPosition = (0, _useScale.getValueToPositionMapper)(yScale);
|
|
36
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
37
38
|
children: [xAxisHighlight === 'band' && axis.x !== null && (0, _isBandScale.isBandScale)(xScale) && /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
38
39
|
d: `M ${xScale(axis.x.value) - (xScale.step() - xScale.bandwidth()) / 2} ${yScale.range()[0]} l ${xScale.step()} 0 l 0 ${yScale.range()[1] - yScale.range()[0]} l ${-xScale.step()} 0 Z`,
|
|
@@ -41,15 +42,22 @@ function ChartsAxisHighlight(props) {
|
|
|
41
42
|
style: {
|
|
42
43
|
pointerEvents: 'none'
|
|
43
44
|
}
|
|
45
|
+
}), yAxisHighlight === 'band' && axis.y !== null && (0, _isBandScale.isBandScale)(yScale) && /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
46
|
+
d: `M ${xScale.range()[0]} ${yScale(axis.y.value) - (yScale.step() - yScale.bandwidth()) / 2} l 0 ${yScale.step()} l ${xScale.range()[1] - xScale.range()[0]} 0 l 0 ${-yScale.step()} Z`,
|
|
47
|
+
fill: "gray",
|
|
48
|
+
fillOpacity: 0.1,
|
|
49
|
+
style: {
|
|
50
|
+
pointerEvents: 'none'
|
|
51
|
+
}
|
|
44
52
|
}), xAxisHighlight === 'line' && axis.x !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
45
|
-
d: `M ${getXPosition(axis.x.value)} ${yScale
|
|
53
|
+
d: `M ${getXPosition(axis.x.value)} ${yScale.range()[0]} L ${getXPosition(axis.x.value)} ${yScale.range()[1]}`,
|
|
46
54
|
stroke: "black",
|
|
47
55
|
strokeDasharray: "5 2",
|
|
48
56
|
style: {
|
|
49
57
|
pointerEvents: 'none'
|
|
50
58
|
}
|
|
51
59
|
}), yAxisHighlight === 'line' && axis.y !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
52
|
-
d: `M ${xScale.range()[0]} ${
|
|
60
|
+
d: `M ${xScale.range()[0]} ${getYPosition(axis.y.value)} L ${xScale.range()[1]} ${getYPosition(axis.y.value)}`,
|
|
53
61
|
stroke: "black",
|
|
54
62
|
strokeDasharray: "5 2",
|
|
55
63
|
style: {
|
|
@@ -64,5 +72,5 @@ process.env.NODE_ENV !== "production" ? ChartsAxisHighlight.propTypes = {
|
|
|
64
72
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
65
73
|
// ----------------------------------------------------------------------
|
|
66
74
|
x: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
67
|
-
y: _propTypes.default.oneOf(['line', 'none'])
|
|
75
|
+
y: _propTypes.default.oneOf(['band', 'line', 'none'])
|
|
68
76
|
} : void 0;
|