@mui/x-charts 7.0.0-alpha.8 → 7.0.0-alpha.9
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/formatter.js +1 -1
- package/CHANGELOG.md +379 -2
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -4
- package/LineChart/formatter.js +6 -2
- package/PieChart/PieArcLabel.js +1 -1
- package/README.md +1 -1
- package/SparkLineChart/SparkLineChart.d.ts +2 -2
- package/SparkLineChart/SparkLineChart.js +2 -2
- package/esm/BarChart/formatter.js +1 -1
- package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +3 -4
- package/esm/LineChart/formatter.js +6 -2
- package/esm/PieChart/PieArcLabel.js +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +2 -2
- package/esm/hooks/useAxisEvents.js +1 -3
- package/esm/internals/stackSeries.js +5 -3
- package/esm/models/index.js +1 -0
- package/esm/models/stacking.js +1 -0
- package/hooks/useAxisEvents.js +1 -3
- package/index.js +1 -1
- package/internals/defaultizeColor.d.ts +9 -9
- package/internals/stackSeries.d.ts +8 -3
- package/internals/stackSeries.js +4 -3
- package/legacy/BarChart/formatter.js +1 -1
- package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +3 -4
- package/legacy/LineChart/formatter.js +7 -3
- package/legacy/PieChart/PieArcLabel.js +3 -1
- package/legacy/SparkLineChart/SparkLineChart.js +2 -2
- package/legacy/hooks/useAxisEvents.js +1 -3
- package/legacy/index.js +1 -1
- package/legacy/internals/stackSeries.js +5 -3
- package/legacy/models/index.js +1 -0
- package/legacy/models/stacking.js +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +11 -0
- package/models/seriesType/bar.d.ts +8 -2
- package/models/seriesType/common.d.ts +3 -4
- package/models/seriesType/index.d.ts +0 -1
- package/models/seriesType/line.d.ts +7 -1
- package/models/stacking.d.ts +2 -0
- package/models/stacking.js +5 -0
- package/modern/BarChart/formatter.js +1 -1
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -4
- package/modern/LineChart/formatter.js +6 -2
- package/modern/PieChart/PieArcLabel.js +1 -1
- package/modern/SparkLineChart/SparkLineChart.js +2 -2
- package/modern/hooks/useAxisEvents.js +1 -3
- package/modern/index.js +1 -1
- package/modern/internals/stackSeries.js +4 -3
- package/modern/models/index.js +1 -0
- package/modern/models/stacking.js +1 -0
- package/package.json +7 -7
package/BarChart/formatter.js
CHANGED
|
@@ -72,7 +72,7 @@ const formatter = (params, dataset) => {
|
|
|
72
72
|
return {
|
|
73
73
|
seriesOrder,
|
|
74
74
|
stackingGroups,
|
|
75
|
-
series: (0, _defaultizeValueFormatter.default)(completedSeries, v => v
|
|
75
|
+
series: (0, _defaultizeValueFormatter.default)(completedSeries, v => v === null ? '' : v.toLocaleString())
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
78
|
var _default = exports.default = formatter;
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,344 @@
|
|
|
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-alpha.9
|
|
7
|
+
|
|
8
|
+
_Jan 19, 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 Data Grid headers have been refactored to bring immense improvements to scrolling, state management, and overall performance of the grid.
|
|
13
|
+
- ⚙️ The Data Grid disabled column-specific features like filtering, sorting, grouping, etc. could now be accessed programmatically. See the related [docs](https://next.mui.com/x/react-data-grid/api-object/#access-the-disabled-column-features) section.
|
|
14
|
+
- 🚀 Uplift the `SimpleTreeView` customization examples (#11424) @noraleonte
|
|
15
|
+
- 🌍 Add Croatian (hr-HR), Portuguese (pt-PT), and Chinese (Hong Kong) (zh-HK) locales (#11668) on the Data Grid @BCaspari
|
|
16
|
+
- 🐞 Bugfixes
|
|
17
|
+
- 💔 Bump `@mui/material` peer dependency for all packages (#11692) @LukasTy
|
|
18
|
+
The minimum required version of `@mui/material` is now `5.15.0`.
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### Breaking changes
|
|
23
|
+
|
|
24
|
+
- The `ariaV7` experimental flag has been removed and the Data Grid now uses the improved accessibility implementation by default.
|
|
25
|
+
If you were using the `ariaV7` flag, you can remove it from the `experimentalFeatures` prop:
|
|
26
|
+
|
|
27
|
+
```diff
|
|
28
|
+
-<DataGrid experimentalFeatures={{ ariaV7: true }} />
|
|
29
|
+
+<DataGrid />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The most notable changes that might affect your application or tests are:
|
|
33
|
+
|
|
34
|
+
- The `role="grid"` attribute along with related ARIA attributes are now applied to the inner `div` element instead of the root `div` element:
|
|
35
|
+
|
|
36
|
+
```diff
|
|
37
|
+
-<div class="MuiDataGrid-root" role="grid" aria-colcount="5" aria-rowcount="101" aria-multiselectable="false">
|
|
38
|
+
+<div class="MuiDataGrid-root">
|
|
39
|
+
<div class="MuiDataGrid-toolbarContainer"></div>
|
|
40
|
+
- <div class="MuiDataGrid-main"></div>
|
|
41
|
+
+ <div class="MuiDataGrid-main" role="grid" aria-colcount="5" aria-rowcount="101" aria-multiselectable="false"></div>
|
|
42
|
+
<div class="MuiDataGrid-footerContainer"></div>
|
|
43
|
+
</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- When the [Tree data](https://next.mui.com/x/react-data-grid/tree-data/) feature is used, the grid role is now `role="treegrid"` instead of `role="grid"`.
|
|
47
|
+
- The Data Grid cells now have `role="gridcell"` instead of `role="cell"`.
|
|
48
|
+
|
|
49
|
+
- The buttons in toolbar composable components `GridToolbarColumnsButton`, `GridToolbarFilterButton`, `GridToolbarDensity`, and `GridToolbarExport` are now wrapped with a tooltip component and have a consistent interface. To override some props corresponding to the toolbar buttons or their corresponding tooltips, you can use the `slotProps` prop. Following is an example diff. See [Toolbar section](https://next.mui.com/x/react-data-grid/components/#toolbar) for more details.
|
|
50
|
+
|
|
51
|
+
```diff
|
|
52
|
+
function CustomToolbar() {
|
|
53
|
+
return (
|
|
54
|
+
<GridToolbarContainer>
|
|
55
|
+
<GridToolbarColumnsButton />
|
|
56
|
+
<GridToolbarFilterButton
|
|
57
|
+
- title="Custom filter" // 🛑 This was previously forwarded to the tooltip component
|
|
58
|
+
+ slotProps={{ tooltip: { title: 'Custom filter' } }} // ✅ This is the correct way now
|
|
59
|
+
/>
|
|
60
|
+
<GridToolbarDensitySelector
|
|
61
|
+
- variant="outlined" // 🛑 This was previously forwarded to the button component
|
|
62
|
+
+ slotProps={{ button: { variant: 'outlined' } }} // ✅ This is the correct way now
|
|
63
|
+
/>
|
|
64
|
+
</GridToolbarContainer>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- Column grouping is now enabled by default. The flag `columnGrouping` is no longer needed to be passed to the `experimentalFeatures` prop to enable it.
|
|
70
|
+
|
|
71
|
+
```diff
|
|
72
|
+
-<DataGrid experimentalFeatures={{ columnGrouping: true }} />
|
|
73
|
+
+<DataGrid />
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- The column grouping API methods `getColumnGroupPath` and `getAllGroupDetails` are no longer prefixed with `unstable_`.
|
|
77
|
+
|
|
78
|
+
- The column grouping selectors `gridFocusColumnGroupHeaderSelector` and `gridTabIndexColumnGroupHeaderSelector` are no longer prefixed with `unstable_`.
|
|
79
|
+
|
|
80
|
+
- The disabled column specific features like `hiding`, `sorting`, `filtering`, `pinning`, `row grouping`, etc could now be controlled programmatically using `initialState`, respective controlled models, or the [API object](https://next.mui.com/x/react-data-grid/api-object/). See the related [docs](https://next.mui.com/x/react-data-grid/api-object/#access-the-disabled-column-features) section.
|
|
81
|
+
|
|
82
|
+
#### `@mui/x-data-grid@7.0.0-alpha.9`
|
|
83
|
+
|
|
84
|
+
- [DataGrid] Allow to filter non-filterable columns programmatically (#11538) @MBilalShafi
|
|
85
|
+
- [DataGrid] Allow to programmatically sort unsortable columns (#11512) @MBilalShafi
|
|
86
|
+
- [DataGrid] Fix incorrect default value for `filterModel.logicOperator` (#11673) @MBilalShafi
|
|
87
|
+
- [DataGrid] Make `column grouping` feature stable (#11698) @MBilalShafi
|
|
88
|
+
- [DataGrid] Remove the `ariaV7` experimental flag (#11428) @cherniavskii
|
|
89
|
+
- [DataGrid] Start the FAQ page (#11686) @MBilalShafi
|
|
90
|
+
- [DataGrid] Sticky headers (#10059) @romgrk
|
|
91
|
+
- [DataGrid] Wrap toolbar buttons with tooltip (#11357) @MBilalShafi
|
|
92
|
+
- [l10n] Add Croatian (hr-HR), Portuguese (pt-PT), and Chinese (Hong Kong) (zh-HK) locales (#11668) @BCaspari
|
|
93
|
+
|
|
94
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.9` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
95
|
+
|
|
96
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.9`, plus:
|
|
97
|
+
|
|
98
|
+
- [DataGridPro] Allow non-pinnable columns to be pinned programmatically (#11680) @MBilalShafi
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.9` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
101
|
+
|
|
102
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.9`, plus:
|
|
103
|
+
|
|
104
|
+
- [DataGridPremium] Allow aggregation to be applied for non-aggregable columns (#11574) @MBilalShafi
|
|
105
|
+
- [DataGridPremium] Allow programmatically grouping non-groupable columns (#11539) @MBilalShafi
|
|
106
|
+
|
|
107
|
+
### Date Pickers
|
|
108
|
+
|
|
109
|
+
#### Breaking changes
|
|
110
|
+
|
|
111
|
+
- The `locales` export has been removed from the root of the packages.
|
|
112
|
+
If you were importing locales from the root, be sure to update it:
|
|
113
|
+
|
|
114
|
+
```diff
|
|
115
|
+
-import { frFR } from '@mui/x-date-pickers';
|
|
116
|
+
+import { frFR } from '@mui/x-date-pickers/locales';
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.9`
|
|
120
|
+
|
|
121
|
+
- [fields] Make `PickersTextField` and its dependencies public (#11581) @flaviendelangle
|
|
122
|
+
- [fields] Support farsi digits (#11639) @flaviendelangle
|
|
123
|
+
- [pickers] Fix AdapterLuxon `getWeekNumber` behavior (#11697) @LukasTy
|
|
124
|
+
- [pickers] Stop root exporting `locales` (#11612) @LukasTy
|
|
125
|
+
|
|
126
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.9` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
127
|
+
|
|
128
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.9`.
|
|
129
|
+
|
|
130
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.9`
|
|
131
|
+
|
|
132
|
+
- [charts] Do not propagate `innerRadius` and `outerRadius` to the DOM (#11689) @alexfauquette
|
|
133
|
+
- [charts] Fix default `stackOffset` for `LineChart` (#11647) @alexfauquette
|
|
134
|
+
- [charts] Remove a TS ignore (#11688) @alexfauquette
|
|
135
|
+
|
|
136
|
+
### Tree View
|
|
137
|
+
|
|
138
|
+
#### Breaking changes
|
|
139
|
+
|
|
140
|
+
- The `expandIcon` / `defaultExpandIcon` props, used to expand the children of a node (rendered when it is collapsed),
|
|
141
|
+
is now defined as a slot both on the Tree View and the Tree Item components.
|
|
142
|
+
|
|
143
|
+
If you were using the `ChevronRight` icon from `@mui/icons-material`,
|
|
144
|
+
you can stop passing it to your component because it is now the default value:
|
|
145
|
+
|
|
146
|
+
```diff
|
|
147
|
+
-import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
148
|
+
|
|
149
|
+
<SimpleTreeView
|
|
150
|
+
- defaultExpandIcon={<ChevronRightIcon />}
|
|
151
|
+
>
|
|
152
|
+
{items}
|
|
153
|
+
</SimpleTreeView>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
If you were passing another icon to your Tree View component,
|
|
157
|
+
you need to use the new `expandIcon` slot on this component:
|
|
158
|
+
|
|
159
|
+
```diff
|
|
160
|
+
<SimpleTreeView
|
|
161
|
+
- defaultExpandIcon={<MyCustomExpandIcon />}
|
|
162
|
+
+ slots={{ expandIcon: MyCustomExpandIcon }}
|
|
163
|
+
>
|
|
164
|
+
{items}
|
|
165
|
+
</SimpleTreeView>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
If you were passing another icon to your Tree Item component,
|
|
169
|
+
you need to use the new `expandIcon` slot on this component:
|
|
170
|
+
|
|
171
|
+
```diff
|
|
172
|
+
<SimpleTreeView>
|
|
173
|
+
<TreeItem
|
|
174
|
+
nodeId="1"
|
|
175
|
+
label="Node 1"
|
|
176
|
+
- expandIcon={<MyCustomExpandIcon />}
|
|
177
|
+
+ slots={{ expandIcon: MyCustomExpandIcon }}
|
|
178
|
+
/>
|
|
179
|
+
</SimpleTreeView>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- The `collapseIcon` / `defaultCollapseIcon` props, used to collapse the children of a node (rendered when it is expanded),
|
|
183
|
+
is now defined as a slot both on the Tree View and the Tree Item components.
|
|
184
|
+
|
|
185
|
+
If you were using the `ExpandMore` icon from `@mui/icons-material`,
|
|
186
|
+
you can stop passing it to your component because it is now the default value:
|
|
187
|
+
|
|
188
|
+
```diff
|
|
189
|
+
- import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
190
|
+
|
|
191
|
+
<SimpleTreeView
|
|
192
|
+
- defaultCollapseIcon={<ExpandMoreIcon />}
|
|
193
|
+
>
|
|
194
|
+
{items}
|
|
195
|
+
</SimpleTreeView>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
If you were passing another icon to your Tree View component,
|
|
199
|
+
you need to use the new `collapseIcon` slot on this component:
|
|
200
|
+
|
|
201
|
+
```diff
|
|
202
|
+
<SimpleTreeView
|
|
203
|
+
- defaultCollapseIcon={<MyCustomCollapseIcon />}
|
|
204
|
+
+ slots={{ collapseIcon: MyCustomCollapseIcon }}
|
|
205
|
+
>
|
|
206
|
+
{items}
|
|
207
|
+
</SimpleTreeView>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
If you were passing another icon to your Tree Item component,
|
|
211
|
+
you need to use the new `collapseIcon` slot on this component:
|
|
212
|
+
|
|
213
|
+
```diff
|
|
214
|
+
<SimpleTreeView>
|
|
215
|
+
<TreeItem
|
|
216
|
+
nodeId="1"
|
|
217
|
+
label="Node 1"
|
|
218
|
+
- collapseIcon={<MyCustomCollapseIcon />}
|
|
219
|
+
+ slots={{ collapseIcon: MyCustomCollapseIcon }}
|
|
220
|
+
/>
|
|
221
|
+
</SimpleTreeView>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
- The `useTreeItem` hook has been renamed `useTreeItemState`.
|
|
225
|
+
This will help create a new headless version of the `TreeItem` component based on a future `useTreeItem` hook.
|
|
226
|
+
|
|
227
|
+
```diff
|
|
228
|
+
-import { TreeItem, useTreeItem } from '@mui/x-tree-view/TreeItem';
|
|
229
|
+
+import { TreeItem, useTreeItemState } from '@mui/x-tree-view/TreeItem';
|
|
230
|
+
|
|
231
|
+
const CustomContent = React.forwardRef((props, ref) => {
|
|
232
|
+
- const { disabled } = useTreeItem(props.nodeId);
|
|
233
|
+
+ const { disabled } = useTreeItemState(props.nodeId);
|
|
234
|
+
|
|
235
|
+
// Render some UI
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
function App() {
|
|
239
|
+
return (
|
|
240
|
+
<SimpleTreeView>
|
|
241
|
+
<TreeItem ContentComponent={CustomContent} />
|
|
242
|
+
</SimpleTreeView>
|
|
243
|
+
)
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
- The `parentIcon` prop has been removed from the Tree View components.
|
|
248
|
+
|
|
249
|
+
If you were passing an icon to your Tree View component,
|
|
250
|
+
you can achieve the same behavior
|
|
251
|
+
by passing the same icon to both the `collapseIcon` and the `expandIcon` slots on this component:
|
|
252
|
+
|
|
253
|
+
```diff
|
|
254
|
+
<SimpleTreeView
|
|
255
|
+
- defaultParentIcon={<MyCustomParentIcon />}
|
|
256
|
+
+ slots={{ collapseIcon: MyCustomParentIcon, expandIcon: MyCustomParentIcon }}
|
|
257
|
+
>
|
|
258
|
+
{items}
|
|
259
|
+
</SimpleTreeView>
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
- The `endIcon` / `defaultEndIcon` props, rendered next to an item without children,
|
|
263
|
+
is now defined as a slot both on the Tree View and the Tree Item components.
|
|
264
|
+
|
|
265
|
+
If you were passing an icon to your Tree View component,
|
|
266
|
+
you need to use the new `endIcon` slot on this component:
|
|
267
|
+
|
|
268
|
+
```diff
|
|
269
|
+
<SimpleTreeView
|
|
270
|
+
- defaultEndIcon={<MyCustomEndIcon />}
|
|
271
|
+
+ slots={{ endIcon: MyCustomEndIcon }}
|
|
272
|
+
>
|
|
273
|
+
{items}
|
|
274
|
+
</SimpleTreeView>
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
If you were passing an icon to your Tree Item component,
|
|
278
|
+
you need to use the new `endIcon` slot on this component:
|
|
279
|
+
|
|
280
|
+
```diff
|
|
281
|
+
<SimpleTreeView>
|
|
282
|
+
<TreeItem
|
|
283
|
+
nodeId="1"
|
|
284
|
+
label="Node 1"
|
|
285
|
+
- endIcon={<MyCustomEndIcon />}
|
|
286
|
+
+ slots={{ endIcon: MyCustomEndIcon }}
|
|
287
|
+
/>
|
|
288
|
+
</SimpleTreeView>
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
- The `icon` prop, rendered next to an item without children,
|
|
292
|
+
is now defined as a slot on the Tree Item component.
|
|
293
|
+
|
|
294
|
+
If you were passing an icon to your Tree Item component,
|
|
295
|
+
you need to use the new `icon` slot on this component:
|
|
296
|
+
|
|
297
|
+
```diff
|
|
298
|
+
<SimpleTreeView>
|
|
299
|
+
<TreeItem
|
|
300
|
+
nodeId="1"
|
|
301
|
+
label="Node 1"
|
|
302
|
+
- icon={<MyCustomIcon />}
|
|
303
|
+
+ slots={{ icon: MyCustomIcon }}
|
|
304
|
+
/>
|
|
305
|
+
</SimpleTreeView>
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### `@mui/x-tree-view@7.0.0-alpha.9`
|
|
309
|
+
|
|
310
|
+
- [TreeView] Adjust expansion and selection docs (#11723) @noraleonte
|
|
311
|
+
- [TreeView] Improve plugin signature definition (#11665) @flaviendelangle
|
|
312
|
+
- [TreeView] Make each plugin responsible for its context value (#11623) @flaviendelangle
|
|
313
|
+
- [TreeView] Migrate remaining icon props to slots (#11713) @flaviendelangle
|
|
314
|
+
- [TreeView] Pass through `Theme` generic to variants (#11480) @dhulme
|
|
315
|
+
- [TreeView] Rename `useTreeItem` to `useTreeItemState` (#11712) @flaviendelangle
|
|
316
|
+
- [TreeView] Add `slots` and `slotProps` on the Tree View components (#11664) @flaviendelangle
|
|
317
|
+
- [TreeView] Explore a better plugin model API (#11567) @flaviendelangle
|
|
318
|
+
|
|
319
|
+
### Docs
|
|
320
|
+
|
|
321
|
+
- [docs] Clean the pickers migration guide (#11694) @flaviendelangle
|
|
322
|
+
- [docs] Cleanup and fix Pickers Playground styling (#11700) @LukasTy
|
|
323
|
+
- [docs] First draft of the Tree View custom plugin doc (#11564) @flaviendelangle
|
|
324
|
+
- [docs] Fix Pickers migration syntax and diffs (#11695) @LukasTy
|
|
325
|
+
- [docs] Fix generated tree view API docs (#11737) @LukasTy
|
|
326
|
+
- [docs] Generate docs for Tree View slots (#11730) @flaviendelangle
|
|
327
|
+
- [docs] Improve codemod for v7 (#11650) @oliviertassinari
|
|
328
|
+
- [docs] Improve data grid `pageSizeOptions` prop documentation (#11682) @oliviertassinari
|
|
329
|
+
- [docs] Parse markdown on API docs demo titles (#11728) @LukasTy
|
|
330
|
+
- [docs] Remove the description from the `className` prop (#11693) @oliviertassinari
|
|
331
|
+
- [docs] Uplift `SimpleTreeView` customization examples (#11424) @noraleonte
|
|
332
|
+
- [docs] Uplift the Date Pickers playground (#11555) @danilo-leal
|
|
333
|
+
|
|
334
|
+
### Core
|
|
335
|
+
|
|
336
|
+
- [core] Bump `@mui/material` peer dependency for all packages (#11692) @LukasTy
|
|
337
|
+
- [core] Make `karma` run in parallel (#11571) @romgrk
|
|
338
|
+
- [core] make `karma-parallel` run under a new command (#11716) @romgrk
|
|
339
|
+
- [code-infra] Migrate all prettier APIs to the async version (#11732) @Janpot
|
|
340
|
+
- [code-infra] Update the Babel macro path (#11479) @michaldudak
|
|
341
|
+
- [docs-infra] Enforce brand name rules (#11651) @oliviertassinari
|
|
342
|
+
- [test] Fix flaky Data Grid test (#11725) @cherniavskii
|
|
343
|
+
|
|
6
344
|
## 7.0.0-alpha.8
|
|
7
345
|
|
|
8
346
|
_Jan 11, 2024_
|
|
@@ -103,8 +441,8 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
|
|
|
103
441
|
id: 'node-1',
|
|
104
442
|
label: 'Node 1',
|
|
105
443
|
children: [
|
|
106
|
-
{ id: 'node-1-1', label: Node 1.1' },
|
|
107
|
-
{ id: 'node-1-2', label: Node 1.2' },
|
|
444
|
+
{ id: 'node-1-1', label: 'Node 1.1' },
|
|
445
|
+
{ id: 'node-1-2', label: 'Node 1.2' },
|
|
108
446
|
],
|
|
109
447
|
},
|
|
110
448
|
{
|
|
@@ -1119,10 +1457,20 @@ And if you need the exact same output you can apply the following transformation
|
|
|
1119
1457
|
- The `adapter.toISO` method have been removed, you can directly use your date library:
|
|
1120
1458
|
|
|
1121
1459
|
```diff
|
|
1460
|
+
// For Day.js
|
|
1122
1461
|
-const isoString = adapter.toISO(value);
|
|
1123
1462
|
+const isoString = value.toISOString();
|
|
1463
|
+
|
|
1464
|
+
// For Luxon
|
|
1465
|
+
-const isoString = adapter.toISO(value);
|
|
1124
1466
|
+const isoString = value.toUTC().toISO({ format: 'extended' });
|
|
1467
|
+
|
|
1468
|
+
// For DateFns
|
|
1469
|
+
-const isoString = adapter.toISO(value);
|
|
1125
1470
|
+const isoString = dateFns.formatISO(value, { format: 'extended' });
|
|
1471
|
+
|
|
1472
|
+
// For Moment
|
|
1473
|
+
-const isoString = adapter.toISO(value);
|
|
1126
1474
|
+const isoString = value.toISOString();
|
|
1127
1475
|
```
|
|
1128
1476
|
|
|
@@ -1424,6 +1772,35 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
1424
1772
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
1425
1773
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
1426
1774
|
|
|
1775
|
+
## 6.19.1
|
|
1776
|
+
|
|
1777
|
+
_Jan 19, 2024_
|
|
1778
|
+
|
|
1779
|
+
We'd like to offer a big thanks to the 1 contributors who made this release possible. Here are some highlights ✨:
|
|
1780
|
+
|
|
1781
|
+
- 🌍 Add Croatian (hr-HR), Portuguese (pt-PT), and Chinese (Hong Kong) (zh-HK) locales (#11717) @BCaspari
|
|
1782
|
+
- 🐞 Bugfixes
|
|
1783
|
+
|
|
1784
|
+
### Data Grid
|
|
1785
|
+
|
|
1786
|
+
#### `@mui/x-data-grid@6.19.1`
|
|
1787
|
+
|
|
1788
|
+
- [l10n] Add Croatian (hr-HR), Portuguese (pt-PT), and Chinese (Hong Kong) (zh-HK) locales (#11717) @BCaspari
|
|
1789
|
+
|
|
1790
|
+
#### `@mui/x-data-grid-pro@6.19.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1791
|
+
|
|
1792
|
+
Same changes as in `@mui/x-data-grid@6.19.1`.
|
|
1793
|
+
|
|
1794
|
+
#### `@mui/x-data-grid-premium@6.19.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1795
|
+
|
|
1796
|
+
Same changes as in `@mui/x-data-grid-pro@6.19.1`.
|
|
1797
|
+
|
|
1798
|
+
### Charts / `@mui/x-charts@6.19.1`
|
|
1799
|
+
|
|
1800
|
+
- [charts] Add `arcLabelRadius` property (#11563) @alexfauquette
|
|
1801
|
+
- [charts] Do not propagate `innerRadius` and `outerRadius` to the DOM (#11719) @alexfauquette
|
|
1802
|
+
- [charts] Fix default `stackOffset` for `LineChart` (#11703) @alexfauquette
|
|
1803
|
+
|
|
1427
1804
|
## 6.19.0
|
|
1428
1805
|
|
|
1429
1806
|
_Jan 11, 2024_
|
|
@@ -32,10 +32,8 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
32
32
|
color: series.color,
|
|
33
33
|
displayedLabel: series.label
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
const formattedValue = series.valueFormatter(series.data[itemData.dataIndex]);
|
|
35
|
+
const value = series.data[itemData.dataIndex];
|
|
36
|
+
const formattedValue = series.valueFormatter?.(value);
|
|
39
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipPaper, {
|
|
40
38
|
sx: sx,
|
|
41
39
|
className: classes.root,
|
package/LineChart/formatter.js
CHANGED
|
@@ -17,7 +17,11 @@ const formatter = (params, dataset) => {
|
|
|
17
17
|
seriesOrder,
|
|
18
18
|
series
|
|
19
19
|
} = params;
|
|
20
|
-
const stackingGroups = (0, _stackSeries.getStackingGroups)(params
|
|
20
|
+
const stackingGroups = (0, _stackSeries.getStackingGroups)((0, _extends2.default)({}, params, {
|
|
21
|
+
defaultStrategy: {
|
|
22
|
+
stackOffset: 'none'
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
21
25
|
|
|
22
26
|
// Create a data set with format adapted to d3
|
|
23
27
|
const d3Dataset = dataset ?? [];
|
|
@@ -72,7 +76,7 @@ const formatter = (params, dataset) => {
|
|
|
72
76
|
return {
|
|
73
77
|
seriesOrder,
|
|
74
78
|
stackingGroups,
|
|
75
|
-
series: (0, _defaultizeValueFormatter.default)(completedSeries, v => v
|
|
79
|
+
series: (0, _defaultizeValueFormatter.default)(completedSeries, v => v === null ? '' : v.toLocaleString())
|
|
76
80
|
};
|
|
77
81
|
};
|
|
78
82
|
var _default = exports.default = formatter;
|
package/PieChart/PieArcLabel.js
CHANGED
|
@@ -18,7 +18,7 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
|
|
|
18
18
|
var _styles = require("@mui/material/styles");
|
|
19
19
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
21
|
+
const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
22
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
24
|
function getPieArcLabelUtilityClass(slot) {
|
package/README.md
CHANGED
|
@@ -36,9 +36,9 @@ export interface SparkLineChartProps extends Omit<ResponsiveChartContainerProps,
|
|
|
36
36
|
* Formatter used by the tooltip.
|
|
37
37
|
* @param {number} value The value to format.
|
|
38
38
|
* @returns {string} the formatted value.
|
|
39
|
-
* @default (v: number) => v.toString()
|
|
39
|
+
* @default (v: number | null) => (v === null ? '' : v.toString())
|
|
40
40
|
*/
|
|
41
|
-
valueFormatter?: (value: number) => string;
|
|
41
|
+
valueFormatter?: (value: number | null) => string;
|
|
42
42
|
/**
|
|
43
43
|
* Set to `true` to enable the tooltip in the sparkline.
|
|
44
44
|
* @default false
|
|
@@ -50,7 +50,7 @@ const SparkLineChart = exports.SparkLineChart = /*#__PURE__*/React.forwardRef(fu
|
|
|
50
50
|
slotProps,
|
|
51
51
|
data,
|
|
52
52
|
plotType = 'line',
|
|
53
|
-
valueFormatter = v => v.toString(),
|
|
53
|
+
valueFormatter = v => v === null ? '' : v.toString(),
|
|
54
54
|
area,
|
|
55
55
|
curve = 'linear'
|
|
56
56
|
} = props;
|
|
@@ -213,7 +213,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
213
213
|
* Formatter used by the tooltip.
|
|
214
214
|
* @param {number} value The value to format.
|
|
215
215
|
* @returns {string} the formatted value.
|
|
216
|
-
* @default (v: number) => v.toString()
|
|
216
|
+
* @default (v: number | null) => (v === null ? '' : v.toString())
|
|
217
217
|
*/
|
|
218
218
|
valueFormatter: _propTypes.default.func,
|
|
219
219
|
viewBox: _propTypes.default.shape({
|
|
@@ -69,7 +69,7 @@ const formatter = (params, dataset) => {
|
|
|
69
69
|
return {
|
|
70
70
|
seriesOrder,
|
|
71
71
|
stackingGroups,
|
|
72
|
-
series: defaultizeValueFormatter(completedSeries, v => v
|
|
72
|
+
series: defaultizeValueFormatter(completedSeries, v => v === null ? '' : v.toLocaleString())
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
export default formatter;
|
|
@@ -5,6 +5,7 @@ import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltip
|
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
function DefaultChartsItemTooltipContent(props) {
|
|
8
|
+
var _series$valueFormatte;
|
|
8
9
|
const {
|
|
9
10
|
series,
|
|
10
11
|
itemData,
|
|
@@ -24,10 +25,8 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
24
25
|
color: series.color,
|
|
25
26
|
displayedLabel: series.label
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
const formattedValue = series.valueFormatter(series.data[itemData.dataIndex]);
|
|
28
|
+
const value = series.data[itemData.dataIndex];
|
|
29
|
+
const formattedValue = (_series$valueFormatte = series.valueFormatter) == null ? void 0 : _series$valueFormatte.call(series, value);
|
|
31
30
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
32
31
|
sx: sx,
|
|
33
32
|
className: classes.root,
|
|
@@ -11,7 +11,11 @@ const formatter = (params, dataset) => {
|
|
|
11
11
|
seriesOrder,
|
|
12
12
|
series
|
|
13
13
|
} = params;
|
|
14
|
-
const stackingGroups = getStackingGroups(params
|
|
14
|
+
const stackingGroups = getStackingGroups(_extends({}, params, {
|
|
15
|
+
defaultStrategy: {
|
|
16
|
+
stackOffset: 'none'
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
15
19
|
|
|
16
20
|
// Create a data set with format adapted to d3
|
|
17
21
|
const d3Dataset = (_ref = dataset) != null ? _ref : [];
|
|
@@ -69,7 +73,7 @@ const formatter = (params, dataset) => {
|
|
|
69
73
|
return {
|
|
70
74
|
seriesOrder,
|
|
71
75
|
stackingGroups,
|
|
72
|
-
series: defaultizeValueFormatter(completedSeries, v => v
|
|
76
|
+
series: defaultizeValueFormatter(completedSeries, v => v === null ? '' : v.toLocaleString())
|
|
73
77
|
};
|
|
74
78
|
};
|
|
75
79
|
export default formatter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
3
|
+
const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { animated, to } from '@react-spring/web';
|
|
@@ -42,7 +42,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
42
42
|
slotProps,
|
|
43
43
|
data,
|
|
44
44
|
plotType = 'line',
|
|
45
|
-
valueFormatter = v => v.toString(),
|
|
45
|
+
valueFormatter = v => v === null ? '' : v.toString(),
|
|
46
46
|
area,
|
|
47
47
|
curve = 'linear'
|
|
48
48
|
} = props;
|
|
@@ -205,7 +205,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
205
205
|
* Formatter used by the tooltip.
|
|
206
206
|
* @param {number} value The value to format.
|
|
207
207
|
* @returns {string} the formatted value.
|
|
208
|
-
* @default (v: number) => v.toString()
|
|
208
|
+
* @default (v: number | null) => (v === null ? '' : v.toString())
|
|
209
209
|
*/
|
|
210
210
|
valueFormatter: PropTypes.func,
|
|
211
211
|
viewBox: PropTypes.shape({
|
|
@@ -61,9 +61,7 @@ export const useAxisEvents = disableAxisListener => {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
if (v <= valueAsNumber) {
|
|
64
|
-
if (index === axisData.length - 1 ||
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
Math.abs(value - v) < Math.abs(value - getAsANumber(axisData[index + 1]))) {
|
|
64
|
+
if (index === axisData.length - 1 || Math.abs(getAsANumber(value) - v) < Math.abs(getAsANumber(value) - getAsANumber(axisData[index + 1]))) {
|
|
67
65
|
return true;
|
|
68
66
|
}
|
|
69
67
|
}
|
|
@@ -56,7 +56,8 @@ export const StackOffset = {
|
|
|
56
56
|
export const getStackingGroups = params => {
|
|
57
57
|
const {
|
|
58
58
|
series,
|
|
59
|
-
seriesOrder
|
|
59
|
+
seriesOrder,
|
|
60
|
+
defaultStrategy
|
|
60
61
|
} = params;
|
|
61
62
|
const stackingGroups = [];
|
|
62
63
|
const stackIndex = {};
|
|
@@ -73,11 +74,12 @@ export const getStackingGroups = params => {
|
|
|
73
74
|
stackingOffset: StackOffset.none
|
|
74
75
|
});
|
|
75
76
|
} else if (stackIndex[stack] === undefined) {
|
|
77
|
+
var _ref, _ref2;
|
|
76
78
|
stackIndex[stack] = stackingGroups.length;
|
|
77
79
|
stackingGroups.push({
|
|
78
80
|
ids: [id],
|
|
79
|
-
stackingOrder: StackOrder[stackOrder != null ? stackOrder : 'none'],
|
|
80
|
-
stackingOffset: StackOffset[stackOffset != null ? stackOffset : 'diverging']
|
|
81
|
+
stackingOrder: StackOrder[(_ref = stackOrder != null ? stackOrder : defaultStrategy == null ? void 0 : defaultStrategy.stackOrder) != null ? _ref : 'none'],
|
|
82
|
+
stackingOffset: StackOffset[(_ref2 = stackOffset != null ? stackOffset : defaultStrategy == null ? void 0 : defaultStrategy.stackOffset) != null ? _ref2 : 'diverging']
|
|
81
83
|
});
|
|
82
84
|
} else {
|
|
83
85
|
stackingGroups[stackIndex[stack]].ids.push(id);
|
package/esm/models/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/hooks/useAxisEvents.js
CHANGED
|
@@ -69,9 +69,7 @@ const useAxisEvents = disableAxisListener => {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
if (v <= valueAsNumber) {
|
|
72
|
-
if (index === axisData.length - 1 ||
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
Math.abs(value - v) < Math.abs(value - getAsANumber(axisData[index + 1]))) {
|
|
72
|
+
if (index === axisData.length - 1 || Math.abs(getAsANumber(value) - v) < Math.abs(getAsANumber(value) - getAsANumber(axisData[index + 1]))) {
|
|
75
73
|
return true;
|
|
76
74
|
}
|
|
77
75
|
}
|
package/index.js
CHANGED
|
@@ -39,23 +39,23 @@ export declare function defaultizeColor(series: AllSeriesType, seriesIndex: numb
|
|
|
39
39
|
} | undefined;
|
|
40
40
|
id?: string | undefined;
|
|
41
41
|
color?: string | undefined;
|
|
42
|
-
valueFormatter?: (
|
|
42
|
+
valueFormatter?: (<V extends import("../models/helpers").MakeOptional<import("../models/seriesType").PieValueType, "id">>(value: V) => string) | undefined;
|
|
43
43
|
highlightScope?: Partial<import("..").HighlightScope> | undefined;
|
|
44
44
|
} | {
|
|
45
45
|
type: "bar";
|
|
46
|
-
data?: number[] | undefined;
|
|
46
|
+
data?: (number | null)[] | undefined;
|
|
47
47
|
dataKey?: string | undefined;
|
|
48
48
|
label?: string | undefined;
|
|
49
49
|
layout?: "horizontal" | "vertical" | undefined;
|
|
50
|
+
stackOffset?: import("..").StackOffsetType | undefined;
|
|
50
51
|
id?: string | undefined;
|
|
51
52
|
color: string;
|
|
52
|
-
valueFormatter?: ((value:
|
|
53
|
+
valueFormatter?: (<V_1 extends number | null>(value: V_1) => string) | undefined;
|
|
53
54
|
highlightScope?: Partial<import("..").HighlightScope> | undefined;
|
|
54
55
|
xAxisKey?: string | undefined;
|
|
55
56
|
yAxisKey?: string | undefined;
|
|
56
57
|
stack?: string | undefined;
|
|
57
|
-
|
|
58
|
-
stackOrder?: "reverse" | "none" | "appearance" | "ascending" | "descending" | "insideOut" | undefined;
|
|
58
|
+
stackOrder?: import("..").StackOrderType | undefined;
|
|
59
59
|
} | {
|
|
60
60
|
type: "line";
|
|
61
61
|
data?: (number | null)[] | undefined;
|
|
@@ -67,14 +67,14 @@ export declare function defaultizeColor(series: AllSeriesType, seriesIndex: numb
|
|
|
67
67
|
showMark?: boolean | ((params: import("../models/seriesType").ShowMarkParams<number | Date>) => boolean) | undefined;
|
|
68
68
|
disableHighlight?: boolean | undefined;
|
|
69
69
|
connectNulls?: boolean | undefined;
|
|
70
|
+
stackOffset?: import("..").StackOffsetType | undefined;
|
|
70
71
|
id?: string | undefined;
|
|
71
72
|
color: string;
|
|
72
|
-
valueFormatter?: ((value:
|
|
73
|
+
valueFormatter?: (<V_1 extends number | null>(value: V_1) => string) | undefined;
|
|
73
74
|
highlightScope?: Partial<import("..").HighlightScope> | undefined;
|
|
74
75
|
xAxisKey?: string | undefined;
|
|
75
76
|
yAxisKey?: string | undefined;
|
|
76
|
-
|
|
77
|
-
stackOrder?: "reverse" | "none" | "appearance" | "ascending" | "descending" | "insideOut" | undefined;
|
|
77
|
+
stackOrder?: import("..").StackOrderType | undefined;
|
|
78
78
|
} | {
|
|
79
79
|
type: "scatter";
|
|
80
80
|
data: import("../models/seriesType").ScatterValueType[];
|
|
@@ -83,7 +83,7 @@ export declare function defaultizeColor(series: AllSeriesType, seriesIndex: numb
|
|
|
83
83
|
disableHover?: boolean | undefined;
|
|
84
84
|
id?: string | undefined;
|
|
85
85
|
color: string;
|
|
86
|
-
valueFormatter?: (
|
|
86
|
+
valueFormatter?: (<V_2 extends import("../models/seriesType").ScatterValueType>(value: V_2) => string) | undefined;
|
|
87
87
|
highlightScope?: Partial<import("..").HighlightScope> | undefined;
|
|
88
88
|
xAxisKey?: string | undefined;
|
|
89
89
|
yAxisKey?: string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Series } from 'd3-shape';
|
|
2
|
-
import { BarSeriesType, LineSeriesType } from '../models/seriesType';
|
|
2
|
+
import type { BarSeriesType, LineSeriesType } from '../models/seriesType';
|
|
3
|
+
import type { StackOffsetType, StackOrderType } from '../models/stacking';
|
|
3
4
|
type StackableSeries = {
|
|
4
5
|
[id: string]: BarSeriesType;
|
|
5
6
|
} | {
|
|
@@ -8,6 +9,10 @@ type StackableSeries = {
|
|
|
8
9
|
type FormatterParams = {
|
|
9
10
|
series: StackableSeries;
|
|
10
11
|
seriesOrder: string[];
|
|
12
|
+
defaultStrategy?: {
|
|
13
|
+
stackOrder?: StackOrderType;
|
|
14
|
+
stackOffset?: StackOffsetType;
|
|
15
|
+
};
|
|
11
16
|
};
|
|
12
17
|
export type StackingGroupsType = {
|
|
13
18
|
ids: string[];
|
|
@@ -15,10 +20,10 @@ export type StackingGroupsType = {
|
|
|
15
20
|
stackingOffset: (series: Series<any, any>, order: Iterable<number>) => void;
|
|
16
21
|
}[];
|
|
17
22
|
export declare const StackOrder: {
|
|
18
|
-
[key in
|
|
23
|
+
[key in StackOrderType]: (series: Series<any, any>) => number[];
|
|
19
24
|
};
|
|
20
25
|
export declare const StackOffset: {
|
|
21
|
-
[key in
|
|
26
|
+
[key in StackOffsetType]: (series: Series<any, any>, order: Iterable<number>) => void;
|
|
22
27
|
};
|
|
23
28
|
/**
|
|
24
29
|
* Takes a set of series and groups their ids
|
package/internals/stackSeries.js
CHANGED
|
@@ -62,7 +62,8 @@ const StackOffset = exports.StackOffset = {
|
|
|
62
62
|
const getStackingGroups = params => {
|
|
63
63
|
const {
|
|
64
64
|
series,
|
|
65
|
-
seriesOrder
|
|
65
|
+
seriesOrder,
|
|
66
|
+
defaultStrategy
|
|
66
67
|
} = params;
|
|
67
68
|
const stackingGroups = [];
|
|
68
69
|
const stackIndex = {};
|
|
@@ -82,8 +83,8 @@ const getStackingGroups = params => {
|
|
|
82
83
|
stackIndex[stack] = stackingGroups.length;
|
|
83
84
|
stackingGroups.push({
|
|
84
85
|
ids: [id],
|
|
85
|
-
stackingOrder: StackOrder[stackOrder ?? 'none'],
|
|
86
|
-
stackingOffset: StackOffset[stackOffset ?? 'diverging']
|
|
86
|
+
stackingOrder: StackOrder[stackOrder ?? defaultStrategy?.stackOrder ?? 'none'],
|
|
87
|
+
stackingOffset: StackOffset[stackOffset ?? defaultStrategy?.stackOffset ?? 'diverging']
|
|
87
88
|
});
|
|
88
89
|
} else {
|
|
89
90
|
stackingGroups[stackIndex[stack]].ids.push(id);
|
|
@@ -71,7 +71,7 @@ var formatter = function formatter(params, dataset) {
|
|
|
71
71
|
seriesOrder: seriesOrder,
|
|
72
72
|
stackingGroups: stackingGroups,
|
|
73
73
|
series: defaultizeValueFormatter(completedSeries, function (v) {
|
|
74
|
-
return v
|
|
74
|
+
return v === null ? '' : v.toLocaleString();
|
|
75
75
|
})
|
|
76
76
|
};
|
|
77
77
|
};
|
|
@@ -5,6 +5,7 @@ import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltip
|
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
function DefaultChartsItemTooltipContent(props) {
|
|
8
|
+
var _series$valueFormatte;
|
|
8
9
|
var series = props.series,
|
|
9
10
|
itemData = props.itemData,
|
|
10
11
|
sx = props.sx,
|
|
@@ -21,10 +22,8 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
21
22
|
},
|
|
22
23
|
displayedLabel = _ref.displayedLabel,
|
|
23
24
|
color = _ref.color;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
var formattedValue = series.valueFormatter(series.data[itemData.dataIndex]);
|
|
25
|
+
var value = series.data[itemData.dataIndex];
|
|
26
|
+
var formattedValue = (_series$valueFormatte = series.valueFormatter) == null ? void 0 : _series$valueFormatte.call(series, value);
|
|
28
27
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
29
28
|
sx: sx,
|
|
30
29
|
className: classes.root,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import { stack as d3Stack } from 'd3-shape';
|
|
5
5
|
import { getStackingGroups } from '../internals/stackSeries';
|
|
6
6
|
import defaultizeValueFormatter from '../internals/defaultizeValueFormatter';
|
|
@@ -11,7 +11,11 @@ var formatter = function formatter(params, dataset) {
|
|
|
11
11
|
var _ref;
|
|
12
12
|
var seriesOrder = params.seriesOrder,
|
|
13
13
|
series = params.series;
|
|
14
|
-
var stackingGroups = getStackingGroups(params
|
|
14
|
+
var stackingGroups = getStackingGroups(_extends({}, params, {
|
|
15
|
+
defaultStrategy: {
|
|
16
|
+
stackOffset: 'none'
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
15
19
|
|
|
16
20
|
// Create a data set with format adapted to d3
|
|
17
21
|
var d3Dataset = (_ref = dataset) != null ? _ref : [];
|
|
@@ -71,7 +75,7 @@ var formatter = function formatter(params, dataset) {
|
|
|
71
75
|
seriesOrder: seriesOrder,
|
|
72
76
|
stackingGroups: stackingGroups,
|
|
73
77
|
series: defaultizeValueFormatter(completedSeries, function (v) {
|
|
74
|
-
return v
|
|
78
|
+
return v === null ? '' : v.toLocaleString();
|
|
75
79
|
})
|
|
76
80
|
};
|
|
77
81
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
var _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
4
|
+
var _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { animated, to } from '@react-spring/web';
|
|
@@ -72,6 +72,8 @@ function PieArcLabel(props) {
|
|
|
72
72
|
endAngle = props.endAngle,
|
|
73
73
|
paddingAngle = props.paddingAngle,
|
|
74
74
|
arcLabelRadius = props.arcLabelRadius,
|
|
75
|
+
innerRadius = props.innerRadius,
|
|
76
|
+
outerRadius = props.outerRadius,
|
|
75
77
|
cornerRadius = props.cornerRadius,
|
|
76
78
|
formattedArcLabel = props.formattedArcLabel,
|
|
77
79
|
isHighlighted = props.isHighlighted,
|
|
@@ -45,7 +45,7 @@ var SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(props
|
|
|
45
45
|
plotType = _props$plotType === void 0 ? 'line' : _props$plotType,
|
|
46
46
|
_props$valueFormatter = props.valueFormatter,
|
|
47
47
|
valueFormatter = _props$valueFormatter === void 0 ? function (v) {
|
|
48
|
-
return v.toString();
|
|
48
|
+
return v === null ? '' : v.toString();
|
|
49
49
|
} : _props$valueFormatter,
|
|
50
50
|
area = props.area,
|
|
51
51
|
_props$curve = props.curve,
|
|
@@ -211,7 +211,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
211
211
|
* Formatter used by the tooltip.
|
|
212
212
|
* @param {number} value The value to format.
|
|
213
213
|
* @returns {string} the formatted value.
|
|
214
|
-
* @default (v: number) => v.toString()
|
|
214
|
+
* @default (v: number | null) => (v === null ? '' : v.toString())
|
|
215
215
|
*/
|
|
216
216
|
valueFormatter: PropTypes.func,
|
|
217
217
|
viewBox: PropTypes.shape({
|
|
@@ -57,9 +57,7 @@ export var useAxisEvents = function useAxisEvents(disableAxisListener) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
if (v <= valueAsNumber) {
|
|
60
|
-
if (index === axisData.length - 1 ||
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
Math.abs(value - v) < Math.abs(value - getAsANumber(axisData[index + 1]))) {
|
|
60
|
+
if (index === axisData.length - 1 || Math.abs(getAsANumber(value) - v) < Math.abs(getAsANumber(value) - getAsANumber(axisData[index + 1]))) {
|
|
63
61
|
return true;
|
|
64
62
|
}
|
|
65
63
|
}
|
package/legacy/index.js
CHANGED
|
@@ -55,7 +55,8 @@ export var StackOffset = {
|
|
|
55
55
|
*/
|
|
56
56
|
export var getStackingGroups = function getStackingGroups(params) {
|
|
57
57
|
var series = params.series,
|
|
58
|
-
seriesOrder = params.seriesOrder
|
|
58
|
+
seriesOrder = params.seriesOrder,
|
|
59
|
+
defaultStrategy = params.defaultStrategy;
|
|
59
60
|
var stackingGroups = [];
|
|
60
61
|
var stackIndex = {};
|
|
61
62
|
seriesOrder.forEach(function (id) {
|
|
@@ -70,11 +71,12 @@ export var getStackingGroups = function getStackingGroups(params) {
|
|
|
70
71
|
stackingOffset: StackOffset.none
|
|
71
72
|
});
|
|
72
73
|
} else if (stackIndex[stack] === undefined) {
|
|
74
|
+
var _ref, _ref2;
|
|
73
75
|
stackIndex[stack] = stackingGroups.length;
|
|
74
76
|
stackingGroups.push({
|
|
75
77
|
ids: [id],
|
|
76
|
-
stackingOrder: StackOrder[stackOrder != null ? stackOrder : 'none'],
|
|
77
|
-
stackingOffset: StackOffset[stackOffset != null ? stackOffset : 'diverging']
|
|
78
|
+
stackingOrder: StackOrder[(_ref = stackOrder != null ? stackOrder : defaultStrategy == null ? void 0 : defaultStrategy.stackOrder) != null ? _ref : 'none'],
|
|
79
|
+
stackingOffset: StackOffset[(_ref2 = stackOffset != null ? stackOffset : defaultStrategy == null ? void 0 : defaultStrategy.stackOffset) != null ? _ref2 : 'diverging']
|
|
78
80
|
});
|
|
79
81
|
} else {
|
|
80
82
|
stackingGroups[stackIndex[stack]].ids.push(id);
|
package/legacy/models/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -24,4 +24,15 @@ Object.keys(_layout).forEach(function (key) {
|
|
|
24
24
|
return _layout[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
+
});
|
|
28
|
+
var _stacking = require("./stacking");
|
|
29
|
+
Object.keys(_stacking).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _stacking[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _stacking[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
27
38
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { DefaultizedProps } from '../helpers';
|
|
2
|
+
import type { StackOffsetType } from '../stacking';
|
|
2
3
|
import { CartesianSeriesType, CommonSeriesType, CommonDefaultizedProps, StackableSeriesType } from './common';
|
|
3
|
-
export interface BarSeriesType extends CommonSeriesType<number>, CartesianSeriesType, StackableSeriesType {
|
|
4
|
+
export interface BarSeriesType extends CommonSeriesType<number | null>, CartesianSeriesType, StackableSeriesType {
|
|
4
5
|
type: 'bar';
|
|
5
6
|
/**
|
|
6
7
|
* Data associated to each bar.
|
|
7
8
|
*/
|
|
8
|
-
data?: number[];
|
|
9
|
+
data?: (number | null)[];
|
|
9
10
|
/**
|
|
10
11
|
* The key used to retrive data from the dataset.
|
|
11
12
|
*/
|
|
@@ -16,6 +17,11 @@ export interface BarSeriesType extends CommonSeriesType<number>, CartesianSeries
|
|
|
16
17
|
* @default 'vertical'
|
|
17
18
|
*/
|
|
18
19
|
layout?: 'horizontal' | 'vertical';
|
|
20
|
+
/**
|
|
21
|
+
* Defines how stacked series handle negative values.
|
|
22
|
+
* @default 'diverging'
|
|
23
|
+
*/
|
|
24
|
+
stackOffset?: StackOffsetType;
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
27
|
* An object that allows to identify a single bar.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HighlightScope } from '../../context/HighlightProvider';
|
|
2
|
-
import type {
|
|
2
|
+
import type { StackOffsetType, StackOrderType } from '../stacking';
|
|
3
3
|
export type CommonSeriesType<TValue> = {
|
|
4
4
|
id?: string;
|
|
5
5
|
color?: string;
|
|
@@ -8,7 +8,7 @@ export type CommonSeriesType<TValue> = {
|
|
|
8
8
|
* @param {TValue} value The series' value to render.
|
|
9
9
|
* @returns {string} The string to dispaly.
|
|
10
10
|
*/
|
|
11
|
-
valueFormatter?: (value:
|
|
11
|
+
valueFormatter?: <V extends TValue>(value: V) => string;
|
|
12
12
|
highlightScope?: Partial<HighlightScope>;
|
|
13
13
|
};
|
|
14
14
|
export type CommonDefaultizedProps = 'id' | 'valueFormatter' | 'data';
|
|
@@ -34,9 +34,8 @@ export type StackableSeriesType = {
|
|
|
34
34
|
stackOffset?: StackOffsetType;
|
|
35
35
|
/**
|
|
36
36
|
* The order in which series' of the same group are stacked together.
|
|
37
|
+
* @default 'none'
|
|
37
38
|
*/
|
|
38
39
|
stackOrder?: StackOrderType;
|
|
39
40
|
};
|
|
40
|
-
export type StackOrderType = keyof typeof StackOrder;
|
|
41
|
-
export type StackOffsetType = keyof typeof StackOffset;
|
|
42
41
|
export type DefaultizedCartesianSeriesType = Required<CartesianSeriesType>;
|
|
@@ -13,5 +13,4 @@ export * from './line';
|
|
|
13
13
|
export * from './bar';
|
|
14
14
|
export * from './scatter';
|
|
15
15
|
export * from './pie';
|
|
16
|
-
export type { StackOrderType, StackOffsetType } from './common';
|
|
17
16
|
export type { AllSeriesType, CartesianSeriesType, DefaultizedSeriesType, DefaultizedCartesianSeriesType, StackableSeriesType, };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DefaultizedProps } from '../helpers';
|
|
2
|
+
import type { StackOffsetType } from '../stacking';
|
|
2
3
|
import { CartesianSeriesType, CommonDefaultizedProps, CommonSeriesType, StackableSeriesType } from './common';
|
|
3
4
|
export type CurveType = 'catmullRom' | 'linear' | 'monotoneX' | 'monotoneY' | 'natural' | 'step' | 'stepBefore' | 'stepAfter';
|
|
4
5
|
export interface ShowMarkParams<AxisValue = number | Date> {
|
|
@@ -23,7 +24,7 @@ export interface ShowMarkParams<AxisValue = number | Date> {
|
|
|
23
24
|
*/
|
|
24
25
|
value: number;
|
|
25
26
|
}
|
|
26
|
-
export interface LineSeriesType extends CommonSeriesType<number>, CartesianSeriesType, StackableSeriesType {
|
|
27
|
+
export interface LineSeriesType extends CommonSeriesType<number | null>, CartesianSeriesType, StackableSeriesType {
|
|
27
28
|
type: 'line';
|
|
28
29
|
/**
|
|
29
30
|
* Data associated to the line.
|
|
@@ -53,6 +54,11 @@ export interface LineSeriesType extends CommonSeriesType<number>, CartesianSerie
|
|
|
53
54
|
* @default false
|
|
54
55
|
*/
|
|
55
56
|
connectNulls?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Defines how stacked series handle negative values.
|
|
59
|
+
* @default 'none'
|
|
60
|
+
*/
|
|
61
|
+
stackOffset?: StackOffsetType;
|
|
56
62
|
}
|
|
57
63
|
/**
|
|
58
64
|
* An object that allows to identify a single line.
|
|
@@ -65,7 +65,7 @@ const formatter = (params, dataset) => {
|
|
|
65
65
|
return {
|
|
66
66
|
seriesOrder,
|
|
67
67
|
stackingGroups,
|
|
68
|
-
series: defaultizeValueFormatter(completedSeries, v => v
|
|
68
|
+
series: defaultizeValueFormatter(completedSeries, v => v === null ? '' : v.toLocaleString())
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
export default formatter;
|
|
@@ -24,10 +24,8 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
24
24
|
color: series.color,
|
|
25
25
|
displayedLabel: series.label
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
const formattedValue = series.valueFormatter(series.data[itemData.dataIndex]);
|
|
27
|
+
const value = series.data[itemData.dataIndex];
|
|
28
|
+
const formattedValue = series.valueFormatter?.(value);
|
|
31
29
|
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
32
30
|
sx: sx,
|
|
33
31
|
className: classes.root,
|
|
@@ -10,7 +10,11 @@ const formatter = (params, dataset) => {
|
|
|
10
10
|
seriesOrder,
|
|
11
11
|
series
|
|
12
12
|
} = params;
|
|
13
|
-
const stackingGroups = getStackingGroups(params
|
|
13
|
+
const stackingGroups = getStackingGroups(_extends({}, params, {
|
|
14
|
+
defaultStrategy: {
|
|
15
|
+
stackOffset: 'none'
|
|
16
|
+
}
|
|
17
|
+
}));
|
|
14
18
|
|
|
15
19
|
// Create a data set with format adapted to d3
|
|
16
20
|
const d3Dataset = dataset ?? [];
|
|
@@ -65,7 +69,7 @@ const formatter = (params, dataset) => {
|
|
|
65
69
|
return {
|
|
66
70
|
seriesOrder,
|
|
67
71
|
stackingGroups,
|
|
68
|
-
series: defaultizeValueFormatter(completedSeries, v => v
|
|
72
|
+
series: defaultizeValueFormatter(completedSeries, v => v === null ? '' : v.toLocaleString())
|
|
69
73
|
};
|
|
70
74
|
};
|
|
71
75
|
export default formatter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
3
|
+
const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { animated, to } from '@react-spring/web';
|
|
@@ -42,7 +42,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
42
42
|
slotProps,
|
|
43
43
|
data,
|
|
44
44
|
plotType = 'line',
|
|
45
|
-
valueFormatter = v => v.toString(),
|
|
45
|
+
valueFormatter = v => v === null ? '' : v.toString(),
|
|
46
46
|
area,
|
|
47
47
|
curve = 'linear'
|
|
48
48
|
} = props;
|
|
@@ -205,7 +205,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
205
205
|
* Formatter used by the tooltip.
|
|
206
206
|
* @param {number} value The value to format.
|
|
207
207
|
* @returns {string} the formatted value.
|
|
208
|
-
* @default (v: number) => v.toString()
|
|
208
|
+
* @default (v: number | null) => (v === null ? '' : v.toString())
|
|
209
209
|
*/
|
|
210
210
|
valueFormatter: PropTypes.func,
|
|
211
211
|
viewBox: PropTypes.shape({
|
|
@@ -61,9 +61,7 @@ export const useAxisEvents = disableAxisListener => {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
if (v <= valueAsNumber) {
|
|
64
|
-
if (index === axisData.length - 1 ||
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
Math.abs(value - v) < Math.abs(value - getAsANumber(axisData[index + 1]))) {
|
|
64
|
+
if (index === axisData.length - 1 || Math.abs(getAsANumber(value) - v) < Math.abs(getAsANumber(value) - getAsANumber(axisData[index + 1]))) {
|
|
67
65
|
return true;
|
|
68
66
|
}
|
|
69
67
|
}
|
package/modern/index.js
CHANGED
|
@@ -56,7 +56,8 @@ export const StackOffset = {
|
|
|
56
56
|
export const getStackingGroups = params => {
|
|
57
57
|
const {
|
|
58
58
|
series,
|
|
59
|
-
seriesOrder
|
|
59
|
+
seriesOrder,
|
|
60
|
+
defaultStrategy
|
|
60
61
|
} = params;
|
|
61
62
|
const stackingGroups = [];
|
|
62
63
|
const stackIndex = {};
|
|
@@ -76,8 +77,8 @@ export const getStackingGroups = params => {
|
|
|
76
77
|
stackIndex[stack] = stackingGroups.length;
|
|
77
78
|
stackingGroups.push({
|
|
78
79
|
ids: [id],
|
|
79
|
-
stackingOrder: StackOrder[stackOrder ?? 'none'],
|
|
80
|
-
stackingOffset: StackOffset[stackOffset ?? 'diverging']
|
|
80
|
+
stackingOrder: StackOrder[stackOrder ?? defaultStrategy?.stackOrder ?? 'none'],
|
|
81
|
+
stackingOffset: StackOffset[stackOffset ?? defaultStrategy?.stackOffset ?? 'diverging']
|
|
81
82
|
});
|
|
82
83
|
} else {
|
|
83
84
|
stackingGroups[stackIndex[stack]].ids.push(id);
|
package/modern/models/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.9",
|
|
4
4
|
"description": "The community edition of the charts components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"directory": "packages/x-charts"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@babel/runtime": "^7.23.
|
|
32
|
-
"@mui/base": "^5.0.0-beta.
|
|
33
|
-
"@mui/system": "^5.15.
|
|
34
|
-
"@mui/utils": "^5.15.
|
|
31
|
+
"@babel/runtime": "^7.23.8",
|
|
32
|
+
"@mui/base": "^5.0.0-beta.32",
|
|
33
|
+
"@mui/system": "^5.15.5",
|
|
34
|
+
"@mui/utils": "^5.15.5",
|
|
35
35
|
"@react-spring/rafz": "^9.7.3",
|
|
36
36
|
"@react-spring/web": "^9.7.3",
|
|
37
|
-
"clsx": "^2.
|
|
37
|
+
"clsx": "^2.1.0",
|
|
38
38
|
"d3-color": "^3.1.0",
|
|
39
39
|
"d3-delaunay": "^6.0.4",
|
|
40
40
|
"d3-scale": "^4.0.2",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@emotion/react": "^11.9.0",
|
|
46
46
|
"@emotion/styled": "^11.8.1",
|
|
47
|
-
"@mui/material": "^5.
|
|
47
|
+
"@mui/material": "^5.15.0",
|
|
48
48
|
"react": "^17.0.0 || ^18.0.0",
|
|
49
49
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
50
50
|
},
|