@mui/x-charts-pro 9.0.1 → 9.0.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/BarChartPro/BarChartPro.js +20 -1
- package/BarChartPro/BarChartPro.mjs +20 -1
- package/CHANGELOG.md +121 -0
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +2 -2
- package/ChartsRadialDataProvider/index.d.mts +1 -0
- package/ChartsRadialDataProvider/index.d.ts +1 -0
- package/ChartsRadialDataProvider/index.js +16 -0
- package/ChartsRadialDataProvider/index.mjs +2 -0
- package/ChartsRadialGrid/index.d.mts +1 -0
- package/ChartsRadialGrid/index.d.ts +1 -0
- package/ChartsRadialGrid/index.js +16 -0
- package/ChartsRadialGrid/index.mjs +2 -0
- package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.js +1 -0
- package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.mjs +1 -0
- package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.js +1 -0
- package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.mjs +1 -0
- package/ChartsToolbarPro/ChartsToolbarPro.d.mts +30 -0
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +30 -0
- package/ChartsToolbarPro/ChartsToolbarPro.js +66 -17
- package/ChartsToolbarPro/ChartsToolbarPro.mjs +66 -17
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.d.mts +41 -0
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.d.ts +41 -0
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.js +156 -0
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.mjs +150 -0
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +1 -1
- package/ChartsToolbarPro/index.d.mts +1 -0
- package/ChartsToolbarPro/index.d.ts +1 -0
- package/ChartsToolbarPro/index.js +11 -0
- package/ChartsToolbarPro/index.mjs +1 -0
- package/ChartsToolbarPro/rangeButtonValueToZoom.d.mts +66 -0
- package/ChartsToolbarPro/rangeButtonValueToZoom.d.ts +66 -0
- package/ChartsToolbarPro/rangeButtonValueToZoom.js +217 -0
- package/ChartsToolbarPro/rangeButtonValueToZoom.mjs +212 -0
- package/Heatmap/Heatmap.js +4 -1
- package/Heatmap/Heatmap.mjs +4 -1
- package/LineChartPro/LineChartPro.js +20 -1
- package/LineChartPro/LineChartPro.mjs +20 -1
- package/ScatterChartPro/ScatterChartPro.js +20 -1
- package/ScatterChartPro/ScatterChartPro.mjs +20 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +13 -4
- package/internals/plugins/useChartProZoom/useChartProZoom.mjs +13 -4
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.mts +3 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +3 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +4 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.mjs +3 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.mts +10 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +10 -0
- package/models/seriesType/heatmap.d.mts +9 -1
- package/models/seriesType/heatmap.d.ts +9 -1
- package/package.json +33 -5
|
@@ -70,12 +70,14 @@ const useChartProZoom = pluginData => {
|
|
|
70
70
|
onZoomChange(newZoomData);
|
|
71
71
|
if (store.state.zoom.isControlled) {
|
|
72
72
|
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
73
|
-
isInteracting: true
|
|
73
|
+
isInteracting: true,
|
|
74
|
+
activeRangeButtonKey: null
|
|
74
75
|
}));
|
|
75
76
|
} else {
|
|
76
77
|
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
77
78
|
isInteracting: true,
|
|
78
|
-
zoomData: newZoomData
|
|
79
|
+
zoomData: newZoomData,
|
|
80
|
+
activeRangeButtonKey: null
|
|
79
81
|
}));
|
|
80
82
|
removeIsInteracting();
|
|
81
83
|
}
|
|
@@ -139,6 +141,11 @@ const useChartProZoom = pluginData => {
|
|
|
139
141
|
}, [setZoomDataCallback, store]);
|
|
140
142
|
const zoomIn = React.useCallback(() => zoom(0.1), [zoom]);
|
|
141
143
|
const zoomOut = React.useCallback(() => zoom(-0.1), [zoom]);
|
|
144
|
+
const setActiveRangeButtonKey = React.useCallback(key => {
|
|
145
|
+
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
146
|
+
activeRangeButtonKey: key
|
|
147
|
+
}));
|
|
148
|
+
}, [store]);
|
|
142
149
|
return {
|
|
143
150
|
publicAPI: {
|
|
144
151
|
setZoomData: setZoomDataCallback,
|
|
@@ -151,7 +158,8 @@ const useChartProZoom = pluginData => {
|
|
|
151
158
|
setAxisZoomData,
|
|
152
159
|
moveZoomRange,
|
|
153
160
|
zoomIn,
|
|
154
|
-
zoomOut
|
|
161
|
+
zoomOut,
|
|
162
|
+
setActiveRangeButtonKey
|
|
155
163
|
}
|
|
156
164
|
};
|
|
157
165
|
};
|
|
@@ -178,7 +186,8 @@ useChartProZoom.getInitialState = params => {
|
|
|
178
186
|
zoomData: (0, _initializeZoomData.initializeZoomData)(optionsLookup, userZoomData),
|
|
179
187
|
isInteracting: false,
|
|
180
188
|
isControlled: zoomData !== undefined,
|
|
181
|
-
zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(params.zoomInteractionConfig, optionsLookup)
|
|
189
|
+
zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(params.zoomInteractionConfig, optionsLookup),
|
|
190
|
+
activeRangeButtonKey: null
|
|
182
191
|
}
|
|
183
192
|
};
|
|
184
193
|
};
|
|
@@ -63,12 +63,14 @@ export const useChartProZoom = pluginData => {
|
|
|
63
63
|
onZoomChange(newZoomData);
|
|
64
64
|
if (store.state.zoom.isControlled) {
|
|
65
65
|
store.set('zoom', _extends({}, store.state.zoom, {
|
|
66
|
-
isInteracting: true
|
|
66
|
+
isInteracting: true,
|
|
67
|
+
activeRangeButtonKey: null
|
|
67
68
|
}));
|
|
68
69
|
} else {
|
|
69
70
|
store.set('zoom', _extends({}, store.state.zoom, {
|
|
70
71
|
isInteracting: true,
|
|
71
|
-
zoomData: newZoomData
|
|
72
|
+
zoomData: newZoomData,
|
|
73
|
+
activeRangeButtonKey: null
|
|
72
74
|
}));
|
|
73
75
|
removeIsInteracting();
|
|
74
76
|
}
|
|
@@ -132,6 +134,11 @@ export const useChartProZoom = pluginData => {
|
|
|
132
134
|
}, [setZoomDataCallback, store]);
|
|
133
135
|
const zoomIn = React.useCallback(() => zoom(0.1), [zoom]);
|
|
134
136
|
const zoomOut = React.useCallback(() => zoom(-0.1), [zoom]);
|
|
137
|
+
const setActiveRangeButtonKey = React.useCallback(key => {
|
|
138
|
+
store.set('zoom', _extends({}, store.state.zoom, {
|
|
139
|
+
activeRangeButtonKey: key
|
|
140
|
+
}));
|
|
141
|
+
}, [store]);
|
|
135
142
|
return {
|
|
136
143
|
publicAPI: {
|
|
137
144
|
setZoomData: setZoomDataCallback,
|
|
@@ -144,7 +151,8 @@ export const useChartProZoom = pluginData => {
|
|
|
144
151
|
setAxisZoomData,
|
|
145
152
|
moveZoomRange,
|
|
146
153
|
zoomIn,
|
|
147
|
-
zoomOut
|
|
154
|
+
zoomOut,
|
|
155
|
+
setActiveRangeButtonKey
|
|
148
156
|
}
|
|
149
157
|
};
|
|
150
158
|
};
|
|
@@ -170,7 +178,8 @@ useChartProZoom.getInitialState = params => {
|
|
|
170
178
|
zoomData: initializeZoomData(optionsLookup, userZoomData),
|
|
171
179
|
isInteracting: false,
|
|
172
180
|
isControlled: zoomData !== undefined,
|
|
173
|
-
zoomInteractionConfig: initializeZoomInteractionConfig(params.zoomInteractionConfig, optionsLookup)
|
|
181
|
+
zoomInteractionConfig: initializeZoomInteractionConfig(params.zoomInteractionConfig, optionsLookup),
|
|
182
|
+
activeRangeButtonKey: null
|
|
174
183
|
}
|
|
175
184
|
};
|
|
176
185
|
};
|
|
@@ -13,6 +13,9 @@ export declare const selectorChartAxisZoomData: (args_0: import("@mui/x-charts/i
|
|
|
13
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/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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.mjs").UseChartProZoomState & Partial<{}> & {
|
|
14
14
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
15
15
|
}) => boolean;
|
|
16
|
+
export declare const selectorChartActiveRangeButtonKey: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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.mjs").UseChartProZoomState & Partial<{}> & {
|
|
17
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
18
|
+
}) => string | null;
|
|
16
19
|
export declare const selectorChartCanZoomIn: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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.mjs").UseChartProZoomState & Partial<{}> & {
|
|
17
20
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
18
21
|
}) => boolean;
|
|
@@ -13,6 +13,9 @@ export declare const selectorChartAxisZoomData: (args_0: import("@mui/x-charts/i
|
|
|
13
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/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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
14
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
15
15
|
}) => boolean;
|
|
16
|
+
export declare const selectorChartActiveRangeButtonKey: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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<{}> & {
|
|
17
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
18
|
+
}) => string | null;
|
|
16
19
|
export declare const selectorChartCanZoomIn: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & 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<{}> & {
|
|
17
20
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
18
21
|
}) => boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.selectorChartZoomState = exports.selectorChartZoomIsInteracting = exports.selectorChartZoomIsEnabled = exports.selectorChartCanZoomOut = exports.selectorChartCanZoomIn = exports.selectorChartAxisZoomData = void 0;
|
|
6
|
+
exports.selectorChartZoomState = exports.selectorChartZoomIsInteracting = exports.selectorChartZoomIsEnabled = exports.selectorChartCanZoomOut = exports.selectorChartCanZoomIn = exports.selectorChartAxisZoomData = exports.selectorChartActiveRangeButtonKey = void 0;
|
|
7
7
|
var _store = require("@mui/x-internals/store");
|
|
8
8
|
var _internals = require("@mui/x-charts/internals");
|
|
9
9
|
const selectorChartZoomState = state => state.zoom;
|
|
@@ -12,14 +12,15 @@ const selectorChartZoomIsInteracting = exports.selectorChartZoomIsInteracting =
|
|
|
12
12
|
const selectorChartZoomIsEnabled = exports.selectorChartZoomIsEnabled = (0, _store.createSelector)(_internals.selectorChartZoomOptionsLookup, optionsLookup => Object.keys(optionsLookup).length > 0);
|
|
13
13
|
const selectorChartAxisZoomData = exports.selectorChartAxisZoomData = (0, _store.createSelector)(_internals.selectorChartZoomMap, (zoomMap, axisId) => zoomMap?.get(axisId));
|
|
14
14
|
const selectorChartCanZoomOut = exports.selectorChartCanZoomOut = (0, _store.createSelector)(selectorChartZoomState, _internals.selectorChartZoomOptionsLookup, (zoomState, zoomOptions) => {
|
|
15
|
-
return zoomState.zoomData.every(zoomData => {
|
|
15
|
+
return !zoomState.zoomData.every(zoomData => {
|
|
16
16
|
const span = zoomData.end - zoomData.start;
|
|
17
17
|
const options = zoomOptions[zoomData.axisId];
|
|
18
18
|
return zoomData.start === options.minStart && zoomData.end === options.maxEnd || span === options.maxSpan;
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
+
const selectorChartActiveRangeButtonKey = exports.selectorChartActiveRangeButtonKey = (0, _store.createSelector)(selectorChartZoomState, zoom => zoom.activeRangeButtonKey);
|
|
21
22
|
const selectorChartCanZoomIn = exports.selectorChartCanZoomIn = (0, _store.createSelector)(selectorChartZoomState, _internals.selectorChartZoomOptionsLookup, (zoomState, zoomOptions) => {
|
|
22
|
-
return zoomState.zoomData.every(zoomData => {
|
|
23
|
+
return !zoomState.zoomData.every(zoomData => {
|
|
23
24
|
const span = zoomData.end - zoomData.start;
|
|
24
25
|
const options = zoomOptions[zoomData.axisId];
|
|
25
26
|
return span === options.minSpan;
|
|
@@ -5,14 +5,15 @@ export const selectorChartZoomIsInteracting = createSelector(selectorChartZoomSt
|
|
|
5
5
|
export const selectorChartZoomIsEnabled = createSelector(selectorChartZoomOptionsLookup, optionsLookup => Object.keys(optionsLookup).length > 0);
|
|
6
6
|
export const selectorChartAxisZoomData = createSelector(selectorChartZoomMap, (zoomMap, axisId) => zoomMap?.get(axisId));
|
|
7
7
|
export const selectorChartCanZoomOut = createSelector(selectorChartZoomState, selectorChartZoomOptionsLookup, (zoomState, zoomOptions) => {
|
|
8
|
-
return zoomState.zoomData.every(zoomData => {
|
|
8
|
+
return !zoomState.zoomData.every(zoomData => {
|
|
9
9
|
const span = zoomData.end - zoomData.start;
|
|
10
10
|
const options = zoomOptions[zoomData.axisId];
|
|
11
11
|
return zoomData.start === options.minStart && zoomData.end === options.maxEnd || span === options.maxSpan;
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
|
+
export const selectorChartActiveRangeButtonKey = createSelector(selectorChartZoomState, zoom => zoom.activeRangeButtonKey);
|
|
14
15
|
export const selectorChartCanZoomIn = createSelector(selectorChartZoomState, selectorChartZoomOptionsLookup, (zoomState, zoomOptions) => {
|
|
15
|
-
return zoomState.zoomData.every(zoomData => {
|
|
16
|
+
return !zoomState.zoomData.every(zoomData => {
|
|
16
17
|
const span = zoomData.end - zoomData.start;
|
|
17
18
|
const options = zoomOptions[zoomData.axisId];
|
|
18
19
|
return span === options.minSpan;
|
|
@@ -41,6 +41,11 @@ export interface UseChartProZoomState {
|
|
|
41
41
|
* Configuration for zoom interactions.
|
|
42
42
|
*/
|
|
43
43
|
zoomInteractionConfig: DefaultizedZoomInteractionConfig;
|
|
44
|
+
/**
|
|
45
|
+
* The key of the currently active range button, or `null` if no range button is active.
|
|
46
|
+
* Cleared when the user manually zooms or pans the chart.
|
|
47
|
+
*/
|
|
48
|
+
activeRangeButtonKey: string | null;
|
|
44
49
|
};
|
|
45
50
|
}
|
|
46
51
|
export interface UseChartProZoomPublicApi {
|
|
@@ -73,6 +78,11 @@ export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {
|
|
|
73
78
|
* Zoom out the chart.
|
|
74
79
|
*/
|
|
75
80
|
zoomOut: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Set the active range button key. Pass `null` to clear.
|
|
83
|
+
* @param {string | null} key The key of the active range button.
|
|
84
|
+
*/
|
|
85
|
+
setActiveRangeButtonKey: (key: string | null) => void;
|
|
76
86
|
}
|
|
77
87
|
export type UseChartProZoomSignature = ChartPluginSignature<{
|
|
78
88
|
params: UseChartProZoomParameters;
|
|
@@ -41,6 +41,11 @@ export interface UseChartProZoomState {
|
|
|
41
41
|
* Configuration for zoom interactions.
|
|
42
42
|
*/
|
|
43
43
|
zoomInteractionConfig: DefaultizedZoomInteractionConfig;
|
|
44
|
+
/**
|
|
45
|
+
* The key of the currently active range button, or `null` if no range button is active.
|
|
46
|
+
* Cleared when the user manually zooms or pans the chart.
|
|
47
|
+
*/
|
|
48
|
+
activeRangeButtonKey: string | null;
|
|
44
49
|
};
|
|
45
50
|
}
|
|
46
51
|
export interface UseChartProZoomPublicApi {
|
|
@@ -73,6 +78,11 @@ export interface UseChartProZoomInstance extends UseChartProZoomPublicApi {
|
|
|
73
78
|
* Zoom out the chart.
|
|
74
79
|
*/
|
|
75
80
|
zoomOut: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Set the active range button key. Pass `null` to clear.
|
|
83
|
+
* @param {string | null} key The key of the active range button.
|
|
84
|
+
*/
|
|
85
|
+
setActiveRangeButtonKey: (key: string | null) => void;
|
|
76
86
|
}
|
|
77
87
|
export type UseChartProZoomSignature = ChartPluginSignature<{
|
|
78
88
|
params: UseChartProZoomParameters;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
|
-
import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType } from '@mui/x-charts/internals';
|
|
2
|
+
import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType, type DatasetElementType } from '@mui/x-charts/internals';
|
|
3
3
|
export type HeatmapValueType = readonly [number, number, number];
|
|
4
4
|
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter' | 'valueFormatter'>, CartesianSeriesType {
|
|
5
5
|
type: 'heatmap';
|
|
@@ -12,6 +12,14 @@ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueTyp
|
|
|
12
12
|
* The key used to retrieve data from the dataset.
|
|
13
13
|
*/
|
|
14
14
|
dataKey?: string;
|
|
15
|
+
/**
|
|
16
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
17
|
+
* It receives the full dataset item and should return a heatmap value.
|
|
18
|
+
* Can be used as an alternative to `dataKey`.
|
|
19
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
20
|
+
* @returns {HeatmapValueType} The transformed value.
|
|
21
|
+
*/
|
|
22
|
+
valueGetter?: (item: DatasetElementType<unknown>) => HeatmapValueType;
|
|
15
23
|
/**
|
|
16
24
|
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
17
25
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
|
-
import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType } from '@mui/x-charts/internals';
|
|
2
|
+
import { type CommonDefaultizedProps, type CommonSeriesType, type CartesianSeriesType, type DatasetElementType } from '@mui/x-charts/internals';
|
|
3
3
|
export type HeatmapValueType = readonly [number, number, number];
|
|
4
4
|
export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType, 'heatmap'>, 'color' | 'colorGetter' | 'valueFormatter'>, CartesianSeriesType {
|
|
5
5
|
type: 'heatmap';
|
|
@@ -12,6 +12,14 @@ export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueTyp
|
|
|
12
12
|
* The key used to retrieve data from the dataset.
|
|
13
13
|
*/
|
|
14
14
|
dataKey?: string;
|
|
15
|
+
/**
|
|
16
|
+
* A function to extract and transform the value from the `dataset` item.
|
|
17
|
+
* It receives the full dataset item and should return a heatmap value.
|
|
18
|
+
* Can be used as an alternative to `dataKey`.
|
|
19
|
+
* @param {DatasetElementType<unknown>} item The full dataset item.
|
|
20
|
+
* @returns {HeatmapValueType} The transformed value.
|
|
21
|
+
*/
|
|
22
|
+
valueGetter?: (item: DatasetElementType<unknown>) => HeatmapValueType;
|
|
15
23
|
/**
|
|
16
24
|
* The label to display on the tooltip or the legend. It can be a string or a function.
|
|
17
25
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts-pro",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
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": "9.0.0",
|
|
32
32
|
"clsx": "^2.1.1",
|
|
33
33
|
"prop-types": "^15.8.1",
|
|
34
|
-
"@mui/x-charts": "^9.0.
|
|
35
|
-
"@mui/x-
|
|
36
|
-
"@mui/x-
|
|
34
|
+
"@mui/x-charts": "^9.0.2",
|
|
35
|
+
"@mui/x-charts-vendor": "^9.0.0",
|
|
36
|
+
"@mui/x-internal-gestures": "^9.0.2",
|
|
37
37
|
"@mui/x-internals": "^9.0.0",
|
|
38
|
-
"@mui/x-
|
|
38
|
+
"@mui/x-license": "^9.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@emotion/react": "^11.9.0",
|
|
@@ -314,6 +314,34 @@
|
|
|
314
314
|
"default": "./ChartsOverlay/index.mjs"
|
|
315
315
|
}
|
|
316
316
|
},
|
|
317
|
+
"./ChartsRadialDataProvider": {
|
|
318
|
+
"import": {
|
|
319
|
+
"types": "./ChartsRadialDataProvider/index.d.mts",
|
|
320
|
+
"default": "./ChartsRadialDataProvider/index.mjs"
|
|
321
|
+
},
|
|
322
|
+
"require": {
|
|
323
|
+
"types": "./ChartsRadialDataProvider/index.d.ts",
|
|
324
|
+
"default": "./ChartsRadialDataProvider/index.js"
|
|
325
|
+
},
|
|
326
|
+
"default": {
|
|
327
|
+
"types": "./ChartsRadialDataProvider/index.d.mts",
|
|
328
|
+
"default": "./ChartsRadialDataProvider/index.mjs"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"./ChartsRadialGrid": {
|
|
332
|
+
"import": {
|
|
333
|
+
"types": "./ChartsRadialGrid/index.d.mts",
|
|
334
|
+
"default": "./ChartsRadialGrid/index.mjs"
|
|
335
|
+
},
|
|
336
|
+
"require": {
|
|
337
|
+
"types": "./ChartsRadialGrid/index.d.ts",
|
|
338
|
+
"default": "./ChartsRadialGrid/index.js"
|
|
339
|
+
},
|
|
340
|
+
"default": {
|
|
341
|
+
"types": "./ChartsRadialGrid/index.d.mts",
|
|
342
|
+
"default": "./ChartsRadialGrid/index.mjs"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
317
345
|
"./ChartsReferenceLine": {
|
|
318
346
|
"import": {
|
|
319
347
|
"types": "./ChartsReferenceLine/index.d.mts",
|