@mui/x-charts-pro 8.0.0-alpha.6 → 8.0.0-alpha.7

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.
@@ -15,10 +15,12 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
15
15
  import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
16
16
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
17
17
  import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
18
- import { useBarChartProps } from '@mui/x-charts/internals';
19
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
18
+ import { useBarChartProps, ChartsWrapper } from '@mui/x-charts/internals';
19
+ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
20
20
  import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
21
  import { useZoom } from "../context/ZoomProvider/useZoom.js";
22
+ import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
23
+ import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
22
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
25
  function BarChartPlotZoom(props) {
24
26
  const {
@@ -89,6 +91,7 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
89
91
  } = props,
90
92
  other = _objectWithoutPropertiesLoose(props, _excluded);
91
93
  const {
94
+ chartsWrapperProps,
92
95
  chartContainerProps,
93
96
  barPlotProps,
94
97
  axisClickHandlerProps,
@@ -101,15 +104,21 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
101
104
  legendProps,
102
105
  children
103
106
  } = useBarChartProps(other);
107
+ const {
108
+ chartDataProviderProProps,
109
+ chartsSurfaceProps
110
+ } = useChartContainerProProps(chartContainerProps, ref);
104
111
  const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
105
- return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
106
- ref: ref
107
- }, chartContainerProps, {
112
+ return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
108
113
  zoom: zoom,
109
114
  onZoomChange: onZoomChange,
110
- children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
111
- children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
112
- })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
115
+ children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
116
+ children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
117
+ children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
118
+ children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
119
+ })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
120
+ }))]
121
+ }))
113
122
  }));
114
123
  });
115
124
  process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
