@mui/x-charts-pro 7.0.0-beta.0 → 7.0.0-beta.2

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.
Files changed (60) hide show
  1. package/BarChartPro/BarChartPro.js +13 -0
  2. package/CHANGELOG.md +184 -4
  3. package/ChartContainerPro/ChartContainerPro.js +2 -0
  4. package/ChartContainerPro/useChartContainerProProps.js +2 -0
  5. package/Heatmap/DefaultHeatmapTooltip.js +2 -0
  6. package/Heatmap/Heatmap.js +12 -0
  7. package/Heatmap/HeatmapPlot.js +2 -0
  8. package/LineChartPro/LineChartPro.js +17 -0
  9. package/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +12 -0
  10. package/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +2 -0
  11. package/ScatterChartPro/ScatterChartPro.js +13 -0
  12. package/context/CartesianProviderPro/CartesianProviderPro.js +5 -6
  13. package/context/CartesianProviderPro/createAxisFilterMapper.js +1 -1
  14. package/context/ZoomProvider/ZoomProvider.js +2 -0
  15. package/context/ZoomProvider/useSetupPan.js +2 -0
  16. package/context/ZoomProvider/useSetupZoom.js +2 -0
  17. package/context/ZoomProvider/useZoom.js +2 -0
  18. package/hooks/useSeries.js +2 -0
  19. package/index.js +1 -1
  20. package/internals/utils/releaseInfo.js +1 -1
  21. package/modern/BarChartPro/BarChartPro.js +13 -0
  22. package/modern/ChartContainerPro/ChartContainerPro.js +2 -0
  23. package/modern/ChartContainerPro/useChartContainerProProps.js +2 -0
  24. package/modern/Heatmap/DefaultHeatmapTooltip.js +2 -0
  25. package/modern/Heatmap/Heatmap.js +12 -0
  26. package/modern/Heatmap/HeatmapPlot.js +2 -0
  27. package/modern/LineChartPro/LineChartPro.js +17 -0
  28. package/modern/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +12 -0
  29. package/modern/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +2 -0
  30. package/modern/ScatterChartPro/ScatterChartPro.js +13 -0
  31. package/modern/context/CartesianProviderPro/CartesianProviderPro.js +5 -6
  32. package/modern/context/CartesianProviderPro/createAxisFilterMapper.js +1 -1
  33. package/modern/context/ZoomProvider/ZoomProvider.js +2 -0
  34. package/modern/context/ZoomProvider/useSetupPan.js +2 -0
  35. package/modern/context/ZoomProvider/useSetupZoom.js +2 -0
  36. package/modern/context/ZoomProvider/useZoom.js +2 -0
  37. package/modern/hooks/useSeries.js +2 -0
  38. package/modern/index.js +1 -1
  39. package/modern/internals/utils/releaseInfo.js +1 -1
  40. package/node/BarChartPro/BarChartPro.js +12 -0
  41. package/node/ChartContainerPro/ChartContainerPro.js +1 -0
  42. package/node/ChartContainerPro/useChartContainerProProps.js +1 -0
  43. package/node/Heatmap/DefaultHeatmapTooltip.js +1 -0
  44. package/node/Heatmap/Heatmap.js +11 -0
  45. package/node/Heatmap/HeatmapPlot.js +1 -0
  46. package/node/LineChartPro/LineChartPro.js +16 -0
  47. package/node/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +11 -0
  48. package/node/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +1 -0
  49. package/node/ScatterChartPro/ScatterChartPro.js +12 -0
  50. package/node/context/CartesianProviderPro/CartesianProviderPro.js +3 -5
  51. package/node/context/CartesianProviderPro/createAxisFilterMapper.js +1 -1
  52. package/node/context/ZoomProvider/ZoomProvider.js +1 -0
  53. package/node/context/ZoomProvider/useSetupPan.js +1 -0
  54. package/node/context/ZoomProvider/useSetupZoom.js +1 -0
  55. package/node/context/ZoomProvider/useZoom.js +1 -0
  56. package/node/hooks/useSeries.js +1 -0
  57. package/node/index.js +1 -1
  58. package/node/internals/utils/releaseInfo.js +1 -1
  59. package/package.json +6 -6
  60. package/typeOverloads/modules.d.ts +2 -1
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  import _extends from "@babel/runtime/helpers/esm/extends";
3
5
  const _excluded = ["zoom", "onZoomChange"];
@@ -163,6 +165,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
163
165
  itemMarkWidth: PropTypes.number,
164
166
  labelStyle: PropTypes.object,
165
167
  markGap: PropTypes.number,
168
+ onItemClick: PropTypes.func,
166
169
  padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
167
170
  bottom: PropTypes.number,
168
171
  left: PropTypes.number,
@@ -218,6 +221,16 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
218
221
  * @param {ZoomData[]} zoomData Updated zoom data.
219
222
  */
220
223
  onZoomChange: PropTypes.func,
