@mui/x-charts-pro 9.3.0 → 9.4.0
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/BarChartPro/BarChartPro.js +32 -2
- package/BarChartPro/BarChartPro.mjs +32 -2
- package/CHANGELOG.md +196 -0
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +2 -2
- package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.js +1 -0
- package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.mjs +1 -0
- package/ChartsToolbarPro/ChartsToolbarPro.d.mts +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +1 -1
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.d.mts +1 -1
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.d.ts +1 -1
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.js +35 -38
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.mjs +37 -40
- package/ChartsToolbarPro/Toolbar.types.d.mts +3 -2
- package/ChartsToolbarPro/Toolbar.types.d.ts +3 -2
- package/ChartsToolbarPro/rangeButtonValueToZoom.d.mts +18 -2
- package/ChartsToolbarPro/rangeButtonValueToZoom.d.ts +18 -2
- package/ChartsToolbarPro/rangeButtonValueToZoom.js +73 -10
- package/ChartsToolbarPro/rangeButtonValueToZoom.mjs +72 -10
- package/ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.js +9 -2
- package/ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.mjs +9 -2
- package/ChartsZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -1
- package/ChartsZoomSlider/internals/previews/ScatterPreviewPlot.mjs +2 -1
- package/FunnelChart/funnelPlotSlots.types.d.mts +5 -4
- package/FunnelChart/funnelPlotSlots.types.d.ts +5 -4
- package/Heatmap/Heatmap.d.mts +3 -2
- package/Heatmap/Heatmap.d.ts +3 -2
- package/Heatmap/Heatmap.js +32 -2
- package/Heatmap/Heatmap.mjs +32 -2
- package/Heatmap/HeatmapItem.d.mts +3 -2
- package/Heatmap/HeatmapItem.d.ts +3 -2
- package/Heatmap/HeatmapItem.js +2 -0
- package/Heatmap/HeatmapItem.mjs +2 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.mts +3 -2
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +3 -2
- package/LineChartPro/LineChartPro.js +32 -2
- package/LineChartPro/LineChartPro.mjs +32 -2
- package/ScatterChartPro/ScatterChartPro.d.mts +2 -1
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -1
- package/ScatterChartPro/ScatterChartPro.js +32 -2
- package/ScatterChartPro/ScatterChartPro.mjs +32 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/plugins/useChartProExport/exportImage.js +8 -2
- package/internals/plugins/useChartProExport/exportImage.mjs +8 -2
- package/internals/plugins/useChartProExport/print.js +1 -0
- package/internals/plugins/useChartProExport/print.mjs +1 -0
- package/internals/plugins/useChartProExport/useChartProExport.types.d.mts +6 -0
- package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +6 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.js +77 -14
- package/internals/plugins/useChartProZoom/useChartProZoom.mjs +79 -15
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.mts +0 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +0 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.mjs +0 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.mts +28 -11
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +28 -11
- package/internals/slots/chartsBaseSlots.d.mts +6 -5
- package/internals/slots/chartsBaseSlots.d.ts +6 -5
- package/internals/slots/chartsIconSlots.d.mts +4 -3
- package/internals/slots/chartsIconSlots.d.ts +4 -3
- package/models/chartsSlotsComponentsPropsPro.d.mts +11 -0
- package/models/chartsSlotsComponentsPropsPro.d.ts +11 -0
- package/models/chartsSlotsComponentsPropsPro.js +5 -0
- package/models/chartsSlotsComponentsPropsPro.mjs +1 -0
- package/models/index.d.mts +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +12 -0
- package/models/index.mjs +1 -0
- package/package.json +6 -6
|
@@ -264,12 +264,21 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
264
264
|
/**
|
|
265
265
|
* The list of zoom data related to each axis.
|
|
266
266
|
* Used to initialize the zoom in a specific configuration without controlling it.
|
|
267
|
+
*
|
|
268
|
+
* Each entry is either explicit zoom percentages (`{ axisId, start, end }`) or a
|
|
269
|
+
* range value (`{ axisId, value }`) resolved against the axis domain.
|
|
267
270
|
*/
|
|
268
|
-
initialZoom: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
271
|
+
initialZoom: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
|
|
269
272
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
270
273
|
end: _propTypes.default.number.isRequired,
|
|
271
274
|
start: _propTypes.default.number.isRequired
|
|
272
|
-
})
|
|
275
|
+
}), _propTypes.default.shape({
|
|
276
|
+
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
277
|
+
value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.instanceOf(Date).isRequired), _propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func, _propTypes.default.shape({
|
|
278
|
+
step: _propTypes.default.number,
|
|
279
|
+
unit: _propTypes.default.oneOf(['day', 'hour', 'microsecond', 'millisecond', 'minute', 'month', 'second', 'week', 'year']).isRequired
|
|
280
|
+
})])
|
|
281
|
+
})]).isRequired),
|
|
273
282
|
/**
|
|
274
283
|
* The direction of the bar elements.
|
|
275
284
|
* @default 'vertical'
|
|
@@ -449,6 +458,27 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
449
458
|
id: _propTypes.default.string,
|
|
450
459
|
max: _propTypes.default.number,
|
|
451
460
|
min: _propTypes.default.number,
|
|
461
|
+
sizeMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
462
|
+
interpolator: _propTypes.default.oneOf(['linear', 'log', 'sqrt']),
|
|
463
|
+
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
464
|
+
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
465
|
+
size: _propTypes.default.arrayOf(_propTypes.default.number.isRequired).isRequired,
|
|
466
|
+
type: _propTypes.default.oneOf(['continuous']).isRequired
|
|
467
|
+
}), _propTypes.default.shape({
|
|
468
|
+
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
469
|
+
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
470
|
+
size: _propTypes.default.func.isRequired,
|
|
471
|
+
type: _propTypes.default.oneOf(['continuous']).isRequired
|
|
472
|
+
}), _propTypes.default.shape({
|
|
473
|
+
sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
|
|
474
|
+
thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
|
|
475
|
+
type: _propTypes.default.oneOf(['piecewise']).isRequired
|
|
476
|
+
}), _propTypes.default.shape({
|
|
477
|
+
sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
|
|
478
|
+
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
479
|
+
unknownSize: _propTypes.default.number,
|
|
480
|
+
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
481
|
+
})]),
|
|
452
482
|
valueGetter: _propTypes.default.func
|
|
453
483
|
})),
|
|
454
484
|
/**
|
|
@@ -257,12 +257,21 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
257
257
|
/**
|
|
258
258
|
* The list of zoom data related to each axis.
|
|
259
259
|
* Used to initialize the zoom in a specific configuration without controlling it.
|
|
260
|
+
*
|
|
261
|
+
* Each entry is either explicit zoom percentages (`{ axisId, start, end }`) or a
|
|
262
|
+
* range value (`{ axisId, value }`) resolved against the axis domain.
|
|
260
263
|
*/
|
|
261
|
-
initialZoom: PropTypes.arrayOf(PropTypes.shape({
|
|
264
|
+
initialZoom: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
262
265
|
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
263
266
|
end: PropTypes.number.isRequired,
|
|
264
267
|
start: PropTypes.number.isRequired
|
|
265
|
-
})
|
|
268
|
+
}), PropTypes.shape({
|
|
269
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
270
|
+
value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.instanceOf(Date).isRequired), PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func, PropTypes.shape({
|
|
271
|
+
step: PropTypes.number,
|
|
272
|
+
unit: PropTypes.oneOf(['day', 'hour', 'microsecond', 'millisecond', 'minute', 'month', 'second', 'week', 'year']).isRequired
|
|
273
|
+
})])
|
|
274
|
+
})]).isRequired),
|
|
266
275
|
/**
|
|
267
276
|
* The direction of the bar elements.
|
|
268
277
|
* @default 'vertical'
|
|
@@ -442,6 +451,27 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
442
451
|
id: PropTypes.string,
|
|
443
452
|
max: PropTypes.number,
|
|
444
453
|
min: PropTypes.number,
|
|
454
|
+
sizeMap: PropTypes.oneOfType([PropTypes.shape({
|
|
455
|
+
interpolator: PropTypes.oneOf(['linear', 'log', 'sqrt']),
|
|
456
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
457
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
458
|
+
size: PropTypes.arrayOf(PropTypes.number.isRequired).isRequired,
|
|
459
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
460
|
+
}), PropTypes.shape({
|
|
461
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
462
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
463
|
+
size: PropTypes.func.isRequired,
|
|
464
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
465
|
+
}), PropTypes.shape({
|
|
466
|
+
sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
467
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
468
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
469
|
+
}), PropTypes.shape({
|
|
470
|
+
sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
471
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
472
|
+
unknownSize: PropTypes.number,
|
|
473
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
474
|
+
})]),
|
|
445
475
|
valueGetter: PropTypes.func
|
|
446
476
|
})),
|
|
447
477
|
/**
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,201 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.4.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v9.3.0..master -->
|
|
6
|
+
|
|
7
|
+
_Jun 4, 2026_
|
|
8
|
+
|
|
9
|
+
We'd like to extend a big thank you to the 21 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🎉 Scheduler is now in Beta shipping with Timeline vitualization and lazy loading
|
|
12
|
+
- 📆 Implement Event Timeline virtualization (#22339)
|
|
13
|
+
- 🫧 Introduce bubble charts (#22537)
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
18
|
+
@imxv, @mixelburg, @mustafajw07
|
|
19
|
+
|
|
20
|
+
The following team members contributed to this release:
|
|
21
|
+
@aemartos, @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @joserodolfofreitas, @LukasTy, @MBilalShafi, @michelengelen, @mj12albert, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@9.4.0`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Fix `avg` aggregation when the average is zero (#22652) @mj12albert
|
|
28
|
+
- [DataGrid] Inherit icon `fontSize` from `baseIconButton` size (#22187) @imxv
|
|
29
|
+
- [DataGrid] Fix `noRowsOverlay` flicker between `dataSource` re-fetches (#22465) @LukasTy
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@9.4.0`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@9.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
> This release includes a version bump of the `@mui/x-internal-exceljs-fork` package to address the vulnerable dependencies.
|
|
38
|
+
> The following CVEs are fixed:
|
|
39
|
+
>
|
|
40
|
+
> - <https://github.com/advisories/GHSA-ph9p-34f9-6g65>
|
|
41
|
+
> - <https://github.com/isaacs/minimatch/security/advisories/GHSA-23c5-xmqv-rm74>
|
|
42
|
+
> - <https://github.com/advisories/GHSA-w5hq-g745-h8pq>
|
|
43
|
+
>
|
|
44
|
+
> To make this security update possible, we bumped the `node` version requirement from `>=14.0.0` to `>=14.17.0`.
|
|
45
|
+
> [Node.js 14.17.0](https://nodejs.org/en/blog/release/v14.17.0) was released in May 2021, so we consider it safe to bump the requirement without causing issues for our users.
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-data-grid-pro@9.4.0`, plus:
|
|
48
|
+
|
|
49
|
+
- [DataGridPremium] Nested Lazy Loading (#21043) @MBilalShafi
|
|
50
|
+
- [DataGridPremium] Update exceljs fork (#22658) @cherniavskii
|
|
51
|
+
|
|
52
|
+
### Date and Time Pickers
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-pickers@9.4.0`
|
|
55
|
+
|
|
56
|
+
Internal changes.
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-date-pickers-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
59
|
+
|
|
60
|
+
Same changes as in `@mui/x-date-pickers@9.4.0`.
|
|
61
|
+
|
|
62
|
+
### Charts
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-charts@9.4.0`
|
|
65
|
+
|
|
66
|
+
- [charts] Add functionality to hide elements during chart export (#22525) @sai6855
|
|
67
|
+
- [charts] Add option to show marks only on the first/last values (#22645) @alexfauquette
|
|
68
|
+
- [charts] Add text customization section and demo for axis labels (#22597) @sai6855
|
|
69
|
+
- [charts] Allow axes to scale according to the visible series only (#22566) @alexfauquette
|
|
70
|
+
- [charts] Correctly handle different identifiers for each series (#22556) @sai6855
|
|
71
|
+
- [charts] Fix inverted Y axis zoom/pan on ordinal scales (#22654) @JCQuintas
|
|
72
|
+
- [charts] Introduce bubble charts (#22537) @alexfauquette
|
|
73
|
+
- [charts] Let scatter chart tooltip ignore hidden series (#22614) @alexfauquette
|
|
74
|
+
- [charts] Make `'sqrt'` size mapping the default (#22683) @alexfauquette
|
|
75
|
+
- [charts] Remove unused proptypes (#22618) @alexfauquette
|
|
76
|
+
- [charts] Support module augmentation for slots (#22519) @sai6855
|
|
77
|
+
- [charts] Support multiple marker size in `findClosestPoint` (#22622) @alexfauquette
|
|
78
|
+
- [charts] Upgrade bezier-easing to v3 and use it for line chart hit-detection (#22608) @sai6855
|
|
79
|
+
- [charts] Use `useLayoutEffect` with `ResizeObserver` (#22646) @JCQuintas
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-charts-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-charts@9.4.0`, plus:
|
|
84
|
+
|
|
85
|
+
- [charts-pro] Auto-select range button matching current zoom (#22137) @JCQuintas
|
|
86
|
+
- [charts-pro] Support range values in `initialZoom` (#22563) @JCQuintas
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-charts-premium@9.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
89
|
+
|
|
90
|
+
Same changes as in `@mui/x-charts-pro@9.4.0`, plus:
|
|
91
|
+
|
|
92
|
+
- [charts-premium] Support range-bar series in WebGL bar renderer (#22607) @JCQuintas
|
|
93
|
+
- [charts-premium] Fix `onAxisClick` for radial bar and lines (#22522) @alexfauquette
|
|
94
|
+
|
|
95
|
+
### Tree View
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-tree-view@9.4.0`
|
|
98
|
+
|
|
99
|
+
Internal changes.
|
|
100
|
+
|
|
101
|
+
#### `@mui/x-tree-view-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
102
|
+
|
|
103
|
+
Same changes as in `@mui/x-tree-view@9.4.0`.
|
|
104
|
+
|
|
105
|
+
### Scheduler
|
|
106
|
+
|
|
107
|
+
#### Breaking changes
|
|
108
|
+
|
|
109
|
+
The theme `styleOverrides` slots for the skeleton and the error container were
|
|
110
|
+
renamed and unified. The CSS utility class names (for example
|
|
111
|
+
`.MuiEventCalendar-eventSkeleton`) are **not** affected — only
|
|
112
|
+
`theme.components.*` overrides need updating.
|
|
113
|
+
|
|
114
|
+
**Event skeleton**
|
|
115
|
+
|
|
116
|
+
| Before | After |
|
|
117
|
+
| --------------------------------------- | ------------------------------ |
|
|
118
|
+
| `MuiEventCalendar` slot `EventSkeleton` | `MuiEventSkeleton` slot `Root` |
|
|
119
|
+
| `MuiEventTimeline` slot `EventSkeleton` | `MuiEventSkeleton` slot `Root` |
|
|
120
|
+
|
|
121
|
+
**Error container**
|
|
122
|
+
|
|
123
|
+
| Before | After |
|
|
124
|
+
| ------------------------------------------------------------- | --------------------------------------- |
|
|
125
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorContainer` | `MuiEventErrorContainer` slot `Root` |
|
|
126
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorAlert` | `MuiEventErrorContainer` slot `Alert` |
|
|
127
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorMessage` | `MuiEventErrorContainer` slot `Message` |
|
|
128
|
+
|
|
129
|
+
If you customized these through the theme, update the component name and slot
|
|
130
|
+
names accordingly:
|
|
131
|
+
|
|
132
|
+
```diff
|
|
133
|
+
components: {
|
|
134
|
+
- MuiEventCalendar: {
|
|
135
|
+
+ MuiEventSkeleton: {
|
|
136
|
+
styleOverrides: {
|
|
137
|
+
- EventSkeleton: { /* ... */ },
|
|
138
|
+
+ Root: { /* ... */ },
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-scheduler@9.0.0-beta.0`
|
|
146
|
+
|
|
147
|
+
- [scheduler] Add a prop to control whether the resource of an event can be cleared (#22464) @rita-codes
|
|
148
|
+
- [scheduler] Add week number labels to agenda, day and week views (#22594) @mustafajw07
|
|
149
|
+
- [scheduler] Add `weekStartsOn` preference and update date functions to support custom week start (#22426) @mustafajw07
|
|
150
|
+
- [scheduler] Export premium version of the standalone views (#22621) @flaviendelangle
|
|
151
|
+
- [scheduler] Implement timeline virtualization (#22339) @romgrk
|
|
152
|
+
- [scheduler] Split scheduler overview (#22453) @joserodolfofreitas
|
|
153
|
+
- [scheduler] Unify `EventSkeleton` and `ErrorContainer` between `EventCalendar` and `EventTimeline` (#22676) @noraleonte
|
|
154
|
+
|
|
155
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
156
|
+
|
|
157
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.0`.
|
|
158
|
+
|
|
159
|
+
### Docs
|
|
160
|
+
|
|
161
|
+
- [docs] Add a performance docs page for charts (#22656) @alexfauquette
|
|
162
|
+
- [docs] Add real dataset for maps documentation (#22599) @alexfauquette
|
|
163
|
+
- [docs] Add spacing between selects on charts overview demo (#22589) @bernardobelchior
|
|
164
|
+
- [docs] Reorganize existing chat docs navigation (#22478) @hasdfa
|
|
165
|
+
- [docs] Switch to visionscarto's world atlas dataset (#22669) @cherniavskii
|
|
166
|
+
- [docs] Update TreeView `domstructure` docs and add demo (#22420) @mj12albert
|
|
167
|
+
- [docs] Fix indexation of Scheduler (#22567) @oliviertassinari
|
|
168
|
+
- [docs] Fix wide layout on event timeline lazy loading and Import title (#22604) @rita-codes
|
|
169
|
+
- [docs] Derive class name owners for shared charts classes (#22674) @JCQuintas
|
|
170
|
+
|
|
171
|
+
### Core
|
|
172
|
+
|
|
173
|
+
- [code-infra] Drop unused and now-transitive deps from docs/package.json (#22549) @LukasTy
|
|
174
|
+
- [code-infra] Refresh CI Node pins to 22.22.3 (#22598) @LukasTy
|
|
175
|
+
- [code-infra] Skip empty product sections in changelog (#22541) @rita-codes
|
|
176
|
+
- [code-infra] Stabilize DataGridScrollRestoration visual regression test (#22553) @Janpot
|
|
177
|
+
- [internal] Add license to the `x-data-grid-generator` (#22240) @arminmeh
|
|
178
|
+
- [internal] Express default value for resource_class (#22569) @oliviertassinari
|
|
179
|
+
- [internal] Fix use of ellipsis (#21852) @oliviertassinari
|
|
180
|
+
- [internal] `useLayoutEffect` with `ResizeObserver` (#22428) @romgrk
|
|
181
|
+
|
|
182
|
+
### Miscellaneous
|
|
183
|
+
|
|
184
|
+
- [chat-headless] Add built-in chat adapters (#22479) @hasdfa
|
|
185
|
+
- [chat-headless] Harden runtime model and message errors (#22480) @hasdfa
|
|
186
|
+
- [core] Prepare for TypeScript 6 bump (#22551) @LukasTy
|
|
187
|
+
- [core] Use CircleCI Gen2 resource classes (#22610) @LukasTy
|
|
188
|
+
- [infra] Fix broken tag retrieval on `master` during release (#22174) @michelengelen
|
|
189
|
+
- [infra] Group Base UI renovate updates (#22590) @LukasTy
|
|
190
|
+
- [pnpm] Add security settings to pnpm-workspace.yaml (#22611) @Janpot
|
|
191
|
+
- [release] Fix release PR scripts (#22680) @JCQuintas
|
|
192
|
+
- [test] Add a Tree View regression test for lazy loading with getChildrenCount returning -1 (#22605) @mixelburg
|
|
193
|
+
- [test] Disable LCD subpixel antialiasing in regression screenshots (#22602) @Janpot
|
|
194
|
+
- [test] Fix flaky Data Grid Pro data source tree data tests (#22659) @LukasTy
|
|
195
|
+
- [test] Remove stale form-submit TODO from e2e suite (#22564) @LukasTy
|
|
196
|
+
- [x-license] Exclude test keys from the published npm package (#22647) @aemartos
|
|
197
|
+
- [test] Fix flaky WebGL benchmark by polling for canvas content (#22535) @JCQuintas
|
|
198
|
+
|
|
3
199
|
## 9.3.0
|
|
4
200
|
|
|
5
201
|
_May 21, 2026_
|
|
@@ -18,8 +18,8 @@ var _useChartsDataProviderProProps = require("./useChartsDataProviderProProps");
|
|
|
18
18
|
var _ChartsWatermark = require("../internals/ChartsWatermark");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
const packageInfo = {
|
|
21
|
-
releaseDate: "
|
|
22
|
-
version: "9.
|
|
21
|
+
releaseDate: "MTc4MDUzMTIwMDAwMA==",
|
|
22
|
+
version: "9.4.0",
|
|
23
23
|
name: 'x-charts-pro'
|
|
24
24
|
};
|
|
25
25
|
const defaultSeriesConfigPro = exports.defaultSeriesConfigPro = _internals.defaultSeriesConfig;
|
|
@@ -11,8 +11,8 @@ import { useChartsDataProviderProProps } from "./useChartsDataProviderProProps.m
|
|
|
11
11
|
import { ChartsWatermark } from "../internals/ChartsWatermark.mjs";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const packageInfo = {
|
|
14
|
-
releaseDate: "
|
|
15
|
-
version: "9.
|
|
14
|
+
releaseDate: "MTc4MDUzMTIwMDAwMA==",
|
|
15
|
+
version: "9.4.0",
|
|
16
16
|
name: 'x-charts-pro'
|
|
17
17
|
};
|
|
18
18
|
export const defaultSeriesConfigPro = defaultSeriesConfig;
|
|
@@ -68,6 +68,7 @@ process.env.NODE_ENV !== "production" ? ChartsToolbarImageExportTrigger.propType
|
|
|
68
68
|
fileName: _propTypes.default.string,
|
|
69
69
|
nonce: _propTypes.default.string,
|
|
70
70
|
onBeforeExport: _propTypes.default.func,
|
|
71
|
+
pixelRatio: _propTypes.default.number,
|
|
71
72
|
quality: _propTypes.default.number,
|
|
72
73
|
type: _propTypes.default.string.isRequired
|
|
73
74
|
}),
|
|
@@ -60,6 +60,7 @@ process.env.NODE_ENV !== "production" ? ChartsToolbarImageExportTrigger.propType
|
|
|
60
60
|
fileName: PropTypes.string,
|
|
61
61
|
nonce: PropTypes.string,
|
|
62
62
|
onBeforeExport: PropTypes.func,
|
|
63
|
+
pixelRatio: PropTypes.number,
|
|
63
64
|
quality: PropTypes.number,
|
|
64
65
|
type: PropTypes.string.isRequired
|
|
65
66
|
}),
|
|
@@ -3,7 +3,7 @@ import { type AxisId } from '@mui/x-charts/internals';
|
|
|
3
3
|
import { type RangeButtonValue } from "./rangeButtonValueToZoom.mjs";
|
|
4
4
|
import { type ChartsToolbarPrintExportOptions } from "./ChartsToolbarPrintExportTrigger.mjs";
|
|
5
5
|
import { type ChartsToolbarImageExportOptions } from "./ChartsToolbarImageExportTrigger.mjs";
|
|
6
|
-
export type { RangeButtonFunctionParams } from "./rangeButtonValueToZoom.mjs";
|
|
6
|
+
export type { RangeButtonFunctionParams, RangeButtonValue, RangeButtonIntervalUnit } from "./rangeButtonValueToZoom.mjs";
|
|
7
7
|
export interface RangeButtonConfig {
|
|
8
8
|
/**
|
|
9
9
|
* The label displayed on the button (e.g., "1M", "3M", "1Y").
|
|
@@ -3,7 +3,7 @@ import { type AxisId } from '@mui/x-charts/internals';
|
|
|
3
3
|
import { type RangeButtonValue } from "./rangeButtonValueToZoom.js";
|
|
4
4
|
import { type ChartsToolbarPrintExportOptions } from "./ChartsToolbarPrintExportTrigger.js";
|
|
5
5
|
import { type ChartsToolbarImageExportOptions } from "./ChartsToolbarImageExportTrigger.js";
|
|
6
|
-
export type { RangeButtonFunctionParams } from "./rangeButtonValueToZoom.js";
|
|
6
|
+
export type { RangeButtonFunctionParams, RangeButtonValue, RangeButtonIntervalUnit } from "./rangeButtonValueToZoom.js";
|
|
7
7
|
export interface RangeButtonConfig {
|
|
8
8
|
/**
|
|
9
9
|
* The label displayed on the button (e.g., "1M", "3M", "1Y").
|
|
@@ -11,7 +11,7 @@ export interface ChartsToolbarRangeButtonTriggerProps {
|
|
|
11
11
|
* The range value. Specifies how far back from the end of the data to zoom.
|
|
12
12
|
*
|
|
13
13
|
* - `{ unit, step }` — A calendar interval from the end of the data (e.g., `{ unit: 'month', step: 3 }` for 3 months).
|
|
14
|
-
* - `[start, end]` — An absolute date range.
|
|
14
|
+
* - `[start, end]` — An absolute date range, or a range between two ordinal (band/point) axis values.
|
|
15
15
|
* - `(params) => { start, end }` — A function that receives axis context (`scaleType`, `data`, `domain`) and returns zoom percentages (0-100).
|
|
16
16
|
* - `null` — Resets zoom to show all data.
|
|
17
17
|
*/
|
|
@@ -11,7 +11,7 @@ export interface ChartsToolbarRangeButtonTriggerProps {
|
|
|
11
11
|
* The range value. Specifies how far back from the end of the data to zoom.
|
|
12
12
|
*
|
|
13
13
|
* - `{ unit, step }` — A calendar interval from the end of the data (e.g., `{ unit: 'month', step: 3 }` for 3 months).
|
|
14
|
-
* - `[start, end]` — An absolute date range.
|
|
14
|
+
* - `[start, end]` — An absolute date range, or a range between two ordinal (band/point) axis values.
|
|
15
15
|
* - `(params) => { start, end }` — A function that receives axis context (`scaleType`, `data`, `domain`) and returns zoom percentages (0-100).
|
|
16
16
|
* - `null` — Resets zoom to show all data.
|
|
17
17
|
*/
|
|
@@ -38,7 +38,6 @@ const ChartsToolbarRangeButtonTrigger = exports.ChartsToolbarRangeButtonTrigger
|
|
|
38
38
|
instance,
|
|
39
39
|
store
|
|
40
40
|
} = (0, _internals.useChartsContext)();
|
|
41
|
-
const activeRangeButtonKey = store.use(_useChartProZoom.selectorChartActiveRangeButtonKey);
|
|
42
41
|
const canZoomOut = store.use(_useChartProZoom.selectorChartCanZoomOut);
|
|
43
42
|
const zoomOptionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
44
43
|
const rawXAxes = store.use(_internals.selectorChartRawXAxis);
|
|
@@ -56,55 +55,53 @@ const ChartsToolbarRangeButtonTrigger = exports.ChartsToolbarRangeButtonTrigger
|
|
|
56
55
|
}
|
|
57
56
|
return rawXAxes.find(axis => zoomOptionsLookup[axis.id] !== undefined)?.id;
|
|
58
57
|
}, [axisIdProp, rawXAxes, zoomOptionsLookup]);
|
|
59
|
-
|
|
60
|
-
// Determine if the resolved axis is ordinal (band/point) to use index-based domain.
|
|
58
|
+
const currentAxisZoom = store.use(_useChartProZoom.selectorChartAxisZoomData, resolvedAxisId);
|
|
61
59
|
const resolvedAxis = React.useMemo(() => rawXAxes?.find(axis => axis.id === resolvedAxisId), [rawXAxes, resolvedAxisId]);
|
|
62
|
-
|
|
60
|
+
// Use isValueNull instead of value === null to avoid unnecessary re-renders when value is a new function/object on each render.
|
|
61
|
+
const isValueNull = value === null;
|
|
63
62
|
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (resolvedAxisId === undefined) {
|
|
68
|
-
return undefined;
|
|
69
|
-
}
|
|
70
|
-
const domainDef = domains[resolvedAxisId];
|
|
71
|
-
if (!domainDef || domainDef.domain.length < 2) {
|
|
63
|
+
// Build the range conversion params for the target axis, ignoring the current zoom.
|
|
64
|
+
const domainParams = React.useMemo(() => {
|
|
65
|
+
if (resolvedAxisId === undefined || resolvedAxis === undefined) {
|
|
72
66
|
return undefined;
|
|
73
67
|
}
|
|
74
|
-
|
|
68
|
+
return (0, _rangeButtonValueToZoom.getRangeButtonDomainParams)(resolvedAxis, domains[resolvedAxisId]?.domain);
|
|
69
|
+
}, [resolvedAxisId, resolvedAxis, domains]);
|
|
70
|
+
|
|
71
|
+
// Destructure so that returning a new object from rangeButtonValueToZoom doesn't cause unnecessary re-renders in handleClick.
|
|
72
|
+
const {
|
|
73
|
+
start: startZoom,
|
|
74
|
+
end: endZoom
|
|
75
|
+
} = React.useMemo(() => {
|
|
76
|
+
if (domainParams === undefined) {
|
|
75
77
|
return {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
start: undefined,
|
|
79
|
+
end: undefined
|
|
78
80
|
};
|
|
79
81
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
min: Number(min),
|
|
84
|
-
max: Number(max)
|
|
85
|
-
};
|
|
86
|
-
}, [resolvedAxisId, domains, isOrdinal]);
|
|
82
|
+
return (0, _rangeButtonValueToZoom.rangeButtonValueToZoom)(value, domainParams);
|
|
83
|
+
}, [domainParams, value]);
|
|
87
84
|
const handleClick = React.useCallback(() => {
|
|
88
|
-
if (resolvedAxisId === undefined ||
|
|
85
|
+
if (resolvedAxisId === undefined || startZoom === undefined || endZoom === undefined) {
|
|
89
86
|
return;
|
|
90
87
|
}
|
|
91
|
-
const zoom = (0, _rangeButtonValueToZoom.rangeButtonValueToZoom)(value, {
|
|
92
|
-
scaleType: resolvedAxis?.scaleType ?? 'linear',
|
|
93
|
-
data: resolvedAxis?.data,
|
|
94
|
-
domain: axisDomain
|
|
95
|
-
});
|
|
96
88
|
instance.setAxisZoomData(resolvedAxisId, {
|
|
97
89
|
axisId: resolvedAxisId,
|
|
98
|
-
start:
|
|
99
|
-
end:
|
|
90
|
+
start: startZoom,
|
|
91
|
+
end: endZoom
|
|
100
92
|
});
|
|
101
|
-
|
|
102
|
-
}, [resolvedAxisId, resolvedAxis, axisDomain, value, instance, label]);
|
|
93
|
+
}, [resolvedAxisId, startZoom, endZoom, instance]);
|
|
103
94
|
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
// A button is selected when the current zoom range matches its computed range.
|
|
96
|
+
const isActive = React.useMemo(() => {
|
|
97
|
+
if (startZoom === undefined || endZoom === undefined) {
|
|
98
|
+
return isValueNull && !canZoomOut;
|
|
99
|
+
}
|
|
100
|
+
const start = currentAxisZoom?.start ?? 0;
|
|
101
|
+
const end = currentAxisZoom?.end ?? 100;
|
|
102
|
+
const epsilon = 0.01;
|
|
103
|
+
return Math.abs(start - startZoom) < epsilon && Math.abs(end - endZoom) < epsilon;
|
|
104
|
+
}, [startZoom, endZoom, isValueNull, currentAxisZoom, canZoomOut]);
|
|
108
105
|
const element = (0, _useComponentRenderer.useComponentRenderer)(slots.baseToggleButton, render, (0, _extends2.default)({}, slotProps.baseToggleButton, {
|
|
109
106
|
onClick: handleClick,
|
|
110
107
|
selected: isActive,
|
|
@@ -145,11 +142,11 @@ process.env.NODE_ENV !== "production" ? ChartsToolbarRangeButtonTrigger.propType
|
|
|
145
142
|
* The range value. Specifies how far back from the end of the data to zoom.
|
|
146
143
|
*
|
|
147
144
|
* - `{ unit, step }` — A calendar interval from the end of the data (e.g., `{ unit: 'month', step: 3 }` for 3 months).
|
|
148
|
-
* - `[start, end]` — An absolute date range.
|
|
145
|
+
* - `[start, end]` — An absolute date range, or a range between two ordinal (band/point) axis values.
|
|
149
146
|
* - `(params) => { start, end }` — A function that receives axis context (`scaleType`, `data`, `domain`) and returns zoom percentages (0-100).
|
|
150
147
|
* - `null` — Resets zoom to show all data.
|
|
151
148
|
*/
|
|
152
|
-
value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.instanceOf(Date).isRequired), _propTypes.default.func, _propTypes.default.shape({
|
|
149
|
+
value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.instanceOf(Date).isRequired), _propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func, _propTypes.default.shape({
|
|
153
150
|
step: _propTypes.default.number,
|
|
154
151
|
unit: _propTypes.default.oneOf(['day', 'hour', 'microsecond', 'millisecond', 'minute', 'month', 'second', 'week', 'year']).isRequired
|
|
155
152
|
})])
|
|
@@ -7,8 +7,8 @@ import * as React from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useChartsContext, useChartsSlots, selectorChartRawXAxis, selectorChartXAxisWithDomains, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
9
9
|
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
10
|
-
import {
|
|
11
|
-
import { rangeButtonValueToZoom } from "./rangeButtonValueToZoom.mjs";
|
|
10
|
+
import { selectorChartAxisZoomData, selectorChartCanZoomOut } from "../internals/plugins/useChartProZoom/index.mjs";
|
|
11
|
+
import { getRangeButtonDomainParams, rangeButtonValueToZoom } from "./rangeButtonValueToZoom.mjs";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
/**
|
|
14
14
|
* A button that sets the chart zoom to a predefined range.
|
|
@@ -31,7 +31,6 @@ const ChartsToolbarRangeButtonTrigger = /*#__PURE__*/React.forwardRef(function C
|
|
|
31
31
|
instance,
|
|
32
32
|
store
|
|
33
33
|
} = useChartsContext();
|
|
34
|
-
const activeRangeButtonKey = store.use(selectorChartActiveRangeButtonKey);
|
|
35
34
|
const canZoomOut = store.use(selectorChartCanZoomOut);
|
|
36
35
|
const zoomOptionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
37
36
|
const rawXAxes = store.use(selectorChartRawXAxis);
|
|
@@ -49,55 +48,53 @@ const ChartsToolbarRangeButtonTrigger = /*#__PURE__*/React.forwardRef(function C
|
|
|
49
48
|
}
|
|
50
49
|
return rawXAxes.find(axis => zoomOptionsLookup[axis.id] !== undefined)?.id;
|
|
51
50
|
}, [axisIdProp, rawXAxes, zoomOptionsLookup]);
|
|
52
|
-
|
|
53
|
-
// Determine if the resolved axis is ordinal (band/point) to use index-based domain.
|
|
51
|
+
const currentAxisZoom = store.use(selectorChartAxisZoomData, resolvedAxisId);
|
|
54
52
|
const resolvedAxis = React.useMemo(() => rawXAxes?.find(axis => axis.id === resolvedAxisId), [rawXAxes, resolvedAxisId]);
|
|
55
|
-
|
|
53
|
+
// Use isValueNull instead of value === null to avoid unnecessary re-renders when value is a new function/object on each render.
|
|
54
|
+
const isValueNull = value === null;
|
|
56
55
|
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (resolvedAxisId === undefined) {
|
|
61
|
-
return undefined;
|
|
62
|
-
}
|
|
63
|
-
const domainDef = domains[resolvedAxisId];
|
|
64
|
-
if (!domainDef || domainDef.domain.length < 2) {
|
|
56
|
+
// Build the range conversion params for the target axis, ignoring the current zoom.
|
|
57
|
+
const domainParams = React.useMemo(() => {
|
|
58
|
+
if (resolvedAxisId === undefined || resolvedAxis === undefined) {
|
|
65
59
|
return undefined;
|
|
66
60
|
}
|
|
67
|
-
|
|
61
|
+
return getRangeButtonDomainParams(resolvedAxis, domains[resolvedAxisId]?.domain);
|
|
62
|
+
}, [resolvedAxisId, resolvedAxis, domains]);
|
|
63
|
+
|
|
64
|
+
// Destructure so that returning a new object from rangeButtonValueToZoom doesn't cause unnecessary re-renders in handleClick.
|
|
65
|
+
const {
|
|
66
|
+
start: startZoom,
|
|
67
|
+
end: endZoom
|
|
68
|
+
} = React.useMemo(() => {
|
|
69
|
+
if (domainParams === undefined) {
|
|
68
70
|
return {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
start: undefined,
|
|
72
|
+
end: undefined
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return {
|
|
76
|
-
min: Number(min),
|
|
77
|
-
max: Number(max)
|
|
78
|
-
};
|
|
79
|
-
}, [resolvedAxisId, domains, isOrdinal]);
|
|
75
|
+
return rangeButtonValueToZoom(value, domainParams);
|
|
76
|
+
}, [domainParams, value]);
|
|
80
77
|
const handleClick = React.useCallback(() => {
|
|
81
|
-
if (resolvedAxisId === undefined ||
|
|
78
|
+
if (resolvedAxisId === undefined || startZoom === undefined || endZoom === undefined) {
|
|
82
79
|
return;
|
|
83
80
|
}
|
|
84
|
-
const zoom = rangeButtonValueToZoom(value, {
|
|
85
|
-
scaleType: resolvedAxis?.scaleType ?? 'linear',
|
|
86
|
-
data: resolvedAxis?.data,
|
|
87
|
-
domain: axisDomain
|
|
88
|
-
});
|
|
89
81
|
instance.setAxisZoomData(resolvedAxisId, {
|
|
90
82
|
axisId: resolvedAxisId,
|
|
91
|
-
start:
|
|
92
|
-
end:
|
|
83
|
+
start: startZoom,
|
|
84
|
+
end: endZoom
|
|
93
85
|
});
|
|
94
|
-
|
|
95
|
-
}, [resolvedAxisId, resolvedAxis, axisDomain, value, instance, label]);
|
|
86
|
+
}, [resolvedAxisId, startZoom, endZoom, instance]);
|
|
96
87
|
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
88
|
+
// A button is selected when the current zoom range matches its computed range.
|
|
89
|
+
const isActive = React.useMemo(() => {
|
|
90
|
+
if (startZoom === undefined || endZoom === undefined) {
|
|
91
|
+
return isValueNull && !canZoomOut;
|
|
92
|
+
}
|
|
93
|
+
const start = currentAxisZoom?.start ?? 0;
|
|
94
|
+
const end = currentAxisZoom?.end ?? 100;
|
|
95
|
+
const epsilon = 0.01;
|
|
96
|
+
return Math.abs(start - startZoom) < epsilon && Math.abs(end - endZoom) < epsilon;
|
|
97
|
+
}, [startZoom, endZoom, isValueNull, currentAxisZoom, canZoomOut]);
|
|
101
98
|
const element = useComponentRenderer(slots.baseToggleButton, render, _extends({}, slotProps.baseToggleButton, {
|
|
102
99
|
onClick: handleClick,
|
|
103
100
|
selected: isActive,
|
|
@@ -138,11 +135,11 @@ process.env.NODE_ENV !== "production" ? ChartsToolbarRangeButtonTrigger.propType
|
|
|
138
135
|
* The range value. Specifies how far back from the end of the data to zoom.
|
|
139
136
|
*
|
|
140
137
|
* - `{ unit, step }` — A calendar interval from the end of the data (e.g., `{ unit: 'month', step: 3 }` for 3 months).
|
|
141
|
-
* - `[start, end]` — An absolute date range.
|
|
138
|
+
* - `[start, end]` — An absolute date range, or a range between two ordinal (band/point) axis values.
|
|
142
139
|
* - `(params) => { start, end }` — A function that receives axis context (`scaleType`, `data`, `domain`) and returns zoom percentages (0-100).
|
|
143
140
|
* - `null` — Resets zoom to show all data.
|
|
144
141
|
*/
|
|
145
|
-
value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.instanceOf(Date).isRequired), PropTypes.func, PropTypes.shape({
|
|
142
|
+
value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.instanceOf(Date).isRequired), PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func, PropTypes.shape({
|
|
146
143
|
step: PropTypes.number,
|
|
147
144
|
unit: PropTypes.oneOf(['day', 'hour', 'microsecond', 'millisecond', 'minute', 'month', 'second', 'week', 'year']).isRequired
|
|
148
145
|
})])
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import type { ToolbarPropsOverrides } from '@mui/x-charts/models';
|
|
2
3
|
import { type ChartsToolbarProProps } from "./ChartsToolbarPro.mjs";
|
|
3
4
|
export interface ChartsToolbarProSlots {
|
|
4
5
|
/**
|
|
5
6
|
* Custom component for the toolbar.
|
|
6
7
|
* @default ChartsToolbar
|
|
7
8
|
*/
|
|
8
|
-
toolbar?: React.ElementType<ChartsToolbarProProps>;
|
|
9
|
+
toolbar?: React.ElementType<ChartsToolbarProProps & ToolbarPropsOverrides>;
|
|
9
10
|
}
|
|
10
11
|
export interface ChartsToolbarProSlotProps {
|
|
11
12
|
/**
|
|
12
13
|
* Props for the toolbar component.
|
|
13
14
|
*/
|
|
14
|
-
toolbar?: Partial<ChartsToolbarProProps
|
|
15
|
+
toolbar?: Partial<ChartsToolbarProProps> & ToolbarPropsOverrides;
|
|
15
16
|
}
|