@mui/x-charts 7.0.0-beta.6 → 7.0.0-beta.7
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 +117 -1
- package/ChartsLegend/ChartsLegend.d.ts +3 -0
- package/ChartsLegend/ChartsLegend.js +3 -0
- package/ChartsLegend/DefaultChartsLegend.js +3 -0
- package/ChartsTooltip/ChartsTooltip.d.ts +12 -0
- package/esm/ChartsLegend/ChartsLegend.js +3 -0
- package/esm/ChartsLegend/DefaultChartsLegend.js +3 -0
- package/esm/hooks/useAxisEvents.js +9 -1
- package/hooks/useAxisEvents.js +9 -1
- package/index.js +1 -1
- package/models/axis.d.ts +16 -0
- package/modern/ChartsLegend/ChartsLegend.js +3 -0
- package/modern/ChartsLegend/DefaultChartsLegend.js +3 -0
- package/modern/hooks/useAxisEvents.js +9 -1
- package/modern/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,102 @@
|
|
|
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.0.0-beta.7
|
|
7
|
+
|
|
8
|
+
_Mar 14, 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
|
+
- 🦥 The Lazy loading feature is now stable and the `lazyLoading` feature flag was removed from the `experimentalFeatures` prop.
|
|
13
|
+
- 🌍 Improve Japanese (ja-JP) locale for the Data Grid
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
### Data Grid
|
|
18
|
+
|
|
19
|
+
#### Breaking changes
|
|
20
|
+
|
|
21
|
+
- The `columnHeader--showColumnBorder` class was replaced by `columnHeader--withLeftBorder` and `columnHeader--withRightBorder`.
|
|
22
|
+
- The `columnHeadersInner`, `columnHeadersInner--scrollable`, and `columnHeaderDropZone` classes were removed since the inner wrapper was removed in our effort to simplify the DOM structure and improve accessibility.
|
|
23
|
+
- The `pinnedColumnHeaders`, `pinnedColumnHeaders--left`, and `pinnedColumnHeaders--right` classes were removed along with the element they were applied to.
|
|
24
|
+
The pinned column headers now use `position: 'sticky'` and are rendered in the same row element as the regular column headers.
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid@7.0.0-beta.7`
|
|
27
|
+
|
|
28
|
+
- [DataGrid] Fix focus visible style on scrollbar (#12402) @oliviertassinari
|
|
29
|
+
- [DataGrid] Fix the issue where pressing the Delete key resets various cell values to an empty string. (#12216) @sooster910
|
|
30
|
+
- [DataGrid] Make `rowCount` part of the state (#12381) @MBilalShafi
|
|
31
|
+
- [DataGrid] Make column resizing and autosizing available in Community plan (#12420) @cherniavskii
|
|
32
|
+
- [DataGrid] Remove `baseSwitch` slot (#12439) @romgrk
|
|
33
|
+
- [l10n] Improve Japanese (ja-JP) locale (#12398) @makoto14
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-pro@7.0.0-beta.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid@7.0.0-beta.7`, plus:
|
|
38
|
+
|
|
39
|
+
- [DataGridPro] Add `inputRef` to the props passed to `colDef.renderHeaderFilter` (#12328) @vovarudomanenko
|
|
40
|
+
- [DataGridPro] Fix filler rendered for no reason when there are pinned columns (#12440) @cherniavskii
|
|
41
|
+
- [DataGridPro] Make lazy loading feature stable (#12421) @cherniavskii
|
|
42
|
+
- [DataGridPro] Render pinned and non-pinned column headers in one row (#12376) @cherniavskii
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-data-grid-premium@7.0.0-beta.7` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
45
|
+
|
|
46
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.7`, plus:
|
|
47
|
+
|
|
48
|
+
- [DataGridPremium] Fix auto-scroll not working when selecting cell range (#12267) @cherniavskii
|
|
49
|
+
|
|
50
|
+
### Date and Time Pickers
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers@7.0.0-beta.7`
|
|
53
|
+
|
|
54
|
+
- [fields] Fix `tabIndex` on accessible field DOM structure (#12311) @flaviendelangle
|
|
55
|
+
- [fields] Fix items alignment on multi input range fields (#12312) @flaviendelangle
|
|
56
|
+
- [pickers] Improve the customization of the range picker calendar header (#11988) @flaviendelangle
|
|
57
|
+
- [pickers] Keep the existing time when looking for closest enabled date (#12377) @LukasTy
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-date-pickers-pro@7.0.0-beta.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
60
|
+
|
|
61
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-beta.7`.
|
|
62
|
+
|
|
63
|
+
### Charts
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-charts@7.0.0-beta.7`
|
|
66
|
+
|
|
67
|
+
- [charts] Fix axis highlight when axis is reversed (#12407) @alexfauquette
|
|
68
|
+
|
|
69
|
+
### Tree View
|
|
70
|
+
|
|
71
|
+
#### Breaking changes
|
|
72
|
+
|
|
73
|
+
The `onNodeFocus` callback has been renamed to `onItemFocus` for consistency:
|
|
74
|
+
|
|
75
|
+
```diff
|
|
76
|
+
<SimpleTreeView
|
|
77
|
+
- onNodeFocus={onNodeFocus}
|
|
78
|
+
+ onItemFocus={onItemFocus}
|
|
79
|
+
/>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### `@mui/x-tree-view@7.0.0-beta.7`
|
|
83
|
+
|
|
84
|
+
- [TreeView] Clean the usage of the term "item" and "node" in API introduced during v7 (#12368) @noraleonte
|
|
85
|
+
- [TreeView] Introduce a new `TreeItem2` component and a new `useTreeItem2` hook (#11721) @flaviendelangle
|
|
86
|
+
- [TreeView] Rename `onNodeFocus` to `onItemFocus` (#12419) @noraleonte
|
|
87
|
+
|
|
88
|
+
### Docs
|
|
89
|
+
|
|
90
|
+
- [docs] Add `legacy` bundle drop mention in migration pages (#12424) @LukasTy
|
|
91
|
+
- [docs] Add missing luxon `Info` import (#12427) @LukasTy
|
|
92
|
+
- [docs] Improve slots definitions for charts (#12408) @alexfauquette
|
|
93
|
+
- [docs] Polish What's new in MUI X blog titles (#12309) @oliviertassinari
|
|
94
|
+
- [docs] Replace `rel="noreferrer"` by `rel="noopener"` @oliviertassinari
|
|
95
|
+
- [docs] Update `date-fns` `weekStarsOn` overriding example (#12416) @LukasTy
|
|
96
|
+
|
|
97
|
+
### Core
|
|
98
|
+
|
|
99
|
+
- [core] Fix CI (#12414) @flaviendelangle
|
|
100
|
+
- [core] Fix PR deploy link for Tree View doc pages (#12411) @flaviendelangle
|
|
101
|
+
|
|
6
102
|
## 7.0.0-beta.6
|
|
7
103
|
|
|
8
104
|
_Mar 8, 2024_
|
|
@@ -1731,7 +1827,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.3`, plus:
|
|
|
1731
1827
|
The Firefox browser currently does not support this behavior because the [getWeekInfo](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) API is not yet implemented.
|
|
1732
1828
|
|
|
1733
1829
|
```ts
|
|
1734
|
-
import { Settings } from 'luxon';
|
|
1830
|
+
import { Settings, Info } from 'luxon';
|
|
1735
1831
|
|
|
1736
1832
|
Settings.defaultWeekSettings = {
|
|
1737
1833
|
firstDay: 1,
|
|
@@ -2521,6 +2617,26 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
2521
2617
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
2522
2618
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
2523
2619
|
|
|
2620
|
+
## 6.19.7
|
|
2621
|
+
|
|
2622
|
+
_Mar 14, 2024_
|
|
2623
|
+
|
|
2624
|
+
We'd like to offer a big thanks to @LukasTy who made this release possible.
|
|
2625
|
+
|
|
2626
|
+
### Date Pickers
|
|
2627
|
+
|
|
2628
|
+
#### `@mui/x-date-pickers@6.19.7`
|
|
2629
|
+
|
|
2630
|
+
- [pickers] Keep the existing time when looking for closest enabled date (#12410) @LukasTy
|
|
2631
|
+
|
|
2632
|
+
#### `@mui/x-date-pickers-pro@6.19.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
2633
|
+
|
|
2634
|
+
Same changes as in `@mui/x-date-pickers@6.19.7`.
|
|
2635
|
+
|
|
2636
|
+
### Docs
|
|
2637
|
+
|
|
2638
|
+
- [docs] Add Pickers custom start of week section (#12425) @LukasTy
|
|
2639
|
+
|
|
2524
2640
|
## 6.19.6
|
|
2525
2641
|
|
|
2526
2642
|
_Mar 1, 2024_
|
|
@@ -13,6 +13,9 @@ export interface ChartsLegendSlotProps {
|
|
|
13
13
|
legend?: Partial<LegendRendererProps>;
|
|
14
14
|
}
|
|
15
15
|
export type ChartsLegendProps = {
|
|
16
|
+
/**
|
|
17
|
+
* The position of the legend.
|
|
18
|
+
*/
|
|
16
19
|
position?: AnchorPosition;
|
|
17
20
|
/**
|
|
18
21
|
* Override or extend the styles applied to the component.
|
|
@@ -94,6 +94,9 @@ process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
|
|
|
94
94
|
* @default false
|
|
95
95
|
*/
|
|
96
96
|
hidden: _propTypes.default.bool,
|
|
97
|
+
/**
|
|
98
|
+
* The position of the legend.
|
|
99
|
+
*/
|
|
97
100
|
position: _propTypes.default.shape({
|
|
98
101
|
horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
|
|
99
102
|
vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -274,6 +274,9 @@ process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
|
274
274
|
right: _propTypes.default.number,
|
|
275
275
|
top: _propTypes.default.number
|
|
276
276
|
})]),
|
|
277
|
+
/**
|
|
278
|
+
* The position of the legend.
|
|
279
|
+
*/
|
|
277
280
|
position: _propTypes.default.shape({
|
|
278
281
|
horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
|
|
279
282
|
vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -5,8 +5,20 @@ import { ChartsItemContentProps } from './ChartsItemTooltipContent';
|
|
|
5
5
|
import { ChartsAxisContentProps } from './ChartsAxisTooltipContent';
|
|
6
6
|
import { ChartsTooltipClasses } from './chartsTooltipClasses';
|
|
7
7
|
export interface ChartsTooltipSlots {
|
|
8
|
+
/**
|
|
9
|
+
* Custom component for the tooltip popper.
|
|
10
|
+
* @default ChartsTooltipRoot
|
|
11
|
+
*/
|
|
8
12
|
popper?: React.ElementType<PopperProps>;
|
|
13
|
+
/**
|
|
14
|
+
* Custom component for displaying tooltip content when triggered by axis event.
|
|
15
|
+
* @default DefaultChartsAxisTooltipContent
|
|
16
|
+
*/
|
|
9
17
|
axisContent?: React.ElementType<ChartsAxisContentProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Custom component for displaying tooltip content when triggered by item event.
|
|
20
|
+
* @default DefaultChartsItemTooltipContent
|
|
21
|
+
*/
|
|
10
22
|
itemContent?: React.ElementType<ChartsItemContentProps>;
|
|
11
23
|
}
|
|
12
24
|
export interface ChartsTooltipSlotProps {
|
|
@@ -86,6 +86,9 @@ process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
|
|
|
86
86
|
* @default false
|
|
87
87
|
*/
|
|
88
88
|
hidden: PropTypes.bool,
|
|
89
|
+
/**
|
|
90
|
+
* The position of the legend.
|
|
91
|
+
*/
|
|
89
92
|
position: PropTypes.shape({
|
|
90
93
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
91
94
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -265,6 +265,9 @@ process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
|
265
265
|
right: PropTypes.number,
|
|
266
266
|
top: PropTypes.number
|
|
267
267
|
})]),
|
|
268
|
+
/**
|
|
269
|
+
* The position of the legend.
|
|
270
|
+
*/
|
|
268
271
|
position: PropTypes.shape({
|
|
269
272
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
270
273
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -43,7 +43,8 @@ export const useAxisEvents = disableAxisListener => {
|
|
|
43
43
|
}
|
|
44
44
|
const {
|
|
45
45
|
scale,
|
|
46
|
-
data: axisData
|
|
46
|
+
data: axisData,
|
|
47
|
+
reverse
|
|
47
48
|
} = axisConfig;
|
|
48
49
|
if (!isBandScale(scale)) {
|
|
49
50
|
const value = scale.invert(mouseValue);
|
|
@@ -76,6 +77,13 @@ export const useAxisEvents = disableAxisListener => {
|
|
|
76
77
|
if (dataIndex < 0 || dataIndex >= axisData.length) {
|
|
77
78
|
return null;
|
|
78
79
|
}
|
|
80
|
+
if (reverse) {
|
|
81
|
+
const reverseIndex = axisData.length - 1 - dataIndex;
|
|
82
|
+
return {
|
|
83
|
+
index: reverseIndex,
|
|
84
|
+
value: axisData[reverseIndex]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
79
87
|
return {
|
|
80
88
|
index: dataIndex,
|
|
81
89
|
value: axisData[dataIndex]
|
package/hooks/useAxisEvents.js
CHANGED
|
@@ -51,7 +51,8 @@ const useAxisEvents = disableAxisListener => {
|
|
|
51
51
|
}
|
|
52
52
|
const {
|
|
53
53
|
scale,
|
|
54
|
-
data: axisData
|
|
54
|
+
data: axisData,
|
|
55
|
+
reverse
|
|
55
56
|
} = axisConfig;
|
|
56
57
|
if (!(0, _isBandScale.isBandScale)(scale)) {
|
|
57
58
|
const value = scale.invert(mouseValue);
|
|
@@ -84,6 +85,13 @@ const useAxisEvents = disableAxisListener => {
|
|
|
84
85
|
if (dataIndex < 0 || dataIndex >= axisData.length) {
|
|
85
86
|
return null;
|
|
86
87
|
}
|
|
88
|
+
if (reverse) {
|
|
89
|
+
const reverseIndex = axisData.length - 1 - dataIndex;
|
|
90
|
+
return {
|
|
91
|
+
index: reverseIndex,
|
|
92
|
+
value: axisData[reverseIndex]
|
|
93
|
+
};
|
|
94
|
+
}
|
|
87
95
|
return {
|
|
88
96
|
index: dataIndex,
|
|
89
97
|
value: axisData[dataIndex]
|
package/index.js
CHANGED
package/models/axis.d.ts
CHANGED
|
@@ -9,9 +9,25 @@ export type D3Scale<Domain extends {
|
|
|
9
9
|
} = number | Date | string, Range = number, Output = number> = ScaleBand<Domain> | ScaleLogarithmic<Range, Output> | ScalePoint<Domain> | ScalePower<Range, Output> | ScaleTime<Range, Output> | ScaleLinear<Range, Output>;
|
|
10
10
|
export type D3ContinuouseScale<Range = number, Output = number> = ScaleLogarithmic<Range, Output> | ScalePower<Range, Output> | ScaleTime<Range, Output> | ScaleLinear<Range, Output>;
|
|
11
11
|
export interface ChartsAxisSlots {
|
|
12
|
+
/**
|
|
13
|
+
* Custom component for the axis main line.
|
|
14
|
+
* @default 'line'
|
|
15
|
+
*/
|
|
12
16
|
axisLine?: React.JSXElementConstructor<React.SVGAttributes<SVGPathElement>>;
|
|
17
|
+
/**
|
|
18
|
+
* Custom component for the axis tick.
|
|
19
|
+
* @default 'line'
|
|
20
|
+
*/
|
|
13
21
|
axisTick?: React.JSXElementConstructor<React.SVGAttributes<SVGPathElement>>;
|
|
22
|
+
/**
|
|
23
|
+
* Custom component for tick label.
|
|
24
|
+
* @default ChartsText
|
|
25
|
+
*/
|
|
14
26
|
axisTickLabel?: React.JSXElementConstructor<ChartsTextProps>;
|
|
27
|
+
/**
|
|
28
|
+
* Custom component for axis label.
|
|
29
|
+
* @default ChartsText
|
|
30
|
+
*/
|
|
15
31
|
axisLabel?: React.JSXElementConstructor<ChartsTextProps>;
|
|
16
32
|
}
|
|
17
33
|
export interface ChartsAxisSlotProps {
|
|
@@ -85,6 +85,9 @@ process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
|
|
|
85
85
|
* @default false
|
|
86
86
|
*/
|
|
87
87
|
hidden: PropTypes.bool,
|
|
88
|
+
/**
|
|
89
|
+
* The position of the legend.
|
|
90
|
+
*/
|
|
88
91
|
position: PropTypes.shape({
|
|
89
92
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
90
93
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -265,6 +265,9 @@ process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
|
265
265
|
right: PropTypes.number,
|
|
266
266
|
top: PropTypes.number
|
|
267
267
|
})]),
|
|
268
|
+
/**
|
|
269
|
+
* The position of the legend.
|
|
270
|
+
*/
|
|
268
271
|
position: PropTypes.shape({
|
|
269
272
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
270
273
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -43,7 +43,8 @@ export const useAxisEvents = disableAxisListener => {
|
|
|
43
43
|
}
|
|
44
44
|
const {
|
|
45
45
|
scale,
|
|
46
|
-
data: axisData
|
|
46
|
+
data: axisData,
|
|
47
|
+
reverse
|
|
47
48
|
} = axisConfig;
|
|
48
49
|
if (!isBandScale(scale)) {
|
|
49
50
|
const value = scale.invert(mouseValue);
|
|
@@ -76,6 +77,13 @@ export const useAxisEvents = disableAxisListener => {
|
|
|
76
77
|
if (dataIndex < 0 || dataIndex >= axisData.length) {
|
|
77
78
|
return null;
|
|
78
79
|
}
|
|
80
|
+
if (reverse) {
|
|
81
|
+
const reverseIndex = axisData.length - 1 - dataIndex;
|
|
82
|
+
return {
|
|
83
|
+
index: reverseIndex,
|
|
84
|
+
value: axisData[reverseIndex]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
79
87
|
return {
|
|
80
88
|
index: dataIndex,
|
|
81
89
|
value: axisData[dataIndex]
|
package/modern/index.js
CHANGED