224
+ /**
225
+ * The chart will try to wait for the parent container to resolve its size
226
+ * before it renders for the first time.
227
+ *
228
+ * This can be useful in some scenarios where the chart appear to grow after
229
+ * the first render, like when used inside a grid.
230
+ *
231
+ * @default false
232
+ */
233
+ resolveSizeBeforeRender: PropTypes.bool,
221
234
  /**
222
235
  * Indicate which axis to display the right of the charts.
223
236
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,186 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.18.0
7
+
8
+ _Sep 20, 2024_
9
+
10
+ We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 💫 Support [Row spanning](https://mui.com/x/react-data-grid/row-spanning/) on the Data Grid that automatically merges the consecutive cells in a column based on the cell value
13
+
14
+ <img width="600" src="https://github.com/user-attachments/assets/d32ec936-d238-4c92-9e1a-af6788d74cdf" alt="data grid row spanning" />
15
+
16
+ - ⏰ Support `date-fns` v4 (#14673) @LukasTy
17
+ - 🎉 Add option for Pickers to change the order of displayed years (#11780) @thomasmoon
18
+ - 🐞 Bugfixes
19
+ - 📚 Documentation improvements
20
+
21
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@7.18.0`
26
+
27
+ - [DataGrid] Add default reset value in row edit mode (#14050) @michelengelen
28
+ - [DataGrid] Add `columnGroupHeaderHeight` prop for sizing column group headers (#14637) @KenanYusuf
29
+ - [DataGrid] Fix `document` reference when the grid is rendered in a popup window (#14649) @arminmeh
30
+ - [DataGrid] Remove `minFirstColumn` from `GetHeadersParams` interface (#14450) @k-rajat19
31
+ - [DataGrid] Row spanning (#14124) @MBilalShafi
32
+
33
+ #### `@mui/x-data-grid-pro@7.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
34
+
35
+ Same changes as in `@mui/x-data-grid@7.18.0`, plus:
36
+
37
+ - [DataGridPro] Fix `onRowsScrollEnd` being triggered instantly when bottom pinned row is present (#14602) @arminmeh
38
+ - [DataGridPro] Fix header filters rendering issue for `isEmpty` and `isNotEmpty` filter operators (#14493) @k-rajat19
39
+ - [DataGridPro] Fix pinned columns in RTL mode (#14586) @KenanYusuf
40
+
41
+ #### `@mui/x-data-grid-premium@7.18.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
42
+
43
+ Same changes as in `@mui/x-data-grid-pro@7.18.0`.
44
+
45
+ ### Date and Time Pickers
46
+
47
+ #### `@mui/x-date-pickers@7.18.0`
48
+
49
+ - [pickers] Add option to change the order of displayed years (#11780) @thomasmoon
50
+ - [pickers] Support `date-fns` v4 (#14673) @LukasTy
51
+
52
+ #### `@mui/x-date-pickers-pro@7.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
53
+
54
+ Same changes as in `@mui/x-date-pickers@7.18.0`.
55
+
56
+ ### Charts
57
+
58
+ #### `@mui/x-charts@7.18.0`
59
+
60
+ - [charts] Add a `PolarProvider` to manage polar axes (#14642) @alexfauquette
61
+ - [charts] Fix `LineChart` animation being stuck with initial drawing area value (#14553) @JCQuintas
62
+ - [charts] Fix legend slot typing (#14657) @alexfauquette
63
+ - [charts] Pass the axis index to extremum getter (#14641) @alexfauquette
64
+ - [charts] Provide hooks to create custom tooltip (#14377) @alexfauquette
65
+
66
+ #### `@mui/x-charts-pro@7.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
67
+
68
+ Same changes as in `@mui/x-charts@7.18.0`.
69
+
70
+ ### Tree View
71
+
72
+ #### `@mui/x-tree-view@7.18.0`
73
+
74
+ - [TreeView] Add `"use client"` directive to every public component and hook (#14579) @flaviendelangle
75
+
76
+ ### Docs
77
+
78
+ - [docs] Add `groupingValueGetter` callout in column definition docs (#14599) @michelengelen
79
+ - [docs] Clean v6 => v7 migration guide (#14652) @flaviendelangle
80
+ - [docs] Copy `vale-action.yml` from main repo @oliviertassinari
81
+ - [docs] Edit the Pickers Getting started doc (#14555) @samuelsycamore
82
+ - [docs] Fix TypeScript capitalization @oliviertassinari
83
+ - [docs] Fix Vale error @oliviertassinari
84
+ - [docs] Make the migration guide diff a bit easier to read @oliviertassinari
85
+ - [docs] Report Vale at warning level (#14660) @oliviertassinari
86
+ - [docs] Warn about the `valueGetter` and `valueFormatter` signature change (#14613) @cherniavskii
87
+ - [docs] Polish code formatting (#14603) @oliviertassinari
88
+ - [test] Spy on `observe` method to avoid flaky wait for a callback (#14640) @arminmeh
89
+
90
+ ### Core
91
+
92
+ - [core] Fix 301 link to Next.js and git diff @oliviertassinari
93
+ - [core] Fix failing CI on `master` (#14644) @cherniavskii
94
+ - [core] Fix `package.json` repository rule @oliviertassinari
95
+ - [core] MUI X repository moved to a new location @oliviertassinari
96
+ - [docs-infra] Strengthen CSP (#14581) @oliviertassinari
97
+ - [license] Finish renaming of LicensingModel (#14615) @oliviertassinari
98
+
99
+ ## 7.17.0
100
+
101
+ _Sep 13, 2024_
102
+
103
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
104
+
105
+ - 📊 Charts performance improvement
106
+ - 🧑‍💻 New Data Grid [custom columns demo](https://mui.com/x/react-data-grid/custom-columns/#full-example)
107
+ - 🐞 Bugfixes
108
+ - 📚 Documentation improvements
109
+ - 🌍 Improve Hungarian (hu-HU) locale on the Data Grid
110
+
111
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
112
+
113
+ ### Data Grid
114
+
115
+ #### `@mui/x-data-grid@7.17.0`
116
+
117
+ - [DataGrid] Add "does not equal" and "does not contain" filter operators (#14489) @KenanYusuf
118
+ - [DataGrid] Add demo to the "Custom columns" page that does not use generator (#13695) @arminmeh
119
+ - [DataGrid] Fix Voice Over reading the column name twice (#14482) @arminmeh
120
+ - [DataGrid] Fix bug in CRUD example (#14513) @michelengelen
121
+ - [DataGrid] Fix failing jsdom tests caused by `:has()` selectors (#14559) @KenanYusuf
122
+ - [DataGrid] Refactor string operator filter functions (#14564) @KenanYusuf
123
+ - [l10n] Improve Hungarian (hu-HU) locale (#14506) @ntamas
124
+
125
+ #### `@mui/x-data-grid-pro@7.17.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
126
+
127
+ Same changes as in `@mui/x-data-grid@7.17.0`.
128
+
129
+ #### `@mui/x-data-grid-premium@7.17.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
130
+
131
+ Same changes as in `@mui/x-data-grid-pro@7.17.0`.
132
+
133
+ ### Date and Time Pickers
134
+
135
+ #### `@mui/x-date-pickers@7.17.0`
136
+
137
+ - [fields] Improve `useSplitFieldProps` and make it public (#14514) @flaviendelangle
138
+ - [pickers] Improve clear action label (#14243) @oliviertassinari
139
+ - [pickers] Add `"use client"` directive to every public component and hook (#14562) @flaviendelangle
140
+ - [pickers] Allow custom fields to validate the value (#14486) @flaviendelangle
141
+ - [pickers] Stop using utils in locales (#14505) @flaviendelangle
142
+
143
+ #### `@mui/x-date-pickers-pro@7.17.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
144
+
145
+ Same changes as in `@mui/x-date-pickers@7.17.0`, plus:
146
+
147
+ - [DateRangePicker] Fix `currentMonthCalendarPosition` not scrolling to future sibling (#14442) @GMchris
148
+
149
+ ### Charts
150
+
151
+ #### `@mui/x-charts@7.17.0`
152
+
153
+ - [charts] Add `"use client"` directive to every public component and hook (#14578) @flaviendelangle
154
+ - [charts] Allow `onItemClick` on the `Legend` component (#14231) @JCQuintas
155
+ - [charts] Fix `onAxisClick` with `layout='horizontal'` (#14547) @alexfauquette
156
+ - [charts] Replace `path` with `circle` for performance improvement (#14518) @alexfauquette
157
+
158
+ #### `@mui/x-charts-pro@7.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
159
+
160
+ Same changes as in `@mui/x-charts@7.17.0`.
161
+
162
+ ### Tree View
163
+
164
+ #### `@mui/x-tree-view@7.17.0`
165
+
166
+ - [TreeView] Make `useTreeItem2` stable (#14498) @flaviendelangle
167
+
168
+ ### Docs
169
+
170
+ - [docs] Add missing callout on "Imperative API" tree view sections (#14503) @flaviendelangle
171
+ - [docs] Fix broken redirection to MUI X v5 @oliviertassinari
172
+ - [docs] Fix multiple `console.error` messages on `charts` docs (#14554) @JCQuintas
173
+ - [docs] Fixed typo in Row Grouping recipes (#14549) @Miodini
174
+ - [docs] Match title with blog posts @oliviertassinari
175
+
176
+ ### Core
177
+
178
+ - [core] Move warning methods to `@mui/x-internals` (#14528) @k-rajat19
179
+ - [core] Sync with core release flow @oliviertassinari
180
+ - [code-infra] Fix charts benchmark workflow (#14573) @JCQuintas
181
+ - [docs-infra] Type interface API pages (#14138) @alexfauquette
182
+ - [infra] Create `ESLint plugins` renovate group (#14574) @LukasTy
183
+ - [license] Clean-up terminology to match codebase (#14531) @oliviertassinari
184
+ - [test] Remove dead `act()` logic (#14529) @oliviertassinari
185
+
6
186
  ## 7.16.0
7
187
 
8
188
  _Sep 5, 2024_
@@ -108,7 +288,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
108
288
 
109
289
  - 💫 Support Material UI v6 (`@mui/material@6`) peer dependency (#14142) @cherniavskii
110
290
 
111
- You can now use MUI X components with either v5 or v6 of `@mui/material` package 🎉
291
+ You can now use MUI X components with either v5 or v6 of `@mui/material` package 🎉
112
292
 
113
293
  - 🐞 Bugfixes
114
294
 
@@ -153,7 +333,7 @@ Same changes as in `@mui/x-charts@7.15.0`, plus:
153
333
 
154
334
  - [docs] Fix sentence case `h2` @oliviertassinari
155
335
  - [docs] Clarify contribution guide references @oliviertassinari
156
- - [docs] Fix Stack Overflow issue canned response @oliviertassinari
336
+ - [docs] Fix Stack Overflow issue canned response @oliviertassinari
157
337
  - [docs] Fix outdated link to support page @oliviertassinari
158
338
  - [docs] Fix use of Material UI @oliviertassinari
159
339
  - [docs] Update deprecated props in docs (#14295) @JCQuintas
@@ -411,7 +591,7 @@ The [Pro plan](https://mui.com/x/introduction/licensing/#pro-plan) is receiving
411
591
 
412
592
  As always, every feature released as part of the MIT plan will remain free and MIT licensed forever.
413
593
 
414
- This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI X pricing in 2024](https://mui.com/blog/mui-x-sep-2024-price-update/) blog post.
594
+ This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI X pricing in 2024](https://mui.com/blog/mui-x-sep-2024-price-update/) blog post.
415
595
 
416
596
  ### Highlights
417
597
 
@@ -476,7 +656,7 @@ Same changes as in `@mui/x-date-pickers@7.12.0`.
476
656
  #### `@mui/x-charts@7.12.0`
477
657
 
478
658
  - [charts] Fix incorrect `axisId` prop being allowed in xAxis/yAxis config. Use `id` instead. (#13986) @JCQuintas
479
- - [charts] Use vendor to have Common JS bundle working out of the box (#13608) @alexfauquette
659
+ - [charts] Use vendor to have CommonJS bundle working out of the box (#13608) @alexfauquette
480
660
  - [charts] Divide the `SeriesProvider` to use in filtering (#14026) @JCQuintas
481
661
 
482
662
  ### Tree View
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  const _excluded = ["zoom", "onZoomChange"];
3
5
  import { useChartContainerProps } from '@mui/x-charts/internals';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import PropTypes from 'prop-types';
3
5
  import clsx from 'clsx';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
@@ -188,6 +190,16 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
188
190
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
189
191
  */
