@mui/x-charts 6.0.0-alpha.6 → 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 +19 -2
- package/BarChart/BarChart.js +84 -22
- package/BarChart/BarElement.d.ts +22 -0
- package/BarChart/BarElement.js +21 -10
- package/BarChart/BarPlot.d.ts +14 -1
- package/BarChart/BarPlot.js +48 -19
- package/BarChart/extremums.js +19 -3
- package/BarChart/formatter.js +3 -1
- package/CHANGELOG.md +213 -28
- package/ChartsAxis/ChartsAxis.d.ts +11 -1
- package/ChartsAxis/ChartsAxis.js +51 -6
- package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +3 -2
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +11 -3
- package/ChartsLegend/ChartsLegend.d.ts +25 -2
- package/ChartsLegend/ChartsLegend.js +49 -17
- package/ChartsTooltip/ChartsAxisTooltipContent.js +13 -9
- package/ChartsTooltip/ChartsTooltipTable.d.ts +2 -9
- package/ChartsXAxis/ChartsXAxis.js +44 -9
- package/ChartsYAxis/ChartsYAxis.js +44 -9
- package/LineChart/AreaElement.d.ts +22 -0
- package/LineChart/AreaElement.js +31 -11
- package/LineChart/AreaPlot.d.ts +14 -1
- package/LineChart/AreaPlot.js +29 -3
- package/LineChart/LineChart.d.ts +20 -2
- package/LineChart/LineChart.js +63 -11
- package/LineChart/LineElement.d.ts +22 -0
- package/LineChart/LineElement.js +31 -10
- package/LineChart/LinePlot.d.ts +14 -1
- package/LineChart/LinePlot.js +35 -4
- package/LineChart/MarkPlot.d.ts +24 -1
- package/LineChart/MarkPlot.js +29 -4
- package/PieChart/PieArcLabel.js +0 -1
- package/PieChart/PieChart.d.ts +14 -2
- package/PieChart/PieChart.js +52 -10
- package/PieChart/PiePlot.d.ts +27 -1
- package/PieChart/PiePlot.js +29 -6
- package/ScatterChart/ScatterChart.d.ts +18 -2
- package/ScatterChart/ScatterChart.js +56 -10
- package/ScatterChart/ScatterPlot.d.ts +24 -1
- package/ScatterChart/ScatterPlot.js +28 -4
- package/SparkLineChart/SparkLineChart.d.ts +18 -0
- package/SparkLineChart/SparkLineChart.js +29 -6
- package/colorPalettes/colorPalettes.js +2 -2
- package/context/CartesianContextProvider.js +18 -12
- package/esm/BarChart/BarChart.js +88 -26
- package/esm/BarChart/BarElement.js +21 -11
- package/esm/BarChart/BarPlot.js +49 -20
- package/esm/BarChart/extremums.js +18 -2
- package/esm/BarChart/formatter.js +3 -1
- package/esm/ChartsAxis/ChartsAxis.js +51 -6
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +11 -3
- package/esm/ChartsLegend/ChartsLegend.js +47 -14
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +13 -9
- package/esm/ChartsXAxis/ChartsXAxis.js +45 -9
- package/esm/ChartsYAxis/ChartsYAxis.js +45 -9
- package/esm/LineChart/AreaElement.js +31 -11
- package/esm/LineChart/AreaPlot.js +31 -4
- package/esm/LineChart/LineChart.js +63 -11
- package/esm/LineChart/LineElement.js +31 -11
- package/esm/LineChart/LinePlot.js +43 -8
- package/esm/LineChart/MarkPlot.js +32 -5
- package/esm/PieChart/PieArcLabel.js +0 -1
- package/esm/PieChart/PieChart.js +52 -10
- package/esm/PieChart/PiePlot.js +31 -6
- package/esm/ScatterChart/ScatterChart.js +56 -10
- package/esm/ScatterChart/ScatterPlot.js +29 -4
- package/esm/SparkLineChart/SparkLineChart.js +29 -6
- package/esm/colorPalettes/colorPalettes.js +2 -2
- package/esm/context/CartesianContextProvider.js +18 -12
- package/esm/hooks/useAxisEvents.js +21 -38
- package/esm/hooks/useTicks.js +11 -8
- package/esm/internals/components/AxisSharedComponents.js +10 -10
- package/hooks/useAxisEvents.js +21 -38
- package/hooks/useTicks.d.ts +20 -5
- package/hooks/useTicks.js +11 -8
- package/index.js +1 -1
- package/internals/components/AxisSharedComponents.d.ts +4 -4
- package/internals/components/AxisSharedComponents.js +15 -15
- package/internals/defaultizeColor.d.ts +1 -0
- package/legacy/BarChart/BarChart.js +93 -29
- package/legacy/BarChart/BarElement.js +20 -10
- package/legacy/BarChart/BarPlot.js +49 -20
- package/legacy/BarChart/extremums.js +22 -2
- package/legacy/BarChart/formatter.js +3 -1
- package/legacy/ChartsAxis/ChartsAxis.js +51 -6
- package/legacy/ChartsAxisHighlight/ChartsAxisHighlight.js +11 -3
- package/legacy/ChartsLegend/ChartsLegend.js +46 -15
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +13 -9
- package/legacy/ChartsXAxis/ChartsXAxis.js +45 -9
- package/legacy/ChartsYAxis/ChartsYAxis.js +45 -9
- package/legacy/LineChart/AreaElement.js +30 -10
- package/legacy/LineChart/AreaPlot.js +29 -4
- package/legacy/LineChart/LineChart.js +63 -11
- package/legacy/LineChart/LineElement.js +30 -10
- package/legacy/LineChart/LinePlot.js +36 -5
- package/legacy/LineChart/MarkPlot.js +30 -5
- package/legacy/PieChart/PieArcLabel.js +0 -1
- package/legacy/PieChart/PieChart.js +52 -10
- package/legacy/PieChart/PiePlot.js +29 -6
- package/legacy/ScatterChart/ScatterChart.js +56 -10
- package/legacy/ScatterChart/ScatterPlot.js +27 -4
- package/legacy/SparkLineChart/SparkLineChart.js +29 -6
- package/legacy/colorPalettes/colorPalettes.js +2 -2
- package/legacy/context/CartesianContextProvider.js +18 -12
- package/legacy/hooks/useAxisEvents.js +21 -37
- package/legacy/hooks/useTicks.js +11 -11
- package/legacy/index.js +1 -1
- package/legacy/internals/components/AxisSharedComponents.js +10 -10
- package/models/axis.d.ts +24 -1
- package/models/seriesType/bar.d.ts +6 -1
- package/modern/BarChart/BarChart.js +85 -23
- package/modern/BarChart/BarElement.js +20 -11
- package/modern/BarChart/BarPlot.js +48 -19
- package/modern/BarChart/extremums.js +18 -2
- package/modern/BarChart/formatter.js +3 -1
- package/modern/ChartsAxis/ChartsAxis.js +51 -6
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +11 -3
- package/modern/ChartsLegend/ChartsLegend.js +46 -14
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +13 -9
- package/modern/ChartsXAxis/ChartsXAxis.js +44 -9
- package/modern/ChartsYAxis/ChartsYAxis.js +44 -9
- package/modern/LineChart/AreaElement.js +30 -11
- package/modern/LineChart/AreaPlot.js +31 -4
- package/modern/LineChart/LineChart.js +63 -11
- package/modern/LineChart/LineElement.js +30 -11
- package/modern/LineChart/LinePlot.js +37 -5
- package/modern/LineChart/MarkPlot.js +31 -5
- package/modern/PieChart/PieArcLabel.js +0 -1
- package/modern/PieChart/PieChart.js +52 -10
- package/modern/PieChart/PiePlot.js +30 -6
- package/modern/ScatterChart/ScatterChart.js +56 -10
- package/modern/ScatterChart/ScatterPlot.js +28 -4
- package/modern/SparkLineChart/SparkLineChart.js +29 -6
- package/modern/colorPalettes/colorPalettes.js +2 -2
- package/modern/context/CartesianContextProvider.js +18 -12
- package/modern/hooks/useAxisEvents.js +21 -38
- package/modern/hooks/useTicks.js +11 -8
- package/modern/index.js +1 -1
- package/modern/internals/components/AxisSharedComponents.js +10 -10
- package/package.json +5 -5
- package/themeAugmentation/components.d.ts +0 -10
- package/themeAugmentation/overrides.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,191 @@
|
|
|
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
|
+
|
|
129
|
+
## 6.11.1
|
|
130
|
+
|
|
131
|
+
_Aug 11, 2023_
|
|
132
|
+
|
|
133
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
134
|
+
|
|
135
|
+
- 💫 Add theme augmentation to `@mui/x-tree-view`
|
|
136
|
+
- 📈 Enable charts customization using `slot` and `slotProps` props
|
|
137
|
+
- 🌍 Improve Finnish (fi-FI) and Icelandic (is-IS) locales on the pickers
|
|
138
|
+
- 🐞 Bugfixes
|
|
139
|
+
- 📚 Documentation improvements
|
|
140
|
+
|
|
141
|
+
### Data Grid
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-data-grid@6.11.1`
|
|
144
|
+
|
|
145
|
+
- [DataGrid] `getCellAggregationResult`: Handle `null` `rowNode` case (#9915) @romgrk
|
|
146
|
+
|
|
147
|
+
#### `@mui/x-data-grid-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
148
|
+
|
|
149
|
+
Same changes as in `@mui/x-data-grid@6.11.1`.
|
|
150
|
+
|
|
151
|
+
#### `@mui/x-data-grid-premium@6.11.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
152
|
+
|
|
153
|
+
Same changes as in `@mui/x-data-grid-pro@6.11.1`.
|
|
154
|
+
|
|
155
|
+
### Date Pickers
|
|
156
|
+
|
|
157
|
+
#### `@mui/x-date-pickers@6.11.1`
|
|
158
|
+
|
|
159
|
+
- [fields] Use `numeric` `inputmode` instead of `tel` (#9918) @LukasTy
|
|
160
|
+
- [pickers] Always respect locale when formatting meridiem (#9979) @flaviendelangle
|
|
161
|
+
- [pickers] Call `onChange` when selecting a shortcut with `changeImportance="set"` (#9974) @flaviendelangle
|
|
162
|
+
- [pickers] Refactor `themeAugmentation` `styleOverrides` (#9978) @LukasTy
|
|
163
|
+
- [l10n] Improve Finnish (fi-FI) locale (#9795) @kurkle
|
|
164
|
+
- [l10n] Improve Icelandic (is-IS) locale (#9639) @magnimarels
|
|
165
|
+
|
|
166
|
+
#### `@mui/x-date-pickers-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
167
|
+
|
|
168
|
+
Same changes as in `@mui/x-date-pickers@6.11.1`.
|
|
169
|
+
|
|
170
|
+
### Charts / `@mui/x-charts@v6.0.0-alpha.7`
|
|
171
|
+
|
|
172
|
+
- [charts] Fix label and tick alignment (#9952) @LukasTy
|
|
173
|
+
- [charts] Remove not functional component `styleOverrides` (#9996) @LukasTy
|
|
174
|
+
- [charts] Set custom ticks number (#9922) @alexfauquette
|
|
175
|
+
- [charts] Use `slot`/`slotProps` for customization (#9744) @alexfauquette
|
|
176
|
+
- [charts] Extend cheerful fiesta palette (#9980) @noraleonte
|
|
177
|
+
|
|
178
|
+
### Tree View / `@mui/x-tree-view@v6.0.0-alpha.1`
|
|
179
|
+
|
|
180
|
+
- [TreeView] Add theme augmentation (#9967) @flaviendelangle
|
|
181
|
+
|
|
182
|
+
### Docs
|
|
183
|
+
|
|
184
|
+
- [docs] Clarify the `shouldDisableClock` migration code options (#9920) @LukasTy
|
|
185
|
+
|
|
186
|
+
### Core
|
|
187
|
+
|
|
188
|
+
- [core] Port GitHub workflow for ensuring triage label is present (#9924) @DanailH
|
|
189
|
+
- [docs-infra] Fix the import samples in Api pages (#9898) @alexfauquette
|
|
190
|
+
|
|
6
191
|
## 6.11.0
|
|
7
192
|
|
|
8
193
|
_Aug 4, 2023_
|
|
@@ -28,11 +213,11 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
28
213
|
- [l10n] Improve Finnish (fi-FI) locale (#9848) @sambbaahh
|
|
29
214
|
- [l10n] Improve Italian (it-IT) locale (#9627) @fabio-rizzello-omnia
|
|
30
215
|
|
|
31
|
-
#### `@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')
|
|
32
217
|
|
|
33
218
|
Same changes as in `@mui/x-data-grid@v6.11.0`.
|
|
34
219
|
|
|
35
|
-
#### `@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')
|
|
36
221
|
|
|
37
222
|
Same changes as in `@mui/x-data-grid-pro@v6.11.0`.
|
|
38
223
|
|
|
@@ -51,7 +236,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.11.0`.
|
|
|
51
236
|
- [pickers] Fix offset management on dayjs adapter (#9884) @flaviendelangle
|
|
52
237
|
- [pickers] Use device motion reduction preference (#9823) @LukasTy
|
|
53
238
|
|
|
54
|
-
#### `@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')
|
|
55
240
|
|
|
56
241
|
Same changes as in `@mui/x-date-pickers@v6.11.0`.
|
|
57
242
|
|
|
@@ -114,11 +299,11 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
114
299
|
- [DataGrid] Keep focused cell in the DOM (#7357) @yaredtsy
|
|
115
300
|
- [l10n] Improve Finnish (fi-FI) locale (#9746) @sambbaahh
|
|
116
301
|
|
|
117
|
-
#### `@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')
|
|
118
303
|
|
|
119
304
|
Same changes as in `@mui/x-data-grid@v6.10.2`.
|
|
120
305
|
|
|
121
|
-
#### `@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')
|
|
122
307
|
|
|
123
308
|
Same changes as in `@mui/x-data-grid-pro@v6.10.2`, plus:
|
|
124
309
|
|
|
@@ -130,7 +315,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.10.2`, plus:
|
|
|
130
315
|
|
|
131
316
|
- [pickers] Remove the `endOfDate` from `DigitalClock` timeOptions (#9800) @noraleonte
|
|
132
317
|
|
|
133
|
-
#### `@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')
|
|
134
319
|
|
|
135
320
|
Same changes as in `@mui/x-date-pickers@v6.10.2`.
|
|
136
321
|
|
|
@@ -182,14 +367,14 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
182
367
|
- [DataGrid] Update focused cell on page change via keyboard (#9203) @m4theushw
|
|
183
368
|
- [DataGrid] Wait for remote stylesheets to load before print (#9665) @cherniavskii
|
|
184
369
|
|
|
185
|
-
#### `@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')
|
|
186
371
|
|
|
187
372
|
Same changes as in `@mui/x-data-grid@v6.10.1`, plus:
|
|
188
373
|
|
|
189
374
|
- [DataGridPro] Improve tree data performance (#9682) @cherniavskii
|
|
190
375
|
- [DataGridPro] Prevent affecting cells from child DataGrid when resizing a column (#9670) @m4theushw
|
|
191
376
|
|
|
192
|
-
#### `@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')
|
|
193
378
|
|
|
194
379
|
Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
|
|
195
380
|
|
|
@@ -200,7 +385,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
|
|
|
200
385
|
- [fields] Fix `format` and `value` update order (#9715) @LukasTy
|
|
201
386
|
- [pickers] Remove `require` usage in comment (#9675) @LukasTy
|
|
202
387
|
|
|
203
|
-
#### `@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')
|
|
204
389
|
|
|
205
390
|
Same changes as in `@mui/x-date-pickers@v6.10.1`.
|
|
206
391
|
|
|
@@ -251,11 +436,11 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
251
436
|
- [DataGrid] Make `rowExpansionChange` event public (#9611) @MBilalShafi
|
|
252
437
|
- [l10n] Improve Polish (pl-PL) locale (#9625) @ch1llysense
|
|
253
438
|
|
|
254
|
-
#### `@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')
|
|
255
440
|
|
|
256
441
|
Same changes as in `@mui/x-data-grid@6.10.0`.
|
|
257
442
|
|
|
258
|
-
#### `@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')
|
|
259
444
|
|
|
260
445
|
Same changes as in `@mui/x-data-grid-pro@6.10.0`.
|
|
261
446
|
|
|
@@ -266,7 +451,7 @@ Same changes as in `@mui/x-data-grid-pro@6.10.0`.
|
|
|
266
451
|
- [pickers] Fix date calendar issues (#9652) @LukasTy
|
|
267
452
|
- [l10n] Improve Norwegian (nb-NO) locale (#9608) @JosteinBrevik
|
|
268
453
|
|
|
269
|
-
#### `@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')
|
|
270
455
|
|
|
271
456
|
Same changes as in `@mui/x-date-pickers@6.10.0`.
|
|
272
457
|
|
|
@@ -319,11 +504,11 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
319
504
|
- [DataGrid] Correctly reflect `TablePagination`'s `rowsPerPageOptions` shape to `pageSizeOptions` (#9438) @burakkgunduzz
|
|
320
505
|
- [l10n] Improve Spanish (es-ES) locale (#9500) @fufex
|
|
321
506
|
|
|
322
|
-
#### `@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')
|
|
323
508
|
|
|
324
509
|
Same changes as in `@mui/x-data-grid@6.9.2`.
|
|
325
510
|
|
|
326
|
-
#### `@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')
|
|
327
512
|
|
|
328
513
|
Same changes as in `@mui/x-data-grid-pro@6.9.2`, plus:
|
|
329
514
|
|
|
@@ -336,7 +521,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.2`, plus:
|
|
|
336
521
|
- [pickers] Forward digital clock classes (#9555) @YoonjiJang
|
|
337
522
|
- [pickers] Rename `internal` folder to `internals` on `@mui/x-date-picker-pro` (#9571) @flaviendelangle
|
|
338
523
|
|
|
339
|
-
#### `@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')
|
|
340
525
|
|
|
341
526
|
Same changes as in `@mui/x-date-pickers@6.9.2`.
|
|
342
527
|
|
|
@@ -384,14 +569,14 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
384
569
|
- [DataGrid] Fix `Maximum call stack size exceeded` error when using fractional width (#9516) @cherniavskii
|
|
385
570
|
- [l10n] Improve Romanian (ro-RO) and Hungarian (hu-HU) translations (#9436) @noraleonte
|
|
386
571
|
|
|
387
|
-
#### `@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')
|
|
388
573
|
|
|
389
574
|
Same changes as in `@mui/x-data-grid@6.9.1`, plus:
|
|
390
575
|
|
|
391
576
|
- [DataGridPro] Don't throw error in column pinning (#9507) @romgrk
|
|
392
577
|
- [DataGridPro] Fix bug with `checkboxSelection` and treeData/grouping (#9418) @romgrk
|
|
393
578
|
|
|
394
|
-
#### `@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')
|
|
395
580
|
|
|
396
581
|
Same changes as in `@mui/x-data-grid-pro@6.9.1`.
|
|
397
582
|
|
|
@@ -405,7 +590,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.1`.
|
|
|
405
590
|
- [l10n] Add Chinese (Hong Kong) (zh-HK) locale (#9468) @samchiu90
|
|
406
591
|
- [l10n] Improve Romanian (ro-RO) translations (#9436) @noraleonte
|
|
407
592
|
|
|
408
|
-
#### `@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')
|
|
409
594
|
|
|
410
595
|
Same changes as in `@mui/x-date-pickers@6.9.1`.
|
|
411
596
|
|
|
@@ -469,11 +654,11 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
469
654
|
- [DataGrid] Use container dimensions from `getComputedStyle` (#9236) @m4theushw
|
|
470
655
|
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#9404) @julioAz
|
|
471
656
|
|
|
472
|
-
#### `@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')
|
|
473
658
|
|
|
474
659
|
Same changes as in `@mui/x-data-grid@6.9.0`.
|
|
475
660
|
|
|
476
|
-
#### `@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')
|
|
477
662
|
|
|
478
663
|
Same changes as in `@mui/x-data-grid-pro@6.9.0`.
|
|
479
664
|
|
|
@@ -489,7 +674,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.0`.
|
|
|
489
674
|
- [pickers] Reduce date range calendar vertical border width (#9368) @oliviertassinari
|
|
490
675
|
- [pickers] Reset fields internal state when pasting value (#9385) @alexfauquette
|
|
491
676
|
|
|
492
|
-
#### `@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')
|
|
493
678
|
|
|
494
679
|
Same changes as in `@mui/x-date-pickers@6.9.0`.
|
|
495
680
|
|
|
@@ -545,11 +730,11 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
545
730
|
- [DataGrid] Scroll performance improvements (#9037) @romgrk
|
|
546
731
|
- [l10n] Improve Greek (el-GR) locale (#9292) @clytras
|
|
547
732
|
|
|
548
|
-
#### `@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')
|
|
549
734
|
|
|
550
735
|
Same changes as in `@mui/x-data-grid@6.8.0`.
|
|
551
736
|
|
|
552
|
-
#### `@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')
|
|
553
738
|
|
|
554
739
|
Same changes as in `@mui/x-data-grid-pro@6.8.0`.
|
|
555
740
|
|
|
@@ -562,7 +747,7 @@ Same changes as in `@mui/x-data-grid-pro@6.8.0`.
|
|
|
562
747
|
- [pickers] Close the calendar when a shortcut is selected (#9080) @flaviendelangle
|
|
563
748
|
- [pickers] Fix disabling for digital clock (#9300) @alexfauquette
|
|
564
749
|
|
|
565
|
-
#### `@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')
|
|
566
751
|
|
|
567
752
|
Same changes as in `@mui/x-date-pickers@6.8.0`.
|
|
568
753
|
|
|
@@ -638,13 +823,13 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
638
823
|
- [l10n] Improve German (de-DE) locale (#9259) @ximex
|
|
639
824
|
- [l10n] Improve Turkish (tr-TR) locale (#9237) @MCErtan
|
|
640
825
|
|
|
641
|
-
#### `@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')
|
|
642
827
|
|
|
643
828
|
Same changes as in `@mui/x-data-grid@6.7.0`, plus:
|
|
644
829
|
|
|
645
830
|
- [DataGridPro] Improve header filter menu visuals (#9181) @MBilalShafi
|
|
646
831
|
|
|
647
|
-
#### `@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')
|
|
648
833
|
|
|
649
834
|
Same changes as in `@mui/x-data-grid-pro@6.7.0`, plus:
|
|
650
835
|
|
|
@@ -658,7 +843,7 @@ Same changes as in `@mui/x-data-grid-pro@6.7.0`, plus:
|
|
|
658
843
|
- [l10n] Improve German (de-DE) locale (#9258) @ximex
|
|
659
844
|
- [pickers] Apply dynamic default format depending on views for all desktop and mobile pickers (#9126) @flaviendelangle
|
|
660
845
|
|
|
661
|
-
#### `@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')
|
|
662
847
|
|
|
663
848
|
Same changes as in `@mui/x-date-pickers@6.7.0`, plus:
|
|
664
849
|
|
|
@@ -2810,7 +2995,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
2810
2995
|
|
|
2811
2996
|
#### Changes
|
|
2812
2997
|
|
|
2813
|
-
- [DateRangePicker] Fix input focused style and mobile
|
|
2998
|
+
- [DateRangePicker] Fix input focused style and mobile behavior (#6645) @LukasTy
|
|
2814
2999
|
- [fields] Update sections when the locale changes (#6649) @flaviendelangle
|
|
2815
3000
|
- [pickers] Add Ukrainian (uk-UA) locale (#6661) @Dufran
|
|
2816
3001
|
- [pickers] Allow non-controlled usage of the calendar components (#6643) @flaviendelangle
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ChartsXAxisProps, ChartsYAxisProps } from '../models/axis';
|
|
2
|
+
import { ChartsAxisSlotComponentProps, ChartsAxisSlotsComponent, ChartsXAxisProps, ChartsYAxisProps } from '../models/axis';
|
|
3
3
|
export interface ChartsAxisProps {
|
|
4
4
|
/**
|
|
5
5
|
* Indicate which axis to display the top of the charts.
|
|
@@ -25,6 +25,16 @@ export interface ChartsAxisProps {
|
|
|
25
25
|
* @default null
|
|
26
26
|
*/
|
|
27
27
|
rightAxis?: null | string | ChartsYAxisProps;
|
|
28
|
+
/**
|
|
29
|
+
* Overridable component slots.
|
|
30
|
+
* @default {}
|
|
31
|
+
*/
|
|
32
|
+
slots?: ChartsAxisSlotsComponent;
|
|
33
|
+
/**
|
|
34
|
+
* The props used for each component slot.
|
|
35
|
+
* @default {}
|
|
36
|
+
*/
|
|
37
|
+
slotProps?: ChartsAxisSlotComponentProps;
|
|
28
38
|
}
|
|
29
39
|
declare function ChartsAxis(props: ChartsAxisProps): React.JSX.Element;
|
|
30
40
|
declare namespace ChartsAxis {
|
package/ChartsAxis/ChartsAxis.js
CHANGED
|
@@ -23,12 +23,23 @@ const getAxisId = propsValue => {
|
|
|
23
23
|
}
|
|
24
24
|
return propsValue;
|
|
25
25
|
};
|
|
26
|
+
const mergeProps = (axisConfig, slots, slotProps) => {
|
|
27
|
+
return typeof axisConfig === 'object' ? (0, _extends2.default)({}, axisConfig, {
|
|
28
|
+
slots: (0, _extends2.default)({}, slots, axisConfig?.slots),
|
|
29
|
+
slotProps: (0, _extends2.default)({}, slotProps, axisConfig?.slotProps)
|
|
30
|
+
}) : {
|
|
31
|
+
slots,
|
|
32
|
+
slotProps
|
|
33
|
+
};
|
|
34
|
+
};
|
|
26
35
|
function ChartsAxis(props) {
|
|
27
36
|
const {
|
|
28
37
|
topAxis,
|
|
29
38
|
leftAxis,
|
|
30
39
|
rightAxis,
|
|
31
|
-
bottomAxis
|
|
40
|
+
bottomAxis,
|
|
41
|
+
slots,
|
|
42
|
+
slotProps
|
|
32
43
|
} = props;
|
|
33
44
|
const {
|
|
34
45
|
xAxis,
|
|
@@ -56,20 +67,24 @@ function ChartsAxis(props) {
|
|
|
56
67
|
if (bottomId !== null && !xAxis[bottomId]) {
|
|
57
68
|
throw Error(`MUI: id used for bottom axis "${bottomId}" is not defined`);
|
|
58
69
|
}
|
|
70
|
+
const topAxisProps = mergeProps(topAxis, slots, slotProps);
|
|
71
|
+
const bottomAxisProps = mergeProps(bottomAxis, slots, slotProps);
|
|
72
|
+
const leftAxisProps = mergeProps(leftAxis, slots, slotProps);
|
|
73
|
+
const rightAxisProps = mergeProps(rightAxis, slots, slotProps);
|
|
59
74
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
60
|
-
children: [topId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsXAxis.ChartsXAxis, (0, _extends2.default)({
|
|
75
|
+
children: [topId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsXAxis.ChartsXAxis, (0, _extends2.default)({}, topAxisProps, {
|
|
61
76
|
position: "top",
|
|
62
77
|
axisId: topId
|
|
63
|
-
}
|
|
78
|
+
})), bottomId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsXAxis.ChartsXAxis, (0, _extends2.default)({}, bottomAxisProps, {
|
|
64
79
|
position: "bottom",
|
|
65
80
|
axisId: bottomId
|
|
66
|
-
}
|
|
81
|
+
})), leftId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsYAxis.ChartsYAxis, (0, _extends2.default)({}, leftAxisProps, {
|
|
67
82
|
position: "left",
|
|
68
83
|
axisId: leftId
|
|
69
|
-
}
|
|
84
|
+
})), rightId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsYAxis.ChartsYAxis, (0, _extends2.default)({}, rightAxisProps, {
|
|
70
85
|
position: "right",
|
|
71
86
|
axisId: rightId
|
|
72
|
-
}
|
|
87
|
+
}))]
|
|
73
88
|
});
|
|
74
89
|
}
|
|
75
90
|
process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
@@ -91,8 +106,13 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
91
106
|
label: _propTypes.default.string,
|
|
92
107
|
labelFontSize: _propTypes.default.number,
|
|
93
108
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
109
|
+
slotProps: _propTypes.default.object,
|
|
110
|
+
slots: _propTypes.default.object,
|
|
94
111
|
stroke: _propTypes.default.string,
|
|
95
112
|
tickFontSize: _propTypes.default.number,
|
|
113
|
+
tickMaxStep: _propTypes.default.number,
|
|
114
|
+
tickMinStep: _propTypes.default.number,
|
|
115
|
+
tickNumber: _propTypes.default.number,
|
|
96
116
|
tickSize: _propTypes.default.number
|
|
97
117
|
}), _propTypes.default.string]),
|
|
98
118
|
/**
|
|
@@ -109,8 +129,13 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
109
129
|
label: _propTypes.default.string,
|
|
110
130
|
labelFontSize: _propTypes.default.number,
|
|
111
131
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
132
|
+
slotProps: _propTypes.default.object,
|
|
133
|
+
slots: _propTypes.default.object,
|
|
112
134
|
stroke: _propTypes.default.string,
|
|
113
135
|
tickFontSize: _propTypes.default.number,
|
|
136
|
+
tickMaxStep: _propTypes.default.number,
|
|
137
|
+
tickMinStep: _propTypes.default.number,
|
|
138
|
+
tickNumber: _propTypes.default.number,
|
|
114
139
|
tickSize: _propTypes.default.number
|
|
115
140
|
}), _propTypes.default.string]),
|
|
116
141
|
/**
|
|
@@ -127,10 +152,25 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
127
152
|
label: _propTypes.default.string,
|
|
128
153
|
labelFontSize: _propTypes.default.number,
|
|
129
154
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
155
|
+
slotProps: _propTypes.default.object,
|
|
156
|
+
slots: _propTypes.default.object,
|
|
130
157
|
stroke: _propTypes.default.string,
|
|
131
158
|
tickFontSize: _propTypes.default.number,
|
|
159
|
+
tickMaxStep: _propTypes.default.number,
|
|
160
|
+
tickMinStep: _propTypes.default.number,
|
|
161
|
+
tickNumber: _propTypes.default.number,
|
|
132
162
|
tickSize: _propTypes.default.number
|
|
133
163
|
}), _propTypes.default.string]),
|
|
164
|
+
/**
|
|
165
|
+
* The props used for each component slot.
|
|
166
|
+
* @default {}
|
|
167
|
+
*/
|
|
168
|
+
slotProps: _propTypes.default.object,
|
|
169
|
+
/**
|
|
170
|
+
* Overridable component slots.
|
|
171
|
+
* @default {}
|
|
172
|
+
*/
|
|
173
|
+
slots: _propTypes.default.object,
|
|
134
174
|
/**
|
|
135
175
|
* Indicate which axis to display the top of the charts.
|
|
136
176
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
@@ -145,8 +185,13 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
145
185
|
label: _propTypes.default.string,
|
|
146
186
|
labelFontSize: _propTypes.default.number,
|
|
147
187
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
188
|
+
slotProps: _propTypes.default.object,
|
|
189
|
+
slots: _propTypes.default.object,
|
|
148
190
|
stroke: _propTypes.default.string,
|
|
149
191
|
tickFontSize: _propTypes.default.number,
|
|
192
|
+
tickMaxStep: _propTypes.default.number,
|
|
193
|
+
tickMinStep: _propTypes.default.number,
|
|
194
|
+
tickNumber: _propTypes.default.number,
|
|
150
195
|
tickSize: _propTypes.default.number
|
|
151
196
|
}), _propTypes.default.string])
|
|
152
197
|
} : void 0;
|
|
@@ -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;
|
|
@@ -2,9 +2,16 @@ import * as React from 'react';
|
|
|
2
2
|
import { Theme } from '@mui/material/styles';
|
|
3
3
|
import { DrawingArea } from '../context/DrawingProvider';
|
|
4
4
|
import { AnchorPosition, SizingParams } from './utils';
|
|
5
|
+
import { FormattedSeries } from '../context/SeriesContextProvider';
|
|
5
6
|
import { ChartsLegendClasses } from './chartsLegendClasses';
|
|
6
7
|
import { DefaultizedProps } from '../models/helpers';
|
|
7
|
-
import { ChartSeriesDefaultized } from '../models/seriesType/config';
|
|
8
|
+
import { ChartSeriesDefaultized, LegendParams } from '../models/seriesType/config';
|
|
9
|
+
export interface ChartsLegendSlotsComponent {
|
|
10
|
+
legend?: React.JSXElementConstructor<LegendRendererProps>;
|
|
11
|
+
}
|
|
12
|
+
export interface ChartsLegendSlotComponentProps {
|
|
13
|
+
legend?: Partial<LegendRendererProps>;
|
|
14
|
+
}
|
|
8
15
|
export type ChartsLegendProps = {
|
|
9
16
|
position?: AnchorPosition;
|
|
10
17
|
offset?: Partial<{
|
|
@@ -19,6 +26,16 @@ export type ChartsLegendProps = {
|
|
|
19
26
|
* Set to true to hide the legend.
|
|
20
27
|
*/
|
|
21
28
|
hidden?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Overridable component slots.
|
|
31
|
+
* @default {}
|
|
32
|
+
*/
|
|
33
|
+
slots?: ChartsLegendSlotsComponent;
|
|
34
|
+
/**
|
|
35
|
+
* The props used for each component slot.
|
|
36
|
+
* @default {}
|
|
37
|
+
*/
|
|
38
|
+
slotProps?: ChartsLegendSlotComponentProps;
|
|
22
39
|
} & SizingParams;
|
|
23
40
|
type DefaultizedChartsLegendProps = DefaultizedProps<ChartsLegendProps, 'direction' | 'position'>;
|
|
24
41
|
type SeriesLegendOwnerState = ChartSeriesDefaultized<any> & Pick<DefaultizedChartsLegendProps, 'direction'> & {
|
|
@@ -44,5 +61,11 @@ export declare const ChartsLegendMark: import("@emotion/styled").StyledComponent
|
|
|
44
61
|
};
|
|
45
62
|
}, Pick<React.SVGProps<SVGRectElement>, keyof React.SVGProps<SVGRectElement>>, {}>;
|
|
46
63
|
export declare const ChartsLegendLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, Pick<React.SVGTextElementAttributes<SVGTextElement>, keyof React.SVGTextElementAttributes<SVGTextElement>>, {}>;
|
|
47
|
-
export
|
|
64
|
+
export interface LegendRendererProps extends Omit<DefaultizedChartsLegendProps, 'slots' | 'slotProps'> {
|
|
65
|
+
series: FormattedSeries;
|
|
66
|
+
seriesToDisplay: LegendParams[];
|
|
67
|
+
drawingArea: DrawingArea;
|
|
68
|
+
classes: Record<'label' | 'mark' | 'series' | 'root', string>;
|
|
69
|
+
}
|
|
70
|
+
export declare function ChartsLegend(inProps: ChartsLegendProps): React.JSX.Element;
|
|
48
71
|
export {};
|