package/CHANGELOG.md CHANGED
@@ -5,6 +5,132 @@
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.0.0-alpha.7
9
+
10
+ _Jan 9, 2025_
11
+
12
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Charts legend is now an HTML element which can be styled more easily
15
+ - 💫 Support [aggregation with server-side data](/x/react-data-grid/server-side-data/aggregation/)
16
+ - 🏎️ Improve Data Grid aggregation performance
17
+ - 🌍 Add Chinese (Taiwan) (zh-TW) locale on the Date and Time Pickers
18
+ - 🌍 Improve Norwegian (nb-NO) locale on the Date and Time Pickers
19
+ - 🐞 Bugfixes
20
+
21
+ Special thanks go out to the community contributors who have helped make this release possible:
22
+ @derek-0000, @josteinjhauge, @k-rajat19, @nusr, @tomashauser.
23
+ Following are all team members who have contributed to this release:
24
+ @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @arminmeh, @romgrk, @oliviertassinari.
25
+
26
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
27
+
28
+ ### Data Grid
29
+
30
+ #### `@mui/x-data-grid@8.0.0-alpha.7`
31
+
32
+ - [DataGrid] Improve React 19 support (#15769) @LukasTy
33
+ - [DataGrid] Add `name` attribute to the checkbox selection column (#15178) @derek-0000
34
+ - [DataGrid] Fix number filter field formatting values while typing (#16062) @arminmeh
35
+ - [DataGrid] Fix select all checkbox state reset with server side data (#16034) @MBilalShafi
36
+ - [DataGrid] Refactor: create base button props (#15930) @romgrk
37
+ - [DataGrid] Refactor: create tooltip props (#16086) @romgrk
38
+ - [DataGrid] Fix TS error (#16046) @cherniavskii
39
+
40
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
41
+
42
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.7`.
43
+
44
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.7` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
45
+
46
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.7`, plus:
47
+
48
+ - [DataGridPremium] Improve aggregation performance for multiple columns (#16097) @cherniavskii
49
+ - [DataGridPremium] Make Aggregation keyboard accessible in the column menu (#15934) @k-rajat19
50
+ - [DataGridPremium] Server-side aggregation with data source (#15741) @MBilalShafi
51
+
52
+ ### Date and Time Pickers
53
+
54
+ #### Breaking changes
55
+
56
+ - The `date-fns` and `date-fns-jalali` date library adapters have been renamed to better align with the current stable major versions — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#✅-rename-date-fns-adapter-imports)
57
+ - Update default `closeOnSelect` and Action Bar `actions` values - [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#update-default-closeonselect-and-action-bar-actions-values)
58
+ - The component passed to the `layout` slot no longer receives the `value`, `onChange` and `onSelectShortcut` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
59
+ - The component passed to the `toolbar` slot no longer receives the `value`, `onChange` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
60
+ - The component passed to the `shortcuts` slot no longer receives the `onChange`, `isValid` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-shortcuts).
61
+ - The `PickerShortcutChangeImportance` type has been renamed `PickerChangeImportance` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables-and-types).
62
+ - The component passed to the `layout` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
63
+ - The component passed to the `toolbar` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
64
+ - The component passed to the `tabs` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-tabs).
65
+
66
+ #### `@mui/x-date-pickers@8.0.0-alpha.7`
67
+
68
+ - [fields] Handle focusing container with `inputRef.current.focus` on `accessibleFieldDOMStructure` (#15985) @LukasTy
69
+ - [pickers] Always use `setValue` internally to update the picker value (#16056) @flaviendelangle
70
+ - [pickers] Create a new context to pass the range position props to the layout components and to the views (#15846) @flaviendelangle
71
+ - [pickers] Introduce a new concept of `manager` (#15339) @flaviendelangle
72
+ - [pickers] Improve React 19 support (#15769) @LukasTy
73
+ - [pickers] Memoize `<PickersActionBar />` (#16071) @LukasTy
74
+ - [pickers] Remove `NonEmptyDateRange` type (#16035) @flaviendelangle
75
+ - [pickers] Rename `AdapterDateFns` into `AdapterDateFnsV2` and `AdapterDateFnsV3` into `AdapterDateFns` (#16082) @LukasTy
76
+ - [pickers] Rename `ctx.onViewChange` to `ctx.setView` and add it to the actions context (#16044) @flaviendelangle
77
+ - [pickers] Support `date-fns-jalali` v4 (#16011) @LukasTy
78
+ - [pickers] Update `closeOnSelect` and `actionBar.actions` default values (#15944) @LukasTy
79
+ - [pickers] Use `usePickerContext()` and `usePickerActionsContext()` instead of passing props to the `shortcuts` and `toolbar` slots (#15948) @flaviendelangle
80
+ - [l10n] Add Chinese (Taiwan) (zh-TW) locale (#16033) @nusr
81
+ - [l10n] Improve Norwegian (nb-NO) locale (#16089) @josteinjhauge
82
+
83
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
84
+
85
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.7`.
86
+
87
+ ### Charts
88
+
89
+ #### Breaking changes
90
+
91
+ - Removed `DefaultChartsLegend` component, since it is now easier to create custom legends — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
92
+ - The default legend is now an HTML element and can be styled more easily.
93
+ - The `width` and `height` properties of the charts now only apply to the `svg` element, and not their wrappers, this might cause some layout shifts.
94
+ - `slotProps.legend.direction` now accepts `'horizontal' | 'vertical'` instead of `'row' | 'column'` — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-direction-value-change-✅).
95
+ - The `getSeriesToDisplay` function was removed in favor of the `useLegend` hook. — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#the-getseriestodisplay-function-was-removed).
96
+
97
+ #### `@mui/x-charts@8.0.0-alpha.7`
98
+
99
+ - [charts] New HTML legend & styles (#15733) @JCQuintas
100
+ - [charts] Improve React 19 support (#15769) @LukasTy
101
+ - [charts] Fix 301 redirection in the API documentation @oliviertassinari
102
+
103
+ #### `@mui/x-charts-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
104
+
105
+ Same changes as in `@mui/x-charts@8.0.0-alpha.7`.
106
+
107
+ ### Tree View
108
+
109
+ #### `@mui/x-tree-view@8.0.0-alpha.7`
110
+
111
+ - [TreeView] Improve React 19 support (#15769) @LukasTy
112
+
113
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
114
+
115
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.7`.
116
+
117
+ ### Docs
118
+
119
+ - [docs] Fix `EditingWithDatePickers` demo (#15967) @k-rajat19
120
+ - [docs] Fix inconsistent multi input range field separators (#16043) @flaviendelangle
121
+ - [docs] Fix non-existing "adapter" property of `LocalizationProvider` (#16084) @tomashauser
122
+ - [docs] Refactor Data Grid with Date Pickers example (#15992) @LukasTy
123
+ - [docs] Unify the wording of the pickers slots breaking changes (#16036) @flaviendelangle
124
+
125
+ ### Core
126
+
127
+ - [core] Clarify the release strategy (#16014) @MBilalShafi
128
+ - [core] Small fixes on docs @oliviertassinari
129
+ - [core] Sync with other repos @oliviertassinari
130
+ - [core] Update the `release:version` docs (#16038) @cherniavskii
131
+ - [code-infra] Add `testSkipIf` and `describeSkipIf` (#16049) @JCQuintas
132
+ - [test] Stabilize flaky Data Grid tests (#16053) @LukasTy
133
+
8
134
  ## 8.0.0-alpha.6
9
135
 
10
136
  _Dec 26, 2024_
@@ -104,7 +230,7 @@ Following are all team members who have contributed to this release:
104
230
 
105
231
  #### Breaking changes
106
232
 
107
- - Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.
233
+ - Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`:
108
234
 
109
235
  - For `.root` element, use `slotProps.root`.
110
236
  - For `.main` element (the one with `role="grid"`), use `slotProps.main`.
@@ -15,10 +15,12 @@ import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
15
15
  import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
16
16
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
17
17
  import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
18
- import { useLineChartProps } from '@mui/x-charts/internals';
19
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
18
+ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
19
+ import { useLineChartProps, ChartsWrapper } from '@mui/x-charts/internals';
20
20
  import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
21
  import { useZoom } from "../context/ZoomProvider/useZoom.js";
22
+ import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
23
+ import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
22
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
25
  function AreaPlotZoom(props) {
24
26
  const {
@@ -152,6 +154,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
152
154
  } = props,
153
155
  other = _objectWithoutPropertiesLoose(props, _excluded);
154
156
  const {
157
+ chartsWrapperProps,
155
158
  chartContainerProps,
156
159
  axisClickHandlerProps,
157
160
  gridProps,
@@ -167,18 +170,24 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
167
170
  legendProps,
168
171
  children
169
172
  } = useLineChartProps(other);
173
+ const {
174
+ chartDataProviderProProps,
175
+ chartsSurfaceProps
176
+ } = useChartContainerProProps(chartContainerProps, ref);
170
177
  const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
171
- return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
172
- ref: ref
173
- }, chartContainerProps, {
178
+ return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
174
179
  zoom: zoom,
175
180
  onZoomChange: onZoomChange,
176
- children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
177
- children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
178
- })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
179
- "data-drawing-container": true,
180
- children: /*#__PURE__*/_jsx(MarkPlotZoom, _extends({}, markPlotProps))
181
- }), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
181
+ children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
182
+ children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
183
+ children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
184
+ children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
185
+ })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
186
+ "data-drawing-container": true,
187
+ children: /*#__PURE__*/_jsx(MarkPlotZoom, _extends({}, markPlotProps))
188
+ }), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
189
+ }))]
190
+ }))
182
191
  }));