190
192
  onHighlightChange: PropTypes.func,
193
+ /**
194
+ * The chart will try to wait for the parent container to resolve its size
195
+ * before it renders for the first time.
196
+ *
197
+ * This can be useful in some scenarios where the chart appear to grow after
198
+ * the first render, like when used inside a grid.
199
+ *
200
+ * @default false
201
+ */
202
+ resolveSizeBeforeRender: PropTypes.bool,
191
203
  /**
192
204
  * Indicate which axis to display the right of the charts.
193
205
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import PropTypes from 'prop-types';
3
5
  import { useXScale, useYScale, useZColorScale } from '@mui/x-charts/hooks';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  import _extends from "@babel/runtime/helpers/esm/extends";
3
5
  const _excluded = ["zoom", "onZoomChange"];
@@ -134,6 +136,10 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
134
136
  * If `true`, render the line highlight item.
135
137
  */
136
138
  disableLineItemHighlight: PropTypes.bool,
139
+ /**
140
+ * If `true` marks will render `<circle />` instead of `<path />` and drop theme override for faster rendering.
141
+ */
142
+ experimentalMarkRendering: PropTypes.bool,
137
143
  /**
138
144
  * Option to display a cartesian grid in the background.
139
145
  */
@@ -170,6 +176,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
170
176
  itemMarkWidth: PropTypes.number,
