@mui/x-charts-pro 7.0.0-alpha.0 → 7.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +162 -1
- package/ChartContainerPro/ChartContainerPro.js +9 -5
- package/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
- package/ChartContainerPro/useChartContainerProProps.js +2 -2
- package/Heatmap/Heatmap.js +4 -0
- package/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +4 -0
- package/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.d.ts +1 -1
- package/ScatterChartPro/ScatterChartPro.js +4 -0
- package/context/CartesianProviderPro/CartesianProviderPro.d.ts +4 -4
- package/context/CartesianProviderPro/CartesianProviderPro.js +46 -10
- package/context/CartesianProviderPro/createAxisFilterMapper.d.ts +12 -0
- package/context/CartesianProviderPro/createAxisFilterMapper.js +61 -0
- package/context/ZoomProvider/Zoom.types.d.ts +10 -0
- package/context/ZoomProvider/defaultizeZoom.js +2 -1
- package/index.js +1 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/modern/ChartContainerPro/ChartContainerPro.js +9 -5
- package/modern/ChartContainerPro/useChartContainerProProps.js +2 -2
- package/modern/Heatmap/Heatmap.js +4 -0
- package/modern/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +4 -0
- package/modern/ScatterChartPro/ScatterChartPro.js +4 -0
- package/modern/context/CartesianProviderPro/CartesianProviderPro.js +46 -10
- package/modern/context/CartesianProviderPro/createAxisFilterMapper.js +61 -0
- package/modern/context/ZoomProvider/defaultizeZoom.js +2 -1
- package/modern/index.js +1 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/ChartContainerPro/ChartContainerPro.js +8 -4
- package/node/ChartContainerPro/useChartContainerProProps.js +2 -2
- package/node/Heatmap/Heatmap.js +4 -0
- package/node/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +4 -0
- package/node/ScatterChartPro/ScatterChartPro.js +4 -0
- package/node/context/CartesianProviderPro/CartesianProviderPro.js +47 -10
- package/node/context/CartesianProviderPro/createAxisFilterMapper.js +69 -0
- package/node/context/ZoomProvider/defaultizeZoom.js +2 -1
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +6 -6
|
@@ -6,7 +6,7 @@ import { HighlightedProvider, ZAxisContextProvider } from '@mui/x-charts/context
|
|
|
6
6
|
import { ChartsAxesGradients, DrawingProvider, InteractionProvider, PluginProvider, SeriesProvider } from '@mui/x-charts/internals';
|
|
7
7
|
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
8
8
|
import { getReleaseInfo } from '../internals/utils/releaseInfo';
|
|
9
|
-
import {
|
|
9
|
+
import { CartesianProviderPro } from '../context/CartesianProviderPro';
|
|
10
10
|
import { ZoomProvider } from '../context/ZoomProvider';
|
|
11
11
|
import { useChartContainerProProps } from './useChartContainerProProps';
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -18,7 +18,7 @@ const ChartContainerPro = /*#__PURE__*/React.forwardRef(function ChartContainer(
|
|
|
18
18
|
seriesProviderProps,
|
|
19
19
|
zAxisContextProps,
|
|
20
20
|
highlightedProviderProps,
|
|
21
|
-
|
|
21
|
+
cartesianProviderProps,
|
|
22
22
|
chartsSurfaceProps,
|
|
23
23
|
pluginProviderProps,
|
|
24
24
|
children
|
|
@@ -26,9 +26,9 @@ const ChartContainerPro = /*#__PURE__*/React.forwardRef(function ChartContainer(
|
|
|
26
26
|
useLicenseVerifier('x-charts-pro', releaseInfo);
|
|
27
27
|
return /*#__PURE__*/_jsx(DrawingProvider, _extends({}, drawingProviderProps, {
|
|
28
28
|
children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
|
|
29
|
-
children: /*#__PURE__*/_jsx(
|
|
30
|
-
children: /*#__PURE__*/_jsx(
|
|
31
|
-
children: /*#__PURE__*/_jsx(
|
|
29
|
+
children: /*#__PURE__*/_jsx(ZoomProvider, _extends({}, zoomProviderProps, {
|
|
30
|
+
children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
|
|
31
|
+
children: /*#__PURE__*/_jsx(CartesianProviderPro, _extends({}, cartesianProviderProps, {
|
|
32
32
|
children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
|
|
33
33
|
children: /*#__PURE__*/_jsx(InteractionProvider, {
|
|
34
34
|
children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
|
|
@@ -165,6 +165,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
165
165
|
slotProps: PropTypes.object,
|
|
166
166
|
slots: PropTypes.object,
|
|
167
167
|
stroke: PropTypes.string,
|
|
168
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
168
169
|
tickFontSize: PropTypes.number,
|
|
169
170
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
170
171
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -177,6 +178,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
177
178
|
tickSize: PropTypes.number,
|
|
178
179
|
valueFormatter: PropTypes.func,
|
|
179
180
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
181
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
180
182
|
maxEnd: PropTypes.number,
|
|
181
183
|
maxSpan: PropTypes.number,
|
|
182
184
|
minSpan: PropTypes.number,
|
|
@@ -225,6 +227,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
225
227
|
slotProps: PropTypes.object,
|
|
226
228
|
slots: PropTypes.object,
|
|
227
229
|
stroke: PropTypes.string,
|
|
230
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
228
231
|
tickFontSize: PropTypes.number,
|
|
229
232
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
230
233
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -237,6 +240,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
237
240
|
tickSize: PropTypes.number,
|
|
238
241
|
valueFormatter: PropTypes.func,
|
|
239
242
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
243
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
240
244
|
maxEnd: PropTypes.number,
|
|
241
245
|
maxSpan: PropTypes.number,
|
|
242
246
|
minSpan: PropTypes.number,
|
|
@@ -11,7 +11,7 @@ export const useChartContainerProProps = (props, ref) => {
|
|
|
11
11
|
children,
|
|
12
12
|
drawingProviderProps,
|
|
13
13
|
seriesProviderProps,
|
|
14
|
-
|
|
14
|
+
cartesianProviderProps,
|
|
15
15
|
zAxisContextProps,
|
|
16
16
|
highlightedProviderProps,
|
|
17
17
|
chartsSurfaceProps,
|
|
@@ -31,7 +31,7 @@ export const useChartContainerProProps = (props, ref) => {
|
|
|
31
31
|
drawingProviderProps,
|
|
32
32
|
pluginProviderProps,
|
|
33
33
|
seriesProviderProps,
|
|
34
|
-
|
|
34
|
+
cartesianProviderProps,
|
|
35
35
|
zAxisContextProps,
|
|
36
36
|
highlightedProviderProps,
|
|
37
37
|
chartsSurfaceProps
|
|
@@ -276,6 +276,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
276
276
|
slotProps: PropTypes.object,
|
|
277
277
|
slots: PropTypes.object,
|
|
278
278
|
stroke: PropTypes.string,
|
|
279
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
279
280
|
tickFontSize: PropTypes.number,
|
|
280
281
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
281
282
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -288,6 +289,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
288
289
|
tickSize: PropTypes.number,
|
|
289
290
|
valueFormatter: PropTypes.func,
|
|
290
291
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
292
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
291
293
|
maxEnd: PropTypes.number,
|
|
292
294
|
maxSpan: PropTypes.number,
|
|
293
295
|
minSpan: PropTypes.number,
|
|
@@ -338,6 +340,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
338
340
|
slotProps: PropTypes.object,
|
|
339
341
|
slots: PropTypes.object,
|
|
340
342
|
stroke: PropTypes.string,
|
|
343
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
341
344
|
tickFontSize: PropTypes.number,
|
|
342
345
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
343
346
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -350,6 +353,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
350
353
|
tickSize: PropTypes.number,
|
|
351
354
|
valueFormatter: PropTypes.func,
|
|
352
355
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
356
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
353
357
|
maxEnd: PropTypes.number,
|
|
354
358
|
maxSpan: PropTypes.number,
|
|
355
359
|
minSpan: PropTypes.number,
|
|
@@ -142,6 +142,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
142
142
|
slotProps: PropTypes.object,
|
|
143
143
|
slots: PropTypes.object,
|
|
144
144
|
stroke: PropTypes.string,
|
|
145
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
145
146
|
tickFontSize: PropTypes.number,
|
|
146
147
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
147
148
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -154,6 +155,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
154
155
|
tickSize: PropTypes.number,
|
|
155
156
|
valueFormatter: PropTypes.func,
|
|
156
157
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
158
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
157
159
|
maxEnd: PropTypes.number,
|
|
158
160
|
maxSpan: PropTypes.number,
|
|
159
161
|
minSpan: PropTypes.number,
|
|
@@ -202,6 +204,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
202
204
|
slotProps: PropTypes.object,
|
|
203
205
|
slots: PropTypes.object,
|
|
204
206
|
stroke: PropTypes.string,
|
|
207
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
205
208
|
tickFontSize: PropTypes.number,
|
|
206
209
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
207
210
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -214,6 +217,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
214
217
|
tickSize: PropTypes.number,
|
|
215
218
|
valueFormatter: PropTypes.func,
|
|
216
219
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
220
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
217
221
|
maxEnd: PropTypes.number,
|
|
218
222
|
maxSpan: PropTypes.number,
|
|
219
223
|
minSpan: PropTypes.number,
|
|
@@ -271,6 +271,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
271
271
|
slotProps: PropTypes.object,
|
|
272
272
|
slots: PropTypes.object,
|
|
273
273
|
stroke: PropTypes.string,
|
|
274
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
274
275
|
tickFontSize: PropTypes.number,
|
|
275
276
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
276
277
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -283,6 +284,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
283
284
|
tickSize: PropTypes.number,
|
|
284
285
|
valueFormatter: PropTypes.func,
|
|
285
286
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
287
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
286
288
|
maxEnd: PropTypes.number,
|
|
287
289
|
maxSpan: PropTypes.number,
|
|
288
290
|
minSpan: PropTypes.number,
|
|
@@ -331,6 +333,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
331
333
|
slotProps: PropTypes.object,
|
|
332
334
|
slots: PropTypes.object,
|
|
333
335
|
stroke: PropTypes.string,
|
|
336
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
334
337
|
tickFontSize: PropTypes.number,
|
|
335
338
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
336
339
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -343,6 +346,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
343
346
|
tickSize: PropTypes.number,
|
|
344
347
|
valueFormatter: PropTypes.func,
|
|
345
348
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
349
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
346
350
|
maxEnd: PropTypes.number,
|
|
347
351
|
maxSpan: PropTypes.number,
|
|
348
352
|
minSpan: PropTypes.number,
|
|
@@ -1,42 +1,78 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { useDrawingArea, useSeries, CartesianContext, cartesianProviderUtils, useXExtremumGetter, useYExtremumGetter } from '@mui/x-charts/internals';
|
|
3
4
|
import { useZoom } from '../ZoomProvider/useZoom';
|
|
5
|
+
import { createAxisFilterMapper, createGetAxisFilters } from './createAxisFilterMapper';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
7
|
const {
|
|
6
8
|
computeValue
|
|
7
9
|
} = cartesianProviderUtils;
|
|
8
|
-
function
|
|
10
|
+
function CartesianProviderPro(props) {
|
|
9
11
|
const {
|
|
10
12
|
xAxis,
|
|
11
13
|
yAxis,
|
|
12
|
-
dataset,
|
|
13
14
|
children
|
|
14
15
|
} = props;
|
|
15
16
|
const formattedSeries = useSeries();
|
|
16
17
|
const drawingArea = useDrawingArea();
|
|
17
18
|
const {
|
|
18
|
-
zoomData
|
|
19
|
+
zoomData,
|
|
20
|
+
options
|
|
19
21
|
} = useZoom();
|
|
20
22
|
const xExtremumGetters = useXExtremumGetter();
|
|
21
23
|
const yExtremumGetters = useYExtremumGetter();
|
|
24
|
+
const getFilters = React.useMemo(() => {
|
|
25
|
+
const xMapper = createAxisFilterMapper({
|
|
26
|
+
zoomData,
|
|
27
|
+
extremumGetter: xExtremumGetters,
|
|
28
|
+
formattedSeries,
|
|
29
|
+
direction: 'x'
|
|
30
|
+
});
|
|
31
|
+
const yMapper = createAxisFilterMapper({
|
|
32
|
+
zoomData,
|
|
33
|
+
extremumGetter: yExtremumGetters,
|
|
34
|
+
formattedSeries,
|
|
35
|
+
direction: 'y'
|
|
36
|
+
});
|
|
37
|
+
const xFilters = xAxis.reduce((acc, axis, index) => {
|
|
38
|
+
const filter = xMapper(axis, index);
|
|
39
|
+
if (filter !== null) {
|
|
40
|
+
acc[axis.id] = filter;
|
|
41
|
+
}
|
|
42
|
+
return acc;
|
|
43
|
+
}, {});
|
|
44
|
+
const yFilters = yAxis.reduce((acc, axis, index) => {
|
|
45
|
+
const filter = yMapper(axis, index);
|
|
46
|
+
if (filter !== null) {
|
|
47
|
+
acc[axis.id] = filter;
|
|
48
|
+
}
|
|
49
|
+
return acc;
|
|
50
|
+
}, {});
|
|
51
|
+
if (Object.keys(xFilters).length === 0 && Object.keys(yFilters).length === 0) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
return createGetAxisFilters(_extends({}, xFilters, yFilters));
|
|
55
|
+
}, [formattedSeries, xAxis, xExtremumGetters, yAxis, yExtremumGetters, zoomData]);
|
|
22
56
|
const xValues = React.useMemo(() => computeValue({
|
|
23
57
|
drawingArea,
|
|
24
58
|
formattedSeries,
|
|
25
59
|
axis: xAxis,
|
|
26
60
|
extremumGetters: xExtremumGetters,
|
|
27
|
-
dataset,
|
|
28
61
|
axisDirection: 'x',
|
|
29
|
-
zoomData
|
|
30
|
-
|
|
62
|
+
zoomData,
|
|
63
|
+
zoomOptions: options,
|
|
64
|
+
getFilters
|
|
65
|
+
}), [drawingArea, formattedSeries, xAxis, xExtremumGetters, zoomData, options, getFilters]);
|
|
31
66
|
const yValues = React.useMemo(() => computeValue({
|
|
32
67
|
drawingArea,
|
|
33
68
|
formattedSeries,
|
|
34
69
|
axis: yAxis,
|
|
35
70
|
extremumGetters: yExtremumGetters,
|
|
36
|
-
dataset,
|
|
37
71
|
axisDirection: 'y',
|
|
38
|
-
zoomData
|
|
39
|
-
|
|
72
|
+
zoomData,
|
|
73
|
+
zoomOptions: options,
|
|
74
|
+
getFilters
|
|
75
|
+
}), [drawingArea, formattedSeries, yAxis, yExtremumGetters, zoomData, options, getFilters]);
|
|
40
76
|
const value = React.useMemo(() => ({
|
|
41
77
|
isInitialized: true,
|
|
42
78
|
data: {
|
|
@@ -51,4 +87,4 @@ function CartesianContextProviderPro(props) {
|
|
|
51
87
|
children: children
|
|
52
88
|
});
|
|
53
89
|
}
|
|
54
|
-
export {
|
|
90
|
+
export { CartesianProviderPro };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { getAxisExtremum, isDefined } from '@mui/x-charts/internals';
|
|
2
|
+
import { getScale } from '../../../../x-charts/src/internals/getScale';
|
|
3
|
+
export const createAxisFilterMapper = ({
|
|
4
|
+
zoomData,
|
|
5
|
+
extremumGetter,
|
|
6
|
+
formattedSeries,
|
|
7
|
+
direction
|
|
8
|
+
}) => (axis, axisIndex) => {
|
|
9
|
+
if (typeof axis.zoom !== 'object' || axis.zoom.filterMode !== 'discard') {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const zoom = zoomData?.find(({
|
|
13
|
+
axisId
|
|
14
|
+
}) => axisId === axis.id);
|
|
15
|
+
if (zoom === undefined || zoom.start <= 0 && zoom.end >= 100) {
|
|
16
|
+
// No zoom, or zoom with all data visible
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
let extremums = [];
|
|
20
|
+
const scaleType = axis.scaleType;
|
|
21
|
+
if (scaleType === 'point' || scaleType === 'band') {
|
|
22
|
+
extremums = [0, (axis.data?.length ?? 1) - 1];
|
|
23
|
+
} else {
|
|
24
|
+
extremums = getAxisExtremum(axis, extremumGetter, axisIndex === 0, formattedSeries);
|
|
25
|
+
}
|
|
26
|
+
let min;
|
|
27
|
+
let max;
|
|
28
|
+
|
|
29
|
+
// @ts-expect-error The function defaults to linear scale if the scaleType is not recognized.
|
|
30
|
+
[min, max] = getScale(scaleType, extremums, [0, 100]).nice().domain();
|
|
31
|
+
min = min instanceof Date ? min.getTime() : min;
|
|
32
|
+
max = max instanceof Date ? max.getTime() : max;
|
|
33
|
+
const minVal = min + zoom.start * (max - min) / 100;
|
|
34
|
+
const maxVal = min + zoom.end * (max - min) / 100;
|
|
35
|
+
return (value, dataIndex) => {
|
|
36
|
+
const val = value[direction] ?? axis.data?.[dataIndex];
|
|
37
|
+
if (val == null) {
|
|
38
|
+
// If the value does not exist because of missing data point, or out of range index, we just ignore.
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (axis.scaleType === 'point' || axis.scaleType === 'band' || typeof val === 'string') {
|
|
42
|
+
return dataIndex >= minVal && dataIndex <= maxVal;
|
|
43
|
+
}
|
|
44
|
+
return val >= minVal && val <= maxVal;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export const createGetAxisFilters = filters => ({
|
|
48
|
+
currentAxisId,
|
|
49
|
+
seriesXAxisId,
|
|
50
|
+
seriesYAxisId,
|
|
51
|
+
isDefaultAxis
|
|
52
|
+
}) => {
|
|
53
|
+
return (value, dataIndex) => {
|
|
54
|
+
const axisId = currentAxisId === seriesXAxisId ? seriesYAxisId : seriesXAxisId;
|
|
55
|
+
if (!axisId || isDefaultAxis) {
|
|
56
|
+
return Object.values(filters ?? {})[0]?.(value, dataIndex) ?? true;
|
|
57
|
+
}
|
|
58
|
+
const data = [seriesYAxisId, seriesXAxisId].filter(id => id !== currentAxisId).map(id => filters[id ?? '']).filter(isDefined);
|
|
59
|
+
return data.every(f => f(value, dataIndex));
|
|
60
|
+
};
|
|
61
|
+
};
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcyNDM2MDQwMDAwMA==";
|
|
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
|
|
@@ -27,7 +27,7 @@ const ChartContainerPro = exports.ChartContainerPro = /*#__PURE__*/React.forward
|
|
|
27
27
|
seriesProviderProps,
|
|
28
28
|
zAxisContextProps,
|
|
29
29
|
highlightedProviderProps,
|
|
30
|
-
|
|
30
|
+
cartesianProviderProps,
|
|
31
31
|
chartsSurfaceProps,
|
|
32
32
|
pluginProviderProps,
|
|
33
33
|
children
|
|
@@ -35,9 +35,9 @@ const ChartContainerPro = exports.ChartContainerPro = /*#__PURE__*/React.forward
|
|
|
35
35
|
(0, _useLicenseVerifier.useLicenseVerifier)('x-charts-pro', releaseInfo);
|
|
36
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.DrawingProvider, (0, _extends2.default)({}, drawingProviderProps, {
|
|
37
37
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.PluginProvider, (0, _extends2.default)({}, pluginProviderProps, {
|
|
38
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
39
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
40
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartesianProviderPro.
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomProvider.ZoomProvider, (0, _extends2.default)({}, zoomProviderProps, {
|
|
39
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.SeriesProvider, (0, _extends2.default)({}, seriesProviderProps, {
|
|
40
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartesianProviderPro.CartesianProviderPro, (0, _extends2.default)({}, cartesianProviderProps, {
|
|
41
41
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.ZAxisContextProvider, (0, _extends2.default)({}, zAxisContextProps, {
|
|
42
42
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.InteractionProvider, {
|
|
43
43
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.HighlightedProvider, (0, _extends2.default)({}, highlightedProviderProps, {
|
|
@@ -174,6 +174,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
174
174
|
slotProps: _propTypes.default.object,
|
|
175
175
|
slots: _propTypes.default.object,
|
|
176
176
|
stroke: _propTypes.default.string,
|
|
177
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
177
178
|
tickFontSize: _propTypes.default.number,
|
|
178
179
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
179
180
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -186,6 +187,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
186
187
|
tickSize: _propTypes.default.number,
|
|
187
188
|
valueFormatter: _propTypes.default.func,
|
|
188
189
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
190
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
189
191
|
maxEnd: _propTypes.default.number,
|
|
190
192
|
maxSpan: _propTypes.default.number,
|
|
191
193
|
minSpan: _propTypes.default.number,
|
|
@@ -234,6 +236,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
234
236
|
slotProps: _propTypes.default.object,
|
|
235
237
|
slots: _propTypes.default.object,
|
|
236
238
|
stroke: _propTypes.default.string,
|
|
239
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
237
240
|
tickFontSize: _propTypes.default.number,
|
|
238
241
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
239
242
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -246,6 +249,7 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
246
249
|
tickSize: _propTypes.default.number,
|
|
247
250
|
valueFormatter: _propTypes.default.func,
|
|
248
251
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
252
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
249
253
|
maxEnd: _propTypes.default.number,
|
|
250
254
|
maxSpan: _propTypes.default.number,
|
|
251
255
|
minSpan: _propTypes.default.number,
|
|
@@ -18,7 +18,7 @@ const useChartContainerProProps = (props, ref) => {
|
|
|
18
18
|
children,
|
|
19
19
|
drawingProviderProps,
|
|
20
20
|
seriesProviderProps,
|
|
21
|
-
|
|
21
|
+
cartesianProviderProps,
|
|
22
22
|
zAxisContextProps,
|
|
23
23
|
highlightedProviderProps,
|
|
24
24
|
chartsSurfaceProps,
|
|
@@ -38,7 +38,7 @@ const useChartContainerProProps = (props, ref) => {
|
|
|
38
38
|
drawingProviderProps,
|
|
39
39
|
pluginProviderProps,
|
|
40
40
|
seriesProviderProps,
|
|
41
|
-
|
|
41
|
+
cartesianProviderProps,
|
|
42
42
|
zAxisContextProps,
|
|
43
43
|
highlightedProviderProps,
|
|
44
44
|
chartsSurfaceProps
|
package/node/Heatmap/Heatmap.js
CHANGED
|
@@ -285,6 +285,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
285
285
|
slotProps: _propTypes.default.object,
|
|
286
286
|
slots: _propTypes.default.object,
|
|
287
287
|
stroke: _propTypes.default.string,
|
|
288
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
288
289
|
tickFontSize: _propTypes.default.number,
|
|
289
290
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
290
291
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -297,6 +298,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
297
298
|
tickSize: _propTypes.default.number,
|
|
298
299
|
valueFormatter: _propTypes.default.func,
|
|
299
300
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
301
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
300
302
|
maxEnd: _propTypes.default.number,
|
|
301
303
|
maxSpan: _propTypes.default.number,
|
|
302
304
|
minSpan: _propTypes.default.number,
|
|
@@ -347,6 +349,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
347
349
|
slotProps: _propTypes.default.object,
|
|
348
350
|
slots: _propTypes.default.object,
|
|
349
351
|
stroke: _propTypes.default.string,
|
|
352
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
350
353
|
tickFontSize: _propTypes.default.number,
|
|
351
354
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
352
355
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -359,6 +362,7 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
359
362
|
tickSize: _propTypes.default.number,
|
|
360
363
|
valueFormatter: _propTypes.default.func,
|
|
361
364
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
365
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
362
366
|
maxEnd: _propTypes.default.number,
|
|
363
367
|
maxSpan: _propTypes.default.number,
|
|
364
368
|
minSpan: _propTypes.default.number,
|
|
@@ -151,6 +151,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
151
151
|
slotProps: _propTypes.default.object,
|
|
152
152
|
slots: _propTypes.default.object,
|
|
153
153
|
stroke: _propTypes.default.string,
|
|
154
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
154
155
|
tickFontSize: _propTypes.default.number,
|
|
155
156
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
156
157
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -163,6 +164,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
163
164
|
tickSize: _propTypes.default.number,
|
|
164
165
|
valueFormatter: _propTypes.default.func,
|
|
165
166
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
167
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
166
168
|
maxEnd: _propTypes.default.number,
|
|
167
169
|
maxSpan: _propTypes.default.number,
|
|
168
170
|
minSpan: _propTypes.default.number,
|
|
@@ -211,6 +213,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
211
213
|
slotProps: _propTypes.default.object,
|
|
212
214
|
slots: _propTypes.default.object,
|
|
213
215
|
stroke: _propTypes.default.string,
|
|
216
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
214
217
|
tickFontSize: _propTypes.default.number,
|
|
215
218
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
216
219
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -223,6 +226,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
|
|
|
223
226
|
tickSize: _propTypes.default.number,
|
|
224
227
|
valueFormatter: _propTypes.default.func,
|
|
225
228
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
229
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
226
230
|
maxEnd: _propTypes.default.number,
|
|
227
231
|
maxSpan: _propTypes.default.number,
|
|
228
232
|
minSpan: _propTypes.default.number,
|
|
@@ -280,6 +280,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
280
280
|
slotProps: _propTypes.default.object,
|
|
281
281
|
slots: _propTypes.default.object,
|
|
282
282
|
stroke: _propTypes.default.string,
|
|
283
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
283
284
|
tickFontSize: _propTypes.default.number,
|
|
284
285
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
285
286
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -292,6 +293,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
292
293
|
tickSize: _propTypes.default.number,
|
|
293
294
|
valueFormatter: _propTypes.default.func,
|
|
294
295
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
296
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
295
297
|
maxEnd: _propTypes.default.number,
|
|
296
298
|
maxSpan: _propTypes.default.number,
|
|
297
299
|
minSpan: _propTypes.default.number,
|
|
@@ -340,6 +342,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
340
342
|
slotProps: _propTypes.default.object,
|
|
341
343
|
slots: _propTypes.default.object,
|
|
342
344
|
stroke: _propTypes.default.string,
|
|
345
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
343
346
|
tickFontSize: _propTypes.default.number,
|
|
344
347
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
345
348
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -352,6 +355,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
352
355
|
tickSize: _propTypes.default.number,
|
|
353
356
|
valueFormatter: _propTypes.default.func,
|
|
354
357
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
358
|
+
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
355
359
|
maxEnd: _propTypes.default.number,
|
|
356
360
|
maxSpan: _propTypes.default.number,
|
|
357
361
|
minSpan: _propTypes.default.number,
|
|
@@ -1,50 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.
|
|
7
|
+
exports.CartesianProviderPro = CartesianProviderPro;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
9
|
var React = _interopRequireWildcard(require("react"));
|
|
8
10
|
var _internals = require("@mui/x-charts/internals");
|
|
9
11
|
var _useZoom = require("../ZoomProvider/useZoom");
|
|
12
|
+
var _createAxisFilterMapper = require("./createAxisFilterMapper");
|
|
10
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
16
|
const {
|
|
14
17
|
computeValue
|
|
15
18
|
} = _internals.cartesianProviderUtils;
|
|
16
|
-
function
|
|
19
|
+
function CartesianProviderPro(props) {
|
|
17
20
|
const {
|
|
18
21
|
xAxis,
|
|
19
22
|
yAxis,
|
|
20
|
-
dataset,
|
|
21
23
|
children
|
|
22
24
|
} = props;
|
|
23
25
|
const formattedSeries = (0, _internals.useSeries)();
|
|
24
26
|
const drawingArea = (0, _internals.useDrawingArea)();
|
|
25
27
|
const {
|
|
26
|
-
zoomData
|
|
28
|
+
zoomData,
|
|
29
|
+
options
|
|
27
30
|
} = (0, _useZoom.useZoom)();
|
|
28
31
|
const xExtremumGetters = (0, _internals.useXExtremumGetter)();
|
|
29
32
|
const yExtremumGetters = (0, _internals.useYExtremumGetter)();
|
|
33
|
+
const getFilters = React.useMemo(() => {
|
|
34
|
+
const xMapper = (0, _createAxisFilterMapper.createAxisFilterMapper)({
|
|
35
|
+
zoomData,
|
|
36
|
+
extremumGetter: xExtremumGetters,
|
|
37
|
+
formattedSeries,
|
|
38
|
+
direction: 'x'
|
|
39
|
+
});
|
|
40
|
+
const yMapper = (0, _createAxisFilterMapper.createAxisFilterMapper)({
|
|
41
|
+
zoomData,
|
|
42
|
+
extremumGetter: yExtremumGetters,
|
|
43
|
+
formattedSeries,
|
|
44
|
+
direction: 'y'
|
|
45
|
+
});
|
|
46
|
+
const xFilters = xAxis.reduce((acc, axis, index) => {
|
|
47
|
+
const filter = xMapper(axis, index);
|
|
48
|
+
if (filter !== null) {
|
|
49
|
+
acc[axis.id] = filter;
|
|
50
|
+
}
|
|
51
|
+
return acc;
|
|
52
|
+
}, {});
|
|
53
|
+
const yFilters = yAxis.reduce((acc, axis, index) => {
|
|
54
|
+
const filter = yMapper(axis, index);
|
|
55
|
+
if (filter !== null) {
|
|
56
|
+
acc[axis.id] = filter;
|
|
57
|
+
}
|
|
58
|
+
return acc;
|
|
59
|
+
}, {});
|
|
60
|
+
if (Object.keys(xFilters).length === 0 && Object.keys(yFilters).length === 0) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
return (0, _createAxisFilterMapper.createGetAxisFilters)((0, _extends2.default)({}, xFilters, yFilters));
|
|
64
|
+
}, [formattedSeries, xAxis, xExtremumGetters, yAxis, yExtremumGetters, zoomData]);
|
|
30
65
|
const xValues = React.useMemo(() => computeValue({
|
|
31
66
|
drawingArea,
|
|
32
67
|
formattedSeries,
|
|
33
68
|
axis: xAxis,
|
|
34
69
|
extremumGetters: xExtremumGetters,
|
|
35
|
-
dataset,
|
|
36
70
|
axisDirection: 'x',
|
|
37
|
-
zoomData
|
|
38
|
-
|
|
71
|
+
zoomData,
|
|
72
|
+
zoomOptions: options,
|
|
73
|
+
getFilters
|
|
74
|
+
}), [drawingArea, formattedSeries, xAxis, xExtremumGetters, zoomData, options, getFilters]);
|
|
39
75
|
const yValues = React.useMemo(() => computeValue({
|
|
40
76
|
drawingArea,
|
|
41
77
|
formattedSeries,
|
|
42
78
|
axis: yAxis,
|
|
43
79
|
extremumGetters: yExtremumGetters,
|
|
44
|
-
dataset,
|
|
45
80
|
axisDirection: 'y',
|
|
46
|
-
zoomData
|
|
47
|
-
|
|
81
|
+
zoomData,
|
|
82
|
+
zoomOptions: options,
|
|
83
|
+
getFilters
|
|
84
|
+
}), [drawingArea, formattedSeries, yAxis, yExtremumGetters, zoomData, options, getFilters]);
|
|
48
85
|
const value = React.useMemo(() => ({
|
|
49
86
|
isInitialized: true,
|
|
50
87
|
data: {
|