183
192
  });
184
193
  process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
@@ -13,11 +13,13 @@ import { ChartsVoronoiHandler } from '@mui/x-charts/ChartsVoronoiHandler';
13
13
  import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
14
14
  import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
15
15
  import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
16
+ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
16
17
  import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
17
18
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
18
- import { useScatterChartProps } from '@mui/x-charts/internals';
19
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
19
+ import { useScatterChartProps, ChartsWrapper } from '@mui/x-charts/internals';
20
20
  import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
+ import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
22
+ import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
21
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
24
  /**
23
25
  * Demos:
@@ -40,6 +42,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
40
42
  } = props,
41
43
  other = _objectWithoutPropertiesLoose(props, _excluded);
42
44
  const {
45
+ chartsWrapperProps,
43
46
  chartContainerProps,
44
47
  zAxisProps,
45
48
  voronoiHandlerProps,
@@ -51,19 +54,25 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
51
54
  axisHighlightProps,
52
55
  children
53
56
  } = useScatterChartProps(other);
57
+ const {
58
+ chartDataProviderProProps,
59
+ chartsSurfaceProps
60
+ } = useChartContainerProProps(chartContainerProps, ref);
54
61
  const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
55
- return /*#__PURE__*/_jsx(ChartContainerPro, _extends({
56
- ref: ref
57
- }, chartContainerProps, {
62
+ return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
58
63
  zoom: zoom,
59
64
  onZoomChange: onZoomChange,
60
- children: /*#__PURE__*/_jsxs(ZAxisContextProvider, _extends({}, zAxisProps, {
61
- children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
62
- "data-drawing-container": true,
63
- children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
64
- }), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip, {
65
- trigger: "item"
66
- })), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
65
+ children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
66
+ children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsSurface, _extends({}, chartsSurfaceProps, {
67
+ children: /*#__PURE__*/_jsxs(ZAxisContextProvider, _extends({}, zAxisProps, {
68
+ children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
69
+ "data-drawing-container": true,
70
+ children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
71
+ }), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip, {
72
+ trigger: "item"
73
+ })), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
74
+ }))
75
+ }))]
67
76
  }))