171
177
  labelStyle: PropTypes.object,
172
178
  markGap: PropTypes.number,
179
+ onItemClick: PropTypes.func,
173
180
  padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
174
181
  bottom: PropTypes.number,
175
182
  left: PropTypes.number,
@@ -231,6 +238,16 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
231
238
  * @param {ZoomData[]} zoomData Updated zoom data.
232
239
  */
233
240
  onZoomChange: PropTypes.func,
241
+ /**
242
+ * The chart will try to wait for the parent container to resolve its size
243
+ * before it renders for the first time.
244
+ *
245
+ * This can be useful in some scenarios where the chart appear to grow after
246
+ * the first render, like when used inside a grid.
247
+ *
248
+ * @default false
249
+ */
250
+ resolveSizeBeforeRender: PropTypes.bool,
234
251
  /**
235
252
  * Indicate which axis to display the right of the charts.
236
253
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
@@ -84,6 +86,16 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
84
86
  * If not provided, the container supports line, bar, scatter and pie charts.
85
87
  */
86
88
  plugins: PropTypes.arrayOf(PropTypes.object),
89
+ /**
90
+ * The chart will try to wait for the parent container to resolve its size
91
+ * before it renders for the first time.
92
+ *
93
+ * This can be useful in some scenarios where the chart appear to grow after
94
+ * the first render, like when used inside a grid.
95
+ *
96
+ * @default false
97
+ */
98
+ resolveSizeBeforeRender: PropTypes.bool,
87
99
  /**
88
100
  * The array of series to display.
89
101
  * Each type of series has its own specificity.
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["zoom", "onZoomChange"];
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["zoom", "onZoomChange"];
@@ -142,6 +144,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
142
144
  itemMarkWidth: PropTypes.number,
143
145
  labelStyle: PropTypes.object,
144
146
  markGap: PropTypes.number,
147
+ onItemClick: PropTypes.func,
145
148
  padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
146
149
  bottom: PropTypes.number,
147
150
  left: PropTypes.number,
@@ -190,6 +193,16 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
190
193
  * @param {ZoomData[]} zoomData Updated zoom data.
191
194
  */
192
195
  onZoomChange: PropTypes.func,
