@mui/x-charts 9.0.4 → 9.2.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/BarChart/BarChart.d.mts +1 -2
- package/BarChart/BarChart.d.ts +1 -2
- package/BarChart/BarChart.js +2 -913
- package/BarChart/BarChart.mjs +2 -913
- package/BarChart/seriesConfig/bar/seriesProcessor.js +2 -0
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +2 -0
- package/CHANGELOG.md +236 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.mts +55 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.ts +55 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.js +94 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.mjs +88 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.mts +13 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.ts +13 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.js +86 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.mjs +80 -0
- package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.mts +18 -0
- package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.ts +18 -0
- package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.js +26 -0
- package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.mjs +16 -0
- package/ChartsAxisHighlightValue/index.d.mts +1 -0
- package/ChartsAxisHighlightValue/index.d.ts +1 -0
- package/ChartsAxisHighlightValue/index.js +16 -0
- package/ChartsAxisHighlightValue/index.mjs +1 -0
- package/ChartsAxisHighlightValue/useAxisHighlightValue.d.mts +14 -0
- package/ChartsAxisHighlightValue/useAxisHighlightValue.d.ts +14 -0
- package/ChartsAxisHighlightValue/useAxisHighlightValue.js +130 -0
- package/ChartsAxisHighlightValue/useAxisHighlightValue.mjs +124 -0
- package/ChartsContainer/ChartsContainer.js +4 -1431
- package/ChartsContainer/ChartsContainer.mjs +4 -1431
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.mts +15 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.ts +15 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.js +56 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.mjs +50 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.mts +6 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.ts +6 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.js +5 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.mjs +1 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.d.mts +11 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.d.ts +11 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.js +70 -0
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.mjs +64 -0
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.mts +9 -0
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.ts +9 -0
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.js +104 -0
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.mjs +98 -0
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.mts +9 -0
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.ts +9 -0
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.js +98 -0
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.mjs +92 -0
- package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.d.mts +7 -0
- package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.d.ts +7 -0
- package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.js +14 -0
- package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.mjs +6 -0
- package/ChartsRadialAxisHighlight/index.d.mts +5 -0
- package/ChartsRadialAxisHighlight/index.d.ts +5 -0
- package/ChartsRadialAxisHighlight/index.js +47 -0
- package/ChartsRadialAxisHighlight/index.mjs +4 -0
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +1 -47
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +1 -47
- package/ChartsRadiusAxis/ChartsRadiusAxis.js +20 -16
- package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +21 -15
- package/ChartsRadiusAxis/index.d.mts +3 -2
- package/ChartsRadiusAxis/index.d.ts +3 -2
- package/ChartsRadiusAxis/index.mjs +3 -1
- package/ChartsRotationAxis/ChartsRotationAxis.d.mts +1 -47
- package/ChartsRotationAxis/ChartsRotationAxis.d.ts +1 -47
- package/ChartsRotationAxis/ChartsRotationAxis.js +16 -19
- package/ChartsRotationAxis/ChartsRotationAxis.mjs +17 -18
- package/ChartsRotationAxis/index.d.mts +3 -2
- package/ChartsRotationAxis/index.d.ts +3 -2
- package/ChartsRotationAxis/index.mjs +3 -1
- package/ChartsTooltip/useAxesTooltip.d.mts +1 -1
- package/ChartsTooltip/useAxesTooltip.d.ts +1 -1
- package/ChartsTooltip/useAxesTooltip.js +11 -2
- package/ChartsTooltip/useAxesTooltip.mjs +12 -3
- package/ChartsXAxis/useAxisTicksProps.d.mts +162 -81
- package/ChartsXAxis/useAxisTicksProps.d.ts +162 -81
- package/ChartsYAxis/useAxisTicksProps.d.mts +162 -81
- package/ChartsYAxis/useAxisTicksProps.d.ts +162 -81
- package/LICENSE +2 -0
- package/LineChart/LineChart.js +2 -913
- package/LineChart/LineChart.mjs +2 -913
- package/LineChart/seriesConfig/curveEvaluation.d.mts +19 -1
- package/LineChart/seriesConfig/curveEvaluation.d.ts +19 -1
- package/LineChart/seriesConfig/curveEvaluation.js +132 -0
- package/LineChart/seriesConfig/curveEvaluation.mjs +131 -0
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +2 -1
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.mjs +2 -1
- package/LineChart/seriesConfig/seriesProcessor.js +4 -0
- package/LineChart/seriesConfig/seriesProcessor.mjs +4 -0
- package/LineChart/useAreaPlotData.js +4 -0
- package/LineChart/useAreaPlotData.mjs +4 -0
- package/LineChart/useLinePlotData.js +2 -0
- package/LineChart/useLinePlotData.mjs +2 -0
- package/LineChart/useMarkPlotData.js +2 -0
- package/LineChart/useMarkPlotData.mjs +2 -0
- package/RadarChart/RadarGrid/CircularRadarStripes.js +2 -3
- package/RadarChart/RadarGrid/CircularRadarStripes.mjs +2 -3
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.mjs +2 -2
- package/ScatterChart/FocusedScatterMark.js +10 -24
- package/ScatterChart/FocusedScatterMark.mjs +10 -24
- package/ScatterChart/HighlightedScatterMark.d.mts +11 -0
- package/ScatterChart/HighlightedScatterMark.d.ts +11 -0
- package/ScatterChart/HighlightedScatterMark.js +68 -0
- package/ScatterChart/HighlightedScatterMark.mjs +62 -0
- package/ScatterChart/ScatterChart.d.mts +1 -2
- package/ScatterChart/ScatterChart.d.ts +1 -2
- package/ScatterChart/ScatterChart.js +2 -913
- package/ScatterChart/ScatterChart.mjs +2 -913
- package/ScatterChart/index.d.mts +1 -0
- package/ScatterChart/index.d.ts +1 -0
- package/ScatterChart/index.js +12 -0
- package/ScatterChart/index.mjs +1 -0
- package/ScatterChart/scatterClasses.d.mts +3 -1
- package/ScatterChart/scatterClasses.d.ts +3 -1
- package/ScatterChart/scatterClasses.js +3 -2
- package/ScatterChart/scatterClasses.mjs +3 -2
- package/ScatterChart/useScatterChartProps.js +3 -1
- package/ScatterChart/useScatterChartProps.mjs +3 -1
- package/ScatterChart/useScatterItemPosition.d.mts +16 -0
- package/ScatterChart/useScatterItemPosition.d.ts +16 -0
- package/ScatterChart/useScatterItemPosition.js +47 -0
- package/ScatterChart/useScatterItemPosition.mjs +41 -0
- package/SparkLineChart/SparkLineChart.js +2 -913
- package/SparkLineChart/SparkLineChart.mjs +2 -913
- package/hooks/useAxis.d.mts +3 -3
- package/hooks/useAxis.d.ts +3 -3
- package/hooks/useAxisSystem.d.mts +1 -1
- package/hooks/useAxisSystem.d.ts +1 -1
- package/hooks/useAxisSystem.js +1 -1
- package/hooks/useAxisSystem.mjs +1 -1
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.js +25 -1
- package/index.mjs +3 -1
- package/internals/getRingPath.d.mts +16 -0
- package/internals/getRingPath.d.ts +16 -0
- package/internals/getRingPath.js +39 -0
- package/internals/getRingPath.mjs +33 -0
- package/internals/index.d.mts +8 -1
- package/internals/index.d.ts +8 -1
- package/internals/index.js +67 -0
- package/internals/index.mjs +7 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +4 -2
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs +4 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +8 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.mts +6 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +6 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +48 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.mjs +47 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +77 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +77 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +152 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +152 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.mts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +4 -7
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +4 -7
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.mts +3 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +3 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.mts +7 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.ts +7 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +56 -6
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.mjs +54 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.mts +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.js +12 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.mjs +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.mts +4 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.mts +23 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +23 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +73 -12
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +74 -12
- package/models/axis.d.mts +79 -31
- package/models/axis.d.ts +79 -31
- package/models/axis.js +5 -1
- package/models/axis.mjs +5 -1
- package/models/seriesType/line.d.mts +6 -6
- package/models/seriesType/line.d.ts +6 -6
- package/package.json +32 -4
|
@@ -51,6 +51,8 @@ const seriesProcessor = (params, dataset, isItemVisible) => {
|
|
|
51
51
|
if (!data && dataset) {
|
|
52
52
|
const dataKey = series[id].dataKey;
|
|
53
53
|
if (!dataKey && !series[id].valueGetter) {
|
|
54
|
+
// TODO: fix mui/no-guarded-throw
|
|
55
|
+
// eslint-disable-next-line mui/no-guarded-throw
|
|
54
56
|
throw new Error(`MUI X Charts: Bar series with id="${id}" has no data, no dataKey, and no valueGetter. ` + 'When using the dataset prop, each series must have a dataKey or valueGetter to identify which dataset values to use. ' + 'Add a dataKey or valueGetter property to the series configuration.');
|
|
55
57
|
}
|
|
56
58
|
if (dataKey) {
|
|
@@ -44,6 +44,8 @@ const seriesProcessor = (params, dataset, isItemVisible) => {
|
|
|
44
44
|
if (!data && dataset) {
|
|
45
45
|
const dataKey = series[id].dataKey;
|
|
46
46
|
if (!dataKey && !series[id].valueGetter) {
|
|
47
|
+
// TODO: fix mui/no-guarded-throw
|
|
48
|
+
// eslint-disable-next-line mui/no-guarded-throw
|
|
47
49
|
throw new Error(`MUI X Charts: Bar series with id="${id}" has no data, no dataKey, and no valueGetter. ` + 'When using the dataset prop, each series must have a dataKey or valueGetter to identify which dataset values to use. ' + 'Add a dataKey or valueGetter property to the series configuration.');
|
|
48
50
|
}
|
|
49
51
|
if (dataKey) {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,241 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.2.0
|
|
4
|
+
|
|
5
|
+
_May 13, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- ⚡️ Add a WebGL renderer to the [Bar chart](https://mui.com/x/react-charts/bars/#webgl-renderer)
|
|
10
|
+
- 📊 Add a radial charts with the [radial line](https://mui.com/x/react-charts/radial-lines/), [radial bar](https://mui.com/x/react-charts/radial-bars/), and the [radial grid and axes](https://mui.com/x/react-charts/radial-axes/)
|
|
11
|
+
- 🐞 Bugfixes
|
|
12
|
+
- 📚 Documentation improvements
|
|
13
|
+
|
|
14
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
15
|
+
@Anexus5919, @mustafajw07
|
|
16
|
+
|
|
17
|
+
The following team members contributed to this release:
|
|
18
|
+
@aemartos, @alexfauquette, @bernardobelchior, @JCQuintas, @oliviertassinari, @sai6855, @siriwatknp
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@9.2.0`
|
|
23
|
+
|
|
24
|
+
- [data grid] Add support for pinned columns in `GridVirtualScroller` (#22347) @sai6855
|
|
25
|
+
- [data grid] Remove unused CSS (#22390) @oliviertassinari
|
|
26
|
+
|
|
27
|
+
#### `@mui/x-data-grid-pro@9.2.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
28
|
+
|
|
29
|
+
Same changes as in `@mui/x-data-grid@9.2.0`.
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-premium@9.2.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid-pro@9.2.0`.
|
|
34
|
+
|
|
35
|
+
### Date and Time Pickers
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-date-pickers@9.2.0`
|
|
38
|
+
|
|
39
|
+
- [pickers] Trim test helpers' default load graph (#22421) @JCQuintas
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers-pro@9.2.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-date-pickers@9.2.0`.
|
|
44
|
+
|
|
45
|
+
### Charts
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-charts@9.2.0`
|
|
48
|
+
|
|
49
|
+
Internal changes.
|
|
50
|
+
|
|
51
|
+
#### `@mui/x-charts-pro@9.2.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
52
|
+
|
|
53
|
+
Same changes as in `@mui/x-charts@9.2.0`.
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-charts-premium@9.2.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-charts-pro@9.2.0`, plus:
|
|
58
|
+
|
|
59
|
+
- [charts-premium] Add `Highlight` support to `RadialBarChart` (#22322) @alexfauquette
|
|
60
|
+
- [charts-premium] Add `WebGL` renderer to `BarChartPremium` (#22354) @JCQuintas
|
|
61
|
+
- [charts-premium] Add mark shape support to the radial line (#22242) @alexfauquette
|
|
62
|
+
- [charts-premium] `RadialBarChart` support axis interaction with layout horizontal (#22319) @alexfauquette
|
|
63
|
+
|
|
64
|
+
### Tree View
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-tree-view@9.1.0`
|
|
67
|
+
|
|
68
|
+
Internal changes.
|
|
69
|
+
|
|
70
|
+
#### `@mui/x-tree-view-pro@9.1.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
71
|
+
|
|
72
|
+
Same changes as in `@mui/x-tree-view@9.1.0`.
|
|
73
|
+
|
|
74
|
+
### Scheduler
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-scheduler@9.0.0-alpha.6`
|
|
77
|
+
|
|
78
|
+
- [scheduler] Complete ARIA grid semantics on `EventTimeline` and `EventCalendar` (#22266) @Anexus5919
|
|
79
|
+
- [scheduler] Improve UX for recurrence tab (#22287) @mustafajw07
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-scheduler-premium@9.0.0-alpha.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-scheduler@9.0.0-alpha.6`.
|
|
84
|
+
|
|
85
|
+
### Codemod
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-codemod@9.1.0`
|
|
88
|
+
|
|
89
|
+
Internal changes.
|
|
90
|
+
|
|
91
|
+
### Docs
|
|
92
|
+
|
|
93
|
+
- [docs] Document the `RadialBarChart` (#22320) @alexfauquette
|
|
94
|
+
- [docs] Add histogram demo to bar-demo page (#22373) @siriwatknp
|
|
95
|
+
- [docs] Add radial bar to the nav bar (#22429) @alexfauquette
|
|
96
|
+
- [docs] Split radial grid and radial line pages (#22238) @alexfauquette
|
|
97
|
+
|
|
98
|
+
### Miscellaneous
|
|
99
|
+
|
|
100
|
+
- [test] Disable animations in chart benchmarks (#22433) @bernardobelchior
|
|
101
|
+
- [test] Move `x-internal-gestures` vitest isolate flag to test block (#22427) @JCQuintas
|
|
102
|
+
- [test] Reduce flakiness in `MobileTimeRangePicker` multi-input `describeValue` tests (#22422) @JCQuintas
|
|
103
|
+
- [x-license] Exclude compat test pins from Renovate major bumps (#22414) @aemartos
|
|
104
|
+
- [x-license] Add cross-major license format compatibility tests (#22335) @aemartos
|
|
105
|
+
|
|
106
|
+
## 9.1.0
|
|
107
|
+
|
|
108
|
+
_May 8, 2026_
|
|
109
|
+
|
|
110
|
+
We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
111
|
+
|
|
112
|
+
- ⚡️ Add a WebGL renderer to the [Scatter chart](https://mui.com/x/react-charts/scatter/#webgl-renderer), and apply the same WebGL performance patterns to the candlestick and heatmap [Premium]
|
|
113
|
+
- 🐞 Bugfixes
|
|
114
|
+
- 📚 Documentation improvements
|
|
115
|
+
|
|
116
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
117
|
+
@Anexus5919, @gaetanodanelli, @imazizbohra, @mustafajw07
|
|
118
|
+
|
|
119
|
+
The following team members contributed to this release:
|
|
120
|
+
@alexfauquette, @brijeshb42, @flaviendelangle, @JCQuintas, @LukasTy, @mapache-salvaje, @MBilalShafi, @michelengelen, @oliviertassinari, @rita-codes
|
|
121
|
+
|
|
122
|
+
### Data Grid
|
|
123
|
+
|
|
124
|
+
#### `@mui/x-data-grid@9.1.0`
|
|
125
|
+
|
|
126
|
+
- [DataGrid] Fix accessibility violation in detail panel toggle column header (#22178) @michelengelen
|
|
127
|
+
- [DataGrid] Fix active filter detection for array values (#22340) @MBilalShafi
|
|
128
|
+
- [DataGrid] Fix crash when grouping/tree-data values match `Object.prototype` property names (#22312) @LukasTy
|
|
129
|
+
- [DataGrid] Position overlays below top pinned rows (#22341) @MBilalShafi
|
|
130
|
+
- [l10n] Improve Italian (it-IT) locale (#22290) @gaetanodanelli
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-data-grid-pro@9.1.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-data-grid@9.1.0`, plus:
|
|
135
|
+
|
|
136
|
+
- [DataGridPro] Fix column unpin restoring stale position after reorder (#22250) @michelengelen
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-data-grid-premium@9.1.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
139
|
+
|
|
140
|
+
Same changes as in `@mui/x-data-grid-pro@9.1.0`, plus:
|
|
141
|
+
|
|
142
|
+
- [DataGridPremium] Fix aggregation column header title truncation without ellipsis (#22248) @michelengelen
|
|
143
|
+
|
|
144
|
+
### Date and Time Pickers
|
|
145
|
+
|
|
146
|
+
#### `@mui/x-date-pickers@9.1.0`
|
|
147
|
+
|
|
148
|
+
- [pickers] Fix duplicate hour label in `MultiSectionDigitalClock` on DST day (#22110) @LukasTy
|
|
149
|
+
- [l10n] Improve Italian (it-IT) locale (#22290) @gaetanodanelli
|
|
150
|
+
|
|
151
|
+
#### `@mui/x-date-pickers-pro@9.1.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
152
|
+
|
|
153
|
+
Same changes as in `@mui/x-date-pickers@9.1.0`.
|
|
154
|
+
|
|
155
|
+
### Charts
|
|
156
|
+
|
|
157
|
+
#### `@mui/x-charts@9.1.0`
|
|
158
|
+
|
|
159
|
+
- [charts] Add `ChartsAxisHighlightValue` component (#21803) @Copilot
|
|
160
|
+
- [charts] Create `ChartsRadialAxisHighlight` (#22241) @alexfauquette
|
|
161
|
+
- [charts] Remove useless extends (#22313) @alexfauquette
|
|
162
|
+
- [charts] Use `PolarAxisConfig` in polar plugin internals (#22315) @alexfauquette
|
|
163
|
+
|
|
164
|
+
#### `@mui/x-charts-pro@9.1.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
165
|
+
|
|
166
|
+
Same changes as in `@mui/x-charts@9.1.0`.
|
|
167
|
+
|
|
168
|
+
#### `@mui/x-charts-premium@9.1.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
169
|
+
|
|
170
|
+
Same changes as in `@mui/x-charts-pro@9.1.0`, plus:
|
|
171
|
+
|
|
172
|
+
- [charts-premium] Add WebGL renderer to `ScatterChartPremium` (#22157) @JCQuintas
|
|
173
|
+
- [charts-premium] Add highlight to the `RadialLineChart` (#22156) @alexfauquette
|
|
174
|
+
- [charts-premium] Apply WebGL perf patterns to candlestick + heatmap (#22223) @JCQuintas
|
|
175
|
+
- [charts-premium] Introduce the `RadialBarChart` (#22268) @alexfauquette
|
|
176
|
+
|
|
177
|
+
### Tree View
|
|
178
|
+
|
|
179
|
+
#### `@mui/x-tree-view@9.1.0`
|
|
180
|
+
|
|
181
|
+
- [tree view] Fix stale Tree View `apiRef` after keyed remount (#22342) @MBilalShafi
|
|
182
|
+
|
|
183
|
+
#### `@mui/x-tree-view-pro@9.1.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
184
|
+
|
|
185
|
+
Same changes as in `@mui/x-tree-view@9.1.0`.
|
|
186
|
+
|
|
187
|
+
### Scheduler
|
|
188
|
+
|
|
189
|
+
#### `@mui/x-scheduler@9.0.0-alpha.5`
|
|
190
|
+
|
|
191
|
+
- [scheduler] Make `EventItem` interactive by integrating button props for keyboard accessibility (#22160) @mustafajw07
|
|
192
|
+
- [scheduler] Migrate color switch to Base UI `ToggleGroup` (#22254) @flaviendelangle
|
|
193
|
+
- [scheduler] Rename Scheduler headless packages (#22273) @rita-codes
|
|
194
|
+
- [scheduler] Use TreeView for the resource sidebar (#22261) @flaviendelangle
|
|
195
|
+
- [scheduler] Use fieldset/legend instead of headings for form sections in the event dialog (#22095) @Anexus5919
|
|
196
|
+
- [scheduler] Added `position: relative` for consistent layout (#22284) @mustafajw07
|
|
197
|
+
- [l10n] Improve Italian (it-IT) locale (#22290) @gaetanodanelli
|
|
198
|
+
|
|
199
|
+
#### `@mui/x-scheduler-premium@9.0.0-alpha.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
200
|
+
|
|
201
|
+
Same changes as in `@mui/x-scheduler@9.0.0-alpha.5`, plus:
|
|
202
|
+
|
|
203
|
+
- [scheduler] Replace per-view headers with a generic `EventTimelinePremiumHeader` in the `EventTimeline` (#22222) @rita-codes
|
|
204
|
+
|
|
205
|
+
### Codemod
|
|
206
|
+
|
|
207
|
+
#### `@mui/x-codemod@9.1.0`
|
|
208
|
+
|
|
209
|
+
Internal changes.
|
|
210
|
+
|
|
211
|
+
### Docs
|
|
212
|
+
|
|
213
|
+
- [docs] Migrate `FlightPicker` overview demo to v9 `slotProps` shape (#22272) @LukasTy
|
|
214
|
+
- [docs] Standardize Scheduler docs style and formatting (#22161) @mapache-salvaje
|
|
215
|
+
- [docs] Add feedback form to the scheduler docs (#22237) @rita-codes
|
|
216
|
+
- [docs] Fix `GridToolbarCustom` demo crash in DataGrid (#21950) @MBilalShafi
|
|
217
|
+
- [docs] Do not resolve axes in charts (#22307) @alexfauquette
|
|
218
|
+
- [docs] Fix no longer valid link (#22371) @LukasTy
|
|
219
|
+
- [docs] Replace broken CodeSandbox iframes in migration guides (#22352) @LukasTy
|
|
220
|
+
|
|
221
|
+
### Core
|
|
222
|
+
|
|
223
|
+
- [code-infra] Bump browser `testTimeout` to absorb React 19 slowness (#22236) @LukasTy
|
|
224
|
+
- [code-infra] Use vale rules from code-infra package (#22256) @brijeshb42
|
|
225
|
+
- [code-infra] Fix broken valelint and docs build (#22362) @LukasTy
|
|
226
|
+
- [internal] Prepare renaming LICENSE file to LICENSE.md (#22055) @imazizbohra
|
|
227
|
+
- [internal] Remove outdated .woff files (#22286) @oliviertassinari
|
|
228
|
+
- [internal] Replace Codspeed with `@mui/internal-benchmark` for charts (#22243) @JCQuintas
|
|
229
|
+
|
|
230
|
+
### Miscellaneous
|
|
231
|
+
|
|
232
|
+
- [internal-gestures] Add passive option to `TurnWheelGesture` (#22349) @JCQuintas
|
|
233
|
+
- [internal-gestures] Enforce pointer-type filter in `ShadowRoot` branch (#22327) @JCQuintas
|
|
234
|
+
- [internal-gestures] Improve passive event listener handling (#22329) @JCQuintas
|
|
235
|
+
- [internal-gestures] Inline wheel-delta clamp per axis (#22331) @JCQuintas
|
|
236
|
+
- [internal-gestures] Return read-only pointer map without copy (#22330) @JCQuintas
|
|
237
|
+
- [internal-gestures] Track multi-tap reset timeout to prevent leak (#22326) @JCQuintas
|
|
238
|
+
|
|
3
239
|
## 9.0.4
|
|
4
240
|
|
|
5
241
|
_Apr 28, 2026_
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type SxProps } from '@mui/material/styles';
|
|
2
|
+
import { type AxisId } from "../models/axis.mjs";
|
|
3
|
+
export type ChartsAxisHighlightValuePosition = 'start' | 'end' | 'both' | 'none';
|
|
4
|
+
export interface ChartsAxisHighlightValueProps {
|
|
5
|
+
/**
|
|
6
|
+
* The axis direction.
|
|
7
|
+
*/
|
|
8
|
+
axisDirection: 'x' | 'y';
|
|
9
|
+
/**
|
|
10
|
+
* The id of the axis.
|
|
11
|
+
* If not provided, defaults to the first axis.
|
|
12
|
+
*/
|
|
13
|
+
axisId?: AxisId;
|
|
14
|
+
/**
|
|
15
|
+
* The position of the label relative to the drawing area.
|
|
16
|
+
* - `'start'`: at the beginning of the drawing area (top for x-axis, left for y-axis).
|
|
17
|
+
* - `'end'`: at the end of the drawing area (bottom for x-axis, right for y-axis).
|
|
18
|
+
* - `'both'`: at both positions.
|
|
19
|
+
* - `'none'`: no label is displayed.
|
|
20
|
+
* @default 'end'
|
|
21
|
+
*/
|
|
22
|
+
labelPosition?: ChartsAxisHighlightValuePosition;
|
|
23
|
+
/**
|
|
24
|
+
* The value to display.
|
|
25
|
+
* If not defined, tracks the axis highlight value from user interaction.
|
|
26
|
+
*/
|
|
27
|
+
value?: number | Date | string | null;
|
|
28
|
+
/**
|
|
29
|
+
* A function to format the displayed value.
|
|
30
|
+
* If not provided, uses the axis `valueFormatter`, or falls back to a default formatter.
|
|
31
|
+
* @param {number | Date | string} value The value to format.
|
|
32
|
+
* @returns {string} The formatted string.
|
|
33
|
+
*/
|
|
34
|
+
valueFormatter?: (value: number | Date | string) => string;
|
|
35
|
+
sx?: SxProps;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A component that displays the axis value at the edge of the drawing area,
|
|
39
|
+
* aligned with the current axis highlight position.
|
|
40
|
+
*
|
|
41
|
+
* Renders as a portal into the ChartsLayerContainer, appearing as the last child.
|
|
42
|
+
*
|
|
43
|
+
* Demos:
|
|
44
|
+
*
|
|
45
|
+
* - [Custom components](https://mui.com/x/react-charts/components/)
|
|
46
|
+
*
|
|
47
|
+
* API:
|
|
48
|
+
*
|
|
49
|
+
* - [ChartsAxisHighlightValue API](https://mui.com/x/api/charts/charts-axis-highlight-value/)
|
|
50
|
+
*/
|
|
51
|
+
declare function ChartsAxisHighlightValue(props: ChartsAxisHighlightValueProps): import("react").ReactPortal | import("react/jsx-runtime").JSX.Element[] | null;
|
|
52
|
+
declare namespace ChartsAxisHighlightValue {
|
|
53
|
+
var propTypes: any;
|
|
54
|
+
}
|
|
55
|
+
export { ChartsAxisHighlightValue };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type SxProps } from '@mui/material/styles';
|
|
2
|
+
import { type AxisId } from "../models/axis.js";
|
|
3
|
+
export type ChartsAxisHighlightValuePosition = 'start' | 'end' | 'both' | 'none';
|
|
4
|
+
export interface ChartsAxisHighlightValueProps {
|
|
5
|
+
/**
|
|
6
|
+
* The axis direction.
|
|
7
|
+
*/
|
|
8
|
+
axisDirection: 'x' | 'y';
|
|
9
|
+
/**
|
|
10
|
+
* The id of the axis.
|
|
11
|
+
* If not provided, defaults to the first axis.
|
|
12
|
+
*/
|
|
13
|
+
axisId?: AxisId;
|
|
14
|
+
/**
|
|
15
|
+
* The position of the label relative to the drawing area.
|
|
16
|
+
* - `'start'`: at the beginning of the drawing area (top for x-axis, left for y-axis).
|
|
17
|
+
* - `'end'`: at the end of the drawing area (bottom for x-axis, right for y-axis).
|
|
18
|
+
* - `'both'`: at both positions.
|
|
19
|
+
* - `'none'`: no label is displayed.
|
|
20
|
+
* @default 'end'
|
|
21
|
+
*/
|
|
22
|
+
labelPosition?: ChartsAxisHighlightValuePosition;
|
|
23
|
+
/**
|
|
24
|
+
* The value to display.
|
|
25
|
+
* If not defined, tracks the axis highlight value from user interaction.
|
|
26
|
+
*/
|
|
27
|
+
value?: number | Date | string | null;
|
|
28
|
+
/**
|
|
29
|
+
* A function to format the displayed value.
|
|
30
|
+
* If not provided, uses the axis `valueFormatter`, or falls back to a default formatter.
|
|
31
|
+
* @param {number | Date | string} value The value to format.
|
|
32
|
+
* @returns {string} The formatted string.
|
|
33
|
+
*/
|
|
34
|
+
valueFormatter?: (value: number | Date | string) => string;
|
|
35
|
+
sx?: SxProps;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A component that displays the axis value at the edge of the drawing area,
|
|
39
|
+
* aligned with the current axis highlight position.
|
|
40
|
+
*
|
|
41
|
+
* Renders as a portal into the ChartsLayerContainer, appearing as the last child.
|
|
42
|
+
*
|
|
43
|
+
* Demos:
|
|
44
|
+
*
|
|
45
|
+
* - [Custom components](https://mui.com/x/react-charts/components/)
|
|
46
|
+
*
|
|
47
|
+
* API:
|
|
48
|
+
*
|
|
49
|
+
* - [ChartsAxisHighlightValue API](https://mui.com/x/api/charts/charts-axis-highlight-value/)
|
|
50
|
+
*/
|
|
51
|
+
declare function ChartsAxisHighlightValue(props: ChartsAxisHighlightValueProps): import("react").ReactPortal | import("react/jsx-runtime").JSX.Element[] | null;
|
|
52
|
+
declare namespace ChartsAxisHighlightValue {
|
|
53
|
+
var propTypes: any;
|
|
54
|
+
}
|
|
55
|
+
export { ChartsAxisHighlightValue };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.ChartsAxisHighlightValue = ChartsAxisHighlightValue;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _useChartsLayerContainerRef = require("../hooks/useChartsLayerContainerRef");
|
|
14
|
+
var _useAxisHighlightValue = require("./useAxisHighlightValue");
|
|
15
|
+
var _ChartsAxisHighlightValueItem = require("./ChartsAxisHighlightValueItem");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
/**
|
|
18
|
+
* A component that displays the axis value at the edge of the drawing area,
|
|
19
|
+
* aligned with the current axis highlight position.
|
|
20
|
+
*
|
|
21
|
+
* Renders as a portal into the ChartsLayerContainer, appearing as the last child.
|
|
22
|
+
*
|
|
23
|
+
* Demos:
|
|
24
|
+
*
|
|
25
|
+
* - [Custom components](https://mui.com/x/react-charts/components/)
|
|
26
|
+
*
|
|
27
|
+
* API:
|
|
28
|
+
*
|
|
29
|
+
* - [ChartsAxisHighlightValue API](https://mui.com/x/api/charts/charts-axis-highlight-value/)
|
|
30
|
+
*/
|
|
31
|
+
function ChartsAxisHighlightValue(props) {
|
|
32
|
+
const {
|
|
33
|
+
axisDirection,
|
|
34
|
+
axisId,
|
|
35
|
+
labelPosition,
|
|
36
|
+
value,
|
|
37
|
+
valueFormatter,
|
|
38
|
+
sx
|
|
39
|
+
} = props;
|
|
40
|
+
const chartsLayerContainerRef = (0, _useChartsLayerContainerRef.useChartsLayerContainerRef)();
|
|
41
|
+
const items = (0, _useAxisHighlightValue.useAxisHighlightValue)({
|
|
42
|
+
axisDirection,
|
|
43
|
+
axisId,
|
|
44
|
+
labelPosition,
|
|
45
|
+
value,
|
|
46
|
+
valueFormatter
|
|
47
|
+
});
|
|
48
|
+
if (items.length === 0) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const content = items.map(itemProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlightValueItem.ChartsAxisHighlightValueItem, (0, _extends2.default)({}, itemProps, {
|
|
52
|
+
sx: sx
|
|
53
|
+
})));
|
|
54
|
+
if (!chartsLayerContainerRef.current) {
|
|
55
|
+
return content;
|
|
56
|
+
}
|
|
57
|
+
return /*#__PURE__*/ReactDOM.createPortal(content, chartsLayerContainerRef.current);
|
|
58
|
+
}
|
|
59
|
+
ChartsAxisHighlightValue.propTypes = {
|
|
60
|
+
// ----------------------------- Warning --------------------------------
|
|
61
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
62
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
63
|
+
// ----------------------------------------------------------------------
|
|
64
|
+
/**
|
|
65
|
+
* The axis direction.
|
|
66
|
+
*/
|
|
67
|
+
axisDirection: _propTypes.default.oneOf(['x', 'y']).isRequired,
|
|
68
|
+
/**
|
|
69
|
+
* The id of the axis.
|
|
70
|
+
* If not provided, defaults to the first axis.
|
|
71
|
+
*/
|
|
72
|
+
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
73
|
+
/**
|
|
74
|
+
* The position of the label relative to the drawing area.
|
|
75
|
+
* - `'start'`: at the beginning of the drawing area (top for x-axis, left for y-axis).
|
|
76
|
+
* - `'end'`: at the end of the drawing area (bottom for x-axis, right for y-axis).
|
|
77
|
+
* - `'both'`: at both positions.
|
|
78
|
+
* - `'none'`: no label is displayed.
|
|
79
|
+
* @default 'end'
|
|
80
|
+
*/
|
|
81
|
+
labelPosition: _propTypes.default.oneOf(['both', 'end', 'none', 'start']),
|
|
82
|
+
/**
|
|
83
|
+
* The value to display.
|
|
84
|
+
* If not defined, tracks the axis highlight value from user interaction.
|
|
85
|
+
*/
|
|
86
|
+
value: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]),
|
|
87
|
+
/**
|
|
88
|
+
* A function to format the displayed value.
|
|
89
|
+
* If not provided, uses the axis `valueFormatter`, or falls back to a default formatter.
|
|
90
|
+
* @param {number | Date | string} value The value to format.
|
|
91
|
+
* @returns {string} The formatted string.
|
|
92
|
+
*/
|
|
93
|
+
valueFormatter: _propTypes.default.func
|
|
94
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import * as ReactDOM from 'react-dom';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { useChartsLayerContainerRef } from "../hooks/useChartsLayerContainerRef.mjs";
|
|
7
|
+
import { useAxisHighlightValue } from "./useAxisHighlightValue.mjs";
|
|
8
|
+
import { ChartsAxisHighlightValueItem } from "./ChartsAxisHighlightValueItem.mjs";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* A component that displays the axis value at the edge of the drawing area,
|
|
12
|
+
* aligned with the current axis highlight position.
|
|
13
|
+
*
|
|
14
|
+
* Renders as a portal into the ChartsLayerContainer, appearing as the last child.
|
|
15
|
+
*
|
|
16
|
+
* Demos:
|
|
17
|
+
*
|
|
18
|
+
* - [Custom components](https://mui.com/x/react-charts/components/)
|
|
19
|
+
*
|
|
20
|
+
* API:
|
|
21
|
+
*
|
|
22
|
+
* - [ChartsAxisHighlightValue API](https://mui.com/x/api/charts/charts-axis-highlight-value/)
|
|
23
|
+
*/
|
|
24
|
+
function ChartsAxisHighlightValue(props) {
|
|
25
|
+
const {
|
|
26
|
+
axisDirection,
|
|
27
|
+
axisId,
|
|
28
|
+
labelPosition,
|
|
29
|
+
value,
|
|
30
|
+
valueFormatter,
|
|
31
|
+
sx
|
|
32
|
+
} = props;
|
|
33
|
+
const chartsLayerContainerRef = useChartsLayerContainerRef();
|
|
34
|
+
const items = useAxisHighlightValue({
|
|
35
|
+
axisDirection,
|
|
36
|
+
axisId,
|
|
37
|
+
labelPosition,
|
|
38
|
+
value,
|
|
39
|
+
valueFormatter
|
|
40
|
+
});
|
|
41
|
+
if (items.length === 0) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const content = items.map(itemProps => /*#__PURE__*/_jsx(ChartsAxisHighlightValueItem, _extends({}, itemProps, {
|
|
45
|
+
sx: sx
|
|
46
|
+
})));
|
|
47
|
+
if (!chartsLayerContainerRef.current) {
|
|
48
|
+
return content;
|
|
49
|
+
}
|
|
50
|
+
return /*#__PURE__*/ReactDOM.createPortal(content, chartsLayerContainerRef.current);
|
|
51
|
+
}
|
|
52
|
+
ChartsAxisHighlightValue.propTypes = {
|
|
53
|
+
// ----------------------------- Warning --------------------------------
|
|
54
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
55
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
56
|
+
// ----------------------------------------------------------------------
|
|
57
|
+
/**
|
|
58
|
+
* The axis direction.
|
|
59
|
+
*/
|
|
60
|
+
axisDirection: PropTypes.oneOf(['x', 'y']).isRequired,
|
|
61
|
+
/**
|
|
62
|
+
* The id of the axis.
|
|
63
|
+
* If not provided, defaults to the first axis.
|
|
64
|
+
*/
|
|
65
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
66
|
+
/**
|
|
67
|
+
* The position of the label relative to the drawing area.
|
|
68
|
+
* - `'start'`: at the beginning of the drawing area (top for x-axis, left for y-axis).
|
|
69
|
+
* - `'end'`: at the end of the drawing area (bottom for x-axis, right for y-axis).
|
|
70
|
+
* - `'both'`: at both positions.
|
|
71
|
+
* - `'none'`: no label is displayed.
|
|
72
|
+
* @default 'end'
|
|
73
|
+
*/
|
|
74
|
+
labelPosition: PropTypes.oneOf(['both', 'end', 'none', 'start']),
|
|
75
|
+
/**
|
|
76
|
+
* The value to display.
|
|
77
|
+
* If not defined, tracks the axis highlight value from user interaction.
|
|
78
|
+
*/
|
|
79
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]),
|
|
80
|
+
/**
|
|
81
|
+
* A function to format the displayed value.
|
|
82
|
+
* If not provided, uses the axis `valueFormatter`, or falls back to a default formatter.
|
|
83
|
+
* @param {number | Date | string} value The value to format.
|
|
84
|
+
* @returns {string} The formatted string.
|
|
85
|
+
*/
|
|
86
|
+
valueFormatter: PropTypes.func
|
|
87
|
+
};
|
|
88
|
+
export { ChartsAxisHighlightValue };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SxProps } from '@mui/material/styles';
|
|
2
|
+
export interface ChartsAxisHighlightValueItemProps {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
formattedValue: string;
|
|
6
|
+
position: 'top' | 'right' | 'bottom' | 'left';
|
|
7
|
+
minCoord: number;
|
|
8
|
+
maxCoord: number;
|
|
9
|
+
space: number;
|
|
10
|
+
sx?: SxProps;
|
|
11
|
+
}
|
|
12
|
+
declare function ChartsAxisHighlightValueItem(props: ChartsAxisHighlightValueItemProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { ChartsAxisHighlightValueItem };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SxProps } from '@mui/material/styles';
|
|
2
|
+
export interface ChartsAxisHighlightValueItemProps {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
formattedValue: string;
|
|
6
|
+
position: 'top' | 'right' | 'bottom' | 'left';
|
|
7
|
+
minCoord: number;
|
|
8
|
+
maxCoord: number;
|
|
9
|
+
space: number;
|
|
10
|
+
sx?: SxProps;
|
|
11
|
+
}
|
|
12
|
+
declare function ChartsAxisHighlightValueItem(props: ChartsAxisHighlightValueItemProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { ChartsAxisHighlightValueItem };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.ChartsAxisHighlightValueItem = ChartsAxisHighlightValueItem;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _styles = require("@mui/material/styles");
|
|
13
|
+
var _createStyled = require("@mui/system/createStyled");
|
|
14
|
+
var _chartsAxisHighlightValueClasses = require("./chartsAxisHighlightValueClasses");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
const ChartsAxisHighlightValueText = (0, _styles.styled)('div', {
|
|
17
|
+
name: 'MuiChartsAxisHighlightValue',
|
|
18
|
+
slot: 'Root',
|
|
19
|
+
shouldForwardProp: prop => (0, _createStyled.shouldForwardProp)(prop) && prop !== 'position'
|
|
20
|
+
})(({
|
|
21
|
+
theme
|
|
22
|
+
}) => (0, _extends2.default)({}, theme.typography.caption, {
|
|
23
|
+
padding: theme.spacing(0.5, 1),
|
|
24
|
+
border: `solid ${theme.palette.divider} 1px`,
|
|
25
|
+
backgroundColor: theme.palette.background.paper,
|
|
26
|
+
'--clamped-offset': 'calc(-1*min(var(--min),max(calc(100% - var(--max)),50%)))',
|
|
27
|
+
variants: [{
|
|
28
|
+
props: {
|
|
29
|
+
position: 'top'
|
|
30
|
+
},
|
|
31
|
+
style: {
|
|
32
|
+
translate: 'var(--clamped-offset) -100%'
|
|
33
|
+
}
|
|
34
|
+
}, {
|
|
35
|
+
props: {
|
|
36
|
+
position: 'bottom'
|
|
37
|
+
},
|
|
38
|
+
style: {
|
|
39
|
+
translate: 'var(--clamped-offset) 0'
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
props: {
|
|
43
|
+
position: 'left'
|
|
44
|
+
},
|
|
45
|
+
style: {
|
|
46
|
+
translate: '-100% var(--clamped-offset)'
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
props: {
|
|
50
|
+
position: 'right'
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
translate: '0 var(--clamped-offset)'
|
|
54
|
+
}
|
|
55
|
+
}]
|
|
56
|
+
}));
|
|
57
|
+
function ChartsAxisHighlightValueItem(props) {
|
|
58
|
+
const {
|
|
59
|
+
x,
|
|
60
|
+
y,
|
|
61
|
+
position,
|
|
62
|
+
formattedValue,
|
|
63
|
+
minCoord,
|
|
64
|
+
maxCoord,
|
|
65
|
+
space,
|
|
66
|
+
sx
|
|
67
|
+
} = props;
|
|
68
|
+
const classes = (0, _chartsAxisHighlightValueClasses.useUtilityClasses)({
|
|
69
|
+
position
|
|
70
|
+
});
|
|
71
|
+
const isXAxis = position === 'top' || position === 'bottom';
|
|
72
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ChartsAxisHighlightValueText, {
|
|
73
|
+
className: classes.root,
|
|
74
|
+
position: position,
|
|
75
|
+
style: {
|
|
76
|
+
position: 'absolute',
|
|
77
|
+
top: y,
|
|
78
|
+
left: x,
|
|
79
|
+
'--min': `${isXAxis ? x - minCoord : y - minCoord}px`,
|
|
80
|
+
'--max': `${isXAxis ? maxCoord - x : maxCoord - y}px`,
|
|
81
|
+
'--space': `${space}px`
|
|
82
|
+
},
|
|
83
|
+
sx: sx,
|
|
84
|
+
children: formattedValue
|
|
85
|
+
});
|
|
86
|
+
}
|