@mui/x-charts-pro 8.3.1 → 8.4.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 +37 -20
- package/CHANGELOG.md +110 -0
- package/ChartContainerPro/ChartContainerPro.js +1 -0
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartZoomSlider/index.d.ts +1 -1
- package/ChartZoomSlider/index.js +4 -4
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +94 -60
- package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +12 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +92 -0
- package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +11 -0
- package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.js +58 -0
- package/ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.d.ts +17 -0
- package/ChartZoomSlider/internals/{chartAxisZoomSliderHandleClasses.js → chartAxisZoomSliderThumbClasses.js} +6 -6
- package/FunnelChart/FunnelChart.js +4 -3
- package/FunnelChart/FunnelPlot.js +2 -0
- package/FunnelChart/FunnelSection.js +2 -1
- package/FunnelChart/curves/curve.types.d.ts +4 -0
- package/FunnelChart/curves/pyramid.d.ts +3 -1
- package/FunnelChart/curves/pyramid.js +37 -10
- package/FunnelChart/curves/step-pyramid.d.ts +10 -2
- package/FunnelChart/curves/step-pyramid.js +96 -20
- package/FunnelChart/curves/step.d.ts +5 -1
- package/FunnelChart/curves/step.js +20 -2
- package/FunnelChart/funnel.types.d.ts +7 -0
- package/FunnelChart/seriesConfig/seriesProcessor.js +47 -1
- package/Heatmap/Heatmap.d.ts +1 -1
- package/Heatmap/Heatmap.js +25 -21
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +2 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +27 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -10
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.js +4 -102
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +10 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.js +5 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +7 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +96 -0
- package/Heatmap/HeatmapTooltip/index.d.ts +3 -1
- package/Heatmap/HeatmapTooltip/index.js +11 -0
- package/LineChartPro/LineChartPro.js +37 -20
- package/ScatterChartPro/ScatterChartPro.js +38 -21
- package/esm/BarChartPro/BarChartPro.js +35 -18
- package/esm/ChartContainerPro/ChartContainerPro.js +1 -0
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartZoomSlider/index.d.ts +1 -1
- package/esm/ChartZoomSlider/index.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +94 -60
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +12 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +85 -0
- package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +11 -0
- package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.js +52 -0
- package/esm/ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.d.ts +17 -0
- package/esm/ChartZoomSlider/internals/{chartAxisZoomSliderHandleClasses.js → chartAxisZoomSliderThumbClasses.js} +4 -4
- package/esm/FunnelChart/FunnelChart.js +4 -3
- package/esm/FunnelChart/FunnelPlot.js +2 -0
- package/esm/FunnelChart/FunnelSection.js +1 -0
- package/esm/FunnelChart/curves/curve.types.d.ts +4 -0
- package/esm/FunnelChart/curves/pyramid.d.ts +3 -1
- package/esm/FunnelChart/curves/pyramid.js +37 -10
- package/esm/FunnelChart/curves/step-pyramid.d.ts +10 -2
- package/esm/FunnelChart/curves/step-pyramid.js +96 -20
- package/esm/FunnelChart/curves/step.d.ts +5 -1
- package/esm/FunnelChart/curves/step.js +20 -2
- package/esm/FunnelChart/funnel.types.d.ts +7 -0
- package/esm/FunnelChart/seriesConfig/seriesProcessor.js +47 -1
- package/esm/Heatmap/Heatmap.d.ts +1 -1
- package/esm/Heatmap/Heatmap.js +23 -19
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +2 -0
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +19 -0
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -10
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.js +5 -103
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +10 -0
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.js +1 -0
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +7 -0
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +89 -0
- package/esm/Heatmap/HeatmapTooltip/index.d.ts +3 -1
- package/esm/Heatmap/HeatmapTooltip/index.js +3 -1
- package/esm/LineChartPro/LineChartPro.js +35 -18
- package/esm/ScatterChartPro/ScatterChartPro.js +36 -19
- package/esm/index.js +1 -1
- package/esm/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +2 -2
- package/index.js +1 -1
- package/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +2 -2
- package/package.json +5 -5
- package/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.d.ts +0 -12
- package/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.js +0 -92
- package/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.d.ts +0 -17
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.d.ts +0 -12
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.js +0 -85
- package/esm/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.d.ts +0 -17
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface ChartZoomSliderHandleOwnerState {
|
|
3
|
-
onResize: (event: PointerEvent) => void;
|
|
4
|
-
orientation: 'horizontal' | 'vertical';
|
|
5
|
-
placement: 'start' | 'end';
|
|
6
|
-
}
|
|
7
|
-
export interface ChartZoomSliderHandleProps extends Pick<React.ComponentProps<'rect'>, 'x' | 'y' | 'width' | 'height' | 'rx' | 'ry'>, ChartZoomSliderHandleOwnerState {}
|
|
8
|
-
/**
|
|
9
|
-
* Renders the zoom slider handle, which is responsible for resizing the zoom range.
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
export declare const ChartAxisZoomSliderHandle: React.ForwardRefExoticComponent<ChartZoomSliderHandleProps & React.RefAttributes<SVGRectElement>>;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { styled } from '@mui/material/styles';
|
|
5
|
-
import useForkRef from '@mui/utils/useForkRef';
|
|
6
|
-
import useEventCallback from '@mui/utils/useEventCallback';
|
|
7
|
-
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
8
|
-
import { chartAxisZoomSliderHandleClasses, useUtilityClasses } from "./chartAxisZoomSliderHandleClasses.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const Rect = styled('rect')(({
|
|
11
|
-
theme
|
|
12
|
-
}) => ({
|
|
13
|
-
[`&.${chartAxisZoomSliderHandleClasses.root}`]: {
|
|
14
|
-
fill: theme.palette.mode === 'dark' ? (theme.vars || theme).palette.grey[300] : (theme.vars || theme).palette.common.white,
|
|
15
|
-
stroke: theme.palette.mode === 'dark' ? (theme.vars || theme).palette.grey[600] : (theme.vars || theme).palette.grey[500]
|
|
16
|
-
},
|
|
17
|
-
[`&.${chartAxisZoomSliderHandleClasses.horizontal}`]: {
|
|
18
|
-
cursor: 'ew-resize'
|
|
19
|
-
},
|
|
20
|
-
[`&.${chartAxisZoomSliderHandleClasses.vertical}`]: {
|
|
21
|
-
cursor: 'ns-resize'
|
|
22
|
-
}
|
|
23
|
-
}));
|
|
24
|
-
/**
|
|
25
|
-
* Renders the zoom slider handle, which is responsible for resizing the zoom range.
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
export const ChartAxisZoomSliderHandle = /*#__PURE__*/React.forwardRef(function ChartPreviewHandle({
|
|
29
|
-
x,
|
|
30
|
-
y,
|
|
31
|
-
width,
|
|
32
|
-
height,
|
|
33
|
-
onResize,
|
|
34
|
-
orientation,
|
|
35
|
-
placement,
|
|
36
|
-
rx = 4,
|
|
37
|
-
ry = 4
|
|
38
|
-
}, forwardedRef) {
|
|
39
|
-
const classes = useUtilityClasses({
|
|
40
|
-
onResize,
|
|
41
|
-
orientation,
|
|
42
|
-
placement
|
|
43
|
-
});
|
|
44
|
-
const handleRef = React.useRef(null);
|
|
45
|
-
const ref = useForkRef(handleRef, forwardedRef);
|
|
46
|
-
const onResizeEvent = useEventCallback(onResize);
|
|
47
|
-
React.useEffect(() => {
|
|
48
|
-
const handle = handleRef.current;
|
|
49
|
-
if (!handle) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
const onPointerMove = rafThrottle(event => {
|
|
53
|
-
onResizeEvent(event);
|
|
54
|
-
});
|
|
55
|
-
const onPointerUp = () => {
|
|
56
|
-
handle.removeEventListener('pointermove', onPointerMove);
|
|
57
|
-
handle.removeEventListener('pointerup', onPointerUp);
|
|
58
|
-
};
|
|
59
|
-
const onPointerDown = event => {
|
|
60
|
-
// Prevent text selection when dragging the handle
|
|
61
|
-
event.preventDefault();
|
|
62
|
-
event.stopPropagation();
|
|
63
|
-
handle.setPointerCapture(event.pointerId);
|
|
64
|
-
handle.addEventListener('pointerup', onPointerUp);
|
|
65
|
-
handle.addEventListener('pointermove', onPointerMove);
|
|
66
|
-
};
|
|
67
|
-
handle.addEventListener('pointerdown', onPointerDown);
|
|
68
|
-
|
|
69
|
-
// eslint-disable-next-line consistent-return
|
|
70
|
-
return () => {
|
|
71
|
-
handle.removeEventListener('pointerdown', onPointerDown);
|
|
72
|
-
onPointerMove.clear();
|
|
73
|
-
};
|
|
74
|
-
}, [onResizeEvent, orientation]);
|
|
75
|
-
return /*#__PURE__*/_jsx(Rect, {
|
|
76
|
-
className: classes.root,
|
|
77
|
-
ref: ref,
|
|
78
|
-
x: x,
|
|
79
|
-
y: y,
|
|
80
|
-
width: width,
|
|
81
|
-
height: height,
|
|
82
|
-
rx: rx,
|
|
83
|
-
ry: ry
|
|
84
|
-
});
|
|
85
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ChartZoomSliderHandleOwnerState } from "./ChartAxisZoomSliderHandle.js";
|
|
2
|
-
export interface ChartAxisZoomSliderHandleClasses {
|
|
3
|
-
/** Styles applied to the root element. */
|
|
4
|
-
root: string;
|
|
5
|
-
/** Styles applied to the root element when it is horizontal. */
|
|
6
|
-
horizontal: string;
|
|
7
|
-
/** Styles applied to the root element when it is vertical. */
|
|
8
|
-
vertical: string;
|
|
9
|
-
/** Styles applied to the root element when it is a start handle. */
|
|
10
|
-
start: string;
|
|
11
|
-
/** Styles applied to the root element when it is an end handle. */
|
|
12
|
-
end: string;
|
|
13
|
-
}
|
|
14
|
-
export type ChartAxisZoomSliderHandleClassKey = keyof ChartAxisZoomSliderHandleClasses;
|
|
15
|
-
export declare const chartAxisZoomSliderHandleClasses: ChartAxisZoomSliderHandleClasses;
|
|
16
|
-
export declare function getAxisZoomSliderHandleUtilityClass(slot: string): string;
|
|
17
|
-
export declare const useUtilityClasses: (ownerState: ChartZoomSliderHandleOwnerState) => Record<"root", string>;
|