196
+ /**
197
+ * The chart will try to wait for the parent container to resolve its size
198
+ * before it renders for the first time.
199
+ *
200
+ * This can be useful in some scenarios where the chart appear to grow after
201
+ * the first render, like when used inside a grid.
202
+ *
203
+ * @default false
204
+ */
205
+ resolveSizeBeforeRender: PropTypes.bool,
193
206
  /**
194
207
  * Indicate which axis to display the right of the charts.
195
208
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,12 +1,11 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
- import { useDrawingArea, useSeries, CartesianContext, cartesianProviderUtils, useXExtremumGetter, useYExtremumGetter } from '@mui/x-charts/internals';
5
+ import { useDrawingArea, useSeries, CartesianContext, computeAxisValue, useXExtremumGetter, useYExtremumGetter } from '@mui/x-charts/internals';
4
6
  import { useZoom } from "../ZoomProvider/useZoom.js";
5
7
  import { createAxisFilterMapper, createGetAxisFilters } from "./createAxisFilterMapper.js";
6
8
  import { jsx as _jsx } from "react/jsx-runtime";
7
- const {
8
- computeValue
9
- } = cartesianProviderUtils;
10
9
  function CartesianProviderPro(props) {
11
10
  const {
12
11
  xAxis,
@@ -53,7 +52,7 @@ function CartesianProviderPro(props) {
53
52
  }
54
53
  return createGetAxisFilters(_extends({}, xFilters, yFilters));
55
54
  }, [formattedSeries, xAxis, xExtremumGetters, yAxis, yExtremumGetters, zoomData]);
56
- const xValues = React.useMemo(() => computeValue({
55
+ const xValues = React.useMemo(() => computeAxisValue({
57
56
  drawingArea,
58
57
  formattedSeries,
59
58
  axis: xAxis,
@@ -63,7 +62,7 @@ function CartesianProviderPro(props) {
63
62
  zoomOptions: options,
64
63
  getFilters
65
64
  }), [drawingArea, formattedSeries, xAxis, xExtremumGetters, zoomData, options, getFilters]);
66
- const yValues = React.useMemo(() => computeValue({
65
+ const yValues = React.useMemo(() => computeAxisValue({
67
66
  drawingArea,
68
67
  formattedSeries,
69
68
  axis: yAxis,
@@ -20,7 +20,7 @@ export const createAxisFilterMapper = ({
20
20
  if (scaleType === 'point' || scaleType === 'band') {
21
21
  extremums = [0, (axis.data?.length ?? 1) - 1];
22
22
  } else {
23
- extremums = getAxisExtremum(axis, extremumGetter, axisIndex === 0, formattedSeries);
23
+ extremums = getAxisExtremum(axis, extremumGetter, axisIndex, formattedSeries);
24
24
  }
25
25
  let min;
26
26
  let max;
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import useControlled from '@mui/utils/useControlled';
3
5
  import { ZoomContext } from "./ZoomContext.js";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { useDrawingArea, useSvgRef } from '@mui/x-charts/hooks';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import { useDrawingArea, useSvgRef } from '@mui/x-charts/hooks';
3
5
  import { getSVGPoint } from '@mui/x-charts/internals';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import { ZoomContext } from "./ZoomContext.js";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import { useSeries } from '@mui/x-charts/internals';
3
5
 
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v7.0.0-beta.0
2
+ * @mui/x-charts-pro v7.0.0-beta.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyNTQ4MzYwMDAwMA==";
3
+ const releaseInfo = "MTcyNjc4NjgwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  import _extends from "@babel/runtime/helpers/esm/extends";
3
5
  const _excluded = ["zoom", "onZoomChange"];
@@ -163,6 +165,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
163
165
  itemMarkWidth: PropTypes.number,
164
166
  labelStyle: PropTypes.object,
165
167
  markGap: PropTypes.number,
168
+ onItemClick: PropTypes.func,
166
169
  padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
167
170
  bottom: PropTypes.number,
168
171
  left: PropTypes.number,
@@ -218,6 +221,16 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
218
221
  * @param {ZoomData[]} zoomData Updated zoom data.
219
222
  */
220
223
  onZoomChange: PropTypes.func,
224
+ /**
225
+ * The chart will try to wait for the parent container to resolve its size
226
+ * before it renders for the first time.
227
+ *
228
+ * This can be useful in some scenarios where the chart appear to grow after
229
+ * the first render, like when used inside a grid.
230
+ *
231
+ * @default false
232
+ */
233
+ resolveSizeBeforeRender: PropTypes.bool,
221
234
  /**
222
235
  * Indicate which axis to display the right of the charts.
223
236
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  const _excluded = ["zoom", "onZoomChange"];
3
5
  import { useChartContainerProps } from '@mui/x-charts/internals';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import PropTypes from 'prop-types';
3
5
  import clsx from 'clsx';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
@@ -188,6 +190,16 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
188
190
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
189
191
  */
190
192
  onHighlightChange: PropTypes.func,
193
+ /**
194
+ * The chart will try to wait for the parent container to resolve its size
195
+ * before it renders for the first time.
196
+ *
197
+ * This can be useful in some scenarios where the chart appear to grow after
198
+ * the first render, like when used inside a grid.
199
+ *
200
+ * @default false
201
+ */
202
+ resolveSizeBeforeRender: PropTypes.bool,
191
203
  /**
192
204
  * Indicate which axis to display the right of the charts.
193
205
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import PropTypes from 'prop-types';
3
5
  import { useXScale, useYScale, useZColorScale } from '@mui/x-charts/hooks';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  import _extends from "@babel/runtime/helpers/esm/extends";
3
5
  const _excluded = ["zoom", "onZoomChange"];
@@ -134,6 +136,10 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
134
136
  * If `true`, render the line highlight item.
135
137
  */
