@mui/x-charts-pro 8.1.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChartPro/BarChartPro.d.ts +7 -1
- package/BarChartPro/BarChartPro.js +62 -5
- package/CHANGELOG.md +233 -7
- package/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
- package/ChartZoomSlider/ChartZoomSlider.d.ts +5 -0
- package/ChartZoomSlider/ChartZoomSlider.js +47 -0
- package/ChartZoomSlider/index.d.ts +2 -0
- package/ChartZoomSlider/index.js +27 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +23 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +348 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.d.ts +12 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.js +92 -0
- package/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.d.ts +17 -0
- package/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.js +27 -0
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -0
- package/ChartsToolbarPro/ChartsToolbarPro.js +31 -0
- package/ChartsToolbarPro/index.d.ts +1 -0
- package/ChartsToolbarPro/index.js +16 -0
- package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +13 -0
- package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +36 -0
- package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +13 -0
- package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +36 -0
- package/FunnelChart/FunnelChart.js +9 -8
- package/FunnelChart/FunnelPlot.d.ts +5 -0
- package/FunnelChart/FunnelPlot.js +36 -18
- package/FunnelChart/FunnelSection.d.ts +1 -0
- package/FunnelChart/FunnelSection.js +12 -7
- package/FunnelChart/curves/borderRadiusPolygon.d.ts +8 -0
- package/FunnelChart/curves/borderRadiusPolygon.js +42 -0
- package/FunnelChart/curves/bump.d.ts +27 -0
- package/FunnelChart/curves/bump.js +81 -0
- package/FunnelChart/curves/curve.types.d.ts +38 -0
- package/FunnelChart/curves/curve.types.js +5 -0
- package/FunnelChart/curves/getFunnelCurve.d.ts +3 -0
- package/FunnelChart/curves/getFunnelCurve.js +30 -0
- package/FunnelChart/curves/index.d.ts +2 -0
- package/FunnelChart/curves/index.js +27 -0
- package/FunnelChart/curves/linear.d.ts +32 -0
- package/FunnelChart/curves/linear.js +88 -0
- package/FunnelChart/curves/pyramid.d.ts +34 -0
- package/FunnelChart/curves/pyramid.js +127 -0
- package/FunnelChart/curves/step-pyramid.d.ts +31 -0
- package/FunnelChart/curves/step-pyramid.js +107 -0
- package/FunnelChart/curves/step.d.ts +32 -0
- package/FunnelChart/curves/step.js +88 -0
- package/FunnelChart/curves/utils.d.ts +4 -0
- package/FunnelChart/curves/utils.js +29 -0
- package/FunnelChart/funnel.types.d.ts +25 -4
- package/FunnelChart/funnelPlotSlots.types.d.ts +1 -1
- package/FunnelChart/funnelSectionClasses.d.ts +6 -2
- package/FunnelChart/funnelSectionClasses.js +5 -2
- package/FunnelChart/index.d.ts +3 -2
- package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +1 -0
- package/FunnelChart/useFunnelChartProps.d.ts +1 -6
- package/FunnelChart/useFunnelChartProps.js +7 -15
- package/Heatmap/Heatmap.d.ts +3 -3
- package/Heatmap/Heatmap.js +3 -21
- package/LineChartPro/LineChartPro.d.ts +7 -1
- package/LineChartPro/LineChartPro.js +62 -5
- package/ScatterChartPro/ScatterChartPro.d.ts +7 -1
- package/ScatterChartPro/ScatterChartPro.js +62 -5
- package/esm/BarChartPro/BarChartPro.d.ts +7 -1
- package/esm/BarChartPro/BarChartPro.js +62 -5
- package/esm/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
- package/esm/ChartZoomSlider/ChartZoomSlider.d.ts +5 -0
- package/esm/ChartZoomSlider/ChartZoomSlider.js +41 -0
- package/esm/ChartZoomSlider/index.d.ts +2 -0
- package/esm/ChartZoomSlider/index.js +2 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +23 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +339 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.d.ts +12 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.js +85 -0
- package/esm/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.d.ts +17 -0
- package/esm/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.js +17 -0
- package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -0
- package/esm/ChartsToolbarPro/ChartsToolbarPro.js +24 -0
- package/esm/ChartsToolbarPro/index.d.ts +1 -0
- package/esm/ChartsToolbarPro/index.js +1 -0
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +13 -0
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +29 -0
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +13 -0
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +29 -0
- package/esm/FunnelChart/FunnelChart.js +9 -8
- package/esm/FunnelChart/FunnelPlot.d.ts +5 -0
- package/esm/FunnelChart/FunnelPlot.js +37 -19
- package/esm/FunnelChart/FunnelSection.d.ts +1 -0
- package/esm/FunnelChart/FunnelSection.js +12 -7
- package/esm/FunnelChart/curves/borderRadiusPolygon.d.ts +8 -0
- package/esm/FunnelChart/curves/borderRadiusPolygon.js +36 -0
- package/esm/FunnelChart/curves/bump.d.ts +27 -0
- package/esm/FunnelChart/curves/bump.js +74 -0
- package/esm/FunnelChart/curves/curve.types.d.ts +38 -0
- package/esm/FunnelChart/curves/curve.types.js +1 -0
- package/esm/FunnelChart/curves/getFunnelCurve.d.ts +3 -0
- package/esm/FunnelChart/curves/getFunnelCurve.js +23 -0
- package/esm/FunnelChart/curves/index.d.ts +2 -0
- package/esm/FunnelChart/curves/index.js +2 -0
- package/esm/FunnelChart/curves/linear.d.ts +32 -0
- package/esm/FunnelChart/curves/linear.js +82 -0
- package/esm/FunnelChart/curves/pyramid.d.ts +34 -0
- package/esm/FunnelChart/curves/pyramid.js +121 -0
- package/esm/FunnelChart/curves/step-pyramid.d.ts +31 -0
- package/esm/FunnelChart/curves/step-pyramid.js +101 -0
- package/esm/FunnelChart/curves/step.d.ts +32 -0
- package/esm/FunnelChart/curves/step.js +82 -0
- package/esm/FunnelChart/curves/utils.d.ts +4 -0
- package/esm/FunnelChart/curves/utils.js +19 -0
- package/esm/FunnelChart/funnel.types.d.ts +25 -4
- package/esm/FunnelChart/funnelPlotSlots.types.d.ts +1 -1
- package/esm/FunnelChart/funnelSectionClasses.d.ts +6 -2
- package/esm/FunnelChart/funnelSectionClasses.js +5 -2
- package/esm/FunnelChart/index.d.ts +3 -2
- package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +1 -0
- package/esm/FunnelChart/useFunnelChartProps.d.ts +1 -6
- package/esm/FunnelChart/useFunnelChartProps.js +7 -15
- package/esm/Heatmap/Heatmap.d.ts +3 -3
- package/esm/Heatmap/Heatmap.js +3 -21
- package/esm/LineChartPro/LineChartPro.d.ts +7 -1
- package/esm/LineChartPro/LineChartPro.js +62 -5
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +7 -1
- package/esm/ScatterChartPro/ScatterChartPro.js +62 -5
- package/esm/index.d.ts +4 -1
- package/esm/index.js +5 -2
- package/esm/internals/material/icons.d.ts +3 -0
- package/esm/internals/material/icons.js +13 -0
- package/esm/internals/material/index.d.ts +4 -0
- package/esm/internals/material/index.js +12 -0
- package/esm/internals/plugins/useChartProExport/common.d.ts +1 -0
- package/esm/internals/plugins/useChartProExport/common.js +8 -0
- package/esm/internals/plugins/useChartProExport/exportImage.d.ts +3 -0
- package/esm/internals/plugins/useChartProExport/exportImage.js +85 -0
- package/esm/internals/plugins/useChartProExport/print.js +6 -50
- package/esm/internals/plugins/useChartProExport/useChartProExport.js +22 -2
- package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +32 -0
- package/esm/internals/plugins/useChartProZoom/calculateZoom.d.ts +23 -0
- package/esm/internals/plugins/useChartProZoom/calculateZoom.js +32 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +46 -4
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +84 -32
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +3 -2
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +17 -2
- package/esm/internals/slots/chartBaseSlotProps.d.ts +10 -0
- package/esm/internals/slots/chartBaseSlotProps.js +1 -0
- package/esm/internals/slots/chartsBaseSlots.d.ts +6 -0
- package/esm/internals/slots/chartsBaseSlots.js +1 -0
- package/esm/internals/slots/chartsIconSlots.d.ts +14 -0
- package/esm/internals/slots/chartsIconSlots.js +1 -0
- package/esm/themeAugmentation/components.d.ts +0 -4
- package/esm/themeAugmentation/components.js +1 -0
- package/esm/themeAugmentation/index.d.ts +3 -3
- package/esm/themeAugmentation/overrides.d.ts +0 -3
- package/esm/themeAugmentation/overrides.js +2 -0
- package/esm/themeAugmentation/props.d.ts +0 -6
- package/esm/themeAugmentation/props.js +2 -0
- package/esm/typeOverloads/modules.d.ts +1 -1
- package/index.d.ts +4 -1
- package/index.js +90 -1
- package/internals/material/icons.d.ts +3 -0
- package/internals/material/icons.js +20 -0
- package/internals/material/index.d.ts +4 -0
- package/internals/material/index.js +19 -0
- package/internals/plugins/useChartProExport/common.d.ts +1 -0
- package/internals/plugins/useChartProExport/common.js +14 -0
- package/internals/plugins/useChartProExport/exportImage.d.ts +3 -0
- package/internals/plugins/useChartProExport/exportImage.js +95 -0
- package/internals/plugins/useChartProExport/print.js +6 -50
- package/internals/plugins/useChartProExport/useChartProExport.js +22 -2
- package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +32 -0
- package/internals/plugins/useChartProZoom/calculateZoom.d.ts +23 -0
- package/internals/plugins/useChartProZoom/calculateZoom.js +39 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +45 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +84 -32
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +3 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +17 -2
- package/internals/slots/chartBaseSlotProps.d.ts +10 -0
- package/internals/slots/chartBaseSlotProps.js +5 -0
- package/internals/slots/chartsBaseSlots.d.ts +6 -0
- package/internals/slots/chartsBaseSlots.js +5 -0
- package/internals/slots/chartsIconSlots.d.ts +14 -0
- package/internals/slots/chartsIconSlots.js +5 -0
- package/package.json +10 -7
- package/themeAugmentation/components.d.ts +0 -4
- package/themeAugmentation/components.js +5 -0
- package/themeAugmentation/index.d.ts +3 -3
- package/themeAugmentation/overrides.d.ts +0 -3
- package/themeAugmentation/overrides.js +5 -0
- package/themeAugmentation/props.d.ts +0 -6
- package/themeAugmentation/props.js +5 -0
- package/typeOverloads/modules.d.ts +1 -1
- package/FunnelChart/funnelStepCurve.d.ts +0 -4
- package/FunnelChart/funnelStepCurve.js +0 -74
- package/esm/FunnelChart/funnelStepCurve.d.ts +0 -4
- package/esm/FunnelChart/funnelStepCurve.js +0 -67
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DefaultizedZoomOptions, ZoomData } from '@mui/x-charts/internals';
|
|
2
|
+
/**
|
|
3
|
+
* Calculates the new zoom range based on the current zoom, step, and constraints.
|
|
4
|
+
*
|
|
5
|
+
* A step of 0.1 or -0.1 means that 10% of the current range will be subtracted/added, respectively, and assuming no
|
|
6
|
+
* constraints (e.g., minSpan, maxEnd) are faced.
|
|
7
|
+
*
|
|
8
|
+
* @param zoom Current zoom range with start and end values.
|
|
9
|
+
* @param step Percentage of the current zoom range to adjust (positive to zoom in, negative to zoom out). Ranges from 0 to 1.
|
|
10
|
+
* @param minSpan Minimum allowed span between start and end values.
|
|
11
|
+
* @param maxSpan Maximum allowed span between start and end values.
|
|
12
|
+
* @param minStart Minimum allowed start value.
|
|
13
|
+
* @param maxEnd Maximum allowed end value.
|
|
14
|
+
*/
|
|
15
|
+
export declare function calculateZoom<T extends Readonly<Pick<ZoomData, 'start' | 'end'>>>(zoom: T, step: number, {
|
|
16
|
+
minSpan,
|
|
17
|
+
maxSpan,
|
|
18
|
+
minStart,
|
|
19
|
+
maxEnd
|
|
20
|
+
}: Pick<DefaultizedZoomOptions, 'minSpan' | 'maxSpan' | 'minStart' | 'maxEnd'>): T & {
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
23
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.calculateZoom = calculateZoom;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
/**
|
|
10
|
+
* Calculates the new zoom range based on the current zoom, step, and constraints.
|
|
11
|
+
*
|
|
12
|
+
* A step of 0.1 or -0.1 means that 10% of the current range will be subtracted/added, respectively, and assuming no
|
|
13
|
+
* constraints (e.g., minSpan, maxEnd) are faced.
|
|
14
|
+
*
|
|
15
|
+
* @param zoom Current zoom range with start and end values.
|
|
16
|
+
* @param step Percentage of the current zoom range to adjust (positive to zoom in, negative to zoom out). Ranges from 0 to 1.
|
|
17
|
+
* @param minSpan Minimum allowed span between start and end values.
|
|
18
|
+
* @param maxSpan Maximum allowed span between start and end values.
|
|
19
|
+
* @param minStart Minimum allowed start value.
|
|
20
|
+
* @param maxEnd Maximum allowed end value.
|
|
21
|
+
*/
|
|
22
|
+
function calculateZoom(zoom, step, {
|
|
23
|
+
minSpan,
|
|
24
|
+
maxSpan,
|
|
25
|
+
minStart,
|
|
26
|
+
maxEnd
|
|
27
|
+
}) {
|
|
28
|
+
const span = zoom.end - zoom.start;
|
|
29
|
+
let delta = span * step / 2;
|
|
30
|
+
if (delta > 0) {
|
|
31
|
+
delta = Math.min(delta, (span - minSpan) / 2);
|
|
32
|
+
} else {
|
|
33
|
+
delta = Math.max(delta, (span - maxSpan) / 2);
|
|
34
|
+
}
|
|
35
|
+
return (0, _extends2.default)({}, zoom, {
|
|
36
|
+
start: Math.max(minStart, zoom.start + delta),
|
|
37
|
+
end: Math.min(maxEnd, zoom.end - delta)
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ChartPlugin, AxisId, DefaultizedZoomOptions, ZoomData } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProZoomSignature } from "./useChartProZoom.types.js";
|
|
3
|
-
export declare function initializeZoomData(options: Record<AxisId, DefaultizedZoomOptions
|
|
3
|
+
export declare function initializeZoomData(options: Record<AxisId, Pick<DefaultizedZoomOptions, 'axisId' | 'minStart' | 'maxEnd'>>, zoomData?: readonly ZoomData[]): ZoomData[];
|
|
4
4
|
export declare const useChartProZoom: ChartPlugin<UseChartProZoomSignature>;
|
|
@@ -14,6 +14,7 @@ var _internals = require("@mui/x-charts/internals");
|
|
|
14
14
|
var _utils = require("@mui/material/utils");
|
|
15
15
|
var _rafThrottle = require("@mui/x-internals/rafThrottle");
|
|
16
16
|
var _debounce = _interopRequireDefault(require("@mui/utils/debounce"));
|
|
17
|
+
var _calculateZoom = require("./calculateZoom");
|
|
17
18
|
var _useChartProZoom = require("./useChartProZoom.utils");
|
|
18
19
|
// It is helpful to avoid the need to provide the possibly auto-generated id for each axis.
|
|
19
20
|
function initializeZoomData(options, zoomData) {
|
|
@@ -61,7 +62,7 @@ const useChartProZoom = ({
|
|
|
61
62
|
}
|
|
62
63
|
store.update(prevState => {
|
|
63
64
|
if (process.env.NODE_ENV !== 'production' && !prevState.zoom.isControlled) {
|
|
64
|
-
console.error([`MUI X: 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'));
|
|
65
|
+
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'));
|
|
65
66
|
}
|
|
66
67
|
return (0, _extends2.default)({}, prevState, {
|
|
67
68
|
zoom: (0, _extends2.default)({}, prevState.zoom, {
|
|
@@ -108,6 +109,34 @@ const useChartProZoom = ({
|
|
|
108
109
|
});
|
|
109
110
|
});
|
|
110
111
|
}, [onZoomChange, store, removeIsInteracting]);
|
|
112
|
+
const moveZoomRange = React.useCallback((axisId, by) => {
|
|
113
|
+
setZoomDataCallback(prevZoomData => {
|
|
114
|
+
return prevZoomData.map(zoom => {
|
|
115
|
+
if (zoom.axisId !== axisId) {
|
|
116
|
+
return zoom;
|
|
117
|
+
}
|
|
118
|
+
const options = optionsLookup[axisId];
|
|
119
|
+
if (!options) {
|
|
120
|
+
return zoom;
|
|
121
|
+
}
|
|
122
|
+
let start = zoom.start;
|
|
123
|
+
let end = zoom.end;
|
|
124
|
+
if (by > 0) {
|
|
125
|
+
const span = end - start;
|
|
126
|
+
end = Math.min(end + by, options.maxEnd);
|
|
127
|
+
start = end - span;
|
|
128
|
+
} else {
|
|
129
|
+
const span = end - start;
|
|
130
|
+
start = Math.max(start + by, options.minStart);
|
|
131
|
+
end = start + span;
|
|
132
|
+
}
|
|
133
|
+
return (0, _extends2.default)({}, zoom, {
|
|
134
|
+
start,
|
|
135
|
+
end
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}, [optionsLookup, setZoomDataCallback]);
|
|
111
140
|
React.useEffect(() => {
|
|
112
141
|
return () => {
|
|
113
142
|
removeIsInteracting.clear();
|
|
@@ -334,12 +363,25 @@ const useChartProZoom = ({
|
|
|
334
363
|
rafThrottledSetZoomData.clear();
|
|
335
364
|
};
|
|
336
365
|
}, [svgRef, drawingArea, isZoomEnabled, optionsLookup, instance, setZoomDataCallback]);
|
|
366
|
+
const zoom = React.useCallback(step => {
|
|
367
|
+
setZoomDataCallback(prev => prev.map(zoomData => {
|
|
368
|
+
const zoomOptions = (0, _internals.selectorChartAxisZoomOptionsLookup)(store.getSnapshot(), zoomData.axisId);
|
|
369
|
+
return (0, _calculateZoom.calculateZoom)(zoomData, step, zoomOptions);
|
|
370
|
+
}));
|
|
371
|
+
}, [setZoomDataCallback, store]);
|
|
372
|
+
const zoomIn = React.useCallback(() => zoom(0.1), [zoom]);
|
|
373
|
+
const zoomOut = React.useCallback(() => zoom(-0.1), [zoom]);
|
|
337
374
|
return {
|
|
338
375
|
publicAPI: {
|
|
339
|
-
setZoomData: setZoomDataCallback
|
|
376
|
+
setZoomData: setZoomDataCallback,
|
|
377
|
+
zoomIn,
|
|
378
|
+
zoomOut
|
|
340
379
|
},
|
|
341
380
|
instance: {
|
|
342
|
-
setZoomData: setZoomDataCallback
|
|
381
|
+
setZoomData: setZoomDataCallback,
|
|
382
|
+
moveZoomRange,
|
|
383
|
+
zoomIn,
|
|
384
|
+
zoomOut
|
|
343
385
|
}
|
|
344
386
|
};
|
|
345
387
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ChartRootSelector } from '@mui/x-charts/internals';
|
|
1
|
+
import { AxisId, ChartRootSelector } from '@mui/x-charts/internals';
|
|
2
2
|
import { UseChartProZoomSignature } from "./useChartProZoom.types.js";
|
|
3
3
|
export declare const selectorChartZoomState: ChartRootSelector<UseChartProZoomSignature>;
|
|
4
|
-
export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & 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("./useChartProZoom.types").UseChartProZoomState & Partial<{}> & {
|
|
4
|
+
export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & 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("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
5
5
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
6
6
|
}) => boolean) & {
|
|
7
7
|
clearCache: () => void;
|
|
@@ -62,11 +62,11 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
|
|
|
62
62
|
resultsCount: () => number;
|
|
63
63
|
resetResultsCount: () => void;
|
|
64
64
|
} & {
|
|
65
|
-
resultFunc: (resultFuncArgs_0: Record<
|
|
65
|
+
resultFunc: (resultFuncArgs_0: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>, resultFuncArgs_1: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) => {
|
|
66
66
|
[x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
67
67
|
[x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
68
68
|
};
|
|
69
|
-
memoizedResultFunc: ((resultFuncArgs_0: Record<
|
|
69
|
+
memoizedResultFunc: ((resultFuncArgs_0: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>, resultFuncArgs_1: Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) => {
|
|
70
70
|
[x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
71
71
|
[x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
|
|
72
72
|
}) & {
|
|
@@ -80,41 +80,41 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
|
|
|
80
80
|
};
|
|
81
81
|
dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & 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 & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
82
82
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
83
|
-
}) => Record<
|
|
83
|
+
}) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
84
84
|
clearCache: () => void;
|
|
85
85
|
resultsCount: () => number;
|
|
86
86
|
resetResultsCount: () => void;
|
|
87
87
|
} & {
|
|
88
|
-
resultFunc: (resultFuncArgs_0: import("@mui/x-charts
|
|
89
|
-
memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts
|
|
88
|
+
resultFunc: (resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
89
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
90
90
|
clearCache: () => void;
|
|
91
91
|
resultsCount: () => number;
|
|
92
92
|
resetResultsCount: () => void;
|
|
93
93
|
};
|
|
94
|
-
lastResult: () => Record<
|
|
94
|
+
lastResult: () => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
95
95
|
dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & 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 & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
96
96
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
97
|
-
}) => import("@mui/x-charts
|
|
97
|
+
}) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) & {
|
|
98
98
|
clearCache: () => void;
|
|
99
99
|
resultsCount: () => number;
|
|
100
100
|
resetResultsCount: () => void;
|
|
101
101
|
} & {
|
|
102
102
|
resultFunc: (resultFuncArgs_0: {
|
|
103
|
-
x: import("@mui/x-charts
|
|
104
|
-
y: import("@mui/x-charts
|
|
105
|
-
} | undefined) => import("@mui/x-charts
|
|
103
|
+
x: import("@mui/x-charts/internals").DefaultedXAxis[];
|
|
104
|
+
y: import("@mui/x-charts/internals").DefaultedYAxis[];
|
|
105
|
+
} | undefined) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined;
|
|
106
106
|
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
107
|
-
x: import("@mui/x-charts
|
|
108
|
-
y: import("@mui/x-charts
|
|
109
|
-
} | undefined) => import("@mui/x-charts
|
|
107
|
+
x: import("@mui/x-charts/internals").DefaultedXAxis[];
|
|
108
|
+
y: import("@mui/x-charts/internals").DefaultedYAxis[];
|
|
109
|
+
} | undefined) => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) & {
|
|
110
110
|
clearCache: () => void;
|
|
111
111
|
resultsCount: () => number;
|
|
112
112
|
resetResultsCount: () => void;
|
|
113
113
|
};
|
|
114
|
-
lastResult: () => import("@mui/x-charts
|
|
114
|
+
lastResult: () => import("@mui/x-charts/internals").DefaultedXAxis[] | undefined;
|
|
115
115
|
dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
|
|
116
|
-
x: import("@mui/x-charts
|
|
117
|
-
y: import("@mui/x-charts
|
|
116
|
+
x: import("@mui/x-charts/internals").DefaultedXAxis[];
|
|
117
|
+
y: import("@mui/x-charts/internals").DefaultedYAxis[];
|
|
118
118
|
} | undefined];
|
|
119
119
|
recomputations: () => number;
|
|
120
120
|
resetRecomputations: () => void;
|
|
@@ -133,41 +133,41 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
|
|
|
133
133
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
134
134
|
}, ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & 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 & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
135
135
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
136
|
-
}) => Record<
|
|
136
|
+
}) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
137
137
|
clearCache: () => void;
|
|
138
138
|
resultsCount: () => number;
|
|
139
139
|
resetResultsCount: () => void;
|
|
140
140
|
} & {
|
|
141
|
-
resultFunc: (resultFuncArgs_0: import("@mui/x-charts
|
|
142
|
-
memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts
|
|
141
|
+
resultFunc: (resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
142
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
143
143
|
clearCache: () => void;
|
|
144
144
|
resultsCount: () => number;
|
|
145
145
|
resetResultsCount: () => void;
|
|
146
146
|
};
|
|
147
|
-
lastResult: () => Record<
|
|
147
|
+
lastResult: () => Record<AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
148
148
|
dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & 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 & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
149
149
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
150
|
-
}) => import("@mui/x-charts
|
|
150
|
+
}) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) & {
|
|
151
151
|
clearCache: () => void;
|
|
152
152
|
resultsCount: () => number;
|
|
153
153
|
resetResultsCount: () => void;
|
|
154
154
|
} & {
|
|
155
155
|
resultFunc: (resultFuncArgs_0: {
|
|
156
|
-
x: import("@mui/x-charts
|
|
157
|
-
y: import("@mui/x-charts
|
|
158
|
-
} | undefined) => import("@mui/x-charts
|
|
156
|
+
x: import("@mui/x-charts/internals").DefaultedXAxis[];
|
|
157
|
+
y: import("@mui/x-charts/internals").DefaultedYAxis[];
|
|
158
|
+
} | undefined) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined;
|
|
159
159
|
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
160
|
-
x: import("@mui/x-charts
|
|
161
|
-
y: import("@mui/x-charts
|
|
162
|
-
} | undefined) => import("@mui/x-charts
|
|
160
|
+
x: import("@mui/x-charts/internals").DefaultedXAxis[];
|
|
161
|
+
y: import("@mui/x-charts/internals").DefaultedYAxis[];
|
|
162
|
+
} | undefined) => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) & {
|
|
163
163
|
clearCache: () => void;
|
|
164
164
|
resultsCount: () => number;
|
|
165
165
|
resetResultsCount: () => void;
|
|
166
166
|
};
|
|
167
|
-
lastResult: () => import("@mui/x-charts
|
|
167
|
+
lastResult: () => import("@mui/x-charts/internals").DefaultedYAxis[] | undefined;
|
|
168
168
|
dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
|
|
169
|
-
x: import("@mui/x-charts
|
|
170
|
-
y: import("@mui/x-charts
|
|
169
|
+
x: import("@mui/x-charts/internals").DefaultedXAxis[];
|
|
170
|
+
y: import("@mui/x-charts/internals").DefaultedYAxis[];
|
|
171
171
|
} | undefined];
|
|
172
172
|
recomputations: () => number;
|
|
173
173
|
resetRecomputations: () => void;
|
|
@@ -200,4 +200,56 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
|
|
|
200
200
|
} & {
|
|
201
201
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
202
202
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
203
|
+
};
|
|
204
|
+
export declare const selectorChartAxisZoomData: ((state: any, axisId: AxisId) => import("@mui/x-charts/internals").ZoomData | undefined) & {
|
|
205
|
+
clearCache: () => void;
|
|
206
|
+
resultsCount: () => number;
|
|
207
|
+
resetResultsCount: () => void;
|
|
208
|
+
} & {
|
|
209
|
+
resultFunc: (resultFuncArgs_0: Map<AxisId, import("@mui/x-charts/internals").ZoomData> | undefined, resultFuncArgs_1: AxisId) => import("@mui/x-charts/internals").ZoomData | undefined;
|
|
210
|
+
memoizedResultFunc: ((resultFuncArgs_0: Map<AxisId, import("@mui/x-charts/internals").ZoomData> | undefined, resultFuncArgs_1: AxisId) => import("@mui/x-charts/internals").ZoomData | undefined) & {
|
|
211
|
+
clearCache: () => void;
|
|
212
|
+
resultsCount: () => number;
|
|
213
|
+
resetResultsCount: () => void;
|
|
214
|
+
};
|
|
215
|
+
lastResult: () => import("@mui/x-charts/internals").ZoomData | undefined;
|
|
216
|
+
dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & 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 & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
|
|
217
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
218
|
+
}) => Map<AxisId, import("@mui/x-charts/internals").ZoomData> | undefined) & {
|
|
219
|
+
clearCache: () => void;
|
|
220
|
+
resultsCount: () => number;
|
|
221
|
+
resetResultsCount: () => void;
|
|
222
|
+
} & {
|
|
223
|
+
resultFunc: (resultFuncArgs_0: {
|
|
224
|
+
isInteracting: boolean;
|
|
225
|
+
zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
|
|
226
|
+
} | undefined) => Map<AxisId, import("@mui/x-charts/internals").ZoomData> | undefined;
|
|
227
|
+
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
228
|
+
isInteracting: boolean;
|
|
229
|
+
zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
|
|
230
|
+
} | undefined) => Map<AxisId, import("@mui/x-charts/internals").ZoomData> | undefined) & {
|
|
231
|
+
clearCache: () => void;
|
|
232
|
+
resultsCount: () => number;
|
|
233
|
+
resetResultsCount: () => void;
|
|
234
|
+
};
|
|
235
|
+
lastResult: () => Map<AxisId, import("@mui/x-charts/internals").ZoomData> | undefined;
|
|
236
|
+
dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
|
|
237
|
+
isInteracting: boolean;
|
|
238
|
+
zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
|
|
239
|
+
} | undefined];
|
|
240
|
+
recomputations: () => number;
|
|
241
|
+
resetRecomputations: () => void;
|
|
242
|
+
dependencyRecomputations: () => number;
|
|
243
|
+
resetDependencyRecomputations: () => void;
|
|
244
|
+
} & {
|
|
245
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
246
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
247
|
+
}, (state: any, axisId: AxisId) => AxisId];
|
|
248
|
+
recomputations: () => number;
|
|
249
|
+
resetRecomputations: () => void;
|
|
250
|
+
dependencyRecomputations: () => number;
|
|
251
|
+
resetDependencyRecomputations: () => void;
|
|
252
|
+
} & {
|
|
253
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
254
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
203
255
|
};
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.selectorChartZoomState = exports.selectorChartZoomIsInteracting = exports.selectorChartZoomIsEnabled = void 0;
|
|
6
|
+
exports.selectorChartZoomState = exports.selectorChartZoomIsInteracting = exports.selectorChartZoomIsEnabled = exports.selectorChartAxisZoomData = void 0;
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
const selectorChartZoomState = state => state.zoom;
|
|
9
9
|
exports.selectorChartZoomState = selectorChartZoomState;
|
|
10
10
|
const selectorChartZoomIsInteracting = exports.selectorChartZoomIsInteracting = (0, _internals.createSelector)(selectorChartZoomState, zoom => zoom.isInteracting);
|
|
11
|
-
const selectorChartZoomIsEnabled = exports.selectorChartZoomIsEnabled = (0, _internals.createSelector)(_internals.selectorChartZoomOptionsLookup, optionsLookup => Object.keys(optionsLookup).length > 0);
|
|
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, (state, axisId) => axisId], (zoomMap, axisId) => zoomMap?.get(axisId));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature, UseChartCartesianAxisDefaultizedParameters, ZoomData } from '@mui/x-charts/internals';
|
|
1
|
+
import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature, UseChartCartesianAxisDefaultizedParameters, ZoomData, AxisId } from '@mui/x-charts/internals';
|
|
2
2
|
export interface UseChartProZoomParameters {
|
|
3
3
|
/**
|
|
4
4
|
* The list of zoom data related to each axis.
|
|
@@ -42,7 +42,22 @@ export interface UseChartProZoomPublicApi {
|
|
|
42
42
|
*/
|
|
43
43
|
setZoomData: (value: ZoomData[] | ((prev: ZoomData[]) => ZoomData[])) => void;
|
|
44
44
|
}
|
|
45
|
-
export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {
|
|
45
|
+
export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {
|
|
46
|
+
/**
|
|
47
|
+
* Translate the zoom range (i.e., both start and end) for a specific axis.
|
|
48
|
+
* @param {AxisId} axisId The id of the axis to move the zoom range for.
|
|
49
|
+
* @param {number} by The amount to move the zoom range by. Ranges from 0 to 100.
|
|
50
|
+
*/
|
|
51
|
+
moveZoomRange: (axisId: AxisId, by: number) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Zoom in the chart.
|
|
54
|
+
*/
|
|
55
|
+
zoomIn: () => void;
|
|
56
|
+
/**
|
|
57
|
+
* Zoom out the chart.
|
|
58
|
+
*/
|
|
59
|
+
zoomOut: () => void;
|
|
60
|
+
}
|
|
46
61
|
export type UseChartProZoomSignature = ChartPluginSignature<{
|
|
47
62
|
params: UseChartProZoomParameters;
|
|
48
63
|
defaultizedParams: UseChartProZoomDefaultizedParameters;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { ChartBaseCommonProps } from '@mui/x-charts/models';
|
|
3
|
+
export type ChartBaseTooltipProps = ChartBaseCommonProps & {
|
|
4
|
+
children: React.ReactElement<any, any>;
|
|
5
|
+
enterDelay?: number;
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type ChartBaseIconButtonProps = ChartBaseCommonProps & {
|
|
9
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChartsBaseSlots } from '@mui/x-charts/models';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ChartBaseTooltipProps } from "./chartBaseSlotProps.js";
|
|
4
|
+
export interface ChartsBaseSlotsPro extends ChartsBaseSlots {
|
|
5
|
+
baseTooltip: React.ComponentType<ChartBaseTooltipProps>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartBaseIconProps, ChartsIconSlots } from '@mui/x-charts/models';
|
|
3
|
+
export interface ChartsIconSlotsPro extends ChartsIconSlots {
|
|
4
|
+
/**
|
|
5
|
+
* Icon displayed on the toolbar's zoom in button.
|
|
6
|
+
* @default ChartsZoomInIcon
|
|
7
|
+
*/
|
|
8
|
+
zoomInIcon: React.ComponentType<ChartBaseIconProps>;
|
|
9
|
+
/**
|
|
10
|
+
* Icon displayed on the toolbar's zoom out button.
|
|
11
|
+
* @default ChartsZoomOutIcon
|
|
12
|
+
*/
|
|
13
|
+
zoomOutIcon: React.ComponentType<ChartBaseIconProps>;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts-pro",
|
|
3
|
-
"version": "8.
|
|
4
|
-
"description": "The Pro plan edition of the Charts components (MUI X).",
|
|
3
|
+
"version": "8.3.0",
|
|
5
4
|
"author": "MUI Team",
|
|
5
|
+
"description": "The Pro plan edition of the MUI X Charts components.",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
8
8
|
"bugs": {
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"directory": "packages/x-charts-pro"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@babel/runtime": "^7.27.
|
|
32
|
+
"@babel/runtime": "^7.27.1",
|
|
33
33
|
"@mui/utils": "^7.0.2",
|
|
34
34
|
"clsx": "^2.1.1",
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
|
-
"@mui/x-
|
|
37
|
-
"@mui/x-
|
|
38
|
-
"@mui/x-
|
|
39
|
-
"@mui/x-charts": "8.
|
|
36
|
+
"@mui/x-internals": "8.3.0",
|
|
37
|
+
"@mui/x-license": "8.3.0",
|
|
38
|
+
"@mui/x-charts": "8.3.0",
|
|
39
|
+
"@mui/x-charts-vendor": "8.3.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.9.0",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"optional": true
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
+
"optionalDependencies": {
|
|
58
|
+
"rasterizehtml": "^1.3.1"
|
|
59
|
+
},
|
|
57
60
|
"engines": {
|
|
58
61
|
"node": ">=14.0.0"
|
|
59
62
|
},
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { ComponentsProps, ComponentsOverrides } from '@mui/material/styles';
|
|
2
2
|
export interface ChartsProComponents<Theme = unknown> {
|
|
3
|
-
// BarChartPro components
|
|
4
3
|
MuiBarChartPro?: {
|
|
5
4
|
defaultProps?: ComponentsProps['MuiBarChartPro'];
|
|
6
5
|
};
|
|
7
|
-
// LineChartPro components
|
|
8
6
|
MuiLineChartPro?: {
|
|
9
7
|
defaultProps?: ComponentsProps['MuiLineChartPro'];
|
|
10
8
|
};
|
|
11
|
-
// Heatmap components
|
|
12
9
|
MuiHeatmap?: {
|
|
13
10
|
defaultProps?: ComponentsProps['MuiHeatmap'];
|
|
14
11
|
styleOverrides?: ComponentsOverrides<Theme>['MuiHeatmap'];
|
|
15
12
|
};
|
|
16
|
-
// ScatterChartPro components
|
|
17
13
|
MuiScatterChartPro?: {
|
|
18
14
|
defaultProps?: ComponentsProps['MuiScatterChartPro'];
|
|
19
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type * from '@mui/x-charts/themeAugmentation';
|
|
2
|
-
export type * from
|
|
3
|
-
export type * from
|
|
4
|
-
export type * from
|
|
2
|
+
export type * from "./overrides.js";
|
|
3
|
+
export type * from "./props.js";
|
|
4
|
+
export type * from "./components.js";
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { HeatmapClassKey } from "../Heatmap/index.js";
|
|
2
2
|
export interface ChartsProComponentNameToClassKey {
|
|
3
|
-
// Heatmap components
|
|
4
3
|
MuiHeatmap: HeatmapClassKey;
|
|
5
4
|
}
|
|
6
5
|
declare module '@mui/material/styles' {
|
|
7
6
|
interface ComponentNameToClassKey extends ChartsProComponentNameToClassKey {}
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
// disable automatic export
|
|
11
8
|
export {};
|
|
@@ -3,18 +3,12 @@ import { BarChartProProps } from "../BarChartPro/index.js";
|
|
|
3
3
|
import { HeatmapProps } from "../Heatmap/Heatmap.js";
|
|
4
4
|
import { LineChartProProps } from "../LineChartPro/index.js";
|
|
5
5
|
export interface ChartsProComponentsPropsList {
|
|
6
|
-
// BarChartPro components
|
|
7
6
|
MuiBarChartPro: BarChartProProps;
|
|
8
|
-
// LineChartPro components
|
|
9
7
|
MuiLineChartPro: LineChartProProps;
|
|
10
|
-
// Heatmap components
|
|
11
8
|
MuiHeatmap: HeatmapProps;
|
|
12
|
-
// ScatterChartPro components
|
|
13
9
|
MuiScatterChartPro: ScatterChartProProps;
|
|
14
10
|
}
|
|
15
11
|
declare module '@mui/material/styles' {
|
|
16
12
|
interface ComponentsPropsList extends ChartsProComponentsPropsList {}
|
|
17
13
|
}
|
|
18
|
-
|
|
19
|
-
// disable automatic export
|
|
20
14
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefaultizedProps, MakeRequired } from '@mui/x-internals/types';
|
|
2
2
|
import { AxisId, ZoomOptions } from '@mui/x-charts/internals';
|
|
3
|
-
import { HeatmapItemIdentifier, HeatmapSeriesType, DefaultizedHeatmapSeriesType, HeatmapValueType } from "../models/seriesType/heatmap.js";
|
|
4
3
|
import { DefaultizedFunnelSeriesType, FunnelItemIdentifier, FunnelSeriesType, FunnelValueType } from "../FunnelChart/funnel.types.js";
|
|
4
|
+
import { HeatmapItemIdentifier, HeatmapSeriesType, DefaultizedHeatmapSeriesType, HeatmapValueType } from "../models/seriesType/heatmap.js";
|
|
5
5
|
declare module '@mui/x-charts/internals' {
|
|
6
6
|
interface ChartsSeriesConfig {
|
|
7
7
|
heatmap: {
|