68
77
  }));
69
78
  });
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.0.0-alpha.6
2
+ * @mui/x-charts-pro v8.0.0-alpha.7
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/ponyfillGlobal';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczNTE2NDAwMDAwMA==";
3
+ const releaseInfo = "MTczNjM3NzIwMDAwMA==";
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
@@ -15,10 +15,12 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
15
15
  import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
16
16
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
17
17
  import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
18
- import { useBarChartProps } from '@mui/x-charts/internals';
19
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
18
+ import { useBarChartProps, ChartsWrapper } from '@mui/x-charts/internals';
19
+ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
20
20
  import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
21
  import { useZoom } from "../context/ZoomProvider/useZoom.js";
22
+ import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
23
+ import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
22
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
25
  function BarChartPlotZoom(props) {
24
26
  const {
@@ -89,6 +91,7 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
89
91
  } = props,
90
92
  other = _objectWithoutPropertiesLoose(props, _excluded);
91
93
  const {
94
+ chartsWrapperProps,
92
95
  chartContainerProps,
93
96
  barPlotProps,
94
97
  axisClickHandlerProps,
@@ -101,15 +104,21 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
101
104
  legendProps,
102
105
  children
103
106
  } = useBarChartProps(other);
107
+ const {
108
+ chartDataProviderProProps,
109
+ chartsSurfaceProps
110
+ } = useChartContainerProProps(chartContainerProps, ref);
104
111
  const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
105
- return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
106
- ref: ref
107
- }, chartContainerProps, {
112
+ return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
108
113
  zoom: zoom,
109
114
  onZoomChange: onZoomChange,
110
- children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
111
- children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
112
- })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
115
+ children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
116
+ children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
117
+ children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
118
+ children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
119
+ })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
120
+ }))]
121
+ }))
113
122
  }));
114
123
  });
115
124
  process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
@@ -15,10 +15,12 @@ import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
15
15
  import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
16
16
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
17
17
  import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
18
- import { useLineChartProps } from '@mui/x-charts/internals';
19
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
18
+ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
19
+ import { useLineChartProps, ChartsWrapper } from '@mui/x-charts/internals';
20
20
  import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
21
  import { useZoom } from "../context/ZoomProvider/useZoom.js";
22
+ import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
23
+ import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
22
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
25
  function AreaPlotZoom(props) {
24
26
  const {
@@ -152,6 +154,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
152
154
  } = props,
153
155
  other = _objectWithoutPropertiesLoose(props, _excluded);
154
156
  const {
157
+ chartsWrapperProps,
155
158
  chartContainerProps,
156
159
  axisClickHandlerProps,
157
160
  gridProps,
@@ -167,18 +170,24 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
167
170
  legendProps,
168
171
  children
169
172
  } = useLineChartProps(other);
173
+ const {
174
+ chartDataProviderProProps,
175
+ chartsSurfaceProps
176
+ } = useChartContainerProProps(chartContainerProps, ref);
170
177
  const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
171
- return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
172
- ref: ref
173
- }, chartContainerProps, {
178
+ return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
174
179
  zoom: zoom,
175
180
  onZoomChange: onZoomChange,
176
- children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
177
- children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
178
- })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
179
- "data-drawing-container": true,
180
- children: /*#__PURE__*/_jsx(MarkPlotZoom, _extends({}, markPlotProps))
181
- }), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
181
+ children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
182
+ children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
183
+ children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
184
+ children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
185
+ })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
186
+ "data-drawing-container": true,
187
+ children: /*#__PURE__*/_jsx(MarkPlotZoom, _extends({}, markPlotProps))
188
+ }), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
189
+ }))]
190
+ }))
182
191
  }));
183
192
  });
184
193
  process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
@@ -13,11 +13,13 @@ import { ChartsVoronoiHandler } from '@mui/x-charts/ChartsVoronoiHandler';
13
13
  import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
14
14
  import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
15
15
  import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
16
+ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
16
17
  import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
