@mui/x-charts-pro 8.0.0 → 8.2.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 +7 -1
- package/BarChartPro/BarChartPro.plugins.d.ts +2 -1
- package/BarChartPro/BarChartPro.plugins.js +2 -1
- package/CHANGELOG.md +230 -5
- package/ChartContainerPro/ChartContainerPro.d.ts +1 -0
- package/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +11 -2
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -2
- package/ChartDataProviderPro/useChartDataProviderProProps.js +2 -0
- package/FunnelChart/FunnelChart.js +12 -1
- package/FunnelChart/FunnelPlot.d.ts +5 -0
- package/FunnelChart/FunnelPlot.js +13 -16
- package/FunnelChart/curves/bump.d.ts +24 -0
- package/FunnelChart/curves/bump.js +82 -0
- package/FunnelChart/curves/curve.types.d.ts +8 -0
- package/FunnelChart/curves/curve.types.js +5 -0
- package/FunnelChart/curves/funnelStep.d.ts +25 -0
- package/FunnelChart/{funnelStepCurve.js → curves/funnelStep.js} +32 -19
- package/FunnelChart/curves/getFunnelCurve.d.ts +3 -0
- package/FunnelChart/curves/getFunnelCurve.js +22 -0
- package/FunnelChart/curves/index.d.ts +2 -0
- package/FunnelChart/curves/index.js +27 -0
- package/FunnelChart/curves/linear.d.ts +24 -0
- package/FunnelChart/curves/linear.js +113 -0
- package/FunnelChart/funnel.types.d.ts +2 -2
- package/FunnelChart/funnelPlotSlots.types.d.ts +1 -1
- package/FunnelChart/funnelSectionClasses.d.ts +1 -1
- package/FunnelChart/index.d.ts +3 -2
- package/FunnelChart/useFunnelChartProps.d.ts +1 -1
- package/FunnelChart/useFunnelChartProps.js +7 -4
- package/Heatmap/Heatmap.js +5 -1
- package/Heatmap/HeatmapItem.js +1 -1
- package/LineChartPro/LineChartPro.js +7 -1
- package/LineChartPro/LineChartPro.plugins.d.ts +2 -1
- package/LineChartPro/LineChartPro.plugins.js +2 -1
- package/ScatterChartPro/ScatterChartPro.js +7 -1
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -1
- package/ScatterChartPro/ScatterChartPro.plugins.js +2 -1
- package/esm/BarChartPro/BarChartPro.js +7 -1
- package/esm/BarChartPro/BarChartPro.plugins.d.ts +2 -1
- package/esm/BarChartPro/BarChartPro.plugins.js +2 -1
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +1 -0
- package/esm/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +11 -2
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -2
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +2 -0
- package/esm/FunnelChart/FunnelChart.js +12 -1
- package/esm/FunnelChart/FunnelPlot.d.ts +5 -0
- package/esm/FunnelChart/FunnelPlot.js +14 -17
- package/esm/FunnelChart/curves/bump.d.ts +24 -0
- package/esm/FunnelChart/curves/bump.js +75 -0
- package/esm/FunnelChart/curves/curve.types.d.ts +8 -0
- package/esm/FunnelChart/curves/curve.types.js +1 -0
- package/esm/FunnelChart/curves/funnelStep.d.ts +25 -0
- package/esm/FunnelChart/{funnelStepCurve.js → curves/funnelStep.js} +32 -19
- package/esm/FunnelChart/curves/getFunnelCurve.d.ts +3 -0
- package/esm/FunnelChart/curves/getFunnelCurve.js +15 -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 +24 -0
- package/esm/FunnelChart/curves/linear.js +106 -0
- package/esm/FunnelChart/funnel.types.d.ts +2 -2
- package/esm/FunnelChart/funnelPlotSlots.types.d.ts +1 -1
- package/esm/FunnelChart/funnelSectionClasses.d.ts +1 -1
- package/esm/FunnelChart/index.d.ts +3 -2
- package/esm/FunnelChart/useFunnelChartProps.d.ts +1 -1
- package/esm/FunnelChart/useFunnelChartProps.js +7 -4
- package/esm/Heatmap/Heatmap.js +5 -1
- package/esm/Heatmap/HeatmapItem.js +1 -1
- package/esm/LineChartPro/LineChartPro.js +7 -1
- package/esm/LineChartPro/LineChartPro.plugins.d.ts +2 -1
- package/esm/LineChartPro/LineChartPro.plugins.js +2 -1
- package/esm/ScatterChartPro/ScatterChartPro.js +7 -1
- package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -1
- package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/internals/plugins/allPlugins.d.ts +5 -4
- package/esm/internals/plugins/allPlugins.js +3 -2
- 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/index.d.ts +2 -0
- package/esm/internals/plugins/useChartProExport/index.js +2 -0
- package/esm/internals/plugins/useChartProExport/print.d.ts +4 -0
- package/esm/internals/plugins/useChartProExport/print.js +28 -0
- package/esm/internals/plugins/useChartProExport/useChartProExport.d.ts +3 -0
- package/esm/internals/plugins/useChartProExport/useChartProExport.js +65 -0
- package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +67 -0
- package/esm/internals/plugins/useChartProExport/useChartProExport.types.js +1 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +54 -30
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +25 -25
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.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/index.d.ts +1 -0
- package/index.js +12 -1
- package/internals/plugins/allPlugins.d.ts +5 -4
- package/internals/plugins/allPlugins.js +3 -2
- 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/index.d.ts +2 -0
- package/internals/plugins/useChartProExport/index.js +27 -0
- package/internals/plugins/useChartProExport/print.d.ts +4 -0
- package/internals/plugins/useChartProExport/print.js +35 -0
- package/internals/plugins/useChartProExport/useChartProExport.d.ts +3 -0
- package/internals/plugins/useChartProExport/useChartProExport.js +73 -0
- package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +67 -0
- package/internals/plugins/useChartProExport/useChartProExport.types.js +5 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +54 -30
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +25 -25
- package/locales/index.d.ts +1 -0
- package/locales/index.js +16 -0
- package/package.json +7 -4
- 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/FunnelChart/funnelStepCurve.d.ts +0 -4
- package/esm/FunnelChart/funnelStepCurve.d.ts +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { 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;
|
|
@@ -85,8 +85,8 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
|
|
|
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<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
89
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedXAxis[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
90
90
|
clearCache: () => void;
|
|
91
91
|
resultsCount: () => number;
|
|
92
92
|
resetResultsCount: () => void;
|
|
@@ -94,27 +94,27 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
|
|
|
94
94
|
lastResult: () => Record<import("@mui/x-charts/internals").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;
|
|
@@ -138,8 +138,8 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
|
|
|
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<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
|
|
142
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts/internals").DefaultedYAxis[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
|
|
143
143
|
clearCache: () => void;
|
|
144
144
|
resultsCount: () => number;
|
|
145
145
|
resetResultsCount: () => void;
|
|
@@ -147,27 +147,27 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
|
|
|
147
147
|
lastResult: () => Record<import("@mui/x-charts/internals").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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/locales';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/locales';
|
|
@@ -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
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 {};
|
package/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from '@mui/x-charts/ChartsGrid';
|
|
|
13
13
|
export * from '@mui/x-charts/ChartsText';
|
|
14
14
|
export * from '@mui/x-charts/ChartsTooltip';
|
|
15
15
|
export * from '@mui/x-charts/ChartsLegend';
|
|
16
|
+
export * from '@mui/x-charts/ChartsLocalizationProvider';
|
|
16
17
|
export * from '@mui/x-charts/ChartsAxisHighlight';
|
|
17
18
|
export * from '@mui/x-charts/BarChart';
|
|
18
19
|
export * from '@mui/x-charts/LineChart';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v8.
|
|
2
|
+
* @mui/x-charts-pro v8.2.0
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -165,6 +165,17 @@ Object.keys(_ChartsLegend).forEach(function (key) {
|
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
|
+
var _ChartsLocalizationProvider = require("@mui/x-charts/ChartsLocalizationProvider");
|
|
169
|
+
Object.keys(_ChartsLocalizationProvider).forEach(function (key) {
|
|
170
|
+
if (key === "default" || key === "__esModule") return;
|
|
171
|
+
if (key in exports && exports[key] === _ChartsLocalizationProvider[key]) return;
|
|
172
|
+
Object.defineProperty(exports, key, {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function () {
|
|
175
|
+
return _ChartsLocalizationProvider[key];
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
});
|
|
168
179
|
var _ChartsAxisHighlight = require("@mui/x-charts/ChartsAxisHighlight");
|
|
169
180
|
Object.keys(_ChartsAxisHighlight).forEach(function (key) {
|
|
170
181
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ChartSeriesType, ConvertSignaturesIntoPlugins, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartZAxisSignature, UseChartHighlightSignature, UseChartPolarAxisSignature } from '@mui/x-charts/internals';
|
|
2
|
+
import { UseChartProExportSignature } from "./useChartProExport/index.js";
|
|
2
3
|
import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
|
|
3
|
-
export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
|
|
4
|
+
export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
4
5
|
export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
|
|
5
|
-
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
|
|
6
|
-
export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
|
|
6
|
+
export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
|
|
7
|
+
export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
7
8
|
export type DefaultPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<TSeries>>;
|
|
8
|
-
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
|
|
9
|
+
export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
|
|
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.DEFAULT_PLUGINS = exports.ALL_PLUGINS = void 0;
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
|
+
var _useChartProExport = require("./useChartProExport");
|
|
8
9
|
var _useChartProZoom = require("./useChartProZoom");
|
|
9
10
|
// This file should be removed after creating all plugins in favor of a file per chart type.
|
|
10
11
|
|
|
11
|
-
const ALL_PLUGINS = exports.ALL_PLUGINS = [_internals.useChartZAxis, _internals.useChartCartesianAxis, _internals.useChartPolarAxis, _internals.useChartInteraction, _internals.useChartHighlight, _useChartProZoom.useChartProZoom];
|
|
12
|
-
const DEFAULT_PLUGINS = exports.DEFAULT_PLUGINS = [_internals.useChartZAxis, _internals.useChartCartesianAxis, _internals.useChartInteraction, _internals.useChartHighlight, _useChartProZoom.useChartProZoom];
|
|
12
|
+
const ALL_PLUGINS = exports.ALL_PLUGINS = [_internals.useChartZAxis, _internals.useChartCartesianAxis, _internals.useChartPolarAxis, _internals.useChartInteraction, _internals.useChartHighlight, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
|
13
|
+
const DEFAULT_PLUGINS = exports.DEFAULT_PLUGINS = [_internals.useChartZAxis, _internals.useChartCartesianAxis, _internals.useChartInteraction, _internals.useChartHighlight, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createExportIframe(title?: string): HTMLIFrameElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createExportIframe = createExportIframe;
|
|
7
|
+
function createExportIframe(title) {
|
|
8
|
+
const iframeEl = document.createElement('iframe');
|
|
9
|
+
iframeEl.style.position = 'absolute';
|
|
10
|
+
iframeEl.style.width = '0px';
|
|
11
|
+
iframeEl.style.height = '0px';
|
|
12
|
+
iframeEl.title = title || document.title;
|
|
13
|
+
return iframeEl;
|
|
14
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ChartImageExportOptions } from "./useChartProExport.types.js";
|
|
2
|
+
export declare const getDrawDocument: () => Promise<typeof import("rasterizehtml").drawDocument>;
|
|
3
|
+
export declare function exportImage(element: HTMLElement | SVGElement, params?: ChartImageExportOptions): Promise<void>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.exportImage = exportImage;
|
|
8
|
+
exports.getDrawDocument = void 0;
|
|
9
|
+
var _interopRequireWildcard2 = _interopRequireDefault(require("@babel/runtime/helpers/interopRequireWildcard"));
|
|
10
|
+
var _ownerDocument = _interopRequireDefault(require("@mui/utils/ownerDocument"));
|
|
11
|
+
var _export = require("@mui/x-internals/export");
|
|
12
|
+
var _common = require("./common");
|
|
13
|
+
const getDrawDocument = async () => {
|
|
14
|
+
try {
|
|
15
|
+
const module = await Promise.resolve().then(() => (0, _interopRequireWildcard2.default)(require('rasterizehtml')));
|
|
16
|
+
return module.drawDocument;
|
|
17
|
+
} catch (error) {
|
|
18
|
+
throw new Error(`MUI X Charts: Failed to import 'rasterizehtml' module. This dependency is mandatory when exporting a chart as an image. Make sure you have it installed as a dependency.`, {
|
|
19
|
+
cause: error
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.getDrawDocument = getDrawDocument;
|
|
24
|
+
async function exportImage(element, params) {
|
|
25
|
+
const {
|
|
26
|
+
fileName,
|
|
27
|
+
type = 'image/png',
|
|
28
|
+
quality = 0.9
|
|
29
|
+
} = params ?? {};
|
|
30
|
+
const drawDocumentPromise = getDrawDocument();
|
|
31
|
+
const {
|
|
32
|
+
width,
|
|
33
|
+
height
|
|
34
|
+
} = element.getBoundingClientRect();
|
|
35
|
+
const doc = (0, _ownerDocument.default)(element);
|
|
36
|
+
const canvas = document.createElement('canvas');
|
|
37
|
+
const ratio = window.devicePixelRatio || 1;
|
|
38
|
+
canvas.width = width * ratio;
|
|
39
|
+
canvas.height = height * ratio;
|
|
40
|
+
canvas.style.width = `${width}px`;
|
|
41
|
+
canvas.style.height = `${height}px`;
|
|
42
|
+
const iframe = (0, _common.createExportIframe)(fileName);
|
|
43
|
+
let resolve;
|
|
44
|
+
const iframeLoadPromise = new Promise(res => {
|
|
45
|
+
resolve = res;
|
|
46
|
+
});
|
|
47
|
+
iframe.onload = async () => {
|
|
48
|
+
const exportDoc = iframe.contentDocument;
|
|
49
|
+
const elementClone = element.cloneNode(true);
|
|
50
|
+
const container = document.createElement('div');
|
|
51
|
+
container.appendChild(elementClone);
|
|
52
|
+
exportDoc.body.innerHTML = container.innerHTML;
|
|
53
|
+
exportDoc.body.style.margin = '0px';
|
|
54
|
+
const rootCandidate = element.getRootNode();
|
|
55
|
+
const root = rootCandidate.constructor.name === 'ShadowRoot' ? rootCandidate : doc;
|
|
56
|
+
await Promise.all((0, _export.loadStyleSheets)(exportDoc, root));
|
|
57
|
+
resolve();
|
|
58
|
+
};
|
|
59
|
+
doc.body.appendChild(iframe);
|
|
60
|
+
const [drawDocument] = await Promise.all([drawDocumentPromise, iframeLoadPromise]);
|
|
61
|
+
try {
|
|
62
|
+
await drawDocument(iframe.contentDocument, canvas, {
|
|
63
|
+
// Handle retina displays: https://github.com/cburgmer/rasterizeHTML.js/blob/262b3404d1c469ce4a7750a2976dec09b8ae2d6c/examples/retina.html#L71
|
|
64
|
+
zoom: ratio
|
|
65
|
+
});
|
|
66
|
+
} finally {
|
|
67
|
+
doc.body.removeChild(iframe);
|
|
68
|
+
}
|
|
69
|
+
let resolveBlobPromise;
|
|
70
|
+
const blobPromise = new Promise(res => {
|
|
71
|
+
resolveBlobPromise = res;
|
|
72
|
+
});
|
|
73
|
+
canvas.toBlob(blob => resolveBlobPromise(blob), type, quality);
|
|
74
|
+
let blob;
|
|
75
|
+
try {
|
|
76
|
+
blob = await blobPromise;
|
|
77
|
+
} catch (error) {
|
|
78
|
+
throw new Error('MUI X Charts: Failed to create blob from canvas.', {
|
|
79
|
+
cause: error
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
if (!blob) {
|
|
83
|
+
throw new Error('MUI X Charts: Failed to create blob from canvas.');
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const url = URL.createObjectURL(blob);
|
|
87
|
+
triggerDownload(url, fileName || document.title);
|
|
88
|
+
URL.revokeObjectURL(url);
|
|
89
|
+
}
|
|
90
|
+
function triggerDownload(url, name) {
|
|
91
|
+
const a = document.createElement('a');
|
|
92
|
+
a.href = url;
|
|
93
|
+
a.download = name;
|
|
94
|
+
a.click();
|
|
95
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _useChartProExport = require("./useChartProExport");
|
|
7
|
+
Object.keys(_useChartProExport).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useChartProExport[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useChartProExport[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _useChartProExport2 = require("./useChartProExport.types");
|
|
18
|
+
Object.keys(_useChartProExport2).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _useChartProExport2[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _useChartProExport2[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.printChart = printChart;
|
|
8
|
+
var _ownerDocument = _interopRequireDefault(require("@mui/utils/ownerDocument"));
|
|
9
|
+
var _export = require("@mui/x-internals/export");
|
|
10
|
+
var _common = require("./common");
|
|
11
|
+
function printChart(element, {
|
|
12
|
+
fileName
|
|
13
|
+
} = {}) {
|
|
14
|
+
const printWindow = (0, _common.createExportIframe)(fileName);
|
|
15
|
+
const doc = (0, _ownerDocument.default)(element);
|
|
16
|
+
printWindow.onload = async () => {
|
|
17
|
+
const printDoc = printWindow.contentDocument;
|
|
18
|
+
const elementClone = element.cloneNode(true);
|
|
19
|
+
const container = document.createElement('div');
|
|
20
|
+
container.appendChild(elementClone);
|
|
21
|
+
printDoc.body.innerHTML = container.innerHTML;
|
|
22
|
+
const rootCandidate = element.getRootNode();
|
|
23
|
+
const root = rootCandidate.constructor.name === 'ShadowRoot' ? rootCandidate : doc;
|
|
24
|
+
await Promise.all((0, _export.loadStyleSheets)(printDoc, root));
|
|
25
|
+
printWindow.contentWindow.print();
|
|
26
|
+
const mediaQueryList = printWindow.contentWindow.matchMedia('print');
|
|
27
|
+
mediaQueryList.addEventListener('change', mql => {
|
|
28
|
+
const isAfterPrint = mql.matches === false;
|
|
29
|
+
if (isAfterPrint) {
|
|
30
|
+
doc.body.removeChild(printWindow);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
doc.body.appendChild(printWindow);
|
|
35
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useChartProExport = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _print = require("./print");
|
|
10
|
+
var _exportImage = require("./exportImage");
|
|
11
|
+
function waitForAnimationFrame() {
|
|
12
|
+
let resolve;
|
|
13
|
+
const promise = new Promise(res => {
|
|
14
|
+
resolve = res;
|
|
15
|
+
});
|
|
16
|
+
window.requestAnimationFrame(() => {
|
|
17
|
+
resolve();
|
|
18
|
+
});
|
|
19
|
+
return promise;
|
|
20
|
+
}
|
|
21
|
+
const useChartProExport = ({
|
|
22
|
+
chartRootRef,
|
|
23
|
+
instance
|
|
24
|
+
}) => {
|
|
25
|
+
const exportAsPrint = async options => {
|
|
26
|
+
const chartRoot = chartRootRef.current;
|
|
27
|
+
if (chartRoot) {
|
|
28
|
+
const enableAnimation = instance.disableAnimation();
|
|
29
|
+
try {
|
|
30
|
+
// Wait for animation frame to ensure the animation finished
|
|
31
|
+
await waitForAnimationFrame();
|
|
32
|
+
(0, _print.printChart)(chartRoot, options);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error('MUI X Charts: Error exporting chart as print:', error);
|
|
35
|
+
} finally {
|
|
36
|
+
enableAnimation();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const exportAsImage = async options => {
|
|
41
|
+
const chartRoot = chartRootRef.current;
|
|
42
|
+
if (chartRoot) {
|
|
43
|
+
const enableAnimation = instance.disableAnimation();
|
|
44
|
+
try {
|
|
45
|
+
// Wait for animation frame to ensure the animation finished
|
|
46
|
+
await waitForAnimationFrame();
|
|
47
|
+
await (0, _exportImage.exportImage)(chartRoot, options);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error('MUI X Charts: Error exporting chart as image:', error);
|
|
50
|
+
} finally {
|
|
51
|
+
enableAnimation();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
publicAPI: {
|
|
57
|
+
exportAsPrint,
|
|
58
|
+
exportAsImage
|
|
59
|
+
},
|
|
60
|
+
instance: {
|
|
61
|
+
exportAsPrint,
|
|
62
|
+
exportAsImage
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
exports.useChartProExport = useChartProExport;
|
|
67
|
+
useChartProExport.params = {};
|
|
68
|
+
useChartProExport.getDefaultizedParams = ({
|
|
69
|
+
params
|
|
70
|
+
}) => (0, _extends2.default)({}, params);
|
|
71
|
+
useChartProExport.getInitialState = () => ({
|
|
72
|
+
export: {}
|
|
73
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature } from '@mui/x-charts/internals';
|
|
2
|
+
export interface UseChartProExportParameters {}
|
|
3
|
+
export type UseChartProExportDefaultizedParameters = UseChartProExportParameters;
|
|
4
|
+
export interface UseChartProExportState {
|
|
5
|
+
export: {};
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The options to apply on the Print export.
|
|
9
|
+
* @demos
|
|
10
|
+
* - [Print export](/x/react-charts/export/#print-export-as-pdf)
|
|
11
|
+
*/
|
|
12
|
+
export interface ChartPrintExportOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The value to be used as the print window title.
|
|
15
|
+
* @default The title of the page.
|
|
16
|
+
*/
|
|
17
|
+
fileName?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The options to apply on the image export.
|
|
21
|
+
* @demos
|
|
22
|
+
* - [Image export](/x/react-charts/export/#export-as-image)
|
|
23
|
+
*/
|
|
24
|
+
export interface ChartImageExportOptions {
|
|
25
|
+
/**
|
|
26
|
+
* The value to be used as the print window title.
|
|
27
|
+
* @default The title of the page.
|
|
28
|
+
*/
|
|
29
|
+
fileName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The format of the image to be exported.
|
|
32
|
+
* Browsers are required to support 'image/png'. Some browsers also support 'image/jpeg' and 'image/webp'.
|
|
33
|
+
* @default 'image/png'
|
|
34
|
+
*/
|
|
35
|
+
type?: 'image/png' | string;
|
|
36
|
+
/**
|
|
37
|
+
* The quality of the image to be exported between 0 and 1. This is only applicable for lossy formats, such as
|
|
38
|
+
* 'image/jpeg' and 'image/webp'. 'image/png' does not support this option.
|
|
39
|
+
* @default 0.9
|
|
40
|
+
*/
|
|
41
|
+
quality?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface UseChartProExportPublicApi {
|
|
44
|
+
/**
|
|
45
|
+
* Opens the browser's print dialog, which can be used to print the chart or export it as PDF.
|
|
46
|
+
* @param {ChartPrintExportOptions} options Options to customize the print export.
|
|
47
|
+
* @returns {void}
|
|
48
|
+
*/
|
|
49
|
+
exportAsPrint: (options?: ChartPrintExportOptions) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Exports the chart as an image.
|
|
52
|
+
* If the provided `type` is not supported by the browser, it will default to `image/png`.
|
|
53
|
+
*
|
|
54
|
+
* @param {ChartPrintExportOptions} options Options to customize the print export.
|
|
55
|
+
* @returns {void}
|
|
56
|
+
*/
|
|
57
|
+
exportAsImage: (options?: ChartImageExportOptions) => void;
|
|
58
|
+
}
|
|
59
|
+
export interface UseChartProExportInstance extends UseChartProExportPublicApi {}
|
|
60
|
+
export type UseChartProExportSignature = ChartPluginSignature<{
|
|
61
|
+
params: UseChartProExportParameters;
|
|
62
|
+
defaultizedParams: UseChartProExportDefaultizedParameters;
|
|
63
|
+
state: UseChartProExportState;
|
|
64
|
+
publicAPI: UseChartProExportPublicApi;
|
|
65
|
+
instance: UseChartProExportInstance;
|
|
66
|
+
dependencies: [UseChartSeriesSignature, UseChartCartesianAxisSignature];
|
|
67
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { ChartPlugin } from '@mui/x-charts/internals';
|
|
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>, zoomData?: readonly ZoomData[]): ZoomData[];
|
|
3
4
|
export declare const useChartProZoom: ChartPlugin<UseChartProZoomSignature>;
|