136
138
  disableLineItemHighlight: PropTypes.bool,
139
+ /**
140
+ * If `true` marks will render `<circle />` instead of `<path />` and drop theme override for faster rendering.
141
+ */
142
+ experimentalMarkRendering: PropTypes.bool,
137
143
  /**
138
144
  * Option to display a cartesian grid in the background.
139
145
  */
@@ -170,6 +176,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
170
176
  itemMarkWidth: PropTypes.number,
171
177
  labelStyle: PropTypes.object,
172
178
  markGap: PropTypes.number,
179
+ onItemClick: PropTypes.func,
173
180
  padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
174
181
  bottom: PropTypes.number,
175
182
  left: PropTypes.number,
@@ -231,6 +238,16 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
231
238
  * @param {ZoomData[]} zoomData Updated zoom data.
232
239
  */
233
240
  onZoomChange: PropTypes.func,
241
+ /**
242
+ * The chart will try to wait for the parent container to resolve its size
243
+ * before it renders for the first time.
244
+ *
245
+ * This can be useful in some scenarios where the chart appear to grow after
246
+ * the first render, like when used inside a grid.
247
+ *
248
+ * @default false
249
+ */
250
+ resolveSizeBeforeRender: PropTypes.bool,
234
251
  /**
235
252
  * Indicate which axis to display the right of the charts.
236
253
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
@@ -84,6 +86,16 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
84
86
  * If not provided, the container supports line, bar, scatter and pie charts.
85
87
  */
86
88
  plugins: PropTypes.arrayOf(PropTypes.object),
89
+ /**
90
+ * The chart will try to wait for the parent container to resolve its size
91
+ * before it renders for the first time.
92
+ *
93
+ * This can be useful in some scenarios where the chart appear to grow after
94
+ * the first render, like when used inside a grid.
95
+ *
96
+ * @default false
97
+ */
98
+ resolveSizeBeforeRender: PropTypes.bool,
87
99
  /**
88
100
  * The array of series to display.
89
101
  * Each type of series has its own specificity.
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["zoom", "onZoomChange"];
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["zoom", "onZoomChange"];
@@ -142,6 +144,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
142
144
  itemMarkWidth: PropTypes.number,
143
145
  labelStyle: PropTypes.object,
144
146
  markGap: PropTypes.number,
147
+ onItemClick: PropTypes.func,
145
148
  padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
146
149
  bottom: PropTypes.number,
147
150
  left: PropTypes.number,
@@ -190,6 +193,16 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
190
193
  * @param {ZoomData[]} zoomData Updated zoom data.
191
194
  */
192
195
  onZoomChange: PropTypes.func,
196
+ /**
197
+ * The chart will try to wait for the parent container to resolve its size
198
+ * before it renders for the first time.
199
+ *
200
+ * This can be useful in some scenarios where the chart appear to grow after
201
+ * the first render, like when used inside a grid.
202
+ *
203
+ * @default false
204
+ */
205
+ resolveSizeBeforeRender: PropTypes.bool,
193
206
  /**
194
207
  * Indicate which axis to display the right of the charts.
195
208
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,12 +1,11 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
- import { useDrawingArea, useSeries, CartesianContext, cartesianProviderUtils, useXExtremumGetter, useYExtremumGetter } from '@mui/x-charts/internals';
5
+ import { useDrawingArea, useSeries, CartesianContext, computeAxisValue, useXExtremumGetter, useYExtremumGetter } from '@mui/x-charts/internals';
4
6
  import { useZoom } from "../ZoomProvider/useZoom.js";
5
7
  import { createAxisFilterMapper, createGetAxisFilters } from "./createAxisFilterMapper.js";
6
8
  import { jsx as _jsx } from "react/jsx-runtime";
7
- const {
8
- computeValue
9
- } = cartesianProviderUtils;
10
9
  function CartesianProviderPro(props) {
11
10
  const {
12
11
  xAxis,
@@ -53,7 +52,7 @@ function CartesianProviderPro(props) {
53
52
  }
54
53
  return createGetAxisFilters(_extends({}, xFilters, yFilters));
55
54
  }, [formattedSeries, xAxis, xExtremumGetters, yAxis, yExtremumGetters, zoomData]);
56
- const xValues = React.useMemo(() => computeValue({
55
+ const xValues = React.useMemo(() => computeAxisValue({
57
56
  drawingArea,
58
57
  formattedSeries,
59
58
  axis: xAxis,
@@ -63,7 +62,7 @@ function CartesianProviderPro(props) {
63
62
  zoomOptions: options,
64
63
  getFilters
65
64
  }), [drawingArea, formattedSeries, xAxis, xExtremumGetters, zoomData, options, getFilters]);
66
- const yValues = React.useMemo(() => computeValue({
65
+ const yValues = React.useMemo(() => computeAxisValue({
67
66
  drawingArea,
68
67
  formattedSeries,
69
68
  axis: yAxis,
@@ -20,7 +20,7 @@ export const createAxisFilterMapper = ({
20
20
  if (scaleType === 'point' || scaleType === 'band') {
21
21
  extremums = [0, (axis.data?.length ?? 1) - 1];
22
22
  } else {
23
- extremums = getAxisExtremum(axis, extremumGetter, axisIndex === 0, formattedSeries);
23
+ extremums = getAxisExtremum(axis, extremumGetter, axisIndex, formattedSeries);
24
24
  }
25
25
  let min;
26
26
  let max;
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import useControlled from '@mui/utils/useControlled';
3
5
  import { ZoomContext } from "./ZoomContext.js";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import { useDrawingArea, useSvgRef } from '@mui/x-charts/hooks';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import { useDrawingArea, useSvgRef } from '@mui/x-charts/hooks';
3
5
  import { getSVGPoint } from '@mui/x-charts/internals';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import { ZoomContext } from "./ZoomContext.js";
3
5
  /**
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import { useSeries } from '@mui/x-charts/internals';
3
5
 
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v7.0.0-beta.0
2
+ * @mui/x-charts-pro v7.0.0-beta.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcyNTQ4MzYwMDAwMA==";
3
+ const releaseInfo = "MTcyNjc4NjgwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
@@ -171,6 +172,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
171
172
  itemMarkWidth: _propTypes.default.number,
172
173
  labelStyle: _propTypes.default.object,
173
174
  markGap: _propTypes.default.number,
175
+ onItemClick: _propTypes.default.func,
174
176
  padding: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
175
177
  bottom: _propTypes.default.number,
176
178
  left: _propTypes.default.number,
@@ -226,6 +228,16 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
226
228
  * @param {ZoomData[]} zoomData Updated zoom data.
227
229
  */
