@mui/x-charts-pro 7.0.0-beta.6 → 8.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChartPro/BarChartPro.d.ts +1 -1
- package/BarChartPro/BarChartPro.js +9 -29
- package/CHANGELOG.md +161 -48
- package/ChartContainerPro/ChartContainerPro.d.ts +1 -1
- package/ChartContainerPro/ChartContainerPro.js +28 -42
- package/ChartContainerPro/useChartContainerProProps.d.ts +42 -13
- package/ChartContainerPro/useChartContainerProProps.js +11 -27
- package/Heatmap/Heatmap.d.ts +5 -4
- package/Heatmap/Heatmap.js +4 -2
- package/LineChartPro/LineChartPro.d.ts +1 -1
- package/LineChartPro/LineChartPro.js +9 -29
- package/README.md +2 -2
- package/ScatterChartPro/ScatterChartPro.d.ts +1 -1
- package/ScatterChartPro/ScatterChartPro.js +9 -29
- package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +7 -0
- package/{modern/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js → context/ChartDataProviderPro/ChartDataProviderPro.js} +49 -31
- package/context/ChartDataProviderPro/index.d.ts +1 -0
- package/context/ChartDataProviderPro/index.js +1 -0
- package/context/ChartDataProviderPro/useChartDataProviderProProps.d.ts +16 -0
- package/context/ChartDataProviderPro/useChartDataProviderProProps.js +43 -0
- package/context/ZoomProvider/ZoomProvider.js +1 -0
- package/index.d.ts +0 -1
- package/index.js +1 -2
- package/internals/utils/releaseInfo.js +1 -1
- package/models/seriesType/heatmap.d.ts +2 -1
- package/modern/BarChartPro/BarChartPro.js +9 -29
- package/modern/ChartContainerPro/ChartContainerPro.js +28 -42
- package/modern/ChartContainerPro/useChartContainerProProps.js +11 -27
- package/modern/Heatmap/Heatmap.js +4 -2
- package/modern/LineChartPro/LineChartPro.js +9 -29
- package/modern/ScatterChartPro/ScatterChartPro.js +9 -29
- package/{ResponsiveChartContainerPro/ResponsiveChartContainerPro.js → modern/context/ChartDataProviderPro/ChartDataProviderPro.js} +49 -31
- package/modern/context/ChartDataProviderPro/index.js +1 -0
- package/modern/context/ChartDataProviderPro/useChartDataProviderProProps.js +43 -0
- package/modern/context/ZoomProvider/ZoomProvider.js +1 -0
- package/modern/index.js +1 -2
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/BarChartPro/BarChartPro.js +9 -29
- package/node/ChartContainerPro/ChartContainerPro.js +27 -41
- package/node/ChartContainerPro/useChartContainerProProps.js +11 -27
- package/node/Heatmap/Heatmap.js +4 -2
- package/node/LineChartPro/LineChartPro.js +9 -29
- package/node/ScatterChartPro/ScatterChartPro.js +9 -29
- package/node/{ResponsiveChartContainerPro/ResponsiveChartContainerPro.js → context/ChartDataProviderPro/ChartDataProviderPro.js} +48 -30
- package/node/context/ChartDataProviderPro/index.js +16 -0
- package/node/context/ChartDataProviderPro/useChartDataProviderProProps.js +50 -0
- package/node/context/ZoomProvider/ZoomProvider.js +1 -0
- package/node/index.js +1 -12
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +6 -6
- package/typeOverloads/modules.d.ts +1 -1
- package/ResponsiveChartContainerPro/ResponsiveChartContainerPro.d.ts +0 -7
- package/ResponsiveChartContainerPro/index.d.ts +0 -1
- package/ResponsiveChartContainerPro/index.js +0 -1
- package/ResponsiveChartContainerPro/package.json +0 -6
- package/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.d.ts +0 -42
- package/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +0 -27
- package/modern/ResponsiveChartContainerPro/index.js +0 -1
- package/modern/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +0 -27
- package/node/ResponsiveChartContainerPro/index.js +0 -16
- package/node/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +0 -34
|
@@ -16,7 +16,7 @@ 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
18
|
import { useBarChartProps } from '@mui/x-charts/internals';
|
|
19
|
-
import {
|
|
19
|
+
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
20
20
|
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
21
21
|
import { useZoom } from "../context/ZoomProvider/useZoom.js";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -102,14 +102,14 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
102
102
|
tooltipProps,
|
|
103
103
|
children
|
|
104
104
|
} = useBarChartProps(other);
|
|
105
|
-
return /*#__PURE__*/_jsxs(
|
|
105
|
+
return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
|
|
106
106
|
ref: ref
|
|
107
107
|
}, chartContainerProps, {
|
|
108
108
|
zoom: zoom,
|
|
109
109
|
onZoomChange: onZoomChange,
|
|
110
110
|
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
111
111
|
children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
112
|
-
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
112
|
+
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
113
113
|
}));
|
|
114
114
|
});
|
|
115
115
|
process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
@@ -174,6 +174,10 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
174
174
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
175
175
|
*/
|
|
176
176
|
height: PropTypes.number,
|
|
177
|
+
/**
|
|
178
|
+
* If `true`, the legend is not rendered.
|
|
179
|
+
*/
|
|
180
|
+
hideLegend: PropTypes.bool,
|
|
177
181
|
/**
|
|
178
182
|
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
179
183
|
*/
|
|
@@ -192,32 +196,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
192
196
|
* @default yAxisIds[0] The id of the first provided axis
|
|
193
197
|
*/
|
|
194
198
|
leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
195
|
-
/**
|
|
196
|
-
* @deprecated Consider using `slotProps.legend` instead.
|
|
197
|
-
*/
|
|
198
|
-
legend: PropTypes.shape({
|
|
199
|
-
classes: PropTypes.object,
|
|
200
|
-
direction: PropTypes.oneOf(['column', 'row']),
|
|
201
|
-
hidden: PropTypes.bool,
|
|
202
|
-
itemGap: PropTypes.number,
|
|
203
|
-
itemMarkHeight: PropTypes.number,
|
|
204
|
-
itemMarkWidth: PropTypes.number,
|
|
205
|
-
labelStyle: PropTypes.object,
|
|
206
|
-
markGap: PropTypes.number,
|
|
207
|
-
onItemClick: PropTypes.func,
|
|
208
|
-
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
209
|
-
bottom: PropTypes.number,
|
|
210
|
-
left: PropTypes.number,
|
|
211
|
-
right: PropTypes.number,
|
|
212
|
-
top: PropTypes.number
|
|
213
|
-
})]),
|
|
214
|
-
position: PropTypes.shape({
|
|
215
|
-
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
216
|
-
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
217
|
-
}),
|
|
218
|
-
slotProps: PropTypes.object,
|
|
219
|
-
slots: PropTypes.object
|
|
220
|
-
}),
|
|
221
199
|
/**
|
|
222
200
|
* If `true`, a loading overlay is displayed.
|
|
223
201
|
* @default false
|
|
@@ -352,6 +330,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
352
330
|
dataKey: PropTypes.string,
|
|
353
331
|
disableLine: PropTypes.bool,
|
|
354
332
|
disableTicks: PropTypes.bool,
|
|
333
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
355
334
|
fill: PropTypes.string,
|
|
356
335
|
hideTooltip: PropTypes.bool,
|
|
357
336
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -414,6 +393,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
414
393
|
dataKey: PropTypes.string,
|
|
415
394
|
disableLine: PropTypes.bool,
|
|
416
395
|
disableTicks: PropTypes.bool,
|
|
396
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
417
397
|
fill: PropTypes.string,
|
|
418
398
|
hideTooltip: PropTypes.bool,
|
|
419
399
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -3,50 +3,24 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { ChartsAxesGradients, DrawingProvider, InteractionProvider, PluginProvider, SeriesProvider, AnimationProvider } from '@mui/x-charts/internals';
|
|
9
|
-
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
6
|
+
import { Watermark } from '@mui/x-license/Watermark';
|
|
7
|
+
import { ResizableContainer } from '@mui/x-charts/internals';
|
|
10
8
|
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
11
|
-
import {
|
|
12
|
-
import { ZoomProvider } from "../context/ZoomProvider/index.js";
|
|
9
|
+
import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
|
|
13
10
|
import { useChartContainerProProps } from "./useChartContainerProProps.js";
|
|
14
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
12
|
const releaseInfo = getReleaseInfo();
|
|
16
|
-
const ChartContainerPro = /*#__PURE__*/React.forwardRef(function
|
|
13
|
+
const ChartContainerPro = /*#__PURE__*/React.forwardRef(function ChartContainerPro(props, ref) {
|
|
17
14
|
const {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
zAxisContextProps,
|
|
22
|
-
highlightedProviderProps,
|
|
23
|
-
cartesianProviderProps,
|
|
24
|
-
chartsSurfaceProps,
|
|
25
|
-
pluginProviderProps,
|
|
26
|
-
animationProviderProps,
|
|
27
|
-
children
|
|
15
|
+
chartDataProviderProProps,
|
|
16
|
+
resizableChartContainerProps,
|
|
17
|
+
hasIntrinsicSize
|
|
28
18
|
} = useChartContainerProProps(props, ref);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
|
|
35
|
-
children: /*#__PURE__*/_jsx(CartesianProviderPro, _extends({}, cartesianProviderProps, {
|
|
36
|
-
children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
|
|
37
|
-
children: /*#__PURE__*/_jsx(InteractionProvider, {
|
|
38
|
-
children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
|
|
39
|
-
children: /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
40
|
-
children: [/*#__PURE__*/_jsx(ChartsAxesGradients, {}), children]
|
|
41
|
-
}))
|
|
42
|
-
}))
|
|
43
|
-
})
|
|
44
|
-
}))
|
|
45
|
-
}))
|
|
46
|
-
}))
|
|
47
|
-
}))
|
|
48
|
-
}))
|
|
49
|
-
}))
|
|
19
|
+
return /*#__PURE__*/_jsxs(ResizableContainer, _extends({}, resizableChartContainerProps, {
|
|
20
|
+
children: [hasIntrinsicSize ? /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps)) : null, /*#__PURE__*/_jsx(Watermark, {
|
|
21
|
+
packageName: "x-charts-pro",
|
|
22
|
+
releaseInfo: releaseInfo
|
|
23
|
+
})]
|
|
50
24
|
}));
|
|
51
25
|
});
|
|
52
26
|
process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
@@ -73,9 +47,9 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
73
47
|
*/
|
|
74
48
|
disableAxisListener: PropTypes.bool,
|
|
75
49
|
/**
|
|
76
|
-
* The height of the chart in px.
|
|
50
|
+
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
77
51
|
*/
|
|
78
|
-
height: PropTypes.number
|
|
52
|
+
height: PropTypes.number,
|
|
79
53
|
/**
|
|
80
54
|
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
81
55
|
*/
|
|
@@ -112,6 +86,16 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
112
86
|
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
113
87
|
*/
|
|
114
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,
|
|
115
99
|
/**
|
|
116
100
|
* The array of series to display.
|
|
117
101
|
* Each type of series has its own specificity.
|
|
@@ -132,9 +116,9 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
132
116
|
y: PropTypes.number
|
|
133
117
|
}),
|
|
134
118
|
/**
|
|
135
|
-
* The width of the chart in px.
|
|
119
|
+
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
136
120
|
*/
|
|
137
|
-
width: PropTypes.number
|
|
121
|
+
width: PropTypes.number,
|
|
138
122
|
/**
|
|
139
123
|
* The configuration of the x-axes.
|
|
140
124
|
* If not provided, a default axis config is used.
|
|
@@ -161,6 +145,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
161
145
|
dataKey: PropTypes.string,
|
|
162
146
|
disableLine: PropTypes.bool,
|
|
163
147
|
disableTicks: PropTypes.bool,
|
|
148
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
164
149
|
fill: PropTypes.string,
|
|
165
150
|
hideTooltip: PropTypes.bool,
|
|
166
151
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -223,6 +208,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
223
208
|
dataKey: PropTypes.string,
|
|
224
209
|
disableLine: PropTypes.bool,
|
|
225
210
|
disableTicks: PropTypes.bool,
|
|
211
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
226
212
|
fill: PropTypes.string,
|
|
227
213
|
hideTooltip: PropTypes.bool,
|
|
228
214
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
5
|
const _excluded = ["zoom", "onZoomChange"];
|
|
5
6
|
import { useChartContainerProps } from '@mui/x-charts/internals';
|
|
@@ -9,35 +10,18 @@ export const useChartContainerProProps = (props, ref) => {
|
|
|
9
10
|
onZoomChange
|
|
10
11
|
} = props,
|
|
11
12
|
baseProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
12
|
-
const {
|
|
13
|
-
children,
|
|
14
|
-
drawingProviderProps,
|
|
15
|
-
seriesProviderProps,
|
|
16
|
-
cartesianProviderProps,
|
|
17
|
-
zAxisContextProps,
|
|
18
|
-
highlightedProviderProps,
|
|
19
|
-
chartsSurfaceProps,
|
|
20
|
-
pluginProviderProps,
|
|
21
|
-
animationProviderProps,
|
|
22
|
-
xAxis,
|
|
23
|
-
yAxis
|
|
24
|
-
} = useChartContainerProps(baseProps, ref);
|
|
25
|
-
const zoomProviderProps = {
|
|
13
|
+
const chartDataProviderProProps = {
|
|
26
14
|
zoom,
|
|
27
|
-
onZoomChange
|
|
28
|
-
xAxis,
|
|
29
|
-
yAxis
|
|
15
|
+
onZoomChange
|
|
30
16
|
};
|
|
17
|
+
const {
|
|
18
|
+
chartDataProviderProps,
|
|
19
|
+
resizableChartContainerProps,
|
|
20
|
+
hasIntrinsicSize
|
|
21
|
+
} = useChartContainerProps(baseProps, ref);
|
|
31
22
|
return {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
pluginProviderProps,
|
|
36
|
-
seriesProviderProps,
|
|
37
|
-
cartesianProviderProps,
|
|
38
|
-
zAxisContextProps,
|
|
39
|
-
highlightedProviderProps,
|
|
40
|
-
chartsSurfaceProps,
|
|
41
|
-
animationProviderProps
|
|
23
|
+
chartDataProviderProProps: _extends({}, chartDataProviderProps, chartDataProviderProProps),
|
|
24
|
+
resizableChartContainerProps,
|
|
25
|
+
hasIntrinsicSize
|
|
42
26
|
};
|
|
43
27
|
};
|
|
@@ -11,7 +11,7 @@ import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
|
11
11
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
12
12
|
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
13
13
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
14
|
-
import {
|
|
14
|
+
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
15
15
|
import { HeatmapPlot } from "./HeatmapPlot.js";
|
|
16
16
|
import { plugin as heatmapPlugin } from "./plugin.js";
|
|
17
17
|
import { DefaultHeatmapTooltip } from "./DefaultHeatmapTooltip.js";
|
|
@@ -65,7 +65,7 @@ const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
|
|
|
65
65
|
color: defaultColorMap
|
|
66
66
|
}
|
|
67
67
|
}], [zAxis]);
|
|
68
|
-
return /*#__PURE__*/_jsxs(
|
|
68
|
+
return /*#__PURE__*/_jsxs(ChartContainerPro, {
|
|
69
69
|
ref: ref,
|
|
70
70
|
plugins: [heatmapPlugin],
|
|
71
71
|
series: series.map(s => _extends({
|
|
@@ -279,6 +279,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
279
279
|
dataKey: PropTypes.string,
|
|
280
280
|
disableLine: PropTypes.bool,
|
|
281
281
|
disableTicks: PropTypes.bool,
|
|
282
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
282
283
|
fill: PropTypes.string,
|
|
283
284
|
hideTooltip: PropTypes.bool,
|
|
284
285
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -343,6 +344,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
343
344
|
dataKey: PropTypes.string,
|
|
344
345
|
disableLine: PropTypes.bool,
|
|
345
346
|
disableTicks: PropTypes.bool,
|
|
347
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
346
348
|
fill: PropTypes.string,
|
|
347
349
|
hideTooltip: PropTypes.bool,
|
|
348
350
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -16,7 +16,7 @@ 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
18
|
import { useLineChartProps } from '@mui/x-charts/internals';
|
|
19
|
-
import {
|
|
19
|
+
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
20
20
|
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
21
21
|
import { useZoom } from "../context/ZoomProvider/useZoom.js";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -168,7 +168,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
168
168
|
tooltipProps,
|
|
169
169
|
children
|
|
170
170
|
} = useLineChartProps(other);
|
|
171
|
-
return /*#__PURE__*/_jsxs(
|
|
171
|
+
return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
|
|
172
172
|
ref: ref
|
|
173
173
|
}, chartContainerProps, {
|
|
174
174
|
zoom: zoom,
|
|
@@ -178,7 +178,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
178
178
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
|
|
179
179
|
"data-drawing-container": true,
|
|
180
180
|
children: /*#__PURE__*/_jsx(MarkPlotZoom, _extends({}, markPlotProps))
|
|
181
|
-
}), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
181
|
+
}), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
182
182
|
}));
|
|
183
183
|
});
|
|
184
184
|
process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
@@ -238,6 +238,10 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
238
238
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
239
239
|
*/
|
|
240
240
|
height: PropTypes.number,
|
|
241
|
+
/**
|
|
242
|
+
* If `true`, the legend is not rendered.
|
|
243
|
+
*/
|
|
244
|
+
hideLegend: PropTypes.bool,
|
|
241
245
|
/**
|
|
242
246
|
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
243
247
|
*/
|
|
@@ -251,32 +255,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
251
255
|
* @default yAxisIds[0] The id of the first provided axis
|
|
252
256
|
*/
|
|
253
257
|
leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
254
|
-
/**
|
|
255
|
-
* @deprecated Consider using `slotProps.legend` instead.
|
|
256
|
-
*/
|
|
257
|
-
legend: PropTypes.shape({
|
|
258
|
-
classes: PropTypes.object,
|
|
259
|
-
direction: PropTypes.oneOf(['column', 'row']),
|
|
260
|
-
hidden: PropTypes.bool,
|
|
261
|
-
itemGap: PropTypes.number,
|
|
262
|
-
itemMarkHeight: PropTypes.number,
|
|
263
|
-
itemMarkWidth: PropTypes.number,
|
|
264
|
-
labelStyle: PropTypes.object,
|
|
265
|
-
markGap: PropTypes.number,
|
|
266
|
-
onItemClick: PropTypes.func,
|
|
267
|
-
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
268
|
-
bottom: PropTypes.number,
|
|
269
|
-
left: PropTypes.number,
|
|
270
|
-
right: PropTypes.number,
|
|
271
|
-
top: PropTypes.number
|
|
272
|
-
})]),
|
|
273
|
-
position: PropTypes.shape({
|
|
274
|
-
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
275
|
-
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
276
|
-
}),
|
|
277
|
-
slotProps: PropTypes.object,
|
|
278
|
-
slots: PropTypes.object
|
|
279
|
-
}),
|
|
280
258
|
/**
|
|
281
259
|
* If `true`, a loading overlay is displayed.
|
|
282
260
|
* @default false
|
|
@@ -418,6 +396,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
418
396
|
dataKey: PropTypes.string,
|
|
419
397
|
disableLine: PropTypes.bool,
|
|
420
398
|
disableTicks: PropTypes.bool,
|
|
399
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
421
400
|
fill: PropTypes.string,
|
|
422
401
|
hideTooltip: PropTypes.bool,
|
|
423
402
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -480,6 +459,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
480
459
|
dataKey: PropTypes.string,
|
|
481
460
|
disableLine: PropTypes.bool,
|
|
482
461
|
disableTicks: PropTypes.bool,
|
|
462
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
483
463
|
fill: PropTypes.string,
|
|
484
464
|
hideTooltip: PropTypes.bool,
|
|
485
465
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -16,7 +16,7 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
16
16
|
import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
17
17
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
18
18
|
import { useScatterChartProps } from '@mui/x-charts/internals';
|
|
19
|
-
import {
|
|
19
|
+
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
20
20
|
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
/**
|
|
@@ -52,7 +52,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
52
52
|
tooltipProps,
|
|
53
53
|
children
|
|
54
54
|
} = useScatterChartProps(other);
|
|
55
|
-
return /*#__PURE__*/_jsx(
|
|
55
|
+
return /*#__PURE__*/_jsx(ChartContainerPro, _extends({
|
|
56
56
|
ref: ref
|
|
57
57
|
}, chartContainerProps, {
|
|
58
58
|
zoom: zoom,
|
|
@@ -61,7 +61,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
61
61
|
children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
|
|
62
62
|
"data-drawing-container": true,
|
|
63
63
|
children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
|
|
64
|
-
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
64
|
+
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
65
65
|
}))
|
|
66
66
|
}));
|
|
67
67
|
});
|
|
@@ -119,6 +119,10 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
119
119
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
120
120
|
*/
|
|
121
121
|
height: PropTypes.number,
|
|
122
|
+
/**
|
|
123
|
+
* If `true`, the legend is not rendered.
|
|
124
|
+
*/
|
|
125
|
+
hideLegend: PropTypes.bool,
|
|
122
126
|
/**
|
|
123
127
|
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
124
128
|
*/
|
|
@@ -132,32 +136,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
132
136
|
* @default yAxisIds[0] The id of the first provided axis
|
|
133
137
|
*/
|
|
134
138
|
leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
135
|
-
/**
|
|
136
|
-
* @deprecated Consider using `slotProps.legend` instead.
|
|
137
|
-
*/
|
|
138
|
-
legend: PropTypes.shape({
|
|
139
|
-
classes: PropTypes.object,
|
|
140
|
-
direction: PropTypes.oneOf(['column', 'row']),
|
|
141
|
-
hidden: PropTypes.bool,
|
|
142
|
-
itemGap: PropTypes.number,
|
|
143
|
-
itemMarkHeight: PropTypes.number,
|
|
144
|
-
itemMarkWidth: PropTypes.number,
|
|
145
|
-
labelStyle: PropTypes.object,
|
|
146
|
-
markGap: PropTypes.number,
|
|
147
|
-
onItemClick: PropTypes.func,
|
|
148
|
-
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
149
|
-
bottom: PropTypes.number,
|
|
150
|
-
left: PropTypes.number,
|
|
151
|
-
right: PropTypes.number,
|
|
152
|
-
top: PropTypes.number
|
|
153
|
-
})]),
|
|
154
|
-
position: PropTypes.shape({
|
|
155
|
-
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
156
|
-
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
157
|
-
}),
|
|
158
|
-
slotProps: PropTypes.object,
|
|
159
|
-
slots: PropTypes.object
|
|
160
|
-
}),
|
|
161
139
|
/**
|
|
162
140
|
* If `true`, a loading overlay is displayed.
|
|
163
141
|
* @default false
|
|
@@ -291,6 +269,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
291
269
|
dataKey: PropTypes.string,
|
|
292
270
|
disableLine: PropTypes.bool,
|
|
293
271
|
disableTicks: PropTypes.bool,
|
|
272
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
294
273
|
fill: PropTypes.string,
|
|
295
274
|
hideTooltip: PropTypes.bool,
|
|
296
275
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -353,6 +332,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
353
332
|
dataKey: PropTypes.string,
|
|
354
333
|
disableLine: PropTypes.bool,
|
|
355
334
|
disableTicks: PropTypes.bool,
|
|
335
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
356
336
|
fill: PropTypes.string,
|
|
357
337
|
hideTooltip: PropTypes.bool,
|
|
358
338
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -3,27 +3,53 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { ChartsAxesGradients, DrawingProvider, InteractionProvider, PluginProvider, SeriesProvider, AnimationProvider } from '@mui/x-charts/internals';
|
|
7
|
+
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
8
|
+
import { HighlightedProvider, ZAxisContextProvider } from '@mui/x-charts/context';
|
|
9
|
+
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
10
|
+
import { getReleaseInfo } from "../../internals/utils/releaseInfo.js";
|
|
11
|
+
import { CartesianProviderPro } from "../CartesianProviderPro/index.js";
|
|
12
|
+
import { ZoomProvider } from "../ZoomProvider/index.js";
|
|
13
|
+
import { useChartContainerProProps } from "./useChartDataProviderProProps.js";
|
|
11
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
15
|
const releaseInfo = getReleaseInfo();
|
|
13
|
-
const
|
|
16
|
+
const ChartDataProviderPro = /*#__PURE__*/React.forwardRef(function ChartDataProviderPro(props, ref) {
|
|
14
17
|
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
zoomProviderProps,
|
|
19
|
+
drawingProviderProps,
|
|
20
|
+
seriesProviderProps,
|
|
21
|
+
zAxisContextProps,
|
|
22
|
+
highlightedProviderProps,
|
|
23
|
+
cartesianProviderProps,
|
|
24
|
+
chartsSurfaceProps,
|
|
25
|
+
pluginProviderProps,
|
|
26
|
+
animationProviderProps,
|
|
27
|
+
children
|
|
28
|
+
} = useChartContainerProProps(props, ref);
|
|
29
|
+
useLicenseVerifier('x-charts-pro', releaseInfo);
|
|
30
|
+
return /*#__PURE__*/_jsx(DrawingProvider, _extends({}, drawingProviderProps, {
|
|
31
|
+
children: /*#__PURE__*/_jsx(AnimationProvider, _extends({}, animationProviderProps, {
|
|
32
|
+
children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
|
|
33
|
+
children: /*#__PURE__*/_jsx(ZoomProvider, _extends({}, zoomProviderProps, {
|
|
34
|
+
children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
|
|
35
|
+
children: /*#__PURE__*/_jsx(CartesianProviderPro, _extends({}, cartesianProviderProps, {
|
|
36
|
+
children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
|
|
37
|
+
children: /*#__PURE__*/_jsx(InteractionProvider, {
|
|
38
|
+
children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
|
|
39
|
+
children: /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
40
|
+
children: [/*#__PURE__*/_jsx(ChartsAxesGradients, {}), children]
|
|
41
|
+
}))
|
|
42
|
+
}))
|
|
43
|
+
})
|
|
44
|
+
}))
|
|
45
|
+
}))
|
|
46
|
+
}))
|
|
47
|
+
}))
|
|
48
|
+
}))
|
|
49
|
+
}))
|
|
24
50
|
}));
|
|
25
51
|
});
|
|
26
|
-
process.env.NODE_ENV !== "production" ?
|
|
52
|
+
process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
27
53
|
// ----------------------------- Warning --------------------------------
|
|
28
54
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
29
55
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -47,9 +73,9 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
47
73
|
*/
|
|
48
74
|
disableAxisListener: PropTypes.bool,
|
|
49
75
|
/**
|
|
50
|
-
* The height of the chart in px.
|
|
76
|
+
* The height of the chart in px.
|
|
51
77
|
*/
|
|
52
|
-
height: PropTypes.number,
|
|
78
|
+
height: PropTypes.number.isRequired,
|
|
53
79
|
/**
|
|
54
80
|
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
55
81
|
*/
|
|
@@ -86,16 +112,6 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
86
112
|
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
87
113
|
*/
|
|
88
114
|
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,
|
|
99
115
|
/**
|
|
100
116
|
* The array of series to display.
|
|
101
117
|
* Each type of series has its own specificity.
|
|
@@ -116,9 +132,9 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
116
132
|
y: PropTypes.number
|
|
117
133
|
}),
|
|
118
134
|
/**
|
|
119
|
-
* The width of the chart in px.
|
|
135
|
+
* The width of the chart in px.
|
|
120
136
|
*/
|
|
121
|
-
width: PropTypes.number,
|
|
137
|
+
width: PropTypes.number.isRequired,
|
|
122
138
|
/**
|
|
123
139
|
* The configuration of the x-axes.
|
|
124
140
|
* If not provided, a default axis config is used.
|
|
@@ -145,6 +161,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
145
161
|
dataKey: PropTypes.string,
|
|
146
162
|
disableLine: PropTypes.bool,
|
|
147
163
|
disableTicks: PropTypes.bool,
|
|
164
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
148
165
|
fill: PropTypes.string,
|
|
149
166
|
hideTooltip: PropTypes.bool,
|
|
150
167
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -207,6 +224,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
207
224
|
dataKey: PropTypes.string,
|
|
208
225
|
disableLine: PropTypes.bool,
|
|
209
226
|
disableTicks: PropTypes.bool,
|
|
227
|
+
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
210
228
|
fill: PropTypes.string,
|
|
211
229
|
hideTooltip: PropTypes.bool,
|
|
212
230
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -277,4 +295,4 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
277
295
|
start: PropTypes.number.isRequired
|
|
278
296
|
}))
|
|
279
297
|
} : void 0;
|
|
280
|
-
export {
|
|
298
|
+
export { ChartDataProviderPro };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChartDataProviderPro.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
const _excluded = ["zoom", "onZoomChange"];
|
|
5
|
+
import { useChartDataProviderProps } from '@mui/x-charts/internals';
|
|
6
|
+
export const useChartContainerProProps = (props, ref) => {
|
|
7
|
+
const {
|
|
8
|
+
zoom,
|
|
9
|
+
onZoomChange
|
|
10
|
+
} = props,
|
|
11
|
+
baseProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
12
|
+
const {
|
|
13
|
+
children,
|
|
14
|
+
drawingProviderProps,
|
|
15
|
+
seriesProviderProps,
|
|
16
|
+
cartesianProviderProps,
|
|
17
|
+
zAxisContextProps,
|
|
18
|
+
highlightedProviderProps,
|
|
19
|
+
chartsSurfaceProps,
|
|
20
|
+
pluginProviderProps,
|
|
21
|
+
animationProviderProps,
|
|
22
|
+
xAxis,
|
|
23
|
+
yAxis
|
|
24
|
+
} = useChartDataProviderProps(baseProps, ref);
|
|
25
|
+
const zoomProviderProps = {
|
|
26
|
+
zoom,
|
|
27
|
+
onZoomChange,
|
|
28
|
+
xAxis,
|
|
29
|
+
yAxis
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
zoomProviderProps,
|
|
33
|
+
children,
|
|
34
|
+
drawingProviderProps,
|
|
35
|
+
pluginProviderProps,
|
|
36
|
+
seriesProviderProps,
|
|
37
|
+
cartesianProviderProps,
|
|
38
|
+
zAxisContextProps,
|
|
39
|
+
highlightedProviderProps,
|
|
40
|
+
chartsSurfaceProps,
|
|
41
|
+
animationProviderProps
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -25,6 +25,7 @@ export function ZoomProvider({
|
|
|
25
25
|
const defaultZoomData = React.useRef(initializeZoomData(options));
|
|
26
26
|
const [zoomData, setZoomData] = useControlled({
|
|
27
27
|
controlled: zoom,
|
|
28
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
28
29
|
default: defaultZoomData.current,
|
|
29
30
|
name: 'ZoomProvider',
|
|
30
31
|
state: 'zoom'
|