@mui/x-charts-pro 8.15.0 → 8.17.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.js +12 -2
- package/BarChartPro/BarChartPro.plugins.d.ts +1 -1
- package/BarChartPro/BarChartPro.plugins.js +1 -1
- package/CHANGELOG.md +207 -0
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -2
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -3
- package/ChartZoomSlider/ChartZoomSlider.d.ts +1 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -2
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -4
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -2
- package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +1 -2
- package/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
- package/FunnelChart/FunnelChart.js +1 -1
- package/FunnelChart/FunnelPlot.d.ts +1 -1
- package/FunnelChart/FunnelPlot.js +3 -23
- package/FunnelChart/coordinateMapper.d.ts +3 -0
- package/FunnelChart/coordinateMapper.js +18 -0
- package/FunnelChart/funnel.types.d.ts +1 -1
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.js +1 -2
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +7 -7
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +6 -44
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +3 -2
- package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +5 -6
- package/FunnelChart/seriesConfig/index.d.ts +1 -1
- package/FunnelChart/seriesConfig/index.js +4 -2
- package/FunnelChart/seriesConfig/tooltipPosition.d.ts +3 -0
- package/FunnelChart/seriesConfig/tooltipPosition.js +62 -0
- package/Heatmap/Heatmap.js +1 -1
- package/Heatmap/Heatmap.plugins.d.ts +1 -1
- package/Heatmap/Heatmap.plugins.js +1 -1
- package/Heatmap/HeatmapItem.d.ts +1 -1
- package/Heatmap/HeatmapPlot.d.ts +1 -2
- package/Heatmap/HeatmapPlot.js +0 -2
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -2
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.js +9 -2
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -2
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +0 -2
- package/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +3 -2
- package/Heatmap/seriesConfig/index.d.ts +1 -1
- package/Heatmap/seriesConfig/index.js +4 -2
- package/Heatmap/seriesConfig/tooltipPosition.d.ts +3 -0
- package/Heatmap/seriesConfig/tooltipPosition.js +57 -0
- package/LineChartPro/LineChartPro.js +11 -2
- package/LineChartPro/LineChartPro.plugins.d.ts +1 -1
- package/LineChartPro/LineChartPro.plugins.js +1 -1
- package/RadarChartPro/RadarChartPro.plugins.d.ts +1 -1
- package/RadarChartPro/RadarChartPro.plugins.js +1 -1
- package/SankeyChart/SankeyChart.js +1 -1
- package/SankeyChart/SankeyLinkElement.js +2 -2
- package/SankeyChart/SankeyNodeElement.js +2 -2
- package/SankeyChart/SankeyPlot.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -2
- package/SankeyChart/SankeyTooltip/SankeyTooltip.js +9 -2
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -2
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.js +0 -2
- package/SankeyChart/plugins/useSankeyHighlight.js +8 -12
- package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +19 -23
- package/SankeyChart/plugins/useSankeyHighlight.selectors.js +3 -3
- package/SankeyChart/seriesConfig/index.d.ts +1 -1
- package/SankeyChart/seriesConfig/index.js +2 -2
- package/ScatterChartPro/ScatterChartPro.js +11 -2
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +1 -1
- package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
- package/esm/BarChartPro/BarChartPro.js +12 -2
- package/esm/BarChartPro/BarChartPro.plugins.d.ts +1 -1
- package/esm/BarChartPro/BarChartPro.plugins.js +1 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -2
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -2
- package/esm/ChartZoomSlider/ChartZoomSlider.d.ts +1 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -2
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -3
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
- package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -2
- package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +1 -2
- package/esm/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
- package/esm/FunnelChart/FunnelChart.js +1 -1
- package/esm/FunnelChart/FunnelPlot.d.ts +1 -1
- package/esm/FunnelChart/FunnelPlot.js +4 -24
- package/esm/FunnelChart/coordinateMapper.d.ts +3 -0
- package/esm/FunnelChart/coordinateMapper.js +11 -0
- package/esm/FunnelChart/funnel.types.d.ts +1 -1
- package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.js +1 -2
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +7 -7
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +6 -44
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +3 -2
- package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +5 -6
- package/esm/FunnelChart/seriesConfig/index.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/index.js +3 -1
- package/esm/FunnelChart/seriesConfig/tooltipPosition.d.ts +3 -0
- package/esm/FunnelChart/seriesConfig/tooltipPosition.js +56 -0
- package/esm/Heatmap/Heatmap.js +1 -1
- package/esm/Heatmap/Heatmap.plugins.d.ts +1 -1
- package/esm/Heatmap/Heatmap.plugins.js +1 -1
- package/esm/Heatmap/HeatmapItem.d.ts +1 -1
- package/esm/Heatmap/HeatmapPlot.d.ts +1 -2
- package/esm/Heatmap/HeatmapPlot.js +0 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -2
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.js +9 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -2
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +0 -1
- package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +3 -2
- package/esm/Heatmap/seriesConfig/index.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/index.js +3 -1
- package/esm/Heatmap/seriesConfig/tooltipPosition.d.ts +3 -0
- package/esm/Heatmap/seriesConfig/tooltipPosition.js +51 -0
- package/esm/LineChartPro/LineChartPro.js +11 -2
- package/esm/LineChartPro/LineChartPro.plugins.d.ts +1 -1
- package/esm/LineChartPro/LineChartPro.plugins.js +1 -1
- package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +1 -1
- package/esm/RadarChartPro/RadarChartPro.plugins.js +1 -1
- package/esm/SankeyChart/SankeyChart.js +1 -1
- package/esm/SankeyChart/SankeyLinkElement.js +2 -2
- package/esm/SankeyChart/SankeyNodeElement.js +2 -2
- package/esm/SankeyChart/SankeyPlot.d.ts +1 -1
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -2
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.js +9 -1
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -2
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.js +0 -1
- package/esm/SankeyChart/plugins/useSankeyHighlight.js +8 -12
- package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +19 -23
- package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.js +3 -3
- package/esm/SankeyChart/seriesConfig/index.d.ts +1 -1
- package/esm/SankeyChart/seriesConfig/index.js +1 -1
- package/esm/ScatterChartPro/ScatterChartPro.js +11 -2
- package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +1 -1
- package/esm/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
- package/esm/index.js +1 -1
- package/esm/internals/material/components/BaseMenuItem.d.ts +1 -2
- package/esm/internals/material/components/BaseMenuItem.js +0 -1
- package/esm/internals/material/components/BasePopper.d.ts +1 -2
- package/esm/internals/plugins/allPlugins.d.ts +5 -5
- package/esm/internals/plugins/allPlugins.js +3 -3
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +19 -4
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.js +4 -3
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +11 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +23 -15
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +27 -15
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.js +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +8 -0
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +100 -0
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +8 -0
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +57 -0
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +2 -2
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +34 -54
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +11 -27
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
- package/esm/models/seriesType/heatmap.d.ts +1 -1
- package/index.js +1 -1
- package/internals/material/components/BaseMenuItem.d.ts +1 -2
- package/internals/material/components/BaseMenuItem.js +0 -2
- package/internals/material/components/BasePopper.d.ts +1 -2
- package/internals/plugins/allPlugins.d.ts +5 -5
- package/internals/plugins/allPlugins.js +2 -2
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +19 -4
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.js +4 -3
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +11 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +23 -15
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +27 -15
- package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.js +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +8 -0
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +107 -0
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +8 -0
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +64 -0
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +2 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.js +34 -54
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +11 -27
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
- package/models/seriesType/heatmap.d.ts +1 -1
- package/package.json +4 -4
|
@@ -19,6 +19,8 @@ var _useZoomOnPinch = require("./gestureHooks/useZoomOnPinch");
|
|
|
19
19
|
var _usePanOnDrag = require("./gestureHooks/usePanOnDrag");
|
|
20
20
|
var _useZoomOnTapAndDrag = require("./gestureHooks/useZoomOnTapAndDrag");
|
|
21
21
|
var _usePanOnPressAndDrag = require("./gestureHooks/usePanOnPressAndDrag");
|
|
22
|
+
var _useZoomOnBrush = require("./gestureHooks/useZoomOnBrush");
|
|
23
|
+
var _useZoomOnDoubleTapReset = require("./gestureHooks/useZoomOnDoubleTapReset");
|
|
22
24
|
var _initializeZoomInteractionConfig = require("./initializeZoomInteractionConfig");
|
|
23
25
|
var _initializeZoomData = require("./initializeZoomData");
|
|
24
26
|
const useChartProZoom = pluginData => {
|
|
@@ -34,68 +36,44 @@ const useChartProZoom = pluginData => {
|
|
|
34
36
|
const onZoomChange = (0, _utils.useEventCallback)(onZoomChangeProp ?? (() => {}));
|
|
35
37
|
const optionsLookup = (0, _internals.useSelector)(store, _internals.selectorChartZoomOptionsLookup);
|
|
36
38
|
(0, _useEffectAfterFirstRender.useEffectAfterFirstRender)(() => {
|
|
37
|
-
store.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(zoomInteractionConfig)
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
});
|
|
39
|
+
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
40
|
+
zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(zoomInteractionConfig)
|
|
41
|
+
}));
|
|
44
42
|
}, [store, zoomInteractionConfig]);
|
|
45
43
|
|
|
44
|
+
// This is debounced. We want to run it only once after the interaction ends.
|
|
45
|
+
const removeIsInteracting = React.useMemo(() => (0, _debounce.default)(() => store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
46
|
+
isInteracting: false
|
|
47
|
+
})), 166), [store]);
|
|
48
|
+
|
|
46
49
|
// Manage controlled state
|
|
47
50
|
React.useEffect(() => {
|
|
48
51
|
if (paramsZoomData === undefined) {
|
|
49
|
-
return
|
|
52
|
+
return;
|
|
50
53
|
}
|
|
51
|
-
store.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
const timeout = setTimeout(() => {
|
|
63
|
-
store.update(prevState => {
|
|
64
|
-
return (0, _extends2.default)({}, prevState, {
|
|
65
|
-
zoom: (0, _extends2.default)({}, prevState.zoom, {
|
|
66
|
-
isInteracting: false
|
|
67
|
-
})
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}, 166);
|
|
71
|
-
return () => {
|
|
72
|
-
clearTimeout(timeout);
|
|
73
|
-
};
|
|
74
|
-
}, [store, paramsZoomData]);
|
|
75
|
-
|
|
76
|
-
// This is debounced. We want to run it only once after the interaction ends.
|
|
77
|
-
const removeIsInteracting = React.useMemo(() => (0, _debounce.default)(() => store.update(prevState => {
|
|
78
|
-
return (0, _extends2.default)({}, prevState, {
|
|
79
|
-
zoom: (0, _extends2.default)({}, prevState.zoom, {
|
|
80
|
-
isInteracting: false
|
|
81
|
-
})
|
|
82
|
-
});
|
|
83
|
-
}), 166), [store]);
|
|
54
|
+
if (process.env.NODE_ENV !== 'production' && !store.state.zoom.isControlled) {
|
|
55
|
+
console.error([`MUI X Charts: A chart component is changing the \`zoomData\` from uncontrolled to controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', 'Decide between using a controlled or uncontrolled for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
|
|
56
|
+
}
|
|
57
|
+
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
58
|
+
isInteracting: true,
|
|
59
|
+
zoomData: paramsZoomData
|
|
60
|
+
}));
|
|
61
|
+
removeIsInteracting();
|
|
62
|
+
}, [store, paramsZoomData, removeIsInteracting]);
|
|
84
63
|
const setZoomDataCallback = React.useCallback(zoomData => {
|
|
85
|
-
store.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
64
|
+
const newZoomData = typeof zoomData === 'function' ? zoomData([...store.state.zoom.zoomData]) : zoomData;
|
|
65
|
+
onZoomChange(newZoomData);
|
|
66
|
+
if (store.state.zoom.isControlled) {
|
|
67
|
+
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
68
|
+
isInteracting: true
|
|
69
|
+
}));
|
|
70
|
+
} else {
|
|
71
|
+
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
72
|
+
isInteracting: true,
|
|
73
|
+
zoomData: newZoomData
|
|
74
|
+
}));
|
|
91
75
|
removeIsInteracting();
|
|
92
|
-
|
|
93
|
-
zoom: (0, _extends2.default)({}, prevState.zoom, {
|
|
94
|
-
isInteracting: true,
|
|
95
|
-
zoomData: newZoomData
|
|
96
|
-
})
|
|
97
|
-
});
|
|
98
|
-
});
|
|
76
|
+
}
|
|
99
77
|
}, [onZoomChange, store, removeIsInteracting]);
|
|
100
78
|
const setAxisZoomData = React.useCallback((axisId, zoomData) => {
|
|
101
79
|
setZoomDataCallback(prev => prev.map(prevZoom => {
|
|
@@ -145,6 +123,8 @@ const useChartProZoom = pluginData => {
|
|
|
145
123
|
(0, _useZoomOnWheel.useZoomOnWheel)(pluginData, setZoomDataCallback);
|
|
146
124
|
(0, _useZoomOnPinch.useZoomOnPinch)(pluginData, setZoomDataCallback);
|
|
147
125
|
(0, _useZoomOnTapAndDrag.useZoomOnTapAndDrag)(pluginData, setZoomDataCallback);
|
|
126
|
+
(0, _useZoomOnBrush.useZoomOnBrush)(pluginData, setZoomDataCallback);
|
|
127
|
+
(0, _useZoomOnDoubleTapReset.useZoomOnDoubleTapReset)(pluginData, setZoomDataCallback);
|
|
148
128
|
const zoom = React.useCallback(step => {
|
|
149
129
|
setZoomDataCallback(prev => prev.map(zoomData => {
|
|
150
130
|
const zoomOptions = (0, _internals.selectorChartAxisZoomOptionsLookup)(store.getSnapshot(), zoomData.axisId);
|
|
@@ -1,34 +1,18 @@
|
|
|
1
1
|
import { AxisId, ChartRootSelector } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProZoomSignature } from "./useChartProZoom.types.js";
|
|
3
|
-
export declare const selectorChartZoomState: ChartRootSelector<UseChartProZoomSignature>;
|
|
4
|
-
export declare const selectorChartZoomIsInteracting:
|
|
3
|
+
export declare const selectorChartZoomState: ChartRootSelector<UseChartProZoomSignature, 'zoom'>;
|
|
4
|
+
export declare const selectorChartZoomIsInteracting: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
5
5
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
6
|
-
}
|
|
6
|
+
}) => boolean;
|
|
7
|
+
export declare const selectorChartZoomIsEnabled: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
7
8
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
8
|
-
}
|
|
9
|
-
export declare const
|
|
9
|
+
}) => boolean;
|
|
10
|
+
export declare const selectorChartAxisZoomData: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
10
11
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
11
|
-
}
|
|
12
|
+
}, axisId: AxisId) => import("@mui/x-charts/internals").ZoomData | undefined;
|
|
13
|
+
export declare const selectorChartCanZoomOut: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
12
14
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
13
|
-
}
|
|
15
|
+
}) => boolean;
|
|
16
|
+
export declare const selectorChartCanZoomIn: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
14
17
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
15
|
-
}
|
|
16
|
-
export declare const selectorChartAxisZoomData: import("reselect").Selector<any, import("@mui/x-charts/internals").ZoomData | undefined, [axisId: AxisId]>;
|
|
17
|
-
export declare const selectorChartCanZoomOut: import("reselect").Selector<import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
18
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
19
|
-
} & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
20
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
21
|
-
} & {
|
|
22
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
23
|
-
} & {
|
|
24
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
25
|
-
}, boolean, any[]>;
|
|
26
|
-
export declare const selectorChartCanZoomIn: import("reselect").Selector<import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
27
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
28
|
-
} & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
29
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
30
|
-
} & {
|
|
31
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
32
|
-
} & {
|
|
33
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
34
|
-
}, boolean, any[]>;
|
|
18
|
+
}) => boolean;
|
|
@@ -9,7 +9,7 @@ const selectorChartZoomState = state => state.zoom;
|
|
|
9
9
|
exports.selectorChartZoomState = selectorChartZoomState;
|
|
10
10
|
const selectorChartZoomIsInteracting = exports.selectorChartZoomIsInteracting = (0, _internals.createSelector)([selectorChartZoomState], zoom => zoom.isInteracting);
|
|
11
11
|
const selectorChartZoomIsEnabled = exports.selectorChartZoomIsEnabled = (0, _internals.createSelector)([_internals.selectorChartZoomOptionsLookup], optionsLookup => Object.keys(optionsLookup).length > 0);
|
|
12
|
-
const selectorChartAxisZoomData = exports.selectorChartAxisZoomData = (0, _internals.createSelector)([_internals.selectorChartZoomMap
|
|
12
|
+
const selectorChartAxisZoomData = exports.selectorChartAxisZoomData = (0, _internals.createSelector)([_internals.selectorChartZoomMap], (zoomMap, axisId) => zoomMap?.get(axisId));
|
|
13
13
|
const selectorChartCanZoomOut = exports.selectorChartCanZoomOut = (0, _internals.createSelector)([selectorChartZoomState, _internals.selectorChartZoomOptionsLookup], (zoomState, zoomOptions) => {
|
|
14
14
|
return zoomState.zoomData.every(zoomData => {
|
|
15
15
|
const span = zoomData.end - zoomData.start;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature, UseChartCartesianAxisDefaultizedParameters, ZoomData, AxisId } from '@mui/x-charts/internals';
|
|
1
|
+
import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature, UseChartCartesianAxisDefaultizedParameters, ZoomData, AxisId, type UseChartBrushSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import { ZoomInteractionConfig, DefaultizedZoomInteractionConfig } from "./ZoomInteractionConfig.types.js";
|
|
3
3
|
export interface UseChartProZoomParameters {
|
|
4
4
|
/**
|
|
@@ -80,5 +80,5 @@ export type UseChartProZoomSignature = ChartPluginSignature<{
|
|
|
80
80
|
state: UseChartProZoomState;
|
|
81
81
|
publicAPI: UseChartProZoomPublicApi;
|
|
82
82
|
instance: UseChartProZoomInstance;
|
|
83
|
-
dependencies: [UseChartSeriesSignature, UseChartCartesianAxisSignature];
|
|
83
|
+
dependencies: [UseChartSeriesSignature, UseChartCartesianAxisSignature, UseChartBrushSignature];
|
|
84
84
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import { CommonDefaultizedProps, CommonSeriesType, CartesianSeriesType } from '@mui/x-charts/internals';
|
|
3
3
|
export type HeatmapValueType = readonly [number, number, number];
|
|
4
|
-
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType>, 'color'>, CartesianSeriesType {
|
|
4
|
+
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType>, 'color' | 'colorGetter'>, CartesianSeriesType {
|
|
5
5
|
type: 'heatmap';
|
|
6
6
|
/**
|
|
7
7
|
* Data associated to each bar.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts-pro",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.17.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Pro plan edition of the MUI X Charts components.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@mui/utils": "^7.3.3",
|
|
32
32
|
"clsx": "^2.1.1",
|
|
33
33
|
"prop-types": "^15.8.1",
|
|
34
|
+
"@mui/x-charts": "8.17.0",
|
|
34
35
|
"@mui/x-charts-vendor": "8.15.0",
|
|
35
|
-
"@mui/x-charts": "8.15.0",
|
|
36
36
|
"@mui/x-internal-gestures": "0.3.4",
|
|
37
|
-
"@mui/x-
|
|
38
|
-
"@mui/x-
|
|
37
|
+
"@mui/x-license": "8.17.0",
|
|
38
|
+
"@mui/x-internals": "8.17.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@emotion/react": "^11.9.0",
|