17
18
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
18
- import { useScatterChartProps } from '@mui/x-charts/internals';
19
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
19
+ import { useScatterChartProps, ChartsWrapper } from '@mui/x-charts/internals';
20
20
  import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
+ import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
22
+ import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
21
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
24
  /**
23
25
  * Demos:
@@ -40,6 +42,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
40
42
  } = props,
41
43
  other = _objectWithoutPropertiesLoose(props, _excluded);
42
44
  const {
45
+ chartsWrapperProps,
43
46
  chartContainerProps,
44
47
  zAxisProps,
45
48
  voronoiHandlerProps,
@@ -51,19 +54,25 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
51
54
  axisHighlightProps,
52
55
  children
53
56
  } = useScatterChartProps(other);
57
+ const {
58
+ chartDataProviderProProps,
59
+ chartsSurfaceProps
60
+ } = useChartContainerProProps(chartContainerProps, ref);
54
61
  const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
55
- return /*#__PURE__*/_jsx(ChartContainerPro, _extends({
56
- ref: ref
57
- }, chartContainerProps, {
62
+ return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
58
63
  zoom: zoom,
59
64
  onZoomChange: onZoomChange,
60
- children: /*#__PURE__*/_jsxs(ZAxisContextProvider, _extends({}, zAxisProps, {
61
- children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
62
- "data-drawing-container": true,
63
- children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
64
- }), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip, {
65
- trigger: "item"
66
- })), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
65
+ children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
66
+ children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsSurface, _extends({}, chartsSurfaceProps, {
67
+ children: /*#__PURE__*/_jsxs(ZAxisContextProvider, _extends({}, zAxisProps, {
68
+ children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
69
+ "data-drawing-container": true,
70
+ children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
71
+ }), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip, {
72
+ trigger: "item"
73
+ })), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
74
+ }))
75
+ }))]
67
76
  }))
68
77
  }));
69
78
  });
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.0.0-alpha.6
2
+ * @mui/x-charts-pro v8.0.0-alpha.7
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/ponyfillGlobal';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczNTE2NDAwMDAwMA==";
3
+ const releaseInfo = "MTczNjM3NzIwMDAwMA==";
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
@@ -22,9 +22,11 @@ var _ChartsAxisHighlight = require("@mui/x-charts/ChartsAxisHighlight");
22
22
  var _ChartsTooltip = require("@mui/x-charts/ChartsTooltip");
23
23
  var _ChartsClipPath = require("@mui/x-charts/ChartsClipPath");
24
24
  var _internals = require("@mui/x-charts/internals");
25
- var _ChartContainerPro = require("../ChartContainerPro");
25
+ var _ChartsSurface = require("@mui/x-charts/ChartsSurface");
26
26
  var _ZoomSetup = require("../context/ZoomProvider/ZoomSetup");
27
27
  var _useZoom = require("../context/ZoomProvider/useZoom");
28
+ var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
29
+ var _ChartDataProviderPro = require("../context/ChartDataProviderPro");
28
30
  var _jsxRuntime = require("react/jsx-runtime");
29
31
  const _excluded = ["zoom", "onZoomChange"];
30
32
  function BarChartPlotZoom(props) {
@@ -96,6 +98,7 @@ const BarChartPro = exports.BarChartPro = /*#__PURE__*/React.forwardRef(function
96
98
  } = props,
97
99
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
98
100
  const {
101
+ chartsWrapperProps,
99
102
  chartContainerProps,
100
103
  barPlotProps,
101
104
  axisClickHandlerProps,
@@ -108,15 +111,21 @@ const BarChartPro = exports.BarChartPro = /*#__PURE__*/React.forwardRef(function
108
111
  legendProps,
109
112
  children
110
113
  } = (0, _internals.useBarChartProps)(other);
114
+ const {
115
+ chartDataProviderProProps,
116
+ chartsSurfaceProps
117
+ } = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps, ref);
111
118
  const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
112
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartContainerPro.ChartContainerPro, (0, _extends2.default)({
113
- ref: ref
114
- }, chartContainerProps, {
119
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
115
120
  zoom: zoom,
116
121
  onZoomChange: onZoomChange,
117
- children: [props.onAxisClick && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOnAxisClickHandler.ChartsOnAxisClickHandler, (0, _extends2.default)({}, axisClickHandlerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
118
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BarChartPlotZoom, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
119
- })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomSetup.ZoomSetup, {}), children]
122
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
123
+ children: [!props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
124
+ children: [props.onAxisClick && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOnAxisClickHandler.ChartsOnAxisClickHandler, (0, _extends2.default)({}, axisClickHandlerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
125
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BarChartPlotZoom, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
126
+ })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomSetup.ZoomSetup, {}), children]
127
+ }))]
128
+ }))
120
129
  }));
