@mui/x-charts 7.23.0 → 7.23.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.
- package/CHANGELOG.md +147 -0
- package/ChartsGrid/ChartsHorizontalGrid.js +2 -2
- package/ChartsGrid/ChartsVerticalGrid.js +2 -2
- package/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/PieChart/PieArc.js +11 -5
- package/PieChart/PieArcPlot.js +9 -13
- package/ScatterChart/extremums.js +1 -3
- package/ScatterChart/formatter.js +2 -2
- package/index.js +1 -1
- package/modern/ChartsGrid/ChartsHorizontalGrid.js +2 -2
- package/modern/ChartsGrid/ChartsVerticalGrid.js +2 -2
- package/modern/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/modern/PieChart/PieArc.js +11 -5
- package/modern/PieChart/PieArcPlot.js +9 -13
- package/modern/ScatterChart/extremums.js +1 -3
- package/modern/ScatterChart/formatter.js +2 -2
- package/modern/index.js +1 -1
- package/node/ChartsGrid/ChartsHorizontalGrid.js +2 -2
- package/node/ChartsGrid/ChartsVerticalGrid.js +2 -2
- package/node/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/node/PieChart/PieArc.js +11 -5
- package/node/PieChart/PieArcPlot.js +9 -13
- package/node/ScatterChart/extremums.js +1 -3
- package/node/ScatterChart/formatter.js +2 -2
- package/node/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,153 @@
|
|
|
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
|
+
## 7.23.2
|
|
7
|
+
|
|
8
|
+
_Dec 12, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Improve Romanian and Turkish locales on the Data Grid
|
|
13
|
+
- 🌍 Improve Romanian locale on the Pickers
|
|
14
|
+
- 📚 Documentation improvements
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
18
|
+
@ihsanberkozcan, @k-rajat19, @lhilgert9, @nusr, @rares985.
|
|
19
|
+
|
|
20
|
+
Following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### `@mui/x-data-grid@7.23.2`
|
|
28
|
+
|
|
29
|
+
- [DataGrid] Fix "No rows" displaying when all rows are pinned (#15851) @nusr
|
|
30
|
+
- [DataGrid] Use `columnsManagement` slot (#15821) @k-rajat19
|
|
31
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
|
|
32
|
+
- [l10n] Improve Turkish (tr-TR) locale (#15748) @ihsanberkozcan
|
|
33
|
+
|
|
34
|
+
#### `@mui/x-data-grid-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
35
|
+
|
|
36
|
+
Same changes as in `@mui/x-data-grid@7.23.2`, plus:
|
|
37
|
+
|
|
38
|
+
- [DataGridPro] Make Row reordering work with pagination (#15782) @k-rajat19
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-premium@7.23.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.2`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPremium] Fix group column ignoring `valueOptions` for `singleSelect` column type (#15754) @arminmeh
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@7.23.2`
|
|
49
|
+
|
|
50
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-date-pickers@7.23.2`.
|
|
55
|
+
|
|
56
|
+
### Charts
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-charts@7.23.2`
|
|
59
|
+
|
|
60
|
+
- [charts] Fix key generation for the ChartsGrid (#15864) @alexfauquette
|
|
61
|
+
- [charts] Fix scatter dataset with missing data (#15804) @alexfauquette
|
|
62
|
+
|
|
63
|
+
#### `@mui/x-charts-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
64
|
+
|
|
65
|
+
Same changes as in `@mui/x-charts@7.23.2`.
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-tree-view@v7.23.2`
|
|
68
|
+
|
|
69
|
+
No changes, releasing to keep the versions in sync.
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-tree-view-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
72
|
+
|
|
73
|
+
Releasing to benefit from license package fix (#15818).
|
|
74
|
+
|
|
75
|
+
### Docs
|
|
76
|
+
|
|
77
|
+
- [docs] Fix typo in charts axis documentation (#15746) @JCQuintas
|
|
78
|
+
- [docs] Improve Pickers accessible DOM structure description (#15752) @LukasTy
|
|
79
|
+
- [docs] Use `updateRows` method for list view demos (#15824) @KenanYusuf
|
|
80
|
+
- [docs] Use date library version from package dev dependencies for sandboxes (#15767) @LukasTy
|
|
81
|
+
|
|
82
|
+
### Core
|
|
83
|
+
|
|
84
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
|
|
85
|
+
- [license] Use `console.log` for the error message on Codesandbox to avoid rendering error (#15818) @arminmeh
|
|
86
|
+
|
|
87
|
+
## 7.23.1
|
|
88
|
+
|
|
89
|
+
_Dec 5, 2024_
|
|
90
|
+
|
|
91
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
92
|
+
|
|
93
|
+
- 🌍 Improve German locale on the Data Grid component
|
|
94
|
+
- 🐞 Bugfixes
|
|
95
|
+
|
|
96
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
97
|
+
@lhilgert9.
|
|
98
|
+
|
|
99
|
+
Following are all team members who have contributed to this release:
|
|
100
|
+
@arthurbalduini, @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy and @MBilalShafi.
|
|
101
|
+
|
|
102
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
103
|
+
|
|
104
|
+
### Data Grid
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-data-grid@7.23.1`
|
|
107
|
+
|
|
108
|
+
- [DataGrid] Make column autosizing work with flex columns (#15712) @cherniavskii
|
|
109
|
+
- [l10n] Improve German (de-DE) locale (#15641) @lhilgert9
|
|
110
|
+
|
|
111
|
+
#### `@mui/x-data-grid-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
112
|
+
|
|
113
|
+
Same changes as in `@mui/x-data-grid@7.23.1`, plus:
|
|
114
|
+
|
|
115
|
+
- [DataGridPro] Cleanup pinned rows on removal (#15702) @cherniavskii
|
|
116
|
+
|
|
117
|
+
#### `@mui/x-data-grid-premium@7.23.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
118
|
+
|
|
119
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.1`.
|
|
120
|
+
|
|
121
|
+
### Date and Time Pickers
|
|
122
|
+
|
|
123
|
+
#### `@mui/x-date-pickers@7.23.1`
|
|
124
|
+
|
|
125
|
+
- [TimePicker] Prevent mouse events after `touchend` event (#15430) @arthurbalduini
|
|
126
|
+
|
|
127
|
+
#### `@mui/x-date-pickers-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
128
|
+
|
|
129
|
+
Same changes as in `@mui/x-date-pickers@7.23.1`.
|
|
130
|
+
|
|
131
|
+
### Charts
|
|
132
|
+
|
|
133
|
+
#### `@mui/x-charts@7.23.1`
|
|
134
|
+
|
|
135
|
+
- [charts] Improve SVG `pattern` and `gradient` support (#15724) @JCQuintas
|
|
136
|
+
|
|
137
|
+
#### `@mui/x-charts-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
138
|
+
|
|
139
|
+
Same changes as in `@mui/x-charts@7.23.1`.
|
|
140
|
+
|
|
141
|
+
### Docs
|
|
142
|
+
|
|
143
|
+
- [docs] Fix Pickers theme augmentation example (#15675) @LukasTy
|
|
144
|
+
- [docs] Remove duplicated warning (#15715) @cherniavskii
|
|
145
|
+
- [test] Force hover in headless Chrome (#15711) @cherniavskii
|
|
146
|
+
- [docs-infra] Bump `@mui/internal-markdown` to support nested demo imports (#15738) @alexfauquette
|
|
147
|
+
- [docs] Improve SEO titles for the Data Grid (#15695) @MBilalShafi
|
|
148
|
+
|
|
149
|
+
### Core
|
|
150
|
+
|
|
151
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
|
|
152
|
+
|
|
6
153
|
## 7.23.0
|
|
7
154
|
|
|
8
155
|
_Nov 29, 2024_
|
|
@@ -23,7 +23,7 @@ export function ChartsGridHorizontal(props) {
|
|
|
23
23
|
});
|
|
24
24
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
25
25
|
children: yTicks.map(({
|
|
26
|
-
|
|
26
|
+
value,
|
|
27
27
|
offset
|
|
28
28
|
}) => /*#__PURE__*/_jsx(GridLine, {
|
|
29
29
|
y1: offset,
|
|
@@ -31,6 +31,6 @@ export function ChartsGridHorizontal(props) {
|
|
|
31
31
|
x1: drawingArea.left,
|
|
32
32
|
x2: drawingArea.left + drawingArea.width,
|
|
33
33
|
className: classes.horizontalLine
|
|
34
|
-
}, `horizontal-${
|
|
34
|
+
}, `horizontal-${value}`))
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -23,7 +23,7 @@ export function ChartsGridVertical(props) {
|
|
|
23
23
|
});
|
|
24
24
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
25
25
|
children: xTicks.map(({
|
|
26
|
-
|
|
26
|
+
value,
|
|
27
27
|
offset
|
|
28
28
|
}) => /*#__PURE__*/_jsx(GridLine, {
|
|
29
29
|
y1: drawingArea.top,
|
|
@@ -31,6 +31,6 @@ export function ChartsGridVertical(props) {
|
|
|
31
31
|
x1: offset,
|
|
32
32
|
x2: offset,
|
|
33
33
|
className: classes.verticalLine
|
|
34
|
-
}, `vertical-${
|
|
34
|
+
}, `vertical-${value}`))
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -96,7 +96,7 @@ export const ChartsTooltipMark = styled('div', {
|
|
|
96
96
|
height: theme.spacing(1),
|
|
97
97
|
borderRadius: '50%',
|
|
98
98
|
boxShadow: theme.shadows[1],
|
|
99
|
-
|
|
99
|
+
background: color,
|
|
100
100
|
borderColor: (theme.vars || theme).palette.background.paper,
|
|
101
101
|
border: `solid ${(theme.vars || theme).palette.background.paper} ${theme.spacing(0.25)}`,
|
|
102
102
|
boxSizing: 'content-box'
|
package/PieChart/PieArc.js
CHANGED
|
@@ -22,10 +22,11 @@ const useUtilityClasses = ownerState => {
|
|
|
22
22
|
classes,
|
|
23
23
|
id,
|
|
24
24
|
isFaded,
|
|
25
|
-
isHighlighted
|
|
25
|
+
isHighlighted,
|
|
26
|
+
dataIndex
|
|
26
27
|
} = ownerState;
|
|
27
28
|
const slots = {
|
|
28
|
-
root: ['root', `series-${id}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
29
|
+
root: ['root', `series-${id}`, `data-index-${dataIndex}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
29
30
|
};
|
|
30
31
|
return composeClasses(slots, getPieArcUtilityClass, classes);
|
|
31
32
|
};
|
|
@@ -36,9 +37,9 @@ const PieArcRoot = styled(animated.path, {
|
|
|
36
37
|
})(({
|
|
37
38
|
theme
|
|
38
39
|
}) => ({
|
|
40
|
+
// Got to move stroke to an element prop instead of style.
|
|
39
41
|
stroke: (theme.vars || theme).palette.background.paper,
|
|
40
|
-
|
|
41
|
-
strokeLinejoin: 'round'
|
|
42
|
+
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, filter 0.2s ease-in'
|
|
42
43
|
}));
|
|
43
44
|
function PieArc(props) {
|
|
44
45
|
const {
|
|
@@ -79,7 +80,12 @@ function PieArc(props) {
|
|
|
79
80
|
onClick: onClick,
|
|
80
81
|
cursor: onClick ? 'pointer' : 'unset',
|
|
81
82
|
ownerState: ownerState,
|
|
82
|
-
className: classes.root
|
|
83
|
+
className: classes.root,
|
|
84
|
+
fill: ownerState.color,
|
|
85
|
+
opacity: ownerState.isFaded ? 0.3 : 1,
|
|
86
|
+
filter: ownerState.isHighlighted ? 'brightness(120%)' : 'none',
|
|
87
|
+
strokeWidth: 1,
|
|
88
|
+
strokeLinejoin: "round"
|
|
83
89
|
}, other, getInteractionItemProps({
|
|
84
90
|
type: 'pie',
|
|
85
91
|
seriesId: id,
|
package/PieChart/PieArcPlot.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"]
|
|
6
|
-
_excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "arcLabelRadius", "outerRadius", "cornerRadius"];
|
|
5
|
+
const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"];
|
|
7
6
|
import * as React from 'react';
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
9
8
|
import { useTransition } from '@react-spring/web';
|
|
@@ -51,16 +50,14 @@ function PieArcPlot(props) {
|
|
|
51
50
|
}
|
|
52
51
|
const Arc = slots?.pieArc ?? PieArc;
|
|
53
52
|
return /*#__PURE__*/_jsx("g", _extends({}, other, {
|
|
54
|
-
children: transition((
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} = _ref,
|
|
63
|
-
style = _objectWithoutPropertiesLoose(_ref, _excluded2);
|
|
53
|
+
children: transition(({
|
|
54
|
+
startAngle,
|
|
55
|
+
endAngle,
|
|
56
|
+
paddingAngle: pA,
|
|
57
|
+
innerRadius: iR,
|
|
58
|
+
outerRadius: oR,
|
|
59
|
+
cornerRadius: cR
|
|
60
|
+
}, item, _, index) => {
|
|
64
61
|
return /*#__PURE__*/_jsx(Arc, _extends({
|
|
65
62
|
startAngle: startAngle,
|
|
66
63
|
endAngle: endAngle,
|
|
@@ -68,7 +65,6 @@ function PieArcPlot(props) {
|
|
|
68
65
|
innerRadius: iR,
|
|
69
66
|
outerRadius: oR,
|
|
70
67
|
cornerRadius: cR,
|
|
71
|
-
style: style,
|
|
72
68
|
id: id,
|
|
73
69
|
color: item.color,
|
|
74
70
|
dataIndex: index,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
const mergeMinMax = (acc, val) =>
|
|
2
|
-
return [Math.min(acc[0], val[0]), Math.max(acc[1], val[1])];
|
|
3
|
-
};
|
|
1
|
+
const mergeMinMax = (acc, val) => [val[0] === null ? acc[0] : Math.min(acc[0], val[0]), val[1] === null ? acc[1] : Math.max(acc[1], val[1])];
|
|
4
2
|
export const getExtremumX = params => {
|
|
5
3
|
const {
|
|
6
4
|
series,
|
|
@@ -11,8 +11,8 @@ const formatter = ({
|
|
|
11
11
|
}
|
|
12
12
|
const data = !datasetKeys ? seriesData.data ?? [] : dataset?.map(d => {
|
|
13
13
|
return {
|
|
14
|
-
x: d[datasetKeys.x],
|
|
15
|
-
y: d[datasetKeys.y],
|
|
14
|
+
x: d[datasetKeys.x] ?? null,
|
|
15
|
+
y: d[datasetKeys.y] ?? null,
|
|
16
16
|
z: datasetKeys.z && d[datasetKeys.z],
|
|
17
17
|
id: d[datasetKeys.id]
|
|
18
18
|
};
|
package/index.js
CHANGED
|
@@ -23,7 +23,7 @@ export function ChartsGridHorizontal(props) {
|
|
|
23
23
|
});
|
|
24
24
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
25
25
|
children: yTicks.map(({
|
|
26
|
-
|
|
26
|
+
value,
|
|
27
27
|
offset
|
|
28
28
|
}) => /*#__PURE__*/_jsx(GridLine, {
|
|
29
29
|
y1: offset,
|
|
@@ -31,6 +31,6 @@ export function ChartsGridHorizontal(props) {
|
|
|
31
31
|
x1: drawingArea.left,
|
|
32
32
|
x2: drawingArea.left + drawingArea.width,
|
|
33
33
|
className: classes.horizontalLine
|
|
34
|
-
}, `horizontal-${
|
|
34
|
+
}, `horizontal-${value}`))
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -23,7 +23,7 @@ export function ChartsGridVertical(props) {
|
|
|
23
23
|
});
|
|
24
24
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
25
25
|
children: xTicks.map(({
|
|
26
|
-
|
|
26
|
+
value,
|
|
27
27
|
offset
|
|
28
28
|
}) => /*#__PURE__*/_jsx(GridLine, {
|
|
29
29
|
y1: drawingArea.top,
|
|
@@ -31,6 +31,6 @@ export function ChartsGridVertical(props) {
|
|
|
31
31
|
x1: offset,
|
|
32
32
|
x2: offset,
|
|
33
33
|
className: classes.verticalLine
|
|
34
|
-
}, `vertical-${
|
|
34
|
+
}, `vertical-${value}`))
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -96,7 +96,7 @@ export const ChartsTooltipMark = styled('div', {
|
|
|
96
96
|
height: theme.spacing(1),
|
|
97
97
|
borderRadius: '50%',
|
|
98
98
|
boxShadow: theme.shadows[1],
|
|
99
|
-
|
|
99
|
+
background: color,
|
|
100
100
|
borderColor: (theme.vars || theme).palette.background.paper,
|
|
101
101
|
border: `solid ${(theme.vars || theme).palette.background.paper} ${theme.spacing(0.25)}`,
|
|
102
102
|
boxSizing: 'content-box'
|
|
@@ -22,10 +22,11 @@ const useUtilityClasses = ownerState => {
|
|
|
22
22
|
classes,
|
|
23
23
|
id,
|
|
24
24
|
isFaded,
|
|
25
|
-
isHighlighted
|
|
25
|
+
isHighlighted,
|
|
26
|
+
dataIndex
|
|
26
27
|
} = ownerState;
|
|
27
28
|
const slots = {
|
|
28
|
-
root: ['root', `series-${id}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
29
|
+
root: ['root', `series-${id}`, `data-index-${dataIndex}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
29
30
|
};
|
|
30
31
|
return composeClasses(slots, getPieArcUtilityClass, classes);
|
|
31
32
|
};
|
|
@@ -36,9 +37,9 @@ const PieArcRoot = styled(animated.path, {
|
|
|
36
37
|
})(({
|
|
37
38
|
theme
|
|
38
39
|
}) => ({
|
|
40
|
+
// Got to move stroke to an element prop instead of style.
|
|
39
41
|
stroke: (theme.vars || theme).palette.background.paper,
|
|
40
|
-
|
|
41
|
-
strokeLinejoin: 'round'
|
|
42
|
+
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, filter 0.2s ease-in'
|
|
42
43
|
}));
|
|
43
44
|
function PieArc(props) {
|
|
44
45
|
const {
|
|
@@ -79,7 +80,12 @@ function PieArc(props) {
|
|
|
79
80
|
onClick: onClick,
|
|
80
81
|
cursor: onClick ? 'pointer' : 'unset',
|
|
81
82
|
ownerState: ownerState,
|
|
82
|
-
className: classes.root
|
|
83
|
+
className: classes.root,
|
|
84
|
+
fill: ownerState.color,
|
|
85
|
+
opacity: ownerState.isFaded ? 0.3 : 1,
|
|
86
|
+
filter: ownerState.isHighlighted ? 'brightness(120%)' : 'none',
|
|
87
|
+
strokeWidth: 1,
|
|
88
|
+
strokeLinejoin: "round"
|
|
83
89
|
}, other, getInteractionItemProps({
|
|
84
90
|
type: 'pie',
|
|
85
91
|
seriesId: id,
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"]
|
|
6
|
-
_excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "arcLabelRadius", "outerRadius", "cornerRadius"];
|
|
5
|
+
const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"];
|
|
7
6
|
import * as React from 'react';
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
9
8
|
import { useTransition } from '@react-spring/web';
|
|
@@ -51,16 +50,14 @@ function PieArcPlot(props) {
|
|
|
51
50
|
}
|
|
52
51
|
const Arc = slots?.pieArc ?? PieArc;
|
|
53
52
|
return /*#__PURE__*/_jsx("g", _extends({}, other, {
|
|
54
|
-
children: transition((
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} = _ref,
|
|
63
|
-
style = _objectWithoutPropertiesLoose(_ref, _excluded2);
|
|
53
|
+
children: transition(({
|
|
54
|
+
startAngle,
|
|
55
|
+
endAngle,
|
|
56
|
+
paddingAngle: pA,
|
|
57
|
+
innerRadius: iR,
|
|
58
|
+
outerRadius: oR,
|
|
59
|
+
cornerRadius: cR
|
|
60
|
+
}, item, _, index) => {
|
|
64
61
|
return /*#__PURE__*/_jsx(Arc, _extends({
|
|
65
62
|
startAngle: startAngle,
|
|
66
63
|
endAngle: endAngle,
|
|
@@ -68,7 +65,6 @@ function PieArcPlot(props) {
|
|
|
68
65
|
innerRadius: iR,
|
|
69
66
|
outerRadius: oR,
|
|
70
67
|
cornerRadius: cR,
|
|
71
|
-
style: style,
|
|
72
68
|
id: id,
|
|
73
69
|
color: item.color,
|
|
74
70
|
dataIndex: index,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
const mergeMinMax = (acc, val) =>
|
|
2
|
-
return [Math.min(acc[0], val[0]), Math.max(acc[1], val[1])];
|
|
3
|
-
};
|
|
1
|
+
const mergeMinMax = (acc, val) => [val[0] === null ? acc[0] : Math.min(acc[0], val[0]), val[1] === null ? acc[1] : Math.max(acc[1], val[1])];
|
|
4
2
|
export const getExtremumX = params => {
|
|
5
3
|
const {
|
|
6
4
|
series,
|
|
@@ -11,8 +11,8 @@ const formatter = ({
|
|
|
11
11
|
}
|
|
12
12
|
const data = !datasetKeys ? seriesData.data ?? [] : dataset?.map(d => {
|
|
13
13
|
return {
|
|
14
|
-
x: d[datasetKeys.x],
|
|
15
|
-
y: d[datasetKeys.y],
|
|
14
|
+
x: d[datasetKeys.x] ?? null,
|
|
15
|
+
y: d[datasetKeys.y] ?? null,
|
|
16
16
|
z: datasetKeys.z && d[datasetKeys.z],
|
|
17
17
|
id: d[datasetKeys.id]
|
|
18
18
|
};
|
package/modern/index.js
CHANGED
|
@@ -30,7 +30,7 @@ function ChartsGridHorizontal(props) {
|
|
|
30
30
|
});
|
|
31
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
32
32
|
children: yTicks.map(({
|
|
33
|
-
|
|
33
|
+
value,
|
|
34
34
|
offset
|
|
35
35
|
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledCommonents.GridLine, {
|
|
36
36
|
y1: offset,
|
|
@@ -38,6 +38,6 @@ function ChartsGridHorizontal(props) {
|
|
|
38
38
|
x1: drawingArea.left,
|
|
39
39
|
x2: drawingArea.left + drawingArea.width,
|
|
40
40
|
className: classes.horizontalLine
|
|
41
|
-
}, `horizontal-${
|
|
41
|
+
}, `horizontal-${value}`))
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -30,7 +30,7 @@ function ChartsGridVertical(props) {
|
|
|
30
30
|
});
|
|
31
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
32
32
|
children: xTicks.map(({
|
|
33
|
-
|
|
33
|
+
value,
|
|
34
34
|
offset
|
|
35
35
|
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledCommonents.GridLine, {
|
|
36
36
|
y1: drawingArea.top,
|
|
@@ -38,6 +38,6 @@ function ChartsGridVertical(props) {
|
|
|
38
38
|
x1: offset,
|
|
39
39
|
x2: offset,
|
|
40
40
|
className: classes.verticalLine
|
|
41
|
-
}, `vertical-${
|
|
41
|
+
}, `vertical-${value}`))
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -101,7 +101,7 @@ const ChartsTooltipMark = exports.ChartsTooltipMark = (0, _styles.styled)('div',
|
|
|
101
101
|
height: theme.spacing(1),
|
|
102
102
|
borderRadius: '50%',
|
|
103
103
|
boxShadow: theme.shadows[1],
|
|
104
|
-
|
|
104
|
+
background: color,
|
|
105
105
|
borderColor: (theme.vars || theme).palette.background.paper,
|
|
106
106
|
border: `solid ${(theme.vars || theme).palette.background.paper} ${theme.spacing(0.25)}`,
|
|
107
107
|
boxSizing: 'content-box'
|
package/node/PieChart/PieArc.js
CHANGED
|
@@ -31,10 +31,11 @@ const useUtilityClasses = ownerState => {
|
|
|
31
31
|
classes,
|
|
32
32
|
id,
|
|
33
33
|
isFaded,
|
|
34
|
-
isHighlighted
|
|
34
|
+
isHighlighted,
|
|
35
|
+
dataIndex
|
|
35
36
|
} = ownerState;
|
|
36
37
|
const slots = {
|
|
37
|
-
root: ['root', `series-${id}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
38
|
+
root: ['root', `series-${id}`, `data-index-${dataIndex}`, isHighlighted && 'highlighted', isFaded && 'faded']
|
|
38
39
|
};
|
|
39
40
|
return (0, _composeClasses.default)(slots, getPieArcUtilityClass, classes);
|
|
40
41
|
};
|
|
@@ -45,9 +46,9 @@ const PieArcRoot = (0, _styles.styled)(_web.animated.path, {
|
|
|
45
46
|
})(({
|
|
46
47
|
theme
|
|
47
48
|
}) => ({
|
|
49
|
+
// Got to move stroke to an element prop instead of style.
|
|
48
50
|
stroke: (theme.vars || theme).palette.background.paper,
|
|
49
|
-
|
|
50
|
-
strokeLinejoin: 'round'
|
|
51
|
+
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, filter 0.2s ease-in'
|
|
51
52
|
}));
|
|
52
53
|
function PieArc(props) {
|
|
53
54
|
const {
|
|
@@ -88,7 +89,12 @@ function PieArc(props) {
|
|
|
88
89
|
onClick: onClick,
|
|
89
90
|
cursor: onClick ? 'pointer' : 'unset',
|
|
90
91
|
ownerState: ownerState,
|
|
91
|
-
className: classes.root
|
|
92
|
+
className: classes.root,
|
|
93
|
+
fill: ownerState.color,
|
|
94
|
+
opacity: ownerState.isFaded ? 0.3 : 1,
|
|
95
|
+
filter: ownerState.isHighlighted ? 'brightness(120%)' : 'none',
|
|
96
|
+
strokeWidth: 1,
|
|
97
|
+
strokeLinejoin: "round"
|
|
92
98
|
}, other, getInteractionItemProps({
|
|
93
99
|
type: 'pie',
|
|
94
100
|
seriesId: id,
|
|
@@ -17,8 +17,7 @@ var _transition = require("./dataTransform/transition");
|
|
|
17
17
|
var _useTransformData = require("./dataTransform/useTransformData");
|
|
18
18
|
var _context = require("../context");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"]
|
|
21
|
-
_excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "arcLabelRadius", "outerRadius", "cornerRadius"];
|
|
20
|
+
const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"];
|
|
22
21
|
function PieArcPlot(props) {
|
|
23
22
|
const {
|
|
24
23
|
slots,
|
|
@@ -58,16 +57,14 @@ function PieArcPlot(props) {
|
|
|
58
57
|
}
|
|
59
58
|
const Arc = slots?.pieArc ?? _PieArc.PieArc;
|
|
60
59
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", (0, _extends2.default)({}, other, {
|
|
61
|
-
children: transition((
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} = _ref,
|
|
70
|
-
style = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded2);
|
|
60
|
+
children: transition(({
|
|
61
|
+
startAngle,
|
|
62
|
+
endAngle,
|
|
63
|
+
paddingAngle: pA,
|
|
64
|
+
innerRadius: iR,
|
|
65
|
+
outerRadius: oR,
|
|
66
|
+
cornerRadius: cR
|
|
67
|
+
}, item, _, index) => {
|
|
71
68
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Arc, (0, _extends2.default)({
|
|
72
69
|
startAngle: startAngle,
|
|
73
70
|
endAngle: endAngle,
|
|
@@ -75,7 +72,6 @@ function PieArcPlot(props) {
|
|
|
75
72
|
innerRadius: iR,
|
|
76
73
|
outerRadius: oR,
|
|
77
74
|
cornerRadius: cR,
|
|
78
|
-
style: style,
|
|
79
75
|
id: id,
|
|
80
76
|
color: item.color,
|
|
81
77
|
dataIndex: index,
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getExtremumY = exports.getExtremumX = void 0;
|
|
7
|
-
const mergeMinMax = (acc, val) =>
|
|
8
|
-
return [Math.min(acc[0], val[0]), Math.max(acc[1], val[1])];
|
|
9
|
-
};
|
|
7
|
+
const mergeMinMax = (acc, val) => [val[0] === null ? acc[0] : Math.min(acc[0], val[0]), val[1] === null ? acc[1] : Math.max(acc[1], val[1])];
|
|
10
8
|
const getExtremumX = params => {
|
|
11
9
|
const {
|
|
12
10
|
series,
|
|
@@ -18,8 +18,8 @@ const formatter = ({
|
|
|
18
18
|
}
|
|
19
19
|
const data = !datasetKeys ? seriesData.data ?? [] : dataset?.map(d => {
|
|
20
20
|
return {
|
|
21
|
-
x: d[datasetKeys.x],
|
|
22
|
-
y: d[datasetKeys.y],
|
|
21
|
+
x: d[datasetKeys.x] ?? null,
|
|
22
|
+
y: d[datasetKeys.y] ?? null,
|
|
23
23
|
z: datasetKeys.z && d[datasetKeys.z],
|
|
24
24
|
id: d[datasetKeys.id]
|
|
25
25
|
};
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "7.23.
|
|
3
|
+
"version": "7.23.2",
|
|
4
4
|
"description": "The community edition of the Charts components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@react-spring/web": "^9.7.5",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"prop-types": "^15.8.1",
|
|
38
|
-
"@mui/x-
|
|
39
|
-
"@mui/x-
|
|
38
|
+
"@mui/x-charts-vendor": "7.20.0",
|
|
39
|
+
"@mui/x-internals": "7.23.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.9.0",
|