@mui/x-charts-pro 8.27.0 → 8.27.4
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 +2 -2
- package/CHANGELOG.md +214 -0
- package/ChartContainerPro/ChartContainerPro.d.ts +17 -31
- package/ChartContainerPro/ChartContainerPro.js +14 -287
- package/ChartContainerPro/useChartContainerProProps.d.ts +9 -5
- package/ChartContainerPro/useChartContainerProProps.js +9 -34
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +18 -44
- package/ChartDataProviderPro/ChartDataProviderPro.js +22 -141
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +7 -7
- package/ChartDataProviderPro/useChartDataProviderProProps.js +5 -18
- package/ChartZoomSlider/index.d.ts +29 -3
- package/ChartZoomSlider/index.js +33 -30
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
- package/ChartsContainerPro/ChartsContainerPro.js +188 -0
- package/ChartsContainerPro/index.d.ts +9 -0
- package/ChartsContainerPro/index.js +17 -0
- package/ChartsContainerPro/useChartsContainerProProps.d.ts +9 -0
- package/ChartsContainerPro/useChartsContainerProProps.js +44 -0
- package/ChartsDataProvider/index.d.ts +1 -0
- package/ChartsDataProvider/index.js +16 -0
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +49 -0
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +150 -0
- package/ChartsDataProviderPro/index.d.ts +2 -0
- package/ChartsDataProviderPro/index.js +13 -0
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +10 -0
- package/ChartsDataProviderPro/useChartsDataProviderProProps.js +25 -0
- package/ChartsZoomSlider/ChartsZoomSlider.d.ts +4 -0
- package/{ChartZoomSlider/ChartZoomSlider.js → ChartsZoomSlider/ChartsZoomSlider.js} +5 -5
- package/ChartsZoomSlider/index.d.ts +3 -0
- package/ChartsZoomSlider/index.js +26 -0
- package/{ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSlider.d.ts} +3 -3
- package/{ChartZoomSlider/internals/ChartAxisZoomSlider.js → ChartsZoomSlider/internals/ChartsAxisZoomSlider.js} +8 -8
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.d.ts} +3 -3
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js} +7 -7
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.d.ts} +3 -3
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.js} +4 -4
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.d.ts +9 -0
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.js} +2 -2
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderThumb.d.ts +12 -0
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderThumb.js} +8 -8
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.d.ts} +3 -3
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js} +4 -4
- package/{ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.d.ts → ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.d.ts} +5 -5
- package/{ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.js → ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.js} +2 -2
- package/ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.d.ts +15 -0
- package/{ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.js → ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.js} +2 -2
- package/LineChartPro/LineChartPro.js +2 -2
- package/ScatterChartPro/ScatterChartPro.js +2 -2
- package/esm/BarChartPro/BarChartPro.js +2 -2
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +17 -31
- package/esm/ChartContainerPro/ChartContainerPro.js +15 -286
- package/esm/ChartContainerPro/useChartContainerProProps.d.ts +9 -5
- package/esm/ChartContainerPro/useChartContainerProProps.js +10 -33
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +18 -44
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +17 -139
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +7 -7
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +6 -17
- package/esm/ChartZoomSlider/index.d.ts +29 -3
- package/esm/ChartZoomSlider/index.js +34 -3
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +2 -0
- package/esm/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
- package/esm/ChartsContainerPro/ChartsContainerPro.js +182 -0
- package/esm/ChartsContainerPro/index.d.ts +9 -0
- package/esm/ChartsContainerPro/index.js +6 -0
- package/esm/ChartsContainerPro/useChartsContainerProProps.d.ts +9 -0
- package/esm/ChartsContainerPro/useChartsContainerProProps.js +37 -0
- package/esm/ChartsDataProvider/index.d.ts +1 -0
- package/esm/ChartsDataProvider/index.js +2 -0
- package/esm/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +49 -0
- package/esm/ChartsDataProviderPro/ChartsDataProviderPro.js +144 -0
- package/esm/ChartsDataProviderPro/index.d.ts +2 -0
- package/esm/ChartsDataProviderPro/index.js +2 -0
- package/esm/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +10 -0
- package/esm/ChartsDataProviderPro/useChartsDataProviderProProps.js +19 -0
- package/esm/ChartsZoomSlider/ChartsZoomSlider.d.ts +4 -0
- package/esm/{ChartZoomSlider/ChartZoomSlider.js → ChartsZoomSlider/ChartsZoomSlider.js} +4 -4
- package/esm/ChartsZoomSlider/index.d.ts +3 -0
- package/esm/ChartsZoomSlider/index.js +3 -0
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSlider.d.ts} +3 -3
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSlider.js → ChartsZoomSlider/internals/ChartsAxisZoomSlider.js} +7 -7
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.d.ts} +3 -3
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js} +5 -5
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.d.ts} +3 -3
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.js} +3 -3
- package/esm/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.d.ts +9 -0
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.js} +1 -1
- package/esm/ChartsZoomSlider/internals/ChartsAxisZoomSliderThumb.d.ts +12 -0
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderThumb.js} +6 -6
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.d.ts} +3 -3
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js} +2 -2
- package/esm/{ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.d.ts → ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.d.ts} +5 -5
- package/esm/{ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.js → ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.js} +1 -1
- package/esm/ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.d.ts +15 -0
- package/esm/{ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.js → ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.js} +1 -1
- package/esm/LineChartPro/LineChartPro.js +2 -2
- package/esm/ScatterChartPro/ScatterChartPro.js +2 -2
- package/esm/index.d.ts +6 -1
- package/esm/index.js +5 -1
- package/esm/internals/index.d.ts +5 -3
- package/esm/internals/index.js +3 -2
- package/esm/internals/plugins/useChartProExport/exportImage.js +8 -0
- package/index.d.ts +6 -1
- package/index.js +45 -1
- package/internals/index.d.ts +5 -3
- package/internals/index.js +10 -3
- package/internals/plugins/useChartProExport/exportImage.js +8 -0
- package/package.json +3 -3
- package/ChartZoomSlider/ChartZoomSlider.d.ts +0 -4
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +0 -9
- package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +0 -12
- package/ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.d.ts +0 -15
- package/esm/ChartZoomSlider/ChartZoomSlider.d.ts +0 -4
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +0 -9
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +0 -12
- package/esm/ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.d.ts +0 -15
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/ChartsTooltipZoomSliderValue.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/ChartsTooltipZoomSliderValue.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/constants.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/constants.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/AreaPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/AreaPreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/BarPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/BarPreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LineAreaPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LineAreaPreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LinePreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LinePreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/PreviewPlot.types.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/PreviewPlot.types.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/ScatterPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/ScatterPreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/seriesPreviewPlotMap.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/seriesPreviewPlotMap.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/zoom-utils.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/zoom-utils.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/ChartsTooltipZoomSliderValue.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/ChartsTooltipZoomSliderValue.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/constants.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/constants.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/AreaPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/AreaPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/BarPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/BarPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LineAreaPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LineAreaPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LinePreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LinePreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/PreviewPlot.types.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/PreviewPlot.types.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/ScatterPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/ScatterPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/seriesPreviewPlotMap.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/seriesPreviewPlotMap.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/zoom-utils.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/zoom-utils.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AxisId } from '@mui/x-charts/internals';
|
|
2
|
-
interface
|
|
2
|
+
interface ChartsZoomSliderProps {
|
|
3
3
|
/**
|
|
4
4
|
* The ID of the axis this overview refers to.
|
|
5
5
|
*/
|
|
@@ -13,8 +13,8 @@ interface ChartZoomSliderProps {
|
|
|
13
13
|
* Renders the zoom slider for a specific axis.
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function ChartsAxisZoomSlider({
|
|
17
17
|
axisDirection,
|
|
18
18
|
axisId
|
|
19
|
-
}:
|
|
19
|
+
}: ChartsZoomSliderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
20
|
export {};
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP, selectorChartAxisZoomOptionsLookup, useDrawingArea, useStore, ZOOM_SLIDER_MARGIN, ZOOM_SLIDER_PREVIEW_SIZE } from '@mui/x-charts/internals';
|
|
5
5
|
import { useXAxes, useYAxes } from '@mui/x-charts/hooks';
|
|
6
|
-
import {
|
|
6
|
+
import { ChartsAxisZoomSliderPreview } from "./ChartsAxisZoomSliderPreview.js";
|
|
7
7
|
import { ZOOM_SLIDER_ACTIVE_TRACK_SIZE, ZOOM_SLIDER_SIZE, ZOOM_SLIDER_TRACK_SIZE } from "./constants.js";
|
|
8
8
|
import { selectorChartAxisZoomData } from "../../internals/plugins/useChartProZoom/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { ChartsAxisZoomSliderTrack } from "./ChartsAxisZoomSliderTrack.js";
|
|
10
|
+
import { ChartsAxisZoomSliderActiveTrack } from "./ChartsAxisZoomSliderActiveTrack.js";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
/**
|
|
13
13
|
* Renders the zoom slider for a specific axis.
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export function
|
|
16
|
+
export function ChartsAxisZoomSlider({
|
|
17
17
|
axisDirection,
|
|
18
18
|
axisId
|
|
19
19
|
}) {
|
|
@@ -62,7 +62,7 @@ export function ChartAxisZoomSlider({
|
|
|
62
62
|
tooltipConditions = axis.zoom?.slider?.showTooltip ?? DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP;
|
|
63
63
|
}
|
|
64
64
|
const backgroundRectOffset = (sliderSize - ZOOM_SLIDER_TRACK_SIZE) / 2;
|
|
65
|
-
const track = showPreview ? /*#__PURE__*/_jsx(
|
|
65
|
+
const track = showPreview ? /*#__PURE__*/_jsx(ChartsAxisZoomSliderPreview, {
|
|
66
66
|
axisId: axisId,
|
|
67
67
|
axisDirection: axisDirection,
|
|
68
68
|
reverse: reverse,
|
|
@@ -70,7 +70,7 @@ export function ChartAxisZoomSlider({
|
|
|
70
70
|
y: 0,
|
|
71
71
|
height: axisDirection === 'x' ? ZOOM_SLIDER_PREVIEW_SIZE : drawingArea.height,
|
|
72
72
|
width: axisDirection === 'x' ? drawingArea.width : ZOOM_SLIDER_PREVIEW_SIZE
|
|
73
|
-
}) : /*#__PURE__*/_jsx(
|
|
73
|
+
}) : /*#__PURE__*/_jsx(ChartsAxisZoomSliderTrack, {
|
|
74
74
|
x: axisDirection === 'x' ? 0 : backgroundRectOffset,
|
|
75
75
|
y: axisDirection === 'x' ? backgroundRectOffset : 0,
|
|
76
76
|
height: axisDirection === 'x' ? ZOOM_SLIDER_TRACK_SIZE : drawingArea.height,
|
|
@@ -89,7 +89,7 @@ export function ChartAxisZoomSlider({
|
|
|
89
89
|
style: {
|
|
90
90
|
touchAction: 'none'
|
|
91
91
|
},
|
|
92
|
-
children: [track, /*#__PURE__*/_jsx(
|
|
92
|
+
children: [track, /*#__PURE__*/_jsx(ChartsAxisZoomSliderActiveTrack, {
|
|
93
93
|
zoomData: zoomData,
|
|
94
94
|
axisId: axisId,
|
|
95
95
|
axisPosition: axisPosition,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AxisId, type ZoomData } from '@mui/x-charts/internals';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ChartsAxisZoomSliderActiveTrackProps {
|
|
3
3
|
axisId: AxisId;
|
|
4
4
|
axisDirection: 'x' | 'y';
|
|
5
5
|
axisPosition: 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -11,7 +11,7 @@ export interface ChartAxisZoomSliderActiveTrackProps {
|
|
|
11
11
|
onPointerEnter?: () => void;
|
|
12
12
|
onPointerLeave?: () => void;
|
|
13
13
|
}
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function ChartsAxisZoomSliderActiveTrack({
|
|
15
15
|
axisId,
|
|
16
16
|
axisDirection,
|
|
17
17
|
axisPosition,
|
|
@@ -22,4 +22,4 @@ export declare function ChartAxisZoomSliderActiveTrack({
|
|
|
22
22
|
showTooltip,
|
|
23
23
|
onPointerEnter,
|
|
24
24
|
onPointerLeave
|
|
25
|
-
}:
|
|
25
|
+
}: ChartsAxisZoomSliderActiveTrackProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,11 +7,11 @@ import * as React from 'react';
|
|
|
7
7
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
8
8
|
import { shouldForwardProp } from '@mui/system';
|
|
9
9
|
import { selectorChartAxisZoomData } from "../../internals/plugins/useChartProZoom/index.js";
|
|
10
|
-
import {
|
|
10
|
+
import { ChartsAxisZoomSliderThumb } from "./ChartsAxisZoomSliderThumb.js";
|
|
11
11
|
import { ChartsTooltipZoomSliderValue } from "./ChartsTooltipZoomSliderValue.js";
|
|
12
12
|
import { calculateZoomEnd, calculateZoomFromPoint, calculateZoomStart } from "./zoom-utils.js";
|
|
13
13
|
import { ZOOM_SLIDER_THUMB_HEIGHT, ZOOM_SLIDER_THUMB_WIDTH } from "./constants.js";
|
|
14
|
-
import { useUtilityClasses } from "./
|
|
14
|
+
import { useUtilityClasses } from "./chartsAxisZoomSliderTrackClasses.js";
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
const ZoomSliderActiveTrackRect = styled('rect', {
|
|
17
17
|
slot: 'internal',
|
|
@@ -39,7 +39,7 @@ const ZoomSliderActiveTrackRect = styled('rect', {
|
|
|
39
39
|
})
|
|
40
40
|
}]
|
|
41
41
|
}));
|
|
42
|
-
export function
|
|
42
|
+
export function ChartsAxisZoomSliderActiveTrack({
|
|
43
43
|
axisId,
|
|
44
44
|
axisDirection,
|
|
45
45
|
axisPosition,
|
|
@@ -224,7 +224,7 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
224
224
|
onPointerEnter: onPointerEnter,
|
|
225
225
|
onPointerLeave: onPointerLeave,
|
|
226
226
|
className: classes.active
|
|
227
|
-
}), /*#__PURE__*/_jsx(
|
|
227
|
+
}), /*#__PURE__*/_jsx(ChartsAxisZoomSliderThumb, {
|
|
228
228
|
ref: setStartThumbEl,
|
|
229
229
|
x: startThumbX,
|
|
230
230
|
y: startThumbY,
|
|
@@ -235,7 +235,7 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
235
235
|
onPointerEnter: onPointerEnter,
|
|
236
236
|
onPointerLeave: onPointerLeave,
|
|
237
237
|
placement: "start"
|
|
238
|
-
}), /*#__PURE__*/_jsx(
|
|
238
|
+
}), /*#__PURE__*/_jsx(ChartsAxisZoomSliderThumb, {
|
|
239
239
|
ref: setEndThumbEl,
|
|
240
240
|
x: endThumbX,
|
|
241
241
|
y: endThumbY,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AxisId } from '@mui/x-charts/internals';
|
|
2
|
-
interface
|
|
2
|
+
interface ChartsAxisZoomSliderPreviewProps {
|
|
3
3
|
axisId: AxisId;
|
|
4
4
|
axisDirection: 'x' | 'y';
|
|
5
5
|
reverse: boolean;
|
|
@@ -8,10 +8,10 @@ interface ChartAxisZoomSliderPreviewProps {
|
|
|
8
8
|
height: number;
|
|
9
9
|
width: number;
|
|
10
10
|
}
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function ChartsAxisZoomSliderPreview({
|
|
12
12
|
axisId,
|
|
13
13
|
axisDirection,
|
|
14
14
|
reverse,
|
|
15
15
|
...props
|
|
16
|
-
}:
|
|
16
|
+
}: ChartsAxisZoomSliderPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -7,7 +7,7 @@ import { selectorChartAxisZoomOptionsLookup, useStore } from '@mui/x-charts/inte
|
|
|
7
7
|
import { alpha } from '@mui/system';
|
|
8
8
|
import useId from '@mui/utils/useId';
|
|
9
9
|
import { selectorChartAxisZoomData } from "../../internals/plugins/useChartProZoom/index.js";
|
|
10
|
-
import {
|
|
10
|
+
import { ChartsAxisZoomSliderPreviewContent } from "./ChartsAxisZoomSliderPreviewContent.js";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const PreviewBackgroundRect = styled('rect', {
|
|
13
13
|
slot: 'internal',
|
|
@@ -20,7 +20,7 @@ const PreviewBackgroundRect = styled('rect', {
|
|
|
20
20
|
stroke: theme.palette.grey[700],
|
|
21
21
|
fill: alpha(theme.palette.grey[700], 0.4)
|
|
22
22
|
}));
|
|
23
|
-
export function
|
|
23
|
+
export function ChartsAxisZoomSliderPreview(_ref) {
|
|
24
24
|
let {
|
|
25
25
|
axisId,
|
|
26
26
|
axisDirection
|
|
@@ -34,7 +34,7 @@ export function ChartAxisZoomSliderPreview(_ref) {
|
|
|
34
34
|
fill: "transparent",
|
|
35
35
|
rx: 4,
|
|
36
36
|
ry: 4
|
|
37
|
-
})), /*#__PURE__*/_jsx(
|
|
37
|
+
})), /*#__PURE__*/_jsx(ChartsAxisZoomSliderPreviewContent, _extends({
|
|
38
38
|
axisId: axisId
|
|
39
39
|
}, props))]
|
|
40
40
|
}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type AxisId } from '@mui/x-charts/internals';
|
|
2
|
+
export interface ChartsAxisZoomSliderPreviewContentProps {
|
|
3
|
+
axisId: AxisId;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
height: number;
|
|
7
|
+
width: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function ChartsAxisZoomSliderPreviewContent(props: ChartsAxisZoomSliderPreviewContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { selectorChartSeriesProcessed, useStore } from '@mui/x-charts/internals';
|
|
4
4
|
import { seriesPreviewPlotMap } from "./seriesPreviewPlotMap.js";
|
|
5
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export function
|
|
6
|
+
export function ChartsAxisZoomSliderPreviewContent(props) {
|
|
7
7
|
const {
|
|
8
8
|
axisId,
|
|
9
9
|
x,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ChartsZoomSliderThumbOwnerState {
|
|
3
|
+
onMove: (event: PointerEvent) => void;
|
|
4
|
+
orientation: 'horizontal' | 'vertical';
|
|
5
|
+
placement: 'start' | 'end';
|
|
6
|
+
}
|
|
7
|
+
export interface ChartsZoomSliderThumbProps extends Omit<React.ComponentProps<'rect'>, 'orientation'>, ChartsZoomSliderThumbOwnerState {}
|
|
8
|
+
/**
|
|
9
|
+
* Renders the zoom slider thumb, which is responsible for resizing the zoom range.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const ChartsAxisZoomSliderThumb: React.ForwardRefExoticComponent<Omit<ChartsZoomSliderThumbProps, "ref"> & React.RefAttributes<SVGRectElement>>;
|
|
@@ -9,7 +9,7 @@ import useForkRef from '@mui/utils/useForkRef';
|
|
|
9
9
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
10
10
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
11
11
|
import clsx from 'clsx';
|
|
12
|
-
import {
|
|
12
|
+
import { chartsAxisZoomSliderThumbClasses, useUtilityClasses } from "./chartsAxisZoomSliderThumbClasses.js";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
const Rect = styled('rect', {
|
|
15
15
|
slot: 'internal',
|
|
@@ -17,17 +17,17 @@ const Rect = styled('rect', {
|
|
|
17
17
|
})(({
|
|
18
18
|
theme
|
|
19
19
|
}) => ({
|
|
20
|
-
[`&.${
|
|
20
|
+
[`&.${chartsAxisZoomSliderThumbClasses.root}`]: _extends({
|
|
21
21
|
fill: (theme.vars || theme).palette.common.white,
|
|
22
22
|
stroke: (theme.vars || theme).palette.grey[500]
|
|
23
23
|
}, theme.applyStyles('dark', {
|
|
24
24
|
fill: (theme.vars || theme).palette.grey[300],
|
|
25
25
|
stroke: (theme.vars || theme).palette.grey[600]
|
|
26
26
|
})),
|
|
27
|
-
[`&.${
|
|
27
|
+
[`&.${chartsAxisZoomSliderThumbClasses.horizontal}`]: {
|
|
28
28
|
cursor: 'ew-resize'
|
|
29
29
|
},
|
|
30
|
-
[`&.${
|
|
30
|
+
[`&.${chartsAxisZoomSliderThumbClasses.vertical}`]: {
|
|
31
31
|
cursor: 'ns-resize'
|
|
32
32
|
}
|
|
33
33
|
}));
|
|
@@ -39,7 +39,7 @@ function preventDefault(event) {
|
|
|
39
39
|
* Renders the zoom slider thumb, which is responsible for resizing the zoom range.
|
|
40
40
|
* @internal
|
|
41
41
|
*/
|
|
42
|
-
export const
|
|
42
|
+
export const ChartsAxisZoomSliderThumb = /*#__PURE__*/React.forwardRef(function ChartsAxisZoomSliderThumb(_ref, forwardedRef) {
|
|
43
43
|
let {
|
|
44
44
|
className,
|
|
45
45
|
onMove,
|
|
@@ -102,4 +102,4 @@ export const ChartAxisZoomSliderThumb = /*#__PURE__*/React.forwardRef(function C
|
|
|
102
102
|
ry: ry
|
|
103
103
|
}, other));
|
|
104
104
|
});
|
|
105
|
-
if (process.env.NODE_ENV !== "production")
|
|
105
|
+
if (process.env.NODE_ENV !== "production") ChartsAxisZoomSliderThumb.displayName = "ChartsAxisZoomSliderThumb";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type AxisId } from '@mui/x-charts/internals';
|
|
3
|
-
interface
|
|
3
|
+
interface ChartsAxisZoomSliderTrackProps extends React.ComponentProps<'rect'> {
|
|
4
4
|
axisId: AxisId;
|
|
5
5
|
axisDirection: 'x' | 'y';
|
|
6
6
|
reverse: boolean;
|
|
7
7
|
onSelectStart?: () => void;
|
|
8
8
|
onSelectEnd?: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function ChartsAxisZoomSliderTrack({
|
|
11
11
|
axisId,
|
|
12
12
|
axisDirection,
|
|
13
13
|
reverse,
|
|
14
14
|
onSelectStart,
|
|
15
15
|
onSelectEnd,
|
|
16
16
|
...other
|
|
17
|
-
}:
|
|
17
|
+
}: ChartsAxisZoomSliderTrackProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -10,7 +10,7 @@ import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
|
10
10
|
import { shouldForwardProp } from '@mui/system';
|
|
11
11
|
import clsx from 'clsx';
|
|
12
12
|
import { calculateZoomEnd, calculateZoomFromPoint, calculateZoomStart } from "./zoom-utils.js";
|
|
13
|
-
import { useUtilityClasses } from "./
|
|
13
|
+
import { useUtilityClasses } from "./chartsAxisZoomSliderTrackClasses.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
const ZoomSliderTrack = styled('rect', {
|
|
16
16
|
slot: 'internal',
|
|
@@ -41,7 +41,7 @@ const ZoomSliderTrack = styled('rect', {
|
|
|
41
41
|
}
|
|
42
42
|
}]
|
|
43
43
|
}));
|
|
44
|
-
export function
|
|
44
|
+
export function ChartsAxisZoomSliderTrack(_ref) {
|
|
45
45
|
let {
|
|
46
46
|
axisId,
|
|
47
47
|
axisDirection,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface
|
|
1
|
+
import type { ChartsZoomSliderThumbOwnerState } from "./ChartsAxisZoomSliderThumb.js";
|
|
2
|
+
export interface ChartsAxisZoomSliderThumbClasses {
|
|
3
3
|
/** Styles applied to the root element. */
|
|
4
4
|
root: string;
|
|
5
5
|
/** Styles applied to the root element when it is horizontal. */
|
|
@@ -11,7 +11,7 @@ export interface ChartAxisZoomSliderThumbClasses {
|
|
|
11
11
|
/** Styles applied to the root element when it is an end thumb. */
|
|
12
12
|
end: string;
|
|
13
13
|
}
|
|
14
|
-
export type
|
|
15
|
-
export declare const
|
|
14
|
+
export type ChartsAxisZoomSliderThumbClassKey = keyof ChartsAxisZoomSliderThumbClasses;
|
|
15
|
+
export declare const chartsAxisZoomSliderThumbClasses: ChartsAxisZoomSliderThumbClasses;
|
|
16
16
|
export declare function getAxisZoomSliderThumbUtilityClass(slot: string): string;
|
|
17
|
-
export declare const useUtilityClasses: (ownerState:
|
|
17
|
+
export declare const useUtilityClasses: (ownerState: ChartsZoomSliderThumbOwnerState) => Record<"root", string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
2
|
import composeClasses from '@mui/utils/composeClasses';
|
|
3
3
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
4
|
-
export const
|
|
4
|
+
export const chartsAxisZoomSliderThumbClasses = generateUtilityClasses('MuiChartAxisZoomSliderThumb', ['root', 'horizontal', 'vertical', 'start', 'end']);
|
|
5
5
|
export function getAxisZoomSliderThumbUtilityClass(slot) {
|
|
6
6
|
return generateUtilityClass('MuiChartAxisZoomSliderThumb', slot);
|
|
7
7
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChartsAxisZoomSliderActiveTrackProps } from "./ChartsAxisZoomSliderActiveTrack.js";
|
|
2
|
+
export interface ChartsAxisZoomSliderTrackClasses {
|
|
3
|
+
/** Styles applied to the root element when it is horizontal. */
|
|
4
|
+
horizontal: string;
|
|
5
|
+
/** Styles applied to the root element when it is vertical. */
|
|
6
|
+
vertical: string;
|
|
7
|
+
/** Styles applied to the root element to the active part of the track. */
|
|
8
|
+
active: string;
|
|
9
|
+
/** Styles applied to the root element to the background part of the track. */
|
|
10
|
+
background: string;
|
|
11
|
+
}
|
|
12
|
+
export type ChartsAxisZoomSliderTrackClassKey = keyof ChartsAxisZoomSliderTrackClasses;
|
|
13
|
+
export declare const chartsAxisZoomSliderTrackClasses: ChartsAxisZoomSliderTrackClasses;
|
|
14
|
+
export declare function getAxisZoomSliderTrackUtilityClass(slot: string): string;
|
|
15
|
+
export declare const useUtilityClasses: (props: Partial<ChartsAxisZoomSliderActiveTrackProps>) => Record<"background" | "active", string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import composeClasses from '@mui/utils/composeClasses';
|
|
2
2
|
import ClassNameGenerator from '@mui/utils/ClassNameGenerator';
|
|
3
|
-
export const
|
|
3
|
+
export const chartsAxisZoomSliderTrackClasses = ['horizontal', 'vertical', 'background', 'active'].reduce((acc, slot) => {
|
|
4
4
|
acc[slot] = getAxisZoomSliderTrackUtilityClass(slot);
|
|
5
5
|
return acc;
|
|
6
6
|
}, {});
|
|
@@ -18,7 +18,7 @@ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
|
18
18
|
import { useLineChartProps } from '@mui/x-charts/internals';
|
|
19
19
|
import { ChartsWrapper } from '@mui/x-charts/ChartsWrapper';
|
|
20
20
|
import { ChartsBrushOverlay } from '@mui/x-charts/ChartsBrushOverlay';
|
|
21
|
-
import {
|
|
21
|
+
import { ChartsZoomSlider } from "../ChartsZoomSlider/index.js";
|
|
22
22
|
import { ChartsToolbarPro } from "../ChartsToolbarPro/index.js";
|
|
23
23
|
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
24
24
|
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
@@ -80,7 +80,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
80
80
|
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
81
81
|
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
82
82
|
children: [/*#__PURE__*/_jsx(AreaPlot, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlot, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
83
|
-
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(
|
|
83
|
+
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsZoomSlider, {}), /*#__PURE__*/_jsx("g", {
|
|
84
84
|
"data-drawing-container": true,
|
|
85
85
|
children: /*#__PURE__*/_jsx(MarkPlot, _extends({}, markPlotProps))
|
|
86
86
|
}), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), /*#__PURE__*/_jsx(ChartsBrushOverlay, {}), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
|
|
@@ -17,7 +17,7 @@ import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
|
17
17
|
import { useScatterChartProps } from '@mui/x-charts/internals';
|
|
18
18
|
import { ChartsWrapper } from '@mui/x-charts/ChartsWrapper';
|
|
19
19
|
import { ChartsBrushOverlay } from '@mui/x-charts/ChartsBrushOverlay';
|
|
20
|
-
import {
|
|
20
|
+
import { ChartsZoomSlider } from "../ChartsZoomSlider/index.js";
|
|
21
21
|
import { ChartsToolbarPro } from "../ChartsToolbarPro/index.js";
|
|
22
22
|
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
23
23
|
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
@@ -72,7 +72,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
|
|
|
72
72
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
73
73
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
74
74
|
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
75
|
-
children: [/*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(
|
|
75
|
+
children: [/*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsZoomSlider, {}), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
|
|
76
76
|
"data-drawing-container": true,
|
|
77
77
|
children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
|
|
78
78
|
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), /*#__PURE__*/_jsx(ChartsBrushOverlay, {}), children]
|
package/esm/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from '@mui/x-charts/SparkLineChart';
|
|
|
18
18
|
export * from '@mui/x-charts/Gauge';
|
|
19
19
|
export * from '@mui/x-charts/RadarChart';
|
|
20
20
|
export * from '@mui/x-charts/ChartsSurface';
|
|
21
|
+
export * from '@mui/x-charts/ChartsDataProvider';
|
|
21
22
|
export * from '@mui/x-charts/ChartDataProvider';
|
|
22
23
|
export * from '@mui/x-charts/ChartsLabel';
|
|
23
24
|
export * from '@mui/x-charts/ChartsOverlay';
|
|
@@ -29,8 +30,11 @@ export * from "./models/index.js";
|
|
|
29
30
|
export * from "./plugins/index.js";
|
|
30
31
|
export * from "./colorPalettes/index.js";
|
|
31
32
|
export * from "./Heatmap/index.js";
|
|
33
|
+
export { ChartsContainerPro } from "./ChartsContainerPro/index.js";
|
|
34
|
+
export type { ChartsContainerProProps, ChartsContainerProSlots, ChartsContainerProSlotProps } from "./ChartsContainerPro/index.js";
|
|
32
35
|
export { ChartContainerPro } from "./ChartContainerPro/index.js";
|
|
33
|
-
export type { ChartContainerProProps } from "./ChartContainerPro/index.js";
|
|
36
|
+
export type { ChartContainerProProps, ChartContainerProSlots, ChartContainerProSlotProps } from "./ChartContainerPro/index.js";
|
|
37
|
+
export * from "./ChartsDataProviderPro/index.js";
|
|
34
38
|
export * from "./ChartDataProviderPro/index.js";
|
|
35
39
|
export * from "./ScatterChartPro/index.js";
|
|
36
40
|
export * from "./SankeyChart/index.js";
|
|
@@ -40,5 +44,6 @@ export * from "./PieChartPro/index.js";
|
|
|
40
44
|
export * from "./FunnelChart/index.js";
|
|
41
45
|
export * from "./RadarChartPro/index.js";
|
|
42
46
|
export * from "./ChartZoomSlider/index.js";
|
|
47
|
+
export * from "./ChartsZoomSlider/index.js";
|
|
43
48
|
export * from "./ChartsToolbarPro/index.js";
|
|
44
49
|
export type { ChartImageExportOptions, ChartPrintExportOptions } from "./internals/plugins/useChartProExport/index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v8.27.
|
|
2
|
+
* @mui/x-charts-pro v8.27.4
|
|
3
3
|
*
|
|
4
4
|
* @license SEE LICENSE IN LICENSE
|
|
5
5
|
* This source code is licensed under the SEE LICENSE IN LICENSE license found in the
|
|
@@ -27,6 +27,7 @@ export * from '@mui/x-charts/SparkLineChart';
|
|
|
27
27
|
export * from '@mui/x-charts/Gauge';
|
|
28
28
|
export * from '@mui/x-charts/RadarChart';
|
|
29
29
|
export * from '@mui/x-charts/ChartsSurface';
|
|
30
|
+
export * from '@mui/x-charts/ChartsDataProvider';
|
|
30
31
|
export * from '@mui/x-charts/ChartDataProvider';
|
|
31
32
|
export * from '@mui/x-charts/ChartsLabel';
|
|
32
33
|
export * from '@mui/x-charts/ChartsOverlay';
|
|
@@ -44,7 +45,9 @@ export * from "./colorPalettes/index.js";
|
|
|
44
45
|
|
|
45
46
|
// Pro components
|
|
46
47
|
export * from "./Heatmap/index.js";
|
|
48
|
+
export { ChartsContainerPro } from "./ChartsContainerPro/index.js";
|
|
47
49
|
export { ChartContainerPro } from "./ChartContainerPro/index.js";
|
|
50
|
+
export * from "./ChartsDataProviderPro/index.js";
|
|
48
51
|
export * from "./ChartDataProviderPro/index.js";
|
|
49
52
|
export * from "./ScatterChartPro/index.js";
|
|
50
53
|
export * from "./SankeyChart/index.js";
|
|
@@ -54,4 +57,5 @@ export * from "./PieChartPro/index.js";
|
|
|
54
57
|
export * from "./FunnelChart/index.js";
|
|
55
58
|
export * from "./RadarChartPro/index.js";
|
|
56
59
|
export * from "./ChartZoomSlider/index.js";
|
|
60
|
+
export * from "./ChartsZoomSlider/index.js";
|
|
57
61
|
export * from "./ChartsToolbarPro/index.js";
|
package/esm/internals/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.js";
|
|
2
|
+
export type { UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.js";
|
|
1
3
|
export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
2
4
|
export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
|
|
3
|
-
export { seriesPreviewPlotMap } from "../
|
|
4
|
-
export type { PreviewPlotProps } from "../
|
|
5
|
-
export { defaultSeriesConfigPro } from "../
|
|
5
|
+
export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.js";
|
|
6
|
+
export type { PreviewPlotProps } from "../ChartsZoomSlider/internals/previews/PreviewPlot.types.js";
|
|
7
|
+
export { defaultSeriesConfigPro } from "../ChartsDataProviderPro/ChartsDataProviderPro.js";
|
|
6
8
|
export type { ProPluginsPerSeriesType } from "../context/ChartProApi.js";
|
|
7
9
|
export { defaultSlotsMaterial } from "./material/index.js";
|
package/esm/internals/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.js";
|
|
1
2
|
export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
2
|
-
export { seriesPreviewPlotMap } from "../
|
|
3
|
-
export { defaultSeriesConfigPro } from "../
|
|
3
|
+
export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.js";
|
|
4
|
+
export { defaultSeriesConfigPro } from "../ChartsDataProviderPro/ChartsDataProviderPro.js";
|
|
4
5
|
export { defaultSlotsMaterial } from "./material/index.js";
|
|
@@ -40,6 +40,10 @@ export async function exportImage(element, svg, params) {
|
|
|
40
40
|
applyStyles(svg, previousStyles);
|
|
41
41
|
exportDoc.body.replaceChildren(elementClone);
|
|
42
42
|
exportDoc.body.style.margin = '0px';
|
|
43
|
+
/* Set display block through styles to ensure that CSS rules that target `body` don't accidentally target this
|
|
44
|
+
* iframe's body, which might cause the body to have no intrinsic width or height, leading to the canvas having a
|
|
45
|
+
* size of 0px, which causes the `toBlob` call to return null. */
|
|
46
|
+
exportDoc.body.style.display = 'block';
|
|
43
47
|
/* The body's parent has a width of 0, so we use fit-content to ensure that the body adjusts its width to the width
|
|
44
48
|
* of its children. */
|
|
45
49
|
exportDoc.body.style.width = 'fit-content';
|
|
@@ -63,6 +67,10 @@ export async function exportImage(element, svg, params) {
|
|
|
63
67
|
canvas.height = exportDocBodySize.height * ratio;
|
|
64
68
|
canvas.style.width = `${exportDocBodySize.width}px`;
|
|
65
69
|
canvas.style.height = `${exportDocBodySize.height}px`;
|
|
70
|
+
if (canvas.width === 0 || canvas.height === 0) {
|
|
71
|
+
doc.body.removeChild(iframe);
|
|
72
|
+
throw new Error(`MUI X Charts: Cannot export an image with zero width or height. Width: ${canvas.width}px. Height: ${canvas.height}px.`);
|
|
73
|
+
}
|
|
66
74
|
try {
|
|
67
75
|
await drawDocument(iframe.contentDocument, canvas, {
|
|
68
76
|
// Handle retina displays: https://github.com/cburgmer/rasterizeHTML.js/blob/262b3404d1c469ce4a7750a2976dec09b8ae2d6c/examples/retina.html#L71
|
package/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from '@mui/x-charts/SparkLineChart';
|
|
|
18
18
|
export * from '@mui/x-charts/Gauge';
|
|
19
19
|
export * from '@mui/x-charts/RadarChart';
|
|
20
20
|
export * from '@mui/x-charts/ChartsSurface';
|
|
21
|
+
export * from '@mui/x-charts/ChartsDataProvider';
|
|
21
22
|
export * from '@mui/x-charts/ChartDataProvider';
|
|
22
23
|
export * from '@mui/x-charts/ChartsLabel';
|
|
23
24
|
export * from '@mui/x-charts/ChartsOverlay';
|
|
@@ -29,8 +30,11 @@ export * from "./models/index.js";
|
|
|
29
30
|
export * from "./plugins/index.js";
|
|
30
31
|
export * from "./colorPalettes/index.js";
|
|
31
32
|
export * from "./Heatmap/index.js";
|
|
33
|
+
export { ChartsContainerPro } from "./ChartsContainerPro/index.js";
|
|
34
|
+
export type { ChartsContainerProProps, ChartsContainerProSlots, ChartsContainerProSlotProps } from "./ChartsContainerPro/index.js";
|
|
32
35
|
export { ChartContainerPro } from "./ChartContainerPro/index.js";
|
|
33
|
-
export type { ChartContainerProProps } from "./ChartContainerPro/index.js";
|
|
36
|
+
export type { ChartContainerProProps, ChartContainerProSlots, ChartContainerProSlotProps } from "./ChartContainerPro/index.js";
|
|
37
|
+
export * from "./ChartsDataProviderPro/index.js";
|
|
34
38
|
export * from "./ChartDataProviderPro/index.js";
|
|
35
39
|
export * from "./ScatterChartPro/index.js";
|
|
36
40
|
export * from "./SankeyChart/index.js";
|
|
@@ -40,5 +44,6 @@ export * from "./PieChartPro/index.js";
|
|
|
40
44
|
export * from "./FunnelChart/index.js";
|
|
41
45
|
export * from "./RadarChartPro/index.js";
|
|
42
46
|
export * from "./ChartZoomSlider/index.js";
|
|
47
|
+
export * from "./ChartsZoomSlider/index.js";
|
|
43
48
|
export * from "./ChartsToolbarPro/index.js";
|
|
44
49
|
export type { ChartImageExportOptions, ChartPrintExportOptions } from "./internals/plugins/useChartProExport/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts-pro v8.27.
|
|
2
|
+
* @mui/x-charts-pro v8.27.4
|
|
3
3
|
*
|
|
4
4
|
* @license SEE LICENSE IN LICENSE
|
|
5
5
|
* This source code is licensed under the SEE LICENSE IN LICENSE license found in the
|
|
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
11
11
|
value: true
|
|
12
12
|
});
|
|
13
13
|
var _exportNames = {
|
|
14
|
+
ChartsContainerPro: true,
|
|
14
15
|
ChartContainerPro: true
|
|
15
16
|
};
|
|
16
17
|
Object.defineProperty(exports, "ChartContainerPro", {
|
|
@@ -19,6 +20,12 @@ Object.defineProperty(exports, "ChartContainerPro", {
|
|
|
19
20
|
return _ChartContainerPro.ChartContainerPro;
|
|
20
21
|
}
|
|
21
22
|
});
|
|
23
|
+
Object.defineProperty(exports, "ChartsContainerPro", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () {
|
|
26
|
+
return _ChartsContainerPro.ChartsContainerPro;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
22
29
|
require("./typeOverloads/modules");
|
|
23
30
|
var _ChartsClipPath = require("@mui/x-charts/ChartsClipPath");
|
|
24
31
|
Object.keys(_ChartsClipPath).forEach(function (key) {
|
|
@@ -248,6 +255,18 @@ Object.keys(_ChartsSurface).forEach(function (key) {
|
|
|
248
255
|
}
|
|
249
256
|
});
|
|
250
257
|
});
|
|
258
|
+
var _ChartsDataProvider = require("@mui/x-charts/ChartsDataProvider");
|
|
259
|
+
Object.keys(_ChartsDataProvider).forEach(function (key) {
|
|
260
|
+
if (key === "default" || key === "__esModule") return;
|
|
261
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
262
|
+
if (key in exports && exports[key] === _ChartsDataProvider[key]) return;
|
|
263
|
+
Object.defineProperty(exports, key, {
|
|
264
|
+
enumerable: true,
|
|
265
|
+
get: function () {
|
|
266
|
+
return _ChartsDataProvider[key];
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
});
|
|
251
270
|
var _ChartDataProvider = require("@mui/x-charts/ChartDataProvider");
|
|
252
271
|
Object.keys(_ChartDataProvider).forEach(function (key) {
|
|
253
272
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -380,7 +399,20 @@ Object.keys(_Heatmap).forEach(function (key) {
|
|
|
380
399
|
}
|
|
381
400
|
});
|
|
382
401
|
});
|
|
402
|
+
var _ChartsContainerPro = require("./ChartsContainerPro");
|
|
383
403
|
var _ChartContainerPro = require("./ChartContainerPro");
|
|
404
|
+
var _ChartsDataProviderPro = require("./ChartsDataProviderPro");
|
|
405
|
+
Object.keys(_ChartsDataProviderPro).forEach(function (key) {
|
|
406
|
+
if (key === "default" || key === "__esModule") return;
|
|
407
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
408
|
+
if (key in exports && exports[key] === _ChartsDataProviderPro[key]) return;
|
|
409
|
+
Object.defineProperty(exports, key, {
|
|
410
|
+
enumerable: true,
|
|
411
|
+
get: function () {
|
|
412
|
+
return _ChartsDataProviderPro[key];
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
});
|
|
384
416
|
var _ChartDataProviderPro = require("./ChartDataProviderPro");
|
|
385
417
|
Object.keys(_ChartDataProviderPro).forEach(function (key) {
|
|
386
418
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -489,6 +521,18 @@ Object.keys(_ChartZoomSlider).forEach(function (key) {
|
|
|
489
521
|
}
|
|
490
522
|
});
|
|
491
523
|
});
|
|
524
|
+
var _ChartsZoomSlider = require("./ChartsZoomSlider");
|
|
525
|
+
Object.keys(_ChartsZoomSlider).forEach(function (key) {
|
|
526
|
+
if (key === "default" || key === "__esModule") return;
|
|
527
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
528
|
+
if (key in exports && exports[key] === _ChartsZoomSlider[key]) return;
|
|
529
|
+
Object.defineProperty(exports, key, {
|
|
530
|
+
enumerable: true,
|
|
531
|
+
get: function () {
|
|
532
|
+
return _ChartsZoomSlider[key];
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
});
|
|
492
536
|
var _ChartsToolbarPro = require("./ChartsToolbarPro");
|
|
493
537
|
Object.keys(_ChartsToolbarPro).forEach(function (key) {
|
|
494
538
|
if (key === "default" || key === "__esModule") return;
|
package/internals/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.js";
|
|
2
|
+
export type { UseChartsContainerProPropsReturnValue } from "../ChartsContainerPro/useChartsContainerProProps.js";
|
|
1
3
|
export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
2
4
|
export type { ChartsSlotsPro, ChartsSlotPropsPro } from "./material/index.js";
|
|
3
|
-
export { seriesPreviewPlotMap } from "../
|
|
4
|
-
export type { PreviewPlotProps } from "../
|
|
5
|
-
export { defaultSeriesConfigPro } from "../
|
|
5
|
+
export { seriesPreviewPlotMap } from "../ChartsZoomSlider/internals/seriesPreviewPlotMap.js";
|
|
6
|
+
export type { PreviewPlotProps } from "../ChartsZoomSlider/internals/previews/PreviewPlot.types.js";
|
|
7
|
+
export { defaultSeriesConfigPro } from "../ChartsDataProviderPro/ChartsDataProviderPro.js";
|
|
6
8
|
export type { ProPluginsPerSeriesType } from "../context/ChartProApi.js";
|
|
7
9
|
export { defaultSlotsMaterial } from "./material/index.js";
|