@mui/x-charts-pro 8.5.1 → 8.5.3
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.d.ts +3 -2
- package/CHANGELOG.md +187 -10
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +22 -32
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +1 -8
- package/ChartZoomSlider/internals/zoom-utils.d.ts +3 -1
- package/ChartZoomSlider/internals/zoom-utils.js +19 -8
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -1
- package/ChartsToolbarPro/Toolbar.types.d.ts +15 -0
- package/ChartsToolbarPro/Toolbar.types.js +5 -0
- package/FunnelChart/FunnelChart.js +4 -11
- package/FunnelChart/FunnelChart.plugins.d.ts +3 -2
- package/FunnelChart/FunnelChart.plugins.js +2 -1
- package/FunnelChart/FunnelPlot.d.ts +0 -5
- package/FunnelChart/FunnelPlot.js +85 -67
- package/FunnelChart/FunnelSection.js +2 -0
- package/FunnelChart/categoryAxis.types.d.ts +2 -1
- package/FunnelChart/curves/bump.d.ts +3 -5
- package/FunnelChart/curves/bump.js +13 -13
- package/FunnelChart/curves/curve.types.d.ts +14 -1
- package/FunnelChart/curves/getFunnelCurve.d.ts +7 -2
- package/FunnelChart/curves/linear.d.ts +4 -4
- package/FunnelChart/curves/linear.js +42 -34
- package/FunnelChart/curves/pyramid.d.ts +3 -3
- package/FunnelChart/curves/pyramid.js +25 -24
- package/FunnelChart/curves/step-pyramid.d.ts +5 -5
- package/FunnelChart/curves/step-pyramid.js +24 -24
- package/FunnelChart/curves/step.d.ts +3 -3
- package/FunnelChart/curves/step.js +14 -26
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +25 -0
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.js +124 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +3 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +173 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +27 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.js +5 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +56 -0
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +27 -0
- package/FunnelChart/labelUtils.d.ts +4 -11
- package/FunnelChart/labelUtils.js +43 -44
- package/FunnelChart/useFunnelChartProps.js +1 -3
- package/Heatmap/Heatmap.d.ts +3 -3
- package/LineChartPro/LineChartPro.d.ts +3 -2
- package/PieChartPro/PieChartPro.d.ts +3 -2
- package/RadarChartPro/RadarChartPro.d.ts +17 -2
- package/ScatterChartPro/ScatterChartPro.d.ts +3 -2
- package/esm/BarChartPro/BarChartPro.d.ts +3 -2
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +23 -33
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +1 -8
- package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +3 -1
- package/esm/ChartZoomSlider/internals/zoom-utils.js +19 -9
- package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -1
- package/esm/ChartsToolbarPro/Toolbar.types.d.ts +15 -0
- package/esm/ChartsToolbarPro/Toolbar.types.js +1 -0
- package/esm/FunnelChart/FunnelChart.js +4 -11
- package/esm/FunnelChart/FunnelChart.plugins.d.ts +3 -2
- package/esm/FunnelChart/FunnelChart.plugins.js +3 -2
- package/esm/FunnelChart/FunnelPlot.d.ts +0 -5
- package/esm/FunnelChart/FunnelPlot.js +86 -68
- package/esm/FunnelChart/FunnelSection.js +2 -0
- package/esm/FunnelChart/categoryAxis.types.d.ts +2 -1
- package/esm/FunnelChart/curves/bump.d.ts +3 -5
- package/esm/FunnelChart/curves/bump.js +13 -13
- package/esm/FunnelChart/curves/curve.types.d.ts +14 -1
- package/esm/FunnelChart/curves/getFunnelCurve.d.ts +7 -2
- package/esm/FunnelChart/curves/linear.d.ts +4 -4
- package/esm/FunnelChart/curves/linear.js +42 -34
- package/esm/FunnelChart/curves/pyramid.d.ts +3 -3
- package/esm/FunnelChart/curves/pyramid.js +25 -24
- package/esm/FunnelChart/curves/step-pyramid.d.ts +5 -5
- package/esm/FunnelChart/curves/step-pyramid.js +24 -24
- package/esm/FunnelChart/curves/step.d.ts +3 -3
- package/esm/FunnelChart/curves/step.js +14 -26
- package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +25 -0
- package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.js +114 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +3 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +165 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +27 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.js +1 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +56 -0
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +20 -0
- package/esm/FunnelChart/labelUtils.d.ts +4 -11
- package/esm/FunnelChart/labelUtils.js +43 -44
- package/esm/FunnelChart/useFunnelChartProps.js +1 -3
- package/esm/Heatmap/Heatmap.d.ts +3 -3
- package/esm/LineChartPro/LineChartPro.d.ts +3 -2
- package/esm/PieChartPro/PieChartPro.d.ts +3 -2
- package/esm/RadarChartPro/RadarChartPro.d.ts +17 -2
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +3 -2
- package/esm/index.js +1 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +16 -595
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +2 -2
- package/index.js +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +16 -595
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +2 -2
- package/package.json +6 -6
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BarChartProps, BarChartSlotProps, BarChartSlots } from '@mui/x-charts/BarChart';
|
|
3
|
+
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
3
4
|
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
4
5
|
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
6
|
import { BarChartProPluginsSignatures } from "./BarChartPro.plugins.js";
|
|
6
|
-
export interface BarChartProSlots extends BarChartSlots, Partial<ChartsSlotsPro> {}
|
|
7
|
-
export interface BarChartProSlotProps extends BarChartSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
7
|
+
export interface BarChartProSlots extends Omit<BarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
|
+
export interface BarChartProSlotProps extends Omit<BarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
9
|
export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'bar', BarChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps'> {
|
|
9
10
|
/**
|
|
10
11
|
* Overridable component slots.
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,193 @@
|
|
|
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.5.3
|
|
9
|
+
|
|
10
|
+
_Jun 19, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📚 Documentation improvements
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@alisasanib, @arminmeh, @sai6855
|
|
19
|
+
|
|
20
|
+
The following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @bernardobelchior, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @oliviertassinari
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@8.5.3`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Fix export menu button tooltip being interactive when menu is open (#18327) @bernardobelchior
|
|
28
|
+
- [DataGrid] Fix column menu scroll close (#18065) @alisasanib
|
|
29
|
+
- [DataGrid] Fix page size issue with data source (#18419) @MBilalShafi
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@8.5.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@8.5.3`, plus:
|
|
34
|
+
|
|
35
|
+
- [DataGridPro] Ignore missing `rowCount` response when new children are fetched with the data source (#17711) @arminmeh
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-data-grid-premium@8.5.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
38
|
+
|
|
39
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.3`.
|
|
40
|
+
|
|
41
|
+
### Date and Time Pickers
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-date-pickers@8.5.3`
|
|
44
|
+
|
|
45
|
+
- [pickers] Add `inputSizeSmall` to classes interface (#18242) @sai6855
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-date-pickers-pro@8.5.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
48
|
+
|
|
49
|
+
Same changes as in `@mui/x-date-pickers@8.5.3`.
|
|
50
|
+
|
|
51
|
+
### Charts
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-charts@8.5.3`
|
|
54
|
+
|
|
55
|
+
- [charts] Add item class to list item around each series in legend (#18411) @bernardobelchior
|
|
56
|
+
- [charts] Allow `tabIndex` in surface and legend (#18344) @JCQuintas
|
|
57
|
+
- [charts] Explore selector typing (#18362) @alexfauquette
|
|
58
|
+
- [charts] Fix highlight with number ids (#18423) @alexfauquette
|
|
59
|
+
- [charts] Make scatter chart use data attributes (#18048) @alexfauquette
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts-pro@8.5.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
62
|
+
|
|
63
|
+
Same changes as in `@mui/x-charts@8.5.3`, plus:
|
|
64
|
+
|
|
65
|
+
- [charts-pro] Add data-series to elements of funnel chart (#18067) @JCQuintas
|
|
66
|
+
- [charts-pro] Hide values outside minStart and maxEnd in zoom slider (#18336) @bernardobelchior
|
|
67
|
+
- [charts-pro] Fix `FunnelChart` label positioning with different curves (#18354) @JCQuintas
|
|
68
|
+
|
|
69
|
+
### Tree View
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-tree-view@8.5.3`
|
|
72
|
+
|
|
73
|
+
Internal changes.
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-tree-view-pro@8.5.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
76
|
+
|
|
77
|
+
Same changes as in `@mui/x-tree-view@8.5.3`.
|
|
78
|
+
|
|
79
|
+
### Codemod
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-codemod@8.5.3`
|
|
82
|
+
|
|
83
|
+
Internal changes.
|
|
84
|
+
|
|
85
|
+
### Docs
|
|
86
|
+
|
|
87
|
+
- [docs] Fix 404 in charts docs (#18440) @alexfauquette
|
|
88
|
+
- [docs][pickers] Fix adapter version resolving when opening demo to edit (#18363) @LukasTy
|
|
89
|
+
|
|
90
|
+
### Core
|
|
91
|
+
|
|
92
|
+
- [core] Fix pnpm valelint error (#18420) @oliviertassinari
|
|
93
|
+
|
|
94
|
+
### Miscellaneous
|
|
95
|
+
|
|
96
|
+
- [code-infra] Add back a `Playwright` renovate group (#18397) @LukasTy
|
|
97
|
+
- [code-infra] Setup `CODEOWNERS` for charts repositories (#18418) @JCQuintas
|
|
98
|
+
- [code-infra] Strengthen `URL` usage for test config (#18444) @LukasTy
|
|
99
|
+
- [code-infra] Use `vitest` bundled types (#17758) @JCQuintas
|
|
100
|
+
- [infra] Stabilise tests by removing babel and plugins from vitest (#18341) @JCQuintas
|
|
101
|
+
- [infra] Add automated release PR creation script (#18345) @michelengelen
|
|
102
|
+
|
|
103
|
+
## 8.5.2
|
|
104
|
+
|
|
105
|
+
_Jun 12, 2025_
|
|
106
|
+
|
|
107
|
+
We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
108
|
+
|
|
109
|
+
- 📊 Improve Data Grid selectors performance
|
|
110
|
+
- 🐞 Fix `useSyncExternalStore` import error in React 17
|
|
111
|
+
|
|
112
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
113
|
+
@alisasanib, @noobyogi0010.
|
|
114
|
+
|
|
115
|
+
The following are all team members who have contributed to this release:
|
|
116
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @JCQuintas, @KenanYusuf, @LukasTy, @mapache-salvaje, @michelengelen, @noraleonte, @oliviertassinari, @prakhargupta1, @romgrk.
|
|
117
|
+
|
|
118
|
+
### Data Grid
|
|
119
|
+
|
|
120
|
+
#### `@mui/x-data-grid@8.5.2`
|
|
121
|
+
|
|
122
|
+
- [DataGrid] Improve selectors performance (#18234) @romgrk
|
|
123
|
+
- [DataGrid] Fix data grid palette when using CSS vars (#18310) @KenanYusuf
|
|
124
|
+
- [DataGrid] Ignore data source request if the grid got unmounted (#18268) @arminmeh
|
|
125
|
+
|
|
126
|
+
#### `@mui/x-data-grid-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
127
|
+
|
|
128
|
+
Same changes as in `@mui/x-data-grid@8.5.2`, plus:
|
|
129
|
+
|
|
130
|
+
- [DataGridPro] Fix flex column width if it is a pinned column (#18293) @alisasanib
|
|
131
|
+
- [DataGridPro] Fix inconsistent filtering results with aggregation (#17954) @cherniavskii
|
|
132
|
+
|
|
133
|
+
#### `@mui/x-data-grid-premium@8.5.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
134
|
+
|
|
135
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.2`.
|
|
136
|
+
|
|
137
|
+
### Date and Time Pickers
|
|
138
|
+
|
|
139
|
+
#### `@mui/x-date-pickers@8.5.2`
|
|
140
|
+
|
|
141
|
+
- [pickers] Add `PickerDay2` and `DateRangePickerDay2` components (#15921) @noraleonte
|
|
142
|
+
- [pickers] Fix `hiddenLabel` prop propagation (#18195) @noobyogi0010
|
|
143
|
+
|
|
144
|
+
#### `@mui/x-date-pickers-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
145
|
+
|
|
146
|
+
Same changes as in `@mui/x-date-pickers@8.5.2`.
|
|
147
|
+
|
|
148
|
+
### Charts
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-charts@8.5.2`
|
|
151
|
+
|
|
152
|
+
- [charts] Add a default value formatter for continuous scales (#18178) @bernardobelchior
|
|
153
|
+
- [charts] Add margin-bottom to charts toolbar (#18326) @bernardobelchior
|
|
154
|
+
- [charts] Fix grid with band scale (#18295) @alexfauquette
|
|
155
|
+
- [charts] Remove unnecessary style changes in tests (#18317) @JCQuintas
|
|
156
|
+
- [charts] Remove `sx` prop merging from `useComponentRenderer` (#18235) @bernardobelchior
|
|
157
|
+
- [charts] Fix `useSyncExternalStore` import error in React 17 (#18314) @bernardobelchior
|
|
158
|
+
|
|
159
|
+
#### `@mui/x-charts-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
160
|
+
|
|
161
|
+
Same changes as in `@mui/x-charts@8.5.2`, plus:
|
|
162
|
+
|
|
163
|
+
- [charts-pro] Document zoom slider tooltip value formatting (#18261) @bernardobelchior
|
|
164
|
+
- [charts-pro] Funnel `gap` prop does not impact the drawing area (#18233) @JCQuintas
|
|
165
|
+
- [charts-pro] Use `ChartsToolbarPro` types in pro charts (#18243) @bernardobelchior
|
|
166
|
+
|
|
167
|
+
### Tree View
|
|
168
|
+
|
|
169
|
+
#### `@mui/x-tree-view@8.5.2`
|
|
170
|
+
|
|
171
|
+
- [tree-view] Fix `useSyncExternalStore` import error in React 17 (#18314) @bernardobelchior
|
|
172
|
+
|
|
173
|
+
#### `@mui/x-tree-view-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
174
|
+
|
|
175
|
+
Same changes as in `@mui/x-tree-view@8.5.2`.
|
|
176
|
+
|
|
177
|
+
### Docs
|
|
178
|
+
|
|
179
|
+
- [docs] Add toolbar custom trigger and panel recipe (#18297) @KenanYusuf
|
|
180
|
+
- [docs] Copyedit the Priority support page (#18311) @mapache-salvaje
|
|
181
|
+
- [docs] Remove confusing opt-out mention in telemetry docs (#18257) @prakhargupta1
|
|
182
|
+
- [docs] Revise the Master Detail doc (#17927) @mapache-salvaje
|
|
183
|
+
- [docs] Revise the list view doc (#17928) @mapache-salvaje
|
|
184
|
+
- [docs] Audit and revise the Pro column docs (#17844) @mapache-salvaje
|
|
185
|
+
- [docs] Add some more context on Heatmap (#18256) @oliviertassinari
|
|
186
|
+
- [x-telemetry] Reduce Telemetry overhead (#18292) @oliviertassinari
|
|
187
|
+
- [code-infra] Align Node version used in CI to v22 (#18319) @LukasTy
|
|
188
|
+
- [code-infra] Fix pkg.pr.new publishing (#18316) @bernardobelchior
|
|
189
|
+
- [code-infra] Revert `React` to `19.0.0` (#18265) @LukasTy
|
|
190
|
+
- [code-infra] Use `catalog` for reused dependencies (#18302) @LukasTy
|
|
191
|
+
- [infra] Remove unused karma/mocha deps and files (#18340) @JCQuintas
|
|
192
|
+
- [infra] Update GitHub label references to use 'scope' instead of 'component' (#18260) @michelengelen
|
|
193
|
+
- [infra] Use a single browser server in CI (#18230) @JCQuintas
|
|
194
|
+
|
|
8
195
|
## 8.5.1
|
|
9
196
|
|
|
10
197
|
<!-- generated comparing v8.5.0..master -->
|
|
@@ -97,15 +284,6 @@ Same changes as in `@mui/x-tree-view@8.5.1`.
|
|
|
97
284
|
|
|
98
285
|
### Core
|
|
99
286
|
|
|
100
|
-
- chore(deps): bump @next/eslint-plugin-next to 15.3.3 (#18155) @renovate[bot]
|
|
101
|
-
- chore(deps): bump @types/lodash to ^4.17.17 (#17990) @renovate[bot]
|
|
102
|
-
- chore(deps): bump babel (#18157) @renovate[bot]
|
|
103
|
-
- chore(deps): bump eslint to ^9.28.0 (#17352) @renovate[bot]
|
|
104
|
-
- chore(deps): bump material ui (#17802) @renovate[bot]
|
|
105
|
-
- chore(deps): bump next to ^15.3.3 (#18159) @renovate[bot]
|
|
106
|
-
- chore(deps): bump ossf/scorecard-action action to v2.4.2 (#18160) @renovate[bot]
|
|
107
|
-
- chore(deps): bump react-router to ^7.6.1 (#18162) @renovate[bot]
|
|
108
|
-
- chore(deps): bump yargs to ^18.0.0 (#18169) @renovate[bot]
|
|
109
287
|
- [code-infra] Different approach to console testing for `processRowUpdate` (#18213) @JCQuintas
|
|
110
288
|
- [code-infra] Fix act warnings in DataGrid/toolbar (#18207) @JCQuintas
|
|
111
289
|
- [code-infra] Remove `istanbul` references (#18194) @JCQuintas
|
|
@@ -4549,7 +4727,6 @@ No changes since `@mui/x-charts@7.22.2`.
|
|
|
4549
4727
|
- [docs] Add `next` version links (#15423) @LukasTy
|
|
4550
4728
|
- [docs] Use the `loading` state in the demos (#15538) @cherniavskii
|
|
4551
4729
|
- [docs] Add data caching to lazy loaded detail panel demo (#15506) @cherniavskii
|
|
4552
|
-
|
|
4553
4730
|
- [code-infra] Tentative fix for Argos flaky screenshot tests (#15399) @JCQuintas
|
|
4554
4731
|
- [docs-infra] Transpile `.ts` demo files (#15421) @KenanYusuf
|
|
4555
4732
|
- [core] Clarify release version bump strategy (#15536) @cherniavskii
|
|
@@ -18,7 +18,7 @@ var _material = require("../internals/material");
|
|
|
18
18
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
19
19
|
var _useChartDataProviderProProps = require("./useChartDataProviderProProps");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
const releaseInfo = "
|
|
21
|
+
const releaseInfo = "MTc1MDI4NDAwMDAwMA==";
|
|
22
22
|
const packageIdentifier = 'x-charts-pro';
|
|
23
23
|
/**
|
|
24
24
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -24,7 +24,7 @@ function ChartAxisZoomSlider({
|
|
|
24
24
|
}) {
|
|
25
25
|
const store = (0, _internals.useStore)();
|
|
26
26
|
const drawingArea = (0, _internals.useDrawingArea)();
|
|
27
|
-
const zoomData = (0, _internals.useSelector)(store, _useChartProZoom.selectorChartAxisZoomData, axisId);
|
|
27
|
+
const zoomData = (0, _internals.useSelector)(store, _useChartProZoom.selectorChartAxisZoomData, [axisId]);
|
|
28
28
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
29
29
|
const {
|
|
30
30
|
xAxis
|
|
@@ -40,7 +40,7 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
40
40
|
svgRef
|
|
41
41
|
} = (0, _internals.useChartContext)();
|
|
42
42
|
const store = (0, _internals.useStore)();
|
|
43
|
-
const axis = (0, _internals.useSelector)(store, _internals.selectorChartAxis, axisId);
|
|
43
|
+
const axis = (0, _internals.useSelector)(store, _internals.selectorChartAxis, [axisId]);
|
|
44
44
|
const drawingArea = (0, _internals.useDrawingArea)();
|
|
45
45
|
const activePreviewRectRef = React.useRef(null);
|
|
46
46
|
const [startThumbEl, setStartThumbEl] = React.useState(null);
|
|
@@ -56,10 +56,6 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
56
56
|
if (!activePreviewRect) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
/* min and max values of zoom to ensure the pointer anchor in the slider is maintained */
|
|
61
|
-
let pointerZoomMin;
|
|
62
|
-
let pointerZoomMax;
|
|
63
59
|
let prevPointerZoom = 0;
|
|
64
60
|
const onPointerMove = (0, _rafThrottle.rafThrottle)(event => {
|
|
65
61
|
const element = svgRef.current;
|
|
@@ -67,11 +63,10 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
67
63
|
return;
|
|
68
64
|
}
|
|
69
65
|
const point = (0, _internals.getSVGPoint)(element, event);
|
|
70
|
-
|
|
66
|
+
const pointerZoom = (0, _zoomUtils.calculateZoomFromPoint)(store.getSnapshot(), axisId, point);
|
|
71
67
|
if (pointerZoom === null) {
|
|
72
68
|
return;
|
|
73
69
|
}
|
|
74
|
-
pointerZoom = Math.max(pointerZoomMin, Math.min(pointerZoomMax, pointerZoom));
|
|
75
70
|
const deltaZoom = pointerZoom - prevPointerZoom;
|
|
76
71
|
prevPointerZoom = pointerZoom;
|
|
77
72
|
instance.moveZoomRange(axisId, deltaZoom);
|
|
@@ -95,8 +90,6 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
95
90
|
return;
|
|
96
91
|
}
|
|
97
92
|
prevPointerZoom = pointerDownZoom;
|
|
98
|
-
pointerZoomMin = pointerDownZoom - axisZoomData.start;
|
|
99
|
-
pointerZoomMax = 100 - (axisZoomData.end - pointerDownZoom);
|
|
100
93
|
document.addEventListener('pointerup', onPointerUp);
|
|
101
94
|
activePreviewRect.addEventListener('pointermove', onPointerMove);
|
|
102
95
|
};
|
|
@@ -137,23 +130,12 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
137
130
|
}
|
|
138
131
|
const point = (0, _internals.getSVGPoint)(element, event);
|
|
139
132
|
instance.setZoomData(prevZoomData => {
|
|
140
|
-
const {
|
|
141
|
-
left,
|
|
142
|
-
top,
|
|
143
|
-
width,
|
|
144
|
-
height
|
|
145
|
-
} = (0, _internals.selectorChartDrawingArea)(store.getSnapshot());
|
|
146
133
|
const zoomOptions = (0, _internals.selectorChartAxisZoomOptionsLookup)(store.getSnapshot(), axisId);
|
|
147
134
|
return prevZoomData.map(zoom => {
|
|
148
135
|
if (zoom.axisId === axisId) {
|
|
149
|
-
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
} else {
|
|
153
|
-
newEnd = (top + height - point.y) / height * 100;
|
|
154
|
-
}
|
|
155
|
-
if (reverse) {
|
|
156
|
-
newEnd = 100 - newEnd;
|
|
136
|
+
const newEnd = (0, _zoomUtils.calculateZoomFromPoint)(store.getSnapshot(), axisId, point);
|
|
137
|
+
if (newEnd === null) {
|
|
138
|
+
return zoom;
|
|
157
139
|
}
|
|
158
140
|
return (0, _extends2.default)({}, zoom, {
|
|
159
141
|
end: (0, _zoomUtils.calculateZoomEnd)(newEnd, zoom, zoomOptions)
|
|
@@ -171,14 +153,21 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
171
153
|
let startThumbY;
|
|
172
154
|
let endThumbX;
|
|
173
155
|
let endThumbY;
|
|
156
|
+
const {
|
|
157
|
+
minStart,
|
|
158
|
+
maxEnd
|
|
159
|
+
} = (0, _internals.selectorChartAxisZoomOptionsLookup)(store.getSnapshot(), axisId);
|
|
160
|
+
const range = maxEnd - minStart;
|
|
161
|
+
const zoomStart = Math.max(minStart, zoomData.start);
|
|
162
|
+
const zoomEnd = Math.min(zoomData.end, maxEnd);
|
|
174
163
|
if (axisDirection === 'x') {
|
|
175
|
-
previewX =
|
|
164
|
+
previewX = (zoomStart - minStart) / range * drawingArea.width;
|
|
176
165
|
previewY = 0;
|
|
177
|
-
previewWidth = drawingArea.width * (
|
|
166
|
+
previewWidth = drawingArea.width * (zoomEnd - zoomStart) / range;
|
|
178
167
|
previewHeight = _constants.ZOOM_SLIDER_ACTIVE_TRACK_SIZE;
|
|
179
|
-
startThumbX =
|
|
168
|
+
startThumbX = (zoomStart - minStart) / range * drawingArea.width;
|
|
180
169
|
startThumbY = 0;
|
|
181
|
-
endThumbX =
|
|
170
|
+
endThumbX = (zoomEnd - minStart) / range * drawingArea.width;
|
|
182
171
|
endThumbY = 0;
|
|
183
172
|
if (reverse) {
|
|
184
173
|
previewX = drawingArea.width - previewX - previewWidth;
|
|
@@ -189,13 +178,13 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
189
178
|
endThumbX -= previewThumbWidth / 2;
|
|
190
179
|
} else {
|
|
191
180
|
previewX = 0;
|
|
192
|
-
previewY = drawingArea.height -
|
|
181
|
+
previewY = drawingArea.height - (zoomEnd - minStart) / range * drawingArea.height;
|
|
193
182
|
previewWidth = _constants.ZOOM_SLIDER_ACTIVE_TRACK_SIZE;
|
|
194
|
-
previewHeight = drawingArea.height * (
|
|
183
|
+
previewHeight = drawingArea.height * (zoomEnd - zoomStart) / range;
|
|
195
184
|
startThumbX = 0;
|
|
196
|
-
startThumbY = drawingArea.height -
|
|
185
|
+
startThumbY = drawingArea.height - (zoomStart - minStart) / range * drawingArea.height;
|
|
197
186
|
endThumbX = 0;
|
|
198
|
-
endThumbY = drawingArea.height -
|
|
187
|
+
endThumbY = drawingArea.height - (zoomEnd - minStart) / range * drawingArea.height;
|
|
199
188
|
if (reverse) {
|
|
200
189
|
previewY = drawingArea.height - previewY - previewHeight;
|
|
201
190
|
startThumbY = drawingArea.height - startThumbY;
|
|
@@ -257,7 +246,8 @@ function getZoomSliderTooltipsText(axis, drawingArea) {
|
|
|
257
246
|
const formatValue = value => {
|
|
258
247
|
if (axis.valueFormatter) {
|
|
259
248
|
return axis.valueFormatter(value, {
|
|
260
|
-
location: 'zoom-slider-tooltip'
|
|
249
|
+
location: 'zoom-slider-tooltip',
|
|
250
|
+
scale: axis.scale
|
|
261
251
|
});
|
|
262
252
|
}
|
|
263
253
|
return `${value}`;
|
|
@@ -63,17 +63,10 @@ function ChartAxisZoomSliderTrack(_ref) {
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
const pointerDownPoint = (0, _internals.getSVGPoint)(element, event);
|
|
66
|
-
|
|
66
|
+
const zoomFromPointerDown = (0, _zoomUtils.calculateZoomFromPoint)(store.getSnapshot(), axisId, pointerDownPoint);
|
|
67
67
|
if (zoomFromPointerDown === null) {
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
const {
|
|
71
|
-
minStart,
|
|
72
|
-
maxEnd
|
|
73
|
-
} = (0, _internals.selectorChartAxisZoomOptionsLookup)(store.getSnapshot(), axisId);
|
|
74
|
-
|
|
75
|
-
// Ensure the zoomFromPointerDown is within the min and max range
|
|
76
|
-
zoomFromPointerDown = Math.max(Math.min(zoomFromPointerDown, maxEnd), minStart);
|
|
77
70
|
const onPointerMove = (0, _rafThrottle.rafThrottle)(function onPointerMove(pointerMoveEvent) {
|
|
78
71
|
const pointerMovePoint = (0, _internals.getSVGPoint)(element, pointerMoveEvent);
|
|
79
72
|
const zoomFromPointerMove = (0, _zoomUtils.calculateZoomFromPoint)(store.getSnapshot(), axisId, pointerMovePoint);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { AxisId, ChartState, DefaultizedZoomOptions, ZoomData } from '@mui/x-charts/internals';
|
|
1
|
+
import { AxisId, ChartState, DefaultedXAxis, DefaultedYAxis, DefaultizedZoomOptions, ZoomData } from '@mui/x-charts/internals';
|
|
2
|
+
import { ChartDrawingArea } from '@mui/x-charts/hooks';
|
|
2
3
|
export declare function calculateZoomFromPoint(state: ChartState<any>, axisId: AxisId, point: DOMPoint): number | null;
|
|
4
|
+
export declare function calculateZoomFromPointImpl(drawingArea: ChartDrawingArea, axis: Pick<DefaultedXAxis | DefaultedYAxis, 'position' | 'reverse'>, zoomOptions: Pick<DefaultizedZoomOptions, 'minStart' | 'maxEnd'>, point: Pick<DOMPoint, 'x' | 'y'>): number;
|
|
3
5
|
export declare function calculateZoomStart(newStart: number, currentZoom: ZoomData, options: Pick<DefaultizedZoomOptions, 'minStart' | 'minSpan' | 'maxSpan'>): number;
|
|
4
6
|
export declare function calculateZoomEnd(newEnd: number, currentZoom: ZoomData, options: Pick<DefaultizedZoomOptions, 'maxEnd' | 'minSpan' | 'maxSpan'>): number;
|
|
@@ -5,28 +5,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.calculateZoomEnd = calculateZoomEnd;
|
|
7
7
|
exports.calculateZoomFromPoint = calculateZoomFromPoint;
|
|
8
|
+
exports.calculateZoomFromPointImpl = calculateZoomFromPointImpl;
|
|
8
9
|
exports.calculateZoomStart = calculateZoomStart;
|
|
9
10
|
var _internals = require("@mui/x-charts/internals");
|
|
10
11
|
function calculateZoomFromPoint(state, axisId, point) {
|
|
12
|
+
const axis = (0, _internals.selectorChartRawAxis)(state, axisId);
|
|
13
|
+
if (!axis) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return calculateZoomFromPointImpl((0, _internals.selectorChartDrawingArea)(state), axis, (0, _internals.selectorChartAxisZoomOptionsLookup)(state, axisId), point);
|
|
17
|
+
}
|
|
18
|
+
function calculateZoomFromPointImpl(drawingArea, axis, zoomOptions, point) {
|
|
11
19
|
const {
|
|
12
20
|
left,
|
|
13
21
|
top,
|
|
14
22
|
height,
|
|
15
23
|
width
|
|
16
|
-
} =
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
24
|
+
} = drawingArea;
|
|
25
|
+
const {
|
|
26
|
+
minStart,
|
|
27
|
+
maxEnd
|
|
28
|
+
} = zoomOptions;
|
|
21
29
|
const axisDirection = axis.position === 'right' || axis.position === 'left' ? 'y' : 'x';
|
|
30
|
+
const range = maxEnd - minStart;
|
|
22
31
|
let pointerZoom;
|
|
23
32
|
if (axisDirection === 'x') {
|
|
24
|
-
pointerZoom = (point.x - left) / width *
|
|
33
|
+
pointerZoom = (point.x - left) / width * range;
|
|
25
34
|
} else {
|
|
26
|
-
pointerZoom = (top + height - point.y) / height *
|
|
35
|
+
pointerZoom = (top + height - point.y) / height * range;
|
|
27
36
|
}
|
|
28
37
|
if (axis.reverse) {
|
|
29
|
-
pointerZoom =
|
|
38
|
+
pointerZoom = maxEnd - pointerZoom;
|
|
39
|
+
} else {
|
|
40
|
+
pointerZoom += minStart;
|
|
30
41
|
}
|
|
31
42
|
return pointerZoom;
|
|
32
43
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChartsToolbarProps } from '@mui/x-charts/Toolbar';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
export interface ChartsToolbarProProps extends ChartsToolbarProps {}
|
|
3
4
|
/**
|
|
4
5
|
* The chart toolbar component for the pro package.
|
|
5
6
|
*/
|
|
6
|
-
export declare function ChartsToolbarPro(props:
|
|
7
|
+
export declare function ChartsToolbarPro(props: ChartsToolbarProProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartsToolbarProProps } from "./ChartsToolbarPro.js";
|
|
3
|
+
export interface ChartsToolbarProSlots {
|
|
4
|
+
/**
|
|
5
|
+
* Custom component for the toolbar.
|
|
6
|
+
* @default ChartsToolbar
|
|
7
|
+
*/
|
|
8
|
+
toolbar?: React.ElementType<ChartsToolbarProProps>;
|
|
9
|
+
}
|
|
10
|
+
export interface ChartsToolbarProSlotProps {
|
|
11
|
+
/**
|
|
12
|
+
* Props for the toolbar component.
|
|
13
|
+
*/
|
|
14
|
+
toolbar?: Partial<ChartsToolbarProProps>;
|
|
15
|
+
}
|
|
@@ -23,6 +23,7 @@ var _useFunnelChartProps = require("./useFunnelChartProps");
|
|
|
23
23
|
var _seriesConfig = require("./seriesConfig");
|
|
24
24
|
var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
|
|
25
25
|
var _ChartDataProviderPro = require("../ChartDataProviderPro");
|
|
26
|
+
var _FunnelChart2 = require("./FunnelChart.plugins");
|
|
26
27
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
28
|
const seriesConfig = {
|
|
28
29
|
funnel: _seriesConfig.seriesConfig
|
|
@@ -48,7 +49,9 @@ const FunnelChart = exports.FunnelChart = /*#__PURE__*/React.forwardRef(function
|
|
|
48
49
|
} = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps, ref);
|
|
49
50
|
const Tooltip = themedProps.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
50
51
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
52
|
+
gap: themedProps.gap,
|
|
51
53
|
seriesConfig: seriesConfig,
|
|
54
|
+
plugins: _FunnelChart2.FUNNEL_CHART_PLUGINS,
|
|
52
55
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
53
56
|
children: [!themedProps.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
54
57
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FunnelPlot.FunnelPlot, (0, _extends2.default)({}, funnelPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), children]
|
|
@@ -95,16 +98,6 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
95
98
|
size: _propTypes.default.number,
|
|
96
99
|
tickLabelStyle: _propTypes.default.object,
|
|
97
100
|
tickSize: _propTypes.default.number
|
|
98
|
-
}), _propTypes.default.shape({
|
|
99
|
-
categories: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
100
|
-
disableLine: _propTypes.default.bool,
|
|
101
|
-
disableTicks: _propTypes.default.bool,
|
|
102
|
-
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
103
|
-
position: _propTypes.default.oneOf(['bottom', 'left', 'none', 'right', 'top']),
|
|
104
|
-
scaleType: _propTypes.default.oneOf(['point']),
|
|
105
|
-
size: _propTypes.default.number,
|
|
106
|
-
tickLabelStyle: _propTypes.default.object,
|
|
107
|
-
tickSize: _propTypes.default.number
|
|
108
101
|
}), _propTypes.default.shape({
|
|
109
102
|
categories: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
110
103
|
disableLine: _propTypes.default.bool,
|
|
@@ -229,7 +222,7 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
229
222
|
})]),
|
|
230
223
|
/**
|
|
231
224
|
* The function called for onClick events.
|
|
232
|
-
* The second argument contains information about all
|
|
225
|
+
* The second argument contains information about all funnel elements at the current position.
|
|
233
226
|
* @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
|
|
234
227
|
* @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
|
|
235
228
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ConvertSignaturesIntoPlugins,
|
|
1
|
+
import { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartInteractionSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
|
|
3
|
+
import { UseChartFunnelAxisSignature } from "./funnelAxisPlugin/useChartFunnelAxis.types.js";
|
|
4
|
+
export type FunnelChartPluginsSignatures = [UseChartFunnelAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProExportSignature];
|
|
4
5
|
export declare const FUNNEL_CHART_PLUGINS: ConvertSignaturesIntoPlugins<FunnelChartPluginsSignatures>;
|
|
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.FUNNEL_CHART_PLUGINS = void 0;
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
|
-
|
|
9
|
+
var _useChartFunnelAxis = require("./funnelAxisPlugin/useChartFunnelAxis");
|
|
10
|
+
const FUNNEL_CHART_PLUGINS = exports.FUNNEL_CHART_PLUGINS = [_useChartFunnelAxis.useChartFunnelAxis, _internals.useChartInteraction, _internals.useChartHighlight, _useChartProExport.useChartProExport];
|
|
@@ -2,11 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { FunnelItemIdentifier } from "./funnel.types.js";
|
|
3
3
|
import { FunnelPlotSlotExtension } from "./funnelPlotSlots.types.js";
|
|
4
4
|
export interface FunnelPlotProps extends FunnelPlotSlotExtension {
|
|
5
|
-
/**
|
|
6
|
-
* The gap, in pixels, between funnel sections.
|
|
7
|
-
* @default 0
|
|
8
|
-
*/
|
|
9
|
-
gap?: number;
|
|
10
5
|
/**
|
|
11
6
|
* Callback fired when a funnel item is clicked.
|
|
12
7
|
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
|