121
130
  });
122
131
  process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
@@ -21,10 +21,12 @@ var _ChartsAxisHighlight = require("@mui/x-charts/ChartsAxisHighlight");
21
21
  var _ChartsLegend = require("@mui/x-charts/ChartsLegend");
22
22
  var _ChartsTooltip = require("@mui/x-charts/ChartsTooltip");
23
23
  var _ChartsClipPath = require("@mui/x-charts/ChartsClipPath");
24
+ var _ChartsSurface = require("@mui/x-charts/ChartsSurface");
24
25
  var _internals = require("@mui/x-charts/internals");
25
- var _ChartContainerPro = require("../ChartContainerPro");
26
26
  var _ZoomSetup = require("../context/ZoomProvider/ZoomSetup");
27
27
  var _useZoom = require("../context/ZoomProvider/useZoom");
28
+ var _ChartDataProviderPro = require("../context/ChartDataProviderPro");
29
+ var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
28
30
  var _jsxRuntime = require("react/jsx-runtime");
29
31
  const _excluded = ["zoom", "onZoomChange"];
30
32
  function AreaPlotZoom(props) {
@@ -159,6 +161,7 @@ const LineChartPro = exports.LineChartPro = /*#__PURE__*/React.forwardRef(functi
159
161
  } = props,
160
162
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
161
163
  const {
164
+ chartsWrapperProps,
162
165
  chartContainerProps,
163
166
  axisClickHandlerProps,
164
167
  gridProps,
@@ -174,18 +177,24 @@ const LineChartPro = exports.LineChartPro = /*#__PURE__*/React.forwardRef(functi
174
177
  legendProps,
175
178
  children
176
179
  } = (0, _internals.useLineChartProps)(other);
180
+ const {
181
+ chartDataProviderProProps,
182
+ chartsSurfaceProps
183
+ } = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps, ref);
177
184
  const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
178
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartContainerPro.ChartContainerPro, (0, _extends2.default)({
179
- ref: ref
180
- }, chartContainerProps, {
185
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
181
186
  zoom: zoom,
182
187
  onZoomChange: onZoomChange,
183
- children: [props.onAxisClick && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOnAxisClickHandler.ChartsOnAxisClickHandler, (0, _extends2.default)({}, axisClickHandlerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
184
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AreaPlotZoom, (0, _extends2.default)({}, areaPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(LinePlotZoom, (0, _extends2.default)({}, linePlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
185
- })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
186
- "data-drawing-container": true,
187
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkPlotZoom, (0, _extends2.default)({}, markPlotProps))
188
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LineHighlightPlot, (0, _extends2.default)({}, lineHighlightPlotProps)), !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomSetup.ZoomSetup, {}), children]
188
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
189
+ children: [!props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
190
+ children: [props.onAxisClick && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOnAxisClickHandler.ChartsOnAxisClickHandler, (0, _extends2.default)({}, axisClickHandlerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
191
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AreaPlotZoom, (0, _extends2.default)({}, areaPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(LinePlotZoom, (0, _extends2.default)({}, linePlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
192
+ })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
193
+ "data-drawing-container": true,
194
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkPlotZoom, (0, _extends2.default)({}, markPlotProps))
195
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LineHighlightPlot, (0, _extends2.default)({}, lineHighlightPlotProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomSetup.ZoomSetup, {}), children]
196
+ }))]
197
+ }))
189
198
  }));
190
199
  });
191
200
  process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
@@ -19,11 +19,13 @@ var _ChartsVoronoiHandler = require("@mui/x-charts/ChartsVoronoiHandler");
19
19
  var _ChartsAxis = require("@mui/x-charts/ChartsAxis");
20
20
  var _ChartsGrid = require("@mui/x-charts/ChartsGrid");
21
21
  var _ChartsLegend = require("@mui/x-charts/ChartsLegend");
22
+ var _ChartsSurface = require("@mui/x-charts/ChartsSurface");
22
23
  var _ChartsAxisHighlight = require("@mui/x-charts/ChartsAxisHighlight");