228
230
  onZoomChange: _propTypes.default.func,
231
+ /**
232
+ * The chart will try to wait for the parent container to resolve its size
233
+ * before it renders for the first time.
234
+ *
235
+ * This can be useful in some scenarios where the chart appear to grow after
236
+ * the first render, like when used inside a grid.
237
+ *
238
+ * @default false
239
+ */
240
+ resolveSizeBeforeRender: _propTypes.default.bool,
229
241
  /**
230
242
  * Indicate which axis to display the right of the charts.
231
243
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
@@ -196,6 +197,16 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
196
197
  * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
197
198
  */
198
199
  onHighlightChange: _propTypes.default.func,
200
+ /**
201
+ * The chart will try to wait for the parent container to resolve its size
202
+ * before it renders for the first time.
203
+ *
204
+ * This can be useful in some scenarios where the chart appear to grow after
205
+ * the first render, like when used inside a grid.
206
+ *
207
+ * @default false
208
+ */
209
+ resolveSizeBeforeRender: _propTypes.default.bool,
199
210
  /**
200
211
  * Indicate which axis to display the right of the charts.
201
212
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
@@ -142,6 +143,10 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
142
143
  * If `true`, render the line highlight item.
143
144
  */
144
145
  disableLineItemHighlight: _propTypes.default.bool,
146
+ /**
147
+ * If `true` marks will render `<circle />` instead of `<path />` and drop theme override for faster rendering.
148
+ */
149
+ experimentalMarkRendering: _propTypes.default.bool,
145
150
  /**
146
151
  * Option to display a cartesian grid in the background.
147
152
  */
@@ -178,6 +183,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
178
183
  itemMarkWidth: _propTypes.default.number,
179
184
  labelStyle: _propTypes.default.object,
180
185
  markGap: _propTypes.default.number,
186
+ onItemClick: _propTypes.default.func,
181
187
  padding: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
182
188
  bottom: _propTypes.default.number,
183
189
  left: _propTypes.default.number,
@@ -239,6 +245,16 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
239
245
  * @param {ZoomData[]} zoomData Updated zoom data.
240
246
  */
241
247
  onZoomChange: _propTypes.default.func,
248
+ /**
249
+ * The chart will try to wait for the parent container to resolve its size
250
+ * before it renders for the first time.
251
+ *
252
+ * This can be useful in some scenarios where the chart appear to grow after
253
+ * the first render, like when used inside a grid.
254
+ *
255
+ * @default false
256
+ */
257
+ resolveSizeBeforeRender: _propTypes.default.bool,
242
258
  /**
243
259
  * Indicate which axis to display the right of the charts.
244
260
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
@@ -92,6 +93,16 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
92
93
  * If not provided, the container supports line, bar, scatter and pie charts.
93
94
  */
94
95
  plugins: _propTypes.default.arrayOf(_propTypes.default.object),
96
+ /**
97
+ * The chart will try to wait for the parent container to resolve its size
98
+ * before it renders for the first time.
99
+ *
100
+ * This can be useful in some scenarios where the chart appear to grow after
101
+ * the first render, like when used inside a grid.
102
+ *
103
+ * @default false
104
+ */
105
+ resolveSizeBeforeRender: _propTypes.default.bool,
95
106
  /**
96
107
  * The array of series to display.
97
108
  * Each type of series has its own specificity.
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
@@ -150,6 +151,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
150
151
  itemMarkWidth: _propTypes.default.number,
151
152
  labelStyle: _propTypes.default.object,
152
153
  markGap: _propTypes.default.number,
154
+ onItemClick: _propTypes.default.func,
153
155
  padding: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
154
156
  bottom: _propTypes.default.number,
155
157
  left: _propTypes.default.number,
@@ -198,6 +200,16 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
198
200
  * @param {ZoomData[]} zoomData Updated zoom data.
199
201
  */
