@mui/x-charts-pro 8.0.0-alpha.0 → 8.0.0-alpha.10
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 +2 -2
- package/BarChartPro/BarChartPro.js +74 -61
- package/CHANGELOG.md +2215 -119
- package/ChartContainerPro/ChartContainerPro.d.ts +33 -4
- package/ChartContainerPro/ChartContainerPro.js +59 -51
- package/ChartContainerPro/useChartContainerProProps.d.ts +7 -43
- package/ChartContainerPro/useChartContainerProProps.js +15 -9
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
- package/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +71 -80
- package/{context → ChartDataProviderPro}/package.json +1 -1
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
- package/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
- package/Heatmap/Heatmap.d.ts +11 -4
- package/Heatmap/Heatmap.js +35 -43
- package/Heatmap/HeatmapItem.js +1 -1
- package/Heatmap/HeatmapTooltip.d.ts +9 -0
- package/Heatmap/HeatmapTooltip.js +274 -0
- package/Heatmap/extremums.d.ts +2 -2
- package/Heatmap/formatter.d.ts +2 -2
- package/Heatmap/formatter.js +2 -1
- package/Heatmap/heatmapClasses.js +2 -1
- package/Heatmap/index.d.ts +1 -1
- package/Heatmap/index.js +1 -1
- package/Heatmap/plugin.d.ts +2 -2
- package/Heatmap/plugin.js +4 -2
- package/Heatmap/tooltip.d.ts +3 -0
- package/Heatmap/tooltip.js +25 -0
- package/LineChartPro/LineChartPro.d.ts +2 -2
- package/LineChartPro/LineChartPro.js +80 -82
- package/README.md +3 -3
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.js +51 -64
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +2 -1
- package/hooks/useSeries.d.ts +2 -4
- package/hooks/zoom/index.d.ts +1 -0
- package/hooks/zoom/index.js +1 -0
- package/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
- package/hooks/zoom/useIsZoomInteracting.js +14 -0
- package/index.d.ts +3 -1
- package/index.js +5 -5
- package/internals/plugins/allPlugins.d.ts +11 -0
- package/internals/plugins/allPlugins.js +5 -0
- package/internals/plugins/useChartProZoom/creatZoomLookup.d.ts +3 -0
- package/internals/plugins/useChartProZoom/creatZoomLookup.js +12 -0
- package/internals/plugins/useChartProZoom/defaultizeZoom.d.ts +2 -0
- package/internals/plugins/useChartProZoom/defaultizeZoom.js +25 -0
- package/internals/plugins/useChartProZoom/index.d.ts +3 -0
- package/internals/plugins/useChartProZoom/index.js +3 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.js +303 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +377 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +10 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +50 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.utils.js +126 -0
- package/internals/plugins/useChartProZoom/zoom.types.d.ts +53 -0
- package/internals/utils/releaseInfo.js +2 -2
- package/models/index.d.ts +1 -0
- package/models/index.js +2 -1
- package/modern/BarChartPro/BarChartPro.js +74 -61
- package/modern/ChartContainerPro/ChartContainerPro.js +59 -51
- package/modern/ChartContainerPro/useChartContainerProProps.js +15 -9
- package/modern/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +71 -80
- package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
- package/modern/Heatmap/Heatmap.js +35 -43
- package/modern/Heatmap/HeatmapItem.js +1 -1
- package/modern/Heatmap/HeatmapTooltip.js +274 -0
- package/modern/Heatmap/formatter.js +2 -1
- package/modern/Heatmap/heatmapClasses.js +2 -1
- package/modern/Heatmap/index.js +1 -1
- package/modern/Heatmap/plugin.js +4 -2
- package/modern/Heatmap/tooltip.js +25 -0
- package/modern/LineChartPro/LineChartPro.js +80 -82
- package/modern/ScatterChartPro/ScatterChartPro.js +51 -64
- package/modern/hooks/index.js +2 -1
- package/modern/hooks/zoom/index.js +1 -0
- package/modern/hooks/zoom/useIsZoomInteracting.js +14 -0
- package/modern/index.js +5 -5
- package/modern/internals/plugins/allPlugins.js +5 -0
- package/modern/internals/plugins/useChartProZoom/creatZoomLookup.js +12 -0
- package/modern/internals/plugins/useChartProZoom/defaultizeZoom.js +25 -0
- package/modern/internals/plugins/useChartProZoom/index.js +3 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +303 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +10 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +1 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +126 -0
- package/modern/internals/plugins/useChartProZoom/zoom.types.js +1 -0
- package/modern/internals/utils/releaseInfo.js +2 -2
- package/modern/models/index.js +2 -1
- package/node/BarChartPro/BarChartPro.js +73 -60
- package/node/ChartContainerPro/ChartContainerPro.js +58 -50
- package/node/ChartContainerPro/useChartContainerProProps.js +15 -9
- package/node/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +70 -79
- package/node/ChartDataProviderPro/useChartDataProviderProProps.js +21 -0
- package/node/Heatmap/Heatmap.js +35 -43
- package/node/Heatmap/HeatmapItem.js +2 -2
- package/node/Heatmap/HeatmapTooltip.js +280 -0
- package/node/Heatmap/formatter.js +2 -1
- package/node/Heatmap/heatmapClasses.js +5 -4
- package/node/Heatmap/index.js +4 -4
- package/node/Heatmap/plugin.js +4 -2
- package/node/Heatmap/tooltip.js +31 -0
- package/node/LineChartPro/LineChartPro.js +79 -81
- package/node/ScatterChartPro/ScatterChartPro.js +50 -63
- package/node/hooks/index.js +16 -1
- package/node/{context/CartesianProviderPro → hooks/zoom}/index.js +4 -4
- package/node/hooks/zoom/useIsZoomInteracting.js +19 -0
- package/node/index.js +34 -12
- package/node/internals/plugins/allPlugins.js +11 -0
- package/node/internals/plugins/useChartProZoom/creatZoomLookup.js +19 -0
- package/node/internals/plugins/useChartProZoom/defaultizeZoom.js +33 -0
- package/node/internals/plugins/useChartProZoom/index.js +38 -0
- package/node/internals/plugins/useChartProZoom/useChartProZoom.js +310 -0
- package/node/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +18 -0
- package/node/internals/plugins/useChartProZoom/useChartProZoom.utils.js +140 -0
- package/node/internals/plugins/useChartProZoom/zoom.types.js +5 -0
- package/node/internals/utils/releaseInfo.js +4 -3
- package/package.json +8 -8
- package/typeOverloads/modules.d.ts +8 -1
- package/Heatmap/DefaultHeatmapTooltip.d.ts +0 -7
- package/Heatmap/DefaultHeatmapTooltip.js +0 -99
- package/context/CartesianProviderPro/CartesianProviderPro.d.ts +0 -6
- package/context/CartesianProviderPro/CartesianProviderPro.js +0 -89
- package/context/CartesianProviderPro/createAxisFilterMapper.d.ts +0 -12
- package/context/CartesianProviderPro/createAxisFilterMapper.js +0 -60
- package/context/CartesianProviderPro/index.d.ts +0 -1
- package/context/CartesianProviderPro/index.js +0 -1
- package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -7
- package/context/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -16
- package/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -43
- package/context/ZoomProvider/Zoom.types.d.ts +0 -144
- package/context/ZoomProvider/ZoomContext.d.ts +0 -4
- package/context/ZoomProvider/ZoomContext.js +0 -16
- package/context/ZoomProvider/ZoomProvider.d.ts +0 -3
- package/context/ZoomProvider/ZoomProvider.js +0 -56
- package/context/ZoomProvider/ZoomSetup.d.ts +0 -9
- package/context/ZoomProvider/ZoomSetup.js +0 -16
- package/context/ZoomProvider/defaultizeZoom.d.ts +0 -2
- package/context/ZoomProvider/defaultizeZoom.js +0 -32
- package/context/ZoomProvider/index.d.ts +0 -3
- package/context/ZoomProvider/index.js +0 -3
- package/context/ZoomProvider/initializeZoomData.d.ts +0 -6
- package/context/ZoomProvider/initializeZoomData.js +0 -13
- package/context/ZoomProvider/useSetupPan.d.ts +0 -1
- package/context/ZoomProvider/useSetupPan.js +0 -106
- package/context/ZoomProvider/useSetupZoom.d.ts +0 -1
- package/context/ZoomProvider/useSetupZoom.js +0 -274
- package/context/ZoomProvider/useZoom.d.ts +0 -7
- package/context/ZoomProvider/useZoom.js +0 -19
- package/context/index.d.ts +0 -3
- package/context/index.js +0 -5
- package/modern/Heatmap/DefaultHeatmapTooltip.js +0 -99
- package/modern/context/CartesianProviderPro/CartesianProviderPro.js +0 -89
- package/modern/context/CartesianProviderPro/createAxisFilterMapper.js +0 -60
- package/modern/context/CartesianProviderPro/index.js +0 -1
- package/modern/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -43
- package/modern/context/ZoomProvider/ZoomContext.js +0 -16
- package/modern/context/ZoomProvider/ZoomProvider.js +0 -56
- package/modern/context/ZoomProvider/ZoomSetup.js +0 -16
- package/modern/context/ZoomProvider/defaultizeZoom.js +0 -32
- package/modern/context/ZoomProvider/index.js +0 -3
- package/modern/context/ZoomProvider/initializeZoomData.js +0 -13
- package/modern/context/ZoomProvider/useSetupPan.js +0 -106
- package/modern/context/ZoomProvider/useSetupZoom.js +0 -274
- package/modern/context/ZoomProvider/useZoom.js +0 -19
- package/modern/context/index.js +0 -5
- package/node/Heatmap/DefaultHeatmapTooltip.js +0 -105
- package/node/context/CartesianProviderPro/CartesianProviderPro.js +0 -95
- package/node/context/CartesianProviderPro/createAxisFilterMapper.js +0 -68
- package/node/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -50
- package/node/context/ZoomProvider/ZoomContext.js +0 -23
- package/node/context/ZoomProvider/ZoomProvider.js +0 -63
- package/node/context/ZoomProvider/ZoomSetup.js +0 -20
- package/node/context/ZoomProvider/defaultizeZoom.js +0 -40
- package/node/context/ZoomProvider/index.js +0 -38
- package/node/context/ZoomProvider/initializeZoomData.js +0 -20
- package/node/context/ZoomProvider/useSetupPan.js +0 -114
- package/node/context/ZoomProvider/useSetupZoom.js +0 -281
- package/node/context/ZoomProvider/useZoom.js +0 -25
- package/node/context/index.js +0 -27
- /package/{context/ChartDataProviderPro → ChartDataProviderPro}/index.d.ts +0 -0
- /package/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
- /package/{context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
- /package/{modern/context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/zoom.types.js} +0 -0
- /package/modern/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
- /package/node/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
- /package/node/{context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface ZoomOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The starting percentage of the zoom range. In the range of 0 to 100.
|
|
4
|
+
*
|
|
5
|
+
* @default 0
|
|
6
|
+
*/
|
|
7
|
+
minStart?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The ending percentage of the zoom range. In the range of 0 to 100.
|
|
10
|
+
*
|
|
11
|
+
* @default 100
|
|
12
|
+
*/
|
|
13
|
+
maxEnd?: number;
|
|
14
|
+
/**
|
|
15
|
+
* The step size of the zooming function. Defines the granularity of the zoom.
|
|
16
|
+
*
|
|
17
|
+
* @default 5
|
|
18
|
+
*/
|
|
19
|
+
step?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Restricts the minimum span size in the range of 0 to 100.
|
|
22
|
+
*
|
|
23
|
+
* If the span size is smaller than the minSpan, the span will be resized to the minSpan.
|
|
24
|
+
*
|
|
25
|
+
* @default 10
|
|
26
|
+
*/
|
|
27
|
+
minSpan?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Restricts the maximum span size in the range of 0 to 100.
|
|
30
|
+
*
|
|
31
|
+
* If the span size is larger than the maxSpan, the span will be resized to the maxSpan.
|
|
32
|
+
*
|
|
33
|
+
* @default 100
|
|
34
|
+
*/
|
|
35
|
+
maxSpan?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Set to `false` to disable panning. Useful when you want to pan programmatically,
|
|
38
|
+
* or to show only a specific section of the chart.
|
|
39
|
+
*
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
panning?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Defines how to filter the axis data when it is outside of the zoomed range of this axis.
|
|
45
|
+
*
|
|
46
|
+
* - `keep`: The data outside the zoomed range is kept. And the other axes will stay the same.
|
|
47
|
+
* - `discard`: The data outside the zoomed range is discarded for the other axes.
|
|
48
|
+
* The other axes will be adjusted to fit the zoomed range.
|
|
49
|
+
*
|
|
50
|
+
* @default 'keep'
|
|
51
|
+
*/
|
|
52
|
+
filterMode?: 'discard' | 'keep';
|
|
53
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ponyfillGlobal from '@mui/utils/ponyfillGlobal';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczODI5OTYwMDAwMA==";
|
|
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
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./seriesType/index.js";
|
|
1
|
+
export * from "./seriesType/index.js";
|
|
2
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
-
const _excluded = ["
|
|
5
|
+
const _excluded = ["initialZoom", "onZoomChange", "apiRef"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useThemeProps } from '@mui/material/styles';
|
|
@@ -15,17 +15,16 @@ 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 {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
18
|
+
import { useBarChartProps, ChartsWrapper } from '@mui/x-charts/internals';
|
|
19
|
+
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
20
|
+
import { useIsZoomInteracting } from "../hooks/zoom/index.js";
|
|
21
|
+
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
22
|
+
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
22
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
24
|
function BarChartPlotZoom(props) {
|
|
24
|
-
const
|
|
25
|
-
isInteracting
|
|
26
|
-
} = useZoom();
|
|
25
|
+
const isInteracting = useIsZoomInteracting();
|
|
27
26
|
return /*#__PURE__*/_jsx(BarPlot, _extends({}, props, {
|
|
28
|
-
skipAnimation: isInteracting ||
|
|
27
|
+
skipAnimation: isInteracting || props.skipAnimation
|
|
29
28
|
}));
|
|
30
29
|
}
|
|
31
30
|
process.env.NODE_ENV !== "production" ? BarChartPlotZoom.propTypes = {
|
|
@@ -84,11 +83,13 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
84
83
|
name: 'MuiBarChartPro'
|
|
85
84
|
});
|
|
86
85
|
const {
|
|
87
|
-
|
|
88
|
-
onZoomChange
|
|
86
|
+
initialZoom,
|
|
87
|
+
onZoomChange,
|
|
88
|
+
apiRef
|
|
89
89
|
} = props,
|
|
90
90
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
91
91
|
const {
|
|
92
|
+
chartsWrapperProps,
|
|
92
93
|
chartContainerProps,
|
|
93
94
|
barPlotProps,
|
|
94
95
|
axisClickHandlerProps,
|
|
@@ -99,17 +100,25 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
99
100
|
chartsAxisProps,
|
|
100
101
|
axisHighlightProps,
|
|
101
102
|
legendProps,
|
|
102
|
-
tooltipProps,
|
|
103
103
|
children
|
|
104
104
|
} = useBarChartProps(other);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
const {
|
|
106
|
+
chartDataProviderProProps,
|
|
107
|
+
chartsSurfaceProps
|
|
108
|
+
} = useChartContainerProProps(_extends({}, chartContainerProps, {
|
|
109
|
+
initialZoom,
|
|
110
|
+
onZoomChange,
|
|
111
|
+
apiRef
|
|
112
|
+
}), ref);
|
|
113
|
+
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
114
|
+
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
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)), children]
|
|
120
|
+
}))]
|
|
121
|
+
}))
|
|
113
122
|
}));
|
|
114
123
|
});
|
|
115
124
|
process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
@@ -117,11 +126,16 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
117
126
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
118
127
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
119
128
|
// ----------------------------------------------------------------------
|
|
129
|
+
apiRef: PropTypes.shape({
|
|
130
|
+
current: PropTypes.shape({
|
|
131
|
+
setZoomData: PropTypes.func.isRequired
|
|
132
|
+
})
|
|
133
|
+
}),
|
|
120
134
|
/**
|
|
121
135
|
* The configuration of axes highlight.
|
|
122
136
|
* Default is set to 'band' in the bar direction.
|
|
123
137
|
* Depends on `layout` prop.
|
|
124
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
138
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
125
139
|
*/
|
|
126
140
|
axisHighlight: PropTypes.shape({
|
|
127
141
|
x: PropTypes.oneOf(['band', 'line', 'none']),
|
|
@@ -179,12 +193,26 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
179
193
|
*/
|
|
180
194
|
hideLegend: PropTypes.bool,
|
|
181
195
|
/**
|
|
182
|
-
* The
|
|
196
|
+
* The highlighted item.
|
|
197
|
+
* Used when the highlight is controlled.
|
|
183
198
|
*/
|
|
184
199
|
highlightedItem: PropTypes.shape({
|
|
185
200
|
dataIndex: PropTypes.number,
|
|
186
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
201
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
187
202
|
}),
|
|
203
|
+
/**
|
|
204
|
+
* This prop is used to help implement the accessibility logic.
|
|
205
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
206
|
+
*/
|
|
207
|
+
id: PropTypes.string,
|
|
208
|
+
/**
|
|
209
|
+
* The list of zoom data related to each axis.
|
|
210
|
+
*/
|
|
211
|
+
initialZoom: PropTypes.arrayOf(PropTypes.shape({
|
|
212
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
213
|
+
end: PropTypes.number.isRequired,
|
|
214
|
+
start: PropTypes.number.isRequired
|
|
215
|
+
})),
|
|
188
216
|
/**
|
|
189
217
|
* The direction of the bar elements.
|
|
190
218
|
* @default 'vertical'
|
|
@@ -205,7 +233,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
205
233
|
* The margin between the SVG and the drawing area.
|
|
206
234
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
207
235
|
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
208
|
-
* @default object Depends on the charts type.
|
|
209
236
|
*/
|
|
210
237
|
margin: PropTypes.shape({
|
|
211
238
|
bottom: PropTypes.number,
|
|
@@ -238,16 +265,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
238
265
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
239
266
|
*/
|
|
240
267
|
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,
|
|
251
268
|
/**
|
|
252
269
|
* Indicate which axis to display the right of the charts.
|
|
253
270
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -275,31 +292,14 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
275
292
|
*/
|
|
276
293
|
slots: PropTypes.object,
|
|
277
294
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
295
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
278
296
|
title: PropTypes.string,
|
|
279
|
-
/**
|
|
280
|
-
* The configuration of the tooltip.
|
|
281
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
282
|
-
*/
|
|
283
|
-
tooltip: PropTypes.shape({
|
|
284
|
-
axisContent: PropTypes.elementType,
|
|
285
|
-
classes: PropTypes.object,
|
|
286
|
-
itemContent: PropTypes.elementType,
|
|
287
|
-
slotProps: PropTypes.object,
|
|
288
|
-
slots: PropTypes.object,
|
|
289
|
-
trigger: PropTypes.oneOf(['axis', 'item', 'none'])
|
|
290
|
-
}),
|
|
291
297
|
/**
|
|
292
298
|
* Indicate which axis to display the top of the charts.
|
|
293
299
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
294
300
|
* @default null
|
|
295
301
|
*/
|
|
296
302
|
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
297
|
-
viewBox: PropTypes.shape({
|
|
298
|
-
height: PropTypes.number,
|
|
299
|
-
width: PropTypes.number,
|
|
300
|
-
x: PropTypes.number,
|
|
301
|
-
y: PropTypes.number
|
|
302
|
-
}),
|
|
303
303
|
/**
|
|
304
304
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
305
305
|
*/
|
|
@@ -335,7 +335,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
335
335
|
hideTooltip: PropTypes.bool,
|
|
336
336
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
337
337
|
label: PropTypes.string,
|
|
338
|
-
labelFontSize: PropTypes.number,
|
|
339
338
|
labelStyle: PropTypes.object,
|
|
340
339
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
341
340
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -346,7 +345,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
346
345
|
slots: PropTypes.object,
|
|
347
346
|
stroke: PropTypes.string,
|
|
348
347
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
349
|
-
tickFontSize: PropTypes.number,
|
|
350
348
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
351
349
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
352
350
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -398,7 +396,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
398
396
|
hideTooltip: PropTypes.bool,
|
|
399
397
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
400
398
|
label: PropTypes.string,
|
|
401
|
-
labelFontSize: PropTypes.number,
|
|
402
399
|
labelStyle: PropTypes.object,
|
|
403
400
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
404
401
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -409,7 +406,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
409
406
|
slots: PropTypes.object,
|
|
410
407
|
stroke: PropTypes.string,
|
|
411
408
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
412
|
-
tickFontSize: PropTypes.number,
|
|
413
409
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
414
410
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
415
411
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -431,12 +427,29 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
431
427
|
}), PropTypes.bool])
|
|
432
428
|
})),
|
|
433
429
|
/**
|
|
434
|
-
* The
|
|
430
|
+
* The configuration of the z-axes.
|
|
435
431
|
*/
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
432
|
+
zAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
433
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
434
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
435
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
436
|
+
unknownColor: PropTypes.string,
|
|
437
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
438
|
+
}), PropTypes.shape({
|
|
439
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
440
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
441
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
442
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
443
|
+
}), PropTypes.shape({
|
|
444
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
445
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
446
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
447
|
+
})]),
|
|
448
|
+
data: PropTypes.array,
|
|
449
|
+
dataKey: PropTypes.string,
|
|
450
|
+
id: PropTypes.string,
|
|
451
|
+
max: PropTypes.number,
|
|
452
|
+
min: PropTypes.number
|
|
440
453
|
}))
|
|
441
454
|
} : void 0;
|
|
442
455
|
export { BarChartPro };
|
|
@@ -3,31 +3,58 @@
|
|
|
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 { ResizableContainer } from '@mui/x-charts/internals';
|
|
8
|
-
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
9
|
-
import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
|
|
6
|
+
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
10
7
|
import { useChartContainerProProps } from "./useChartContainerProProps.js";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
12
|
+
*
|
|
13
|
+
* This is a combination of both the `ChartDataProviderPro` and `ChartsSurface` components.
|
|
14
|
+
*
|
|
15
|
+
* Demos:
|
|
16
|
+
*
|
|
17
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
18
|
+
*
|
|
19
|
+
* API:
|
|
20
|
+
*
|
|
21
|
+
* - [ChartContainer API](https://mui.com/x/api/charts/chart-container/)
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```jsx
|
|
25
|
+
* <ChartContainerPro
|
|
26
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
27
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
28
|
+
* >
|
|
29
|
+
* <BarPlot />
|
|
30
|
+
* <ChartsXAxis position="bottom" axisId="x-axis" />
|
|
31
|
+
* </ChartContainerPro>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
const ChartContainerPro = /*#__PURE__*/React.forwardRef(function ChartContainerProInner(props, ref) {
|
|
14
35
|
const {
|
|
15
36
|
chartDataProviderProProps,
|
|
16
|
-
|
|
17
|
-
|
|
37
|
+
children,
|
|
38
|
+
chartsSurfaceProps
|
|
18
39
|
} = useChartContainerProProps(props, ref);
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
children:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})]
|
|
40
|
+
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
41
|
+
children: /*#__PURE__*/_jsx(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
42
|
+
children: children
|
|
43
|
+
}))
|
|
24
44
|
}));
|
|
25
45
|
});
|
|
46
|
+
|
|
47
|
+
// @ts-expect-error the type coercion breaks the prop types
|
|
26
48
|
process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
27
49
|
// ----------------------------- Warning --------------------------------
|
|
28
50
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
29
51
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
30
52
|
// ----------------------------------------------------------------------
|
|
53
|
+
apiRef: PropTypes.shape({
|
|
54
|
+
current: PropTypes.shape({
|
|
55
|
+
setZoomData: PropTypes.func.isRequired
|
|
56
|
+
})
|
|
57
|
+
}),
|
|
31
58
|
children: PropTypes.node,
|
|
32
59
|
className: PropTypes.string,
|
|
33
60
|
/**
|
|
@@ -51,17 +78,30 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
51
78
|
*/
|
|
52
79
|
height: PropTypes.number,
|
|
53
80
|
/**
|
|
54
|
-
* The
|
|
81
|
+
* The highlighted item.
|
|
82
|
+
* Used when the highlight is controlled.
|
|
55
83
|
*/
|
|
56
84
|
highlightedItem: PropTypes.shape({
|
|
57
85
|
dataIndex: PropTypes.number,
|
|
58
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
86
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
59
87
|
}),
|
|
88
|
+
/**
|
|
89
|
+
* This prop is used to help implement the accessibility logic.
|
|
90
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
91
|
+
*/
|
|
92
|
+
id: PropTypes.string,
|
|
93
|
+
/**
|
|
94
|
+
* The list of zoom data related to each axis.
|
|
95
|
+
*/
|
|
96
|
+
initialZoom: PropTypes.arrayOf(PropTypes.shape({
|
|
97
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
98
|
+
end: PropTypes.number.isRequired,
|
|
99
|
+
start: PropTypes.number.isRequired
|
|
100
|
+
})),
|
|
60
101
|
/**
|
|
61
102
|
* The margin between the SVG and the drawing area.
|
|
62
103
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
63
104
|
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
64
|
-
* @default object Depends on the charts type.
|
|
65
105
|
*/
|
|
66
106
|
margin: PropTypes.shape({
|
|
67
107
|
bottom: PropTypes.number,
|
|
@@ -81,40 +121,20 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
81
121
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
82
122
|
*/
|
|
83
123
|
onZoomChange: PropTypes.func,
|
|
84
|
-
/**
|
|
85
|
-
* An array of plugins defining how to preprocess data.
|
|
86
|
-
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
87
|
-
*/
|
|
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,
|
|
99
124
|
/**
|
|
100
125
|
* The array of series to display.
|
|
101
126
|
* Each type of series has its own specificity.
|
|
102
127
|
* Please refer to the appropriate docs page to learn more about it.
|
|
103
128
|
*/
|
|
104
|
-
series: PropTypes.arrayOf(PropTypes.object)
|
|
129
|
+
series: PropTypes.arrayOf(PropTypes.object),
|
|
105
130
|
/**
|
|
106
131
|
* If `true`, animations are skipped.
|
|
107
132
|
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
108
133
|
*/
|
|
109
134
|
skipAnimation: PropTypes.bool,
|
|
110
135
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
136
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
111
137
|
title: PropTypes.string,
|
|
112
|
-
viewBox: PropTypes.shape({
|
|
113
|
-
height: PropTypes.number,
|
|
114
|
-
width: PropTypes.number,
|
|
115
|
-
x: PropTypes.number,
|
|
116
|
-
y: PropTypes.number
|
|
117
|
-
}),
|
|
118
138
|
/**
|
|
119
139
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
120
140
|
*/
|
|
@@ -150,7 +170,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
150
170
|
hideTooltip: PropTypes.bool,
|
|
151
171
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
152
172
|
label: PropTypes.string,
|
|
153
|
-
labelFontSize: PropTypes.number,
|
|
154
173
|
labelStyle: PropTypes.object,
|
|
155
174
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
156
175
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -161,7 +180,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
161
180
|
slots: PropTypes.object,
|
|
162
181
|
stroke: PropTypes.string,
|
|
163
182
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
164
|
-
tickFontSize: PropTypes.number,
|
|
165
183
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
166
184
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
167
185
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -213,7 +231,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
213
231
|
hideTooltip: PropTypes.bool,
|
|
214
232
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
215
233
|
label: PropTypes.string,
|
|
216
|
-
labelFontSize: PropTypes.number,
|
|
217
234
|
labelStyle: PropTypes.object,
|
|
218
235
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
219
236
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -224,7 +241,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
224
241
|
slots: PropTypes.object,
|
|
225
242
|
stroke: PropTypes.string,
|
|
226
243
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
227
|
-
tickFontSize: PropTypes.number,
|
|
228
244
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
229
245
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
230
246
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -269,14 +285,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
269
285
|
id: PropTypes.string,
|
|
270
286
|
max: PropTypes.number,
|
|
271
287
|
min: PropTypes.number
|
|
272
|
-
})),
|
|
273
|
-
/**
|
|
274
|
-
* The list of zoom data related to each axis.
|
|
275
|
-
*/
|
|
276
|
-
zoom: PropTypes.arrayOf(PropTypes.shape({
|
|
277
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
278
|
-
end: PropTypes.number.isRequired,
|
|
279
|
-
start: PropTypes.number.isRequired
|
|
280
288
|
}))
|
|
281
289
|
} : void 0;
|
|
282
290
|
export { ChartContainerPro };
|
|
@@ -2,26 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["
|
|
5
|
+
const _excluded = ["initialZoom", "onZoomChange", "plugins", "apiRef"];
|
|
6
6
|
import { useChartContainerProps } from '@mui/x-charts/internals';
|
|
7
|
+
import { ALL_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
7
8
|
export const useChartContainerProProps = (props, ref) => {
|
|
8
9
|
const {
|
|
9
|
-
|
|
10
|
-
onZoomChange
|
|
10
|
+
initialZoom,
|
|
11
|
+
onZoomChange,
|
|
12
|
+
plugins,
|
|
13
|
+
apiRef
|
|
11
14
|
} = props,
|
|
12
15
|
baseProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
13
16
|
const chartDataProviderProProps = {
|
|
14
|
-
|
|
17
|
+
initialZoom,
|
|
15
18
|
onZoomChange
|
|
16
19
|
};
|
|
17
20
|
const {
|
|
18
21
|
chartDataProviderProps,
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
chartsSurfaceProps,
|
|
23
|
+
children
|
|
21
24
|
} = useChartContainerProps(baseProps, ref);
|
|
22
25
|
return {
|
|
23
|
-
chartDataProviderProProps: _extends({}, chartDataProviderProps, chartDataProviderProProps
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
chartDataProviderProProps: _extends({}, chartDataProviderProps, chartDataProviderProProps, {
|
|
27
|
+
apiRef,
|
|
28
|
+
plugins: plugins ?? ALL_PLUGINS
|
|
29
|
+
}),
|
|
30
|
+
chartsSurfaceProps,
|
|
31
|
+
children
|
|
26
32
|
};
|
|
27
33
|
};
|