@mui/x-charts-pro 8.22.0 → 8.23.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/CHANGELOG.md +202 -0
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +2 -3
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +7 -23
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.d.ts +4 -0
- package/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.js +22 -0
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +4 -0
- package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/seriesPreviewPlotMap.d.ts +3 -0
- package/ChartZoomSlider/internals/seriesPreviewPlotMap.js +10 -0
- package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/FunnelChart/FunnelPlot.js +3 -3
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +2 -2
- package/Heatmap/Heatmap.d.ts +2 -2
- package/Heatmap/Heatmap.js +109 -5
- package/Heatmap/Heatmap.plugins.d.ts +3 -2
- package/Heatmap/Heatmap.plugins.js +2 -1
- package/Heatmap/HeatmapItem.d.ts +10 -1
- package/Heatmap/HeatmapItem.js +3 -9
- package/Heatmap/HeatmapPlot.js +11 -1
- package/Heatmap/index.d.ts +1 -0
- package/SankeyChart/SankeyLinkElement.js +2 -2
- package/SankeyChart/SankeyNodeElement.js +2 -2
- package/SankeyChart/SankeyNodeLabel.js +2 -2
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +2 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +2 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +8 -24
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.d.ts +4 -0
- package/esm/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.js +15 -0
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +4 -0
- package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/seriesPreviewPlotMap.d.ts +3 -0
- package/esm/ChartZoomSlider/internals/seriesPreviewPlotMap.js +4 -0
- package/esm/ChartsToolbarPro/ChartsToolbarPro.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +2 -2
- package/esm/FunnelChart/FunnelPlot.js +4 -4
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +3 -3
- package/esm/Heatmap/Heatmap.d.ts +2 -2
- package/esm/Heatmap/Heatmap.js +109 -5
- package/esm/Heatmap/Heatmap.plugins.d.ts +3 -2
- package/esm/Heatmap/Heatmap.plugins.js +3 -2
- package/esm/Heatmap/HeatmapItem.d.ts +10 -1
- package/esm/Heatmap/HeatmapItem.js +3 -9
- package/esm/Heatmap/HeatmapPlot.js +11 -1
- package/esm/Heatmap/index.d.ts +1 -0
- package/esm/SankeyChart/SankeyLinkElement.js +3 -3
- package/esm/SankeyChart/SankeyNodeElement.js +3 -3
- package/esm/SankeyChart/SankeyNodeLabel.js +3 -3
- package/esm/hooks/useSankeySeries.js +2 -2
- package/esm/hooks/zoom/useIsZoomInteracting.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +4 -0
- package/esm/internals/index.js +2 -0
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +3 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +4 -4
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +2 -2
- package/hooks/useSankeySeries.js +1 -1
- package/hooks/zoom/useIsZoomInteracting.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +4 -0
- package/internals/index.js +19 -0
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +3 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,208 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.23.0
|
|
9
|
+
|
|
10
|
+
_Dec 23, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🧮 Support Data Grid `size`, `size(true)`, and `size(false)` [aggregations for `'boolean'` column type](https://mui.com/x/react-data-grid/aggregation/#usage-with-row-grouping)
|
|
15
|
+
- 🔎 Allow zooming a heatmap
|
|
16
|
+
|
|
17
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
18
|
+
@henkerik, @sai6855
|
|
19
|
+
|
|
20
|
+
The following team members contributed to this release:
|
|
21
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @brijeshb42, @flaviendelangle, @JCQuintas, @mapache-salvaje, @MBilalShafi, @siriwatknp
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@8.23.0`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Fix columns state and columns prop sync issue (#20703) @arminmeh
|
|
28
|
+
- [DataGrid] Fix filter datetime with seconds (#20557) @siriwatknp
|
|
29
|
+
- [DataGrid] Add new `includeHeaderFilters` flag to include header filters when autosizing columns (#20510) @siriwatknp
|
|
30
|
+
- [DataGrid] Prevent default on `Enter` key down when starting editing (#20751) @siriwatknp
|
|
31
|
+
- [l10n] Improve Portuguese from Portugal (pt-PT) locale (#20722) @Copilot
|
|
32
|
+
|
|
33
|
+
#### `@mui/x-data-grid-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
34
|
+
|
|
35
|
+
Same changes as in `@mui/x-data-grid@8.23.0`, plus:
|
|
36
|
+
|
|
37
|
+
- [DataGridPro] Fix crash on rows change in tree data with pagination (#20215) @Copilot
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-data-grid-premium@8.23.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
40
|
+
|
|
41
|
+
Same changes as in `@mui/x-data-grid-pro@8.23.0`, plus:
|
|
42
|
+
|
|
43
|
+
- [DataGridPremium] Add aggregation for `'boolean'` column type (#20683) @arminmeh
|
|
44
|
+
- [DataGridPremium] Fix strategy value computation with row grouping (#20725) @MBilalShafi
|
|
45
|
+
- [DataGridPremium] Handle `isRowSelectable()` checks for the rows missing due to `keepNonExistentRowsSelected` (#20668) @arminmeh
|
|
46
|
+
|
|
47
|
+
### Date and Time Pickers
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-date-pickers@8.23.0`
|
|
50
|
+
|
|
51
|
+
Internal changes.
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-date-pickers-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
54
|
+
|
|
55
|
+
Same changes as in `@mui/x-date-pickers@8.23.0`.
|
|
56
|
+
|
|
57
|
+
### Charts
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-charts@8.23.0`
|
|
60
|
+
|
|
61
|
+
- [charts] Custom stack functions implementation (#20679) @JCQuintas
|
|
62
|
+
- [charts] Extract keyboard focus navigation to the series config (#20693) @alexfauquette
|
|
63
|
+
- [charts] Fix demo not wrapping in mobile (#20713) @JCQuintas
|
|
64
|
+
- [charts] Fix missing dependencies in `x-charts-vendor` (#20685) @henkerik
|
|
65
|
+
- [charts] Remove webkit test differences (#20707) @JCQuintas
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-charts-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
68
|
+
|
|
69
|
+
Same changes as in `@mui/x-charts@8.23.0`, plus:
|
|
70
|
+
|
|
71
|
+
- [charts-pro] Allow registering preview plots from higher tier packages (#20716) @bernardobelchior
|
|
72
|
+
- [charts-pro] Fix erroneous behavior when adding/removing pointers from zoom&pan gestures (#20698) @JCQuintas
|
|
73
|
+
- [charts-pro] Move heatmap highlight handling to plot component (#20701) @bernardobelchior
|
|
74
|
+
- [charts-pro] Add zoom to heatmap (#20708) @bernardobelchior
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-charts-premium@8.23.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
77
|
+
|
|
78
|
+
Same changes as in `@mui/x-charts-pro@8.23.0`.
|
|
79
|
+
|
|
80
|
+
### Tree View
|
|
81
|
+
|
|
82
|
+
#### `@mui/x-tree-view@8.23.0`
|
|
83
|
+
|
|
84
|
+
- [tree view] Add new APIs to disable selection feature for tree view item (#20666) @siriwatknp
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-tree-view-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
87
|
+
|
|
88
|
+
Same changes as in `@mui/x-tree-view@8.23.0`.
|
|
89
|
+
|
|
90
|
+
### Codemod
|
|
91
|
+
|
|
92
|
+
#### `@mui/x-codemod@8.23.0`
|
|
93
|
+
|
|
94
|
+
Internal changes.
|
|
95
|
+
|
|
96
|
+
### Docs
|
|
97
|
+
|
|
98
|
+
- [docs] Clarify feature availability and relationship between Community and Pro/Premium docs (#20714) @mapache-salvaje
|
|
99
|
+
- [docs] Copyedit Tree View docs and apply new component style rules (DX-19) (#20652) @mapache-salvaje
|
|
100
|
+
- [docs] Fix `ColumnPinningDynamicRowHeight` demo (#20750) @sai6855
|
|
101
|
+
- [docs] Clean up Charts docs sidebar (DX-97) (#20700) @alelthomas
|
|
102
|
+
- [docs] Fix tick labels not being shown on a demo (#20718) @sai6855
|
|
103
|
+
|
|
104
|
+
### Core
|
|
105
|
+
|
|
106
|
+
- [code-infra] Bump prettier to 3.7.4 (#20709) @JCQuintas
|
|
107
|
+
- [code-infra] Fix contributor generation logic in changelog script (#20705) @brijeshb42
|
|
108
|
+
|
|
109
|
+
## 8.22.1
|
|
110
|
+
|
|
111
|
+
_Dec 17, 2025_
|
|
112
|
+
|
|
113
|
+
We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
114
|
+
|
|
115
|
+
- 🌎 Improve Swedish (sv-SE) locale on the Data Grid
|
|
116
|
+
- 🐞 Bugfixes
|
|
117
|
+
|
|
118
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
119
|
+
@KyeongJooni, @VismaAndreasIvarsson
|
|
120
|
+
|
|
121
|
+
The following team members contributed to this release:
|
|
122
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @Janpot, @JCQuintas, @mapache-salvaje, @michelengelen, @mj12albert, @prakhargupta1, @romgrk, @siriwatknp
|
|
123
|
+
|
|
124
|
+
### Data Grid
|
|
125
|
+
|
|
126
|
+
#### `@mui/x-data-grid@8.22.1`
|
|
127
|
+
|
|
128
|
+
- [data grid] Fix column menu keyboard shortcut (#20621) @mj12albert
|
|
129
|
+
- [data grid] Fix row checkbox disabled state on first render and keep cell focusable (ARIA) (#20641) @michelengelen
|
|
130
|
+
- [data grid] Fix tree data selection bug (#20528) @michelengelen
|
|
131
|
+
- [data grid] Prevent clear cell selection on edit mode (#20544) @siriwatknp
|
|
132
|
+
- [data grid] Refactor column merge logic to prioritize defined properties only (#20640) @michelengelen
|
|
133
|
+
- [data grid] Reset row spanning on row expansion change (#20661) @siriwatknp
|
|
134
|
+
- [data grid] Resize newly added rows while resize action is happening (#20676)
|
|
135
|
+
- [l10n] Improve Swedish (sv-SE) locale (#20682) @VismaAndreasIvarsson
|
|
136
|
+
|
|
137
|
+
#### `@mui/x-data-grid-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
138
|
+
|
|
139
|
+
Same changes as in `@mui/x-data-grid@8.22.1`.
|
|
140
|
+
|
|
141
|
+
#### `@mui/x-data-grid-premium@8.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
142
|
+
|
|
143
|
+
Same changes as in `@mui/x-data-grid-pro@8.22.1`, plus:
|
|
144
|
+
|
|
145
|
+
- [DataGridPremium] Import `useId()` from `@mui/utils` to maintain React 17 compatibility (#20635) @arminmeh
|
|
146
|
+
|
|
147
|
+
### Date and Time Pickers
|
|
148
|
+
|
|
149
|
+
#### `@mui/x-date-pickers@8.22.1`
|
|
150
|
+
|
|
151
|
+
- [pickers] Add minutesStep validation test (#20672) @KyeongJooni
|
|
152
|
+
- [pickers] Fix `onAccept()` returning wrong year after selecting year then month (#20639) @michelengelen
|
|
153
|
+
|
|
154
|
+
#### `@mui/x-date-pickers-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
155
|
+
|
|
156
|
+
Same changes as in `@mui/x-date-pickers@8.22.1`.
|
|
157
|
+
|
|
158
|
+
### Charts
|
|
159
|
+
|
|
160
|
+
#### `@mui/x-charts@8.22.1`
|
|
161
|
+
|
|
162
|
+
- [charts] Extract `FocusedPieArc` from `PieArcPlot` (#20613) @alexfauquette
|
|
163
|
+
- [charts] Fix regression on the highlight control (#20627) @alexfauquette
|
|
164
|
+
- [charts] Refactor: `useSelector()` => `store.use()` (#20681) @romgrk
|
|
165
|
+
- [charts] Remove duplicated types (#20694) @alexfauquette
|
|
166
|
+
- [charts] Remove unused generics from bar charts (#20642) @bernardobelchior
|
|
167
|
+
- [charts] Simplify tooltip position getter for pie chart (#20625) @alexfauquette
|
|
168
|
+
|
|
169
|
+
#### `@mui/x-charts-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
170
|
+
|
|
171
|
+
Same changes as in `@mui/x-charts@8.22.1`, plus:
|
|
172
|
+
|
|
173
|
+
- [charts-pro] Add heatmap performance benchmark (#20695) @bernardobelchior
|
|
174
|
+
|
|
175
|
+
#### `@mui/x-charts-premium@8.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
176
|
+
|
|
177
|
+
Same changes as in `@mui/x-charts-pro@8.22.1`, plus:
|
|
178
|
+
|
|
179
|
+
- [charts-premium] Create `BarChartPremium` (#20643) @bernardobelchior
|
|
180
|
+
|
|
181
|
+
### Tree View
|
|
182
|
+
|
|
183
|
+
#### `@mui/x-tree-view@8.22.1`
|
|
184
|
+
|
|
185
|
+
Internal changes.
|
|
186
|
+
|
|
187
|
+
#### `@mui/x-tree-view-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
188
|
+
|
|
189
|
+
Same changes as in `@mui/x-tree-view@8.22.1`.
|
|
190
|
+
|
|
191
|
+
### Codemod
|
|
192
|
+
|
|
193
|
+
#### `@mui/x-codemod@8.22.1`
|
|
194
|
+
|
|
195
|
+
Internal changes.
|
|
196
|
+
|
|
197
|
+
### Docs
|
|
198
|
+
|
|
199
|
+
- [docs] Add button to GitHub source code for the Data Grid advanced demos (DX-50) (#20633) @alelthomas
|
|
200
|
+
- [docs] Remove `seriesConfig` to prevent future confusion (#20678) @alexfauquette
|
|
201
|
+
- [docs] Revise the Data Grid's API object doc for clarity and style (#20649) @mapache-salvaje
|
|
202
|
+
- [docs] Update list of charts (#20479) @prakhargupta1
|
|
203
|
+
|
|
204
|
+
### Core
|
|
205
|
+
|
|
206
|
+
- [code-infra] Regression tests improvements (#20441) @Janpot
|
|
207
|
+
- [code-infra] Test utils upgrade (#20592) @Janpot
|
|
208
|
+
- [code-infra] Try to fix the Tree View flacky tests (#20573) @JCQuintas
|
|
209
|
+
|
|
8
210
|
## 8.22.0
|
|
9
211
|
|
|
10
212
|
_Dec 11, 2025_
|
|
@@ -16,7 +16,7 @@ var _material = require("../internals/material");
|
|
|
16
16
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
17
17
|
var _useChartDataProviderProProps = require("./useChartDataProviderProProps");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const releaseInfo = "
|
|
19
|
+
const releaseInfo = "MTc2NjUzNDQwMDAwMA==";
|
|
20
20
|
const packageIdentifier = 'x-charts-pro';
|
|
21
21
|
/**
|
|
22
22
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -25,8 +25,8 @@ function ChartAxisZoomSlider({
|
|
|
25
25
|
}) {
|
|
26
26
|
const store = (0, _internals.useStore)();
|
|
27
27
|
const drawingArea = (0, _internals.useDrawingArea)();
|
|
28
|
-
const zoomData =
|
|
29
|
-
const zoomOptions =
|
|
28
|
+
const zoomData = store.use(_useChartProZoom.selectorChartAxisZoomData, axisId);
|
|
29
|
+
const zoomOptions = store.use(_internals.selectorChartAxisZoomOptionsLookup, axisId);
|
|
30
30
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
31
31
|
const {
|
|
32
32
|
xAxis
|
|
@@ -62,7 +62,7 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
62
62
|
svgRef
|
|
63
63
|
} = (0, _internals.useChartContext)();
|
|
64
64
|
const store = (0, _internals.useStore)();
|
|
65
|
-
const axis =
|
|
65
|
+
const axis = store.use(_internals.selectorChartAxis, axisId);
|
|
66
66
|
const drawingArea = (0, _internals.useDrawingArea)();
|
|
67
67
|
const activePreviewRectRef = React.useRef(null);
|
|
68
68
|
const [startThumbEl, setStartThumbEl] = React.useState(null);
|
|
@@ -50,8 +50,8 @@ function PreviewRectangles(props) {
|
|
|
50
50
|
axisDirection
|
|
51
51
|
} = props;
|
|
52
52
|
const store = (0, _internals.useStore)();
|
|
53
|
-
const zoomData =
|
|
54
|
-
const zoomOptions =
|
|
53
|
+
const zoomData = store.use(_useChartProZoom.selectorChartAxisZoomData, axisId);
|
|
54
|
+
const zoomOptions = store.use(_internals.selectorChartAxisZoomOptionsLookup, axisId);
|
|
55
55
|
const id = (0, _useId.default)();
|
|
56
56
|
if (!zoomData) {
|
|
57
57
|
return null;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type AxisId } from '@mui/x-charts/internals';
|
|
2
|
-
interface ChartAxisZoomSliderPreviewContentProps {
|
|
2
|
+
export interface ChartAxisZoomSliderPreviewContentProps {
|
|
3
3
|
axisId: AxisId;
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
height: number;
|
|
7
7
|
width: number;
|
|
8
8
|
}
|
|
9
|
-
export declare function ChartAxisZoomSliderPreviewContent(props: ChartAxisZoomSliderPreviewContentProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
9
|
+
export declare function ChartAxisZoomSliderPreviewContent(props: ChartAxisZoomSliderPreviewContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,10 +9,7 @@ exports.ChartAxisZoomSliderPreviewContent = ChartAxisZoomSliderPreviewContent;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _internals = require("@mui/x-charts/internals");
|
|
12
|
-
var
|
|
13
|
-
var _AreaPreviewPlot = require("./previews/AreaPreviewPlot");
|
|
14
|
-
var _BarPreviewPlot = require("./previews/BarPreviewPlot");
|
|
15
|
-
var _ScatterPreviewPlot = require("./previews/ScatterPreviewPlot");
|
|
12
|
+
var _seriesPreviewPlotMap = require("./seriesPreviewPlotMap");
|
|
16
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
14
|
function ChartAxisZoomSliderPreviewContent(props) {
|
|
18
15
|
const {
|
|
@@ -23,27 +20,14 @@ function ChartAxisZoomSliderPreviewContent(props) {
|
|
|
23
20
|
height
|
|
24
21
|
} = props;
|
|
25
22
|
const store = (0, _internals.useStore)();
|
|
26
|
-
const processedSeries =
|
|
23
|
+
const processedSeries = store.use(_internals.selectorChartSeriesProcessed);
|
|
27
24
|
const children = [];
|
|
28
25
|
const clipId = `zoom-preview-mask-${axisId}`;
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
axisId: axisId
|
|
35
|
-
}, "area"));
|
|
36
|
-
}
|
|
37
|
-
if (hasBarSeries) {
|
|
38
|
-
children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_BarPreviewPlot.BarPreviewPlot, (0, _extends2.default)({}, props), "bar"));
|
|
39
|
-
}
|
|
40
|
-
if (hasLineSeries) {
|
|
41
|
-
children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_LinePreviewPlot.LinePreviewPlot, {
|
|
42
|
-
axisId: axisId
|
|
43
|
-
}, "line"));
|
|
44
|
-
}
|
|
45
|
-
if (hasScatterSeries) {
|
|
46
|
-
children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScatterPreviewPlot.ScatterPreviewPlot, (0, _extends2.default)({}, props), "scatter"));
|
|
26
|
+
for (const [seriesType, Component] of _seriesPreviewPlotMap.seriesPreviewPlotMap) {
|
|
27
|
+
const hasSeries = (processedSeries[seriesType]?.seriesOrder?.length ?? 0) > 0;
|
|
28
|
+
if (hasSeries) {
|
|
29
|
+
children.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, (0, _extends2.default)({}, props), seriesType));
|
|
30
|
+
}
|
|
47
31
|
}
|
|
48
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
49
33
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("clipPath", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
3
|
import { type PreviewPlotProps } from "./PreviewPlot.types.js";
|
|
4
|
-
interface AreaPreviewPlotProps extends PreviewPlotProps {}
|
|
4
|
+
interface AreaPreviewPlotProps extends Pick<PreviewPlotProps, 'axisId'> {}
|
|
5
5
|
export declare function AreaPreviewPlot({
|
|
6
6
|
axisId
|
|
7
7
|
}: AreaPreviewPlotProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -55,7 +55,7 @@ function PreviewAreaElement(_ref) {
|
|
|
55
55
|
}
|
|
56
56
|
function useAreaPreviewData(axisId) {
|
|
57
57
|
const store = (0, _internals.useStore)();
|
|
58
|
-
const xAxes =
|
|
59
|
-
const yAxes =
|
|
58
|
+
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
59
|
+
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
60
60
|
return (0, _internals.useAreaPlotData)(xAxes, yAxes);
|
|
61
61
|
}
|
|
@@ -54,7 +54,7 @@ function BarPreviewPlot(props) {
|
|
|
54
54
|
}
|
|
55
55
|
function useBarPreviewData(axisId, drawingArea) {
|
|
56
56
|
const store = (0, _internals.useStore)();
|
|
57
|
-
const xAxes =
|
|
58
|
-
const yAxes =
|
|
57
|
+
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
58
|
+
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
59
59
|
return (0, _internals.useBarPlotData)(drawingArea, xAxes, yAxes);
|
|
60
60
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.LineAreaPreviewPlot = LineAreaPreviewPlot;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _AreaPreviewPlot = require("./AreaPreviewPlot");
|
|
10
|
+
var _LinePreviewPlot = require("./LinePreviewPlot");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function LineAreaPreviewPlot({
|
|
13
|
+
axisId
|
|
14
|
+
}) {
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
16
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AreaPreviewPlot.AreaPreviewPlot, {
|
|
17
|
+
axisId: axisId
|
|
18
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinePreviewPlot.LinePreviewPlot, {
|
|
19
|
+
axisId: axisId
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import {
|
|
4
|
-
interface LinePreviewPlotProps extends PreviewPlotProps {}
|
|
3
|
+
import type { PreviewPlotProps } from "./PreviewPlot.types.js";
|
|
4
|
+
interface LinePreviewPlotProps extends Pick<PreviewPlotProps, 'axisId'> {}
|
|
5
5
|
export declare function LinePreviewPlot({
|
|
6
6
|
axisId
|
|
7
7
|
}: LinePreviewPlotProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -53,7 +53,7 @@ function PreviewLineElement(_ref) {
|
|
|
53
53
|
}
|
|
54
54
|
function useLinePreviewData(axisId) {
|
|
55
55
|
const store = (0, _internals.useStore)();
|
|
56
|
-
const xAxes =
|
|
57
|
-
const yAxes =
|
|
56
|
+
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
57
|
+
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
58
58
|
return (0, _internals.useLinePlotData)(xAxes, yAxes);
|
|
59
59
|
}
|
|
@@ -19,8 +19,8 @@ function ScatterPreviewPlot({
|
|
|
19
19
|
}) {
|
|
20
20
|
const store = (0, _internals.useStore)();
|
|
21
21
|
const seriesData = (0, _hooks.useScatterSeriesContext)();
|
|
22
|
-
const xAxes =
|
|
23
|
-
const yAxes =
|
|
22
|
+
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
23
|
+
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
24
24
|
const defaultXAxisId = (0, _hooks.useXAxes)().xAxisIds[0];
|
|
25
25
|
const defaultYAxisId = (0, _hooks.useYAxes)().yAxisIds[0];
|
|
26
26
|
const {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.seriesPreviewPlotMap = void 0;
|
|
7
|
+
var _BarPreviewPlot = require("./previews/BarPreviewPlot");
|
|
8
|
+
var _ScatterPreviewPlot = require("./previews/ScatterPreviewPlot");
|
|
9
|
+
var _LineAreaPreviewPlot = require("./previews/LineAreaPreviewPlot");
|
|
10
|
+
const seriesPreviewPlotMap = exports.seriesPreviewPlotMap = new Map([['bar', _BarPreviewPlot.BarPreviewPlot], ['line', _LineAreaPreviewPlot.LineAreaPreviewPlot], ['scatter', _ScatterPreviewPlot.ScatterPreviewPlot]]);
|
|
@@ -51,7 +51,7 @@ function ChartsToolbarPro(_ref) {
|
|
|
51
51
|
const exportMenuTriggerRef = React.useRef(null);
|
|
52
52
|
const exportMenuId = (0, _useId.default)();
|
|
53
53
|
const exportMenuTriggerId = (0, _useId.default)();
|
|
54
|
-
const isZoomEnabled =
|
|
54
|
+
const isZoomEnabled = store.use(_useChartProZoom.selectorChartZoomIsEnabled);
|
|
55
55
|
const imageExportOptionList = rawImageExportOptions ?? DEFAULT_IMAGE_EXPORT_OPTIONS;
|
|
56
56
|
const showExportMenu = !printOptions?.disableToolbarButton || imageExportOptionList.length > 0;
|
|
57
57
|
const children = [];
|
|
@@ -33,7 +33,7 @@ const ChartsToolbarZoomInTrigger = exports.ChartsToolbarZoomInTrigger = /*#__PUR
|
|
|
33
33
|
instance,
|
|
34
34
|
store
|
|
35
35
|
} = (0, _internals.useChartContext)();
|
|
36
|
-
const disabled =
|
|
36
|
+
const disabled = store.use(_useChartProZoom.selectorChartCanZoomIn);
|
|
37
37
|
const element = (0, _useComponentRenderer.useComponentRenderer)(slots.baseButton, render, (0, _extends2.default)({}, slotProps.baseButton, {
|
|
38
38
|
onClick: () => instance.zoomIn(),
|
|
39
39
|
disabled
|
|
@@ -33,7 +33,7 @@ const ChartsToolbarZoomOutTrigger = exports.ChartsToolbarZoomOutTrigger = /*#__P
|
|
|
33
33
|
instance,
|
|
34
34
|
store
|
|
35
35
|
} = (0, _internals.useChartContext)();
|
|
36
|
-
const disabled =
|
|
36
|
+
const disabled = store.use(_useChartProZoom.selectorChartCanZoomOut);
|
|
37
37
|
const element = (0, _useComponentRenderer.useComponentRenderer)(slots.baseButton, render, (0, _extends2.default)({}, slotProps.baseButton, {
|
|
38
38
|
onClick: () => instance.zoomOut(),
|
|
39
39
|
disabled
|
|
@@ -29,12 +29,12 @@ const useAggregatedData = () => {
|
|
|
29
29
|
const {
|
|
30
30
|
axis: xAxis,
|
|
31
31
|
axisIds: xAxisIds
|
|
32
|
-
} =
|
|
32
|
+
} = store.use(_useChartFunnelAxisRendering.selectorChartXAxis);
|
|
33
33
|
const {
|
|
34
34
|
axis: yAxis,
|
|
35
35
|
axisIds: yAxisIds
|
|
36
|
-
} =
|
|
37
|
-
const gap =
|
|
36
|
+
} = store.use(_useChartFunnelAxisRendering.selectorChartYAxis);
|
|
37
|
+
const gap = store.use(_useChartFunnelAxisRendering.selectorFunnelGap);
|
|
38
38
|
const allData = React.useMemo(() => {
|
|
39
39
|
if (seriesData === undefined) {
|
|
40
40
|
return [];
|
|
@@ -32,8 +32,8 @@ const useChartFunnelAxis = ({
|
|
|
32
32
|
(0, _warning.warnOnce)([`MUI X Charts: The following axis ids are duplicated: ${Array.from(duplicates).join(', ')}.`, `Please make sure that each axis has a unique id.`].join('\n'), 'error');
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
const drawingArea =
|
|
36
|
-
const isInteractionEnabled =
|
|
35
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
36
|
+
const isInteractionEnabled = store.use(_internals.selectorChartsInteractionIsInitialized);
|
|
37
37
|
const isFirstRender = React.useRef(true);
|
|
38
38
|
React.useEffect(() => {
|
|
39
39
|
if (isFirstRender.current) {
|
package/Heatmap/Heatmap.d.ts
CHANGED
|
@@ -34,13 +34,13 @@ export interface HeatmapProps extends Omit<ChartContainerProProps<'heatmap', Hea
|
|
|
34
34
|
* If not provided, a default axis config is used.
|
|
35
35
|
* An array of [[AxisConfig]] objects.
|
|
36
36
|
*/
|
|
37
|
-
xAxis: Readonly<
|
|
37
|
+
xAxis: Readonly<MakeOptional<XAxis<'band'>, 'scaleType'>[]>;
|
|
38
38
|
/**
|
|
39
39
|
* The configuration of the y-axes.
|
|
40
40
|
* If not provided, a default axis config is used.
|
|
41
41
|
* An array of [[AxisConfig]] objects.
|
|
42
42
|
*/
|
|
43
|
-
yAxis: Readonly<
|
|
43
|
+
yAxis: Readonly<MakeOptional<YAxis<'band'>, 'scaleType'>[]>;
|
|
44
44
|
/**
|
|
45
45
|
* The series to display in the bar chart.
|
|
46
46
|
* An array of [[HeatmapSeries]] objects.
|