200
202
  onZoomChange: _propTypes.default.func,
203
+ /**
204
+ * The chart will try to wait for the parent container to resolve its size
205
+ * before it renders for the first time.
206
+ *
207
+ * This can be useful in some scenarios where the chart appear to grow after
208
+ * the first render, like when used inside a grid.
209
+ *
210
+ * @default false
211
+ */
212
+ resolveSizeBeforeRender: _propTypes.default.bool,
201
213
  /**
202
214
  * Indicate which axis to display the right of the charts.
203
215
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
@@ -12,9 +13,6 @@ var _internals = require("@mui/x-charts/internals");
12
13
  var _useZoom = require("../ZoomProvider/useZoom");
13
14
  var _createAxisFilterMapper = require("./createAxisFilterMapper");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
- const {
16
- computeValue
17
- } = _internals.cartesianProviderUtils;
18
16
  function CartesianProviderPro(props) {
19
17
  const {
20
18
  xAxis,
@@ -61,7 +59,7 @@ function CartesianProviderPro(props) {
61
59
  }
62
60
  return (0, _createAxisFilterMapper.createGetAxisFilters)((0, _extends2.default)({}, xFilters, yFilters));
63
61
  }, [formattedSeries, xAxis, xExtremumGetters, yAxis, yExtremumGetters, zoomData]);
64
- const xValues = React.useMemo(() => computeValue({
62
+ const xValues = React.useMemo(() => (0, _internals.computeAxisValue)({
65
63
  drawingArea,
66
64
  formattedSeries,
67
65
  axis: xAxis,
@@ -71,7 +69,7 @@ function CartesianProviderPro(props) {
71
69
  zoomOptions: options,
72
70
  getFilters
73
71
  }), [drawingArea, formattedSeries, xAxis, xExtremumGetters, zoomData, options, getFilters]);
74
- const yValues = React.useMemo(() => computeValue({
72
+ const yValues = React.useMemo(() => (0, _internals.computeAxisValue)({
75
73
  drawingArea,
76
74
  formattedSeries,
77
75
  axis: yAxis,
@@ -26,7 +26,7 @@ const createAxisFilterMapper = ({
26
26
  if (scaleType === 'point' || scaleType === 'band') {
27
27
  extremums = [0, (axis.data?.length ?? 1) - 1];
28
28
  } else {
29
- extremums = (0, _internals.getAxisExtremum)(axis, extremumGetter, axisIndex === 0, formattedSeries);
29
+ extremums = (0, _internals.getAxisExtremum)(axis, extremumGetter, axisIndex, formattedSeries);
30
30
  }
31
31
  let min;
32
32
  let max;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  Object.defineProperty(exports, "__esModule", {
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  Object.defineProperty(exports, "__esModule", {
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
3
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  Object.defineProperty(exports, "__esModule", {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v7.0.0-beta.0
2
+ * @mui/x-charts-pro v7.0.0-beta.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTcyNTQ4MzYwMDAwMA==";
9
+ const releaseInfo = "MTcyNjc4NjgwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-pro",
3
- "version": "7.0.0-beta.0",
3
+ "version": "7.0.0-beta.2",
4
4
  "description": "The Pro plan edition of the Charts components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -25,7 +25,7 @@
25
25
  ],
26
26
  "repository": {
27
27
  "type": "git",
28
- "url": "https://github.com/mui/mui-x.git",
28
+ "url": "git+https://github.com/mui/mui-x.git",
29
29
  "directory": "packages/x-charts-pro"
30
30
  },
31
31
  "dependencies": {
@@ -35,10 +35,10 @@
35
35
  "@react-spring/web": "^9.7.4",
36
36
  "clsx": "^2.1.1",
37
37
  "prop-types": "^15.8.1",
38
- "@mui/x-charts": "7.16.0",
39
- "@mui/x-charts-vendor": "7.16.0",
40
- "@mui/x-internals": "7.16.0",
41
- "@mui/x-license": "7.16.0"
38
+ "@mui/x-charts": "7.18.0",
39
+ "@mui/x-license": "7.18.0",
40
+ "@mui/x-charts-vendor": "7.18.0",
41
+ "@mui/x-internals": "7.18.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@emotion/react": "^11.9.0",
@@ -1,5 +1,5 @@
1
1
  import { DefaultizedProps } from '@mui/x-charts/internals';
2
- import { HeatmapItemIdentifier, HeatmapSeriesType, DefaultizedHeatmapSeriesType } from '../models/seriesType/heatmap';
2
+ import { HeatmapItemIdentifier, HeatmapSeriesType, DefaultizedHeatmapSeriesType, HeatmapValueType } from '../models/seriesType/heatmap';
3
3
  import { ZoomOptions } from '../context/ZoomProvider';
4
4
  declare module '@mui/x-charts/internals' {
5
5
  interface ChartsSeriesConfig {
@@ -8,6 +8,7 @@ declare module '@mui/x-charts/internals' {
8
8
  series: DefaultizedHeatmapSeriesType;
9
9
  seriesProp: HeatmapSeriesType;
10
10
  itemIdentifier: HeatmapItemIdentifier;
11
+ valueType: HeatmapValueType;
11
12
  cartesian: true;
12
13
  };
13
14
  }