@mui/x-charts-pro 9.0.0 → 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 +215 -6891
- 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/gestureHooks/usePanOnWheel.js +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.mjs +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.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 +45 -17
|
@@ -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-
|
|
34
|
+
"@mui/x-charts": "^9.0.2",
|
|
35
|
+
"@mui/x-charts-vendor": "^9.0.0",
|
|
36
|
+
"@mui/x-internal-gestures": "^9.0.2",
|
|
36
37
|
"@mui/x-internals": "^9.0.0",
|
|
37
|
-
"@mui/x-license": "^9.0.
|
|
38
|
-
"@mui/x-charts-vendor": "^9.0.0"
|
|
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",
|
|
@@ -763,42 +791,42 @@
|
|
|
763
791
|
}
|
|
764
792
|
},
|
|
765
793
|
"./themeAugmentation": {
|
|
766
|
-
"require": {
|
|
767
|
-
"types": "./themeAugmentation/index.d.ts",
|
|
768
|
-
"default": "./themeAugmentation/index.js"
|
|
769
|
-
},
|
|
770
794
|
"import": {
|
|
771
795
|
"types": "./themeAugmentation/index.d.mts",
|
|
772
796
|
"default": "./themeAugmentation/index.mjs"
|
|
773
797
|
},
|
|
798
|
+
"require": {
|
|
799
|
+
"types": "./themeAugmentation/index.d.ts",
|
|
800
|
+
"default": "./themeAugmentation/index.js"
|
|
801
|
+
},
|
|
774
802
|
"default": {
|
|
775
803
|
"types": "./themeAugmentation/index.d.mts",
|
|
776
804
|
"default": "./themeAugmentation/index.mjs"
|
|
777
805
|
}
|
|
778
806
|
},
|
|
779
807
|
"./typeOverloads": {
|
|
780
|
-
"require": {
|
|
781
|
-
"types": "./typeOverloads/index.d.ts",
|
|
782
|
-
"default": "./typeOverloads/index.js"
|
|
783
|
-
},
|
|
784
808
|
"import": {
|
|
785
809
|
"types": "./typeOverloads/index.d.mts",
|
|
786
810
|
"default": "./typeOverloads/index.mjs"
|
|
787
811
|
},
|
|
812
|
+
"require": {
|
|
813
|
+
"types": "./typeOverloads/index.d.ts",
|
|
814
|
+
"default": "./typeOverloads/index.js"
|
|
815
|
+
},
|
|
788
816
|
"default": {
|
|
789
817
|
"types": "./typeOverloads/index.d.mts",
|
|
790
818
|
"default": "./typeOverloads/index.mjs"
|
|
791
819
|
}
|
|
792
820
|
},
|
|
793
821
|
"./utils": {
|
|
794
|
-
"require": {
|
|
795
|
-
"types": "./utils/index.d.ts",
|
|
796
|
-
"default": "./utils/index.js"
|
|
797
|
-
},
|
|
798
822
|
"import": {
|
|
799
823
|
"types": "./utils/index.d.mts",
|
|
800
824
|
"default": "./utils/index.mjs"
|
|
801
825
|
},
|
|
826
|
+
"require": {
|
|
827
|
+
"types": "./utils/index.d.ts",
|
|
828
|
+
"default": "./utils/index.js"
|
|
829
|
+
},
|
|
802
830
|
"default": {
|
|
803
831
|
"types": "./utils/index.d.mts",
|
|
804
832
|
"default": "./utils/index.mjs"
|