23
24
  var _ChartsTooltip = require("@mui/x-charts/ChartsTooltip");
24
25
  var _internals = require("@mui/x-charts/internals");
25
- var _ChartContainerPro = require("../ChartContainerPro");
26
26
  var _ZoomSetup = require("../context/ZoomProvider/ZoomSetup");
27
+ var _ChartDataProviderPro = require("../context/ChartDataProviderPro");
28
+ var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
27
29
  var _jsxRuntime = require("react/jsx-runtime");
28
30
  const _excluded = ["zoom", "onZoomChange"];
29
31
  /**
@@ -47,6 +49,7 @@ const ScatterChartPro = exports.ScatterChartPro = /*#__PURE__*/React.forwardRef(
47
49
  } = props,
48
50
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
49
51
  const {
52
+ chartsWrapperProps,
50
53
  chartContainerProps,
51
54
  zAxisProps,
52
55
  voronoiHandlerProps,
@@ -58,19 +61,25 @@ const ScatterChartPro = exports.ScatterChartPro = /*#__PURE__*/React.forwardRef(
58
61
  axisHighlightProps,
59
62
  children
60
63
  } = (0, _internals.useScatterChartProps)(other);
64
+ const {
65
+ chartDataProviderProProps,
66
+ chartsSurfaceProps
67
+ } = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps, ref);
61
68
  const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
62
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartContainerPro.ChartContainerPro, (0, _extends2.default)({
63
- ref: ref
64
- }, chartContainerProps, {
69
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
65
70
  zoom: zoom,
66
71
  onZoomChange: onZoomChange,
67
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_context.ZAxisContextProvider, (0, _extends2.default)({}, zAxisProps, {
68
- children: [!props.disableVoronoi && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsVoronoiHandler.ChartsVoronoiHandler, (0, _extends2.default)({}, voronoiHandlerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
69
- "data-drawing-container": true,
70
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScatterChart.ScatterPlot, (0, _extends2.default)({}, scatterPlotProps))
71
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props?.slotProps?.tooltip, {
72
- trigger: "item"
73
- })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomSetup.ZoomSetup, {}), children]
72
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
73
+ children: [!props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
74
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_context.ZAxisContextProvider, (0, _extends2.default)({}, zAxisProps, {
75
+ children: [!props.disableVoronoi && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsVoronoiHandler.ChartsVoronoiHandler, (0, _extends2.default)({}, voronoiHandlerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
76
+ "data-drawing-container": true,
77
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScatterChart.ScatterPlot, (0, _extends2.default)({}, scatterPlotProps))
78
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props?.slotProps?.tooltip, {
79
+ trigger: "item"
80
+ })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomSetup.ZoomSetup, {}), children]
81
+ }))
82
+ }))]
74
83
  }))
75
84
  }));
76
85
  });
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.0.0-alpha.6
2
+ * @mui/x-charts-pro v8.0.0-alpha.7
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getReleaseInfo = void 0;
8
8
  var _ponyfillGlobal = _interopRequireDefault(require("@mui/utils/ponyfillGlobal"));
9
9
  const getReleaseInfo = () => {
10
- const releaseInfo = "MTczNTE2NDAwMDAwMA==";
10
+ const releaseInfo = "MTczNjM3NzIwMDAwMA==";
11
11
  if (process.env.NODE_ENV !== 'production') {
12
12
  // A simple hack to set the value in the test environment (has no build step).
13
13
  // 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": "8.0.0-alpha.6",
3
+ "version": "8.0.0-alpha.7",
4
4
  "description": "The Pro plan edition of the Charts components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -35,10 +35,10 @@
35
35
  "@react-spring/web": "^9.7.5",
36
36
  "clsx": "^2.1.1",
37
37
  "prop-types": "^15.8.1",
38
- "@mui/x-internals": "8.0.0-alpha.6",
39
- "@mui/x-charts-vendor": "8.0.0-alpha.5",
40
- "@mui/x-charts": "8.0.0-alpha.6",
41
- "@mui/x-license": "8.0.0-alpha.6"
38
+ "@mui/x-charts-vendor": "8.0.0-alpha.7",
39
+ "@mui/x-internals": "8.0.0-alpha.7",
40
+ "@mui/x-charts": "8.0.0-alpha.7",
41
+ "@mui/x-license": "8.0.0-alpha.7"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@emotion/react": "^11.9.0",