@mui/x-charts-pro 8.3.1 → 8.5.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.d.ts +13 -5
- package/BarChartPro/BarChartPro.js +56 -21
- package/CHANGELOG.md +213 -0
- package/ChartContainerPro/ChartContainerPro.d.ts +0 -1
- package/ChartContainerPro/ChartContainerPro.js +1 -0
- package/ChartContainerPro/ChartProApi.d.ts +26 -0
- package/ChartContainerPro/ChartProApi.js +5 -0
- package/ChartContainerPro/index.d.ts +2 -1
- package/ChartContainerPro/index.js +11 -0
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +11 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +19 -3
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -0
- package/ChartDataProviderPro/useChartDataProviderProProps.js +5 -1
- package/ChartZoomSlider/index.d.ts +1 -1
- package/ChartZoomSlider/index.js +4 -4
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -3
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +31 -287
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +24 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +251 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +12 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +92 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +160 -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/ChartZoomSlider/internals/constants.d.ts +5 -0
- package/ChartZoomSlider/internals/constants.js +11 -0
- package/ChartZoomSlider/internals/zoom-utils.d.ts +4 -0
- package/ChartZoomSlider/internals/zoom-utils.js +48 -0
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +8 -1
- package/ChartsToolbarPro/ChartsToolbarPro.js +42 -8
- package/ChartsToolbarPro/ChartsToolbarZoomInButton.d.ts +16 -0
- package/ChartsToolbarPro/ChartsToolbarZoomInButton.js +56 -0
- package/ChartsToolbarPro/ChartsToolbarZoomOutButton.d.ts +16 -0
- package/ChartsToolbarPro/ChartsToolbarZoomOutButton.js +56 -0
- package/ChartsToolbarPro/index.d.ts +3 -1
- package/ChartsToolbarPro/index.js +22 -0
- package/FunnelChart/FunnelChart.d.ts +2 -1
- package/FunnelChart/FunnelChart.js +6 -23
- package/FunnelChart/FunnelChart.plugins.d.ts +4 -0
- package/FunnelChart/FunnelChart.plugins.js +9 -0
- 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/funnelSlots.types.d.ts +4 -3
- package/FunnelChart/seriesConfig/seriesProcessor.js +47 -1
- package/FunnelChart/useFunnelChartProps.d.ts +2 -1
- package/FunnelChart/useFunnelChartProps.js +3 -1
- package/Heatmap/Heatmap.d.ts +18 -5
- package/Heatmap/Heatmap.js +64 -26
- package/Heatmap/Heatmap.plugins.d.ts +2 -1
- package/Heatmap/Heatmap.plugins.js +2 -1
- 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.d.ts +13 -5
- package/LineChartPro/LineChartPro.js +56 -21
- package/RadarChartPro/RadarChartPro.d.ts +15 -0
- package/RadarChartPro/RadarChartPro.js +202 -0
- package/RadarChartPro/RadarChartPro.plugins.d.ts +4 -0
- package/RadarChartPro/RadarChartPro.plugins.js +9 -0
- package/RadarChartPro/index.d.ts +1 -0
- package/RadarChartPro/index.js +16 -0
- package/ScatterChartPro/ScatterChartPro.d.ts +13 -5
- package/ScatterChartPro/ScatterChartPro.js +57 -22
- package/context/index.d.ts +1 -0
- package/context/index.js +16 -0
- package/context/useChartApiContext.d.ts +9 -0
- package/context/useChartApiContext.js +17 -0
- package/esm/BarChartPro/BarChartPro.d.ts +13 -5
- package/esm/BarChartPro/BarChartPro.js +54 -19
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +0 -1
- package/esm/ChartContainerPro/ChartContainerPro.js +1 -0
- package/esm/ChartContainerPro/ChartProApi.d.ts +26 -0
- package/esm/ChartContainerPro/ChartProApi.js +1 -0
- package/esm/ChartContainerPro/index.d.ts +2 -1
- package/esm/ChartContainerPro/index.js +2 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +11 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +20 -4
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -0
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +5 -1
- package/esm/ChartZoomSlider/index.d.ts +1 -1
- package/esm/ChartZoomSlider/index.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +30 -283
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +24 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +243 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +12 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js +85 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +18 -0
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +152 -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/ChartZoomSlider/internals/constants.d.ts +5 -0
- package/esm/ChartZoomSlider/internals/constants.js +5 -0
- package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +4 -0
- package/esm/ChartZoomSlider/internals/zoom-utils.js +40 -0
- package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +8 -1
- package/esm/ChartsToolbarPro/ChartsToolbarPro.js +42 -9
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInButton.d.ts +16 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInButton.js +50 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutButton.d.ts +16 -0
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutButton.js +50 -0
- package/esm/ChartsToolbarPro/index.d.ts +3 -1
- package/esm/ChartsToolbarPro/index.js +3 -1
- package/esm/FunnelChart/FunnelChart.d.ts +2 -1
- package/esm/FunnelChart/FunnelChart.js +6 -23
- package/esm/FunnelChart/FunnelChart.plugins.d.ts +4 -0
- package/esm/FunnelChart/FunnelChart.plugins.js +3 -0
- 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/funnelSlots.types.d.ts +4 -3
- package/esm/FunnelChart/seriesConfig/seriesProcessor.js +47 -1
- package/esm/FunnelChart/useFunnelChartProps.d.ts +2 -1
- package/esm/FunnelChart/useFunnelChartProps.js +3 -1
- package/esm/Heatmap/Heatmap.d.ts +18 -5
- package/esm/Heatmap/Heatmap.js +62 -24
- package/esm/Heatmap/Heatmap.plugins.d.ts +2 -1
- package/esm/Heatmap/Heatmap.plugins.js +2 -1
- 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.d.ts +13 -5
- package/esm/LineChartPro/LineChartPro.js +54 -19
- package/esm/RadarChartPro/RadarChartPro.d.ts +15 -0
- package/esm/RadarChartPro/RadarChartPro.js +195 -0
- package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +4 -0
- package/esm/RadarChartPro/RadarChartPro.plugins.js +3 -0
- package/esm/RadarChartPro/index.d.ts +1 -0
- package/esm/RadarChartPro/index.js +1 -0
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +13 -5
- package/esm/ScatterChartPro/ScatterChartPro.js +55 -20
- package/esm/context/index.d.ts +1 -0
- package/esm/context/index.js +1 -0
- package/esm/context/useChartApiContext.d.ts +9 -0
- package/esm/context/useChartApiContext.js +11 -0
- package/esm/hooks/index.d.ts +2 -1
- package/esm/hooks/index.js +2 -1
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -1
- package/esm/internals/material/index.d.ts +1 -0
- package/esm/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +12 -2
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +358 -0
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +15 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +7 -0
- package/esm/models/index.d.ts +1 -1
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +21 -10
- package/index.d.ts +2 -1
- package/index.js +12 -1
- package/internals/material/index.d.ts +1 -0
- package/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +12 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +358 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +16 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +7 -0
- package/models/index.d.ts +1 -1
- 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/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +0 -13
- package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +0 -36
- package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +0 -13
- package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +0 -36
- 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
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +0 -13
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +0 -29
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +0 -13
- package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +0 -29
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports.ChartsToolbarZoomInButton = ChartsToolbarZoomInButton;
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _Toolbar = require("@mui/x-charts/Toolbar");
|
|
13
|
-
var _internals = require("@mui/x-charts/internals");
|
|
14
|
-
var _hooks = require("@mui/x-charts/hooks");
|
|
15
|
-
var _material = require("../../internals/material");
|
|
16
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
function ChartsToolbarZoomInButton({
|
|
18
|
-
slots,
|
|
19
|
-
slotProps
|
|
20
|
-
}) {
|
|
21
|
-
const {
|
|
22
|
-
instance
|
|
23
|
-
} = (0, _internals.useChartContext)();
|
|
24
|
-
const ZoomInIcon = slots?.zoomInIcon ?? _material.defaultSlotsMaterial.zoomInIcon;
|
|
25
|
-
const Tooltip = slots?.baseTooltip ?? _material.defaultSlotsMaterial.baseTooltip;
|
|
26
|
-
const {
|
|
27
|
-
localeText
|
|
28
|
-
} = (0, _hooks.useChartsLocalization)();
|
|
29
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, {
|
|
30
|
-
title: localeText.zoomIn,
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toolbar.ToolbarButton, {
|
|
32
|
-
onClick: () => instance.zoomIn(),
|
|
33
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ZoomInIcon, (0, _extends2.default)({}, slotProps?.zoomInIcon))
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ChartsSlotsPro } from "../../internals/material/index.js";
|
|
3
|
-
type ChartsToolbarZoomOutButtonSlots = Partial<Pick<ChartsSlotsPro, 'baseTooltip' | 'zoomOutIcon'>>;
|
|
4
|
-
type ChartsToolbarZoomOutButtonSlotProps = { [K in keyof Required<ChartsToolbarZoomOutButtonSlots>]: React.ComponentProps<Required<ChartsToolbarZoomOutButtonSlots>[K]> };
|
|
5
|
-
interface ChartsToolbarZoomOutButtonProps {
|
|
6
|
-
slots?: ChartsToolbarZoomOutButtonSlots;
|
|
7
|
-
slotProps?: ChartsToolbarZoomOutButtonSlotProps;
|
|
8
|
-
}
|
|
9
|
-
export declare function ChartsToolbarZoomOutButton({
|
|
10
|
-
slots,
|
|
11
|
-
slotProps
|
|
12
|
-
}: ChartsToolbarZoomOutButtonProps): React.JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports.ChartsToolbarZoomOutButton = ChartsToolbarZoomOutButton;
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _Toolbar = require("@mui/x-charts/Toolbar");
|
|
13
|
-
var _internals = require("@mui/x-charts/internals");
|
|
14
|
-
var _hooks = require("@mui/x-charts/hooks");
|
|
15
|
-
var _material = require("../../internals/material");
|
|
16
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
function ChartsToolbarZoomOutButton({
|
|
18
|
-
slots,
|
|
19
|
-
slotProps
|
|
20
|
-
}) {
|
|
21
|
-
const {
|
|
22
|
-
instance
|
|
23
|
-
} = (0, _internals.useChartContext)();
|
|
24
|
-
const ZoomOutIcon = slots?.zoomOutIcon ?? _material.defaultSlotsMaterial.zoomOutIcon;
|
|
25
|
-
const Tooltip = slots?.baseTooltip ?? _material.defaultSlotsMaterial.baseTooltip;
|
|
26
|
-
const {
|
|
27
|
-
localeText
|
|
28
|
-
} = (0, _hooks.useChartsLocalization)();
|
|
29
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, {
|
|
30
|
-
title: localeText.zoomOut,
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toolbar.ToolbarButton, {
|
|
32
|
-
onClick: () => instance.zoomOut(),
|
|
33
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ZoomOutIcon, (0, _extends2.default)({}, slotProps?.zoomOutIcon))
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
}
|
|
@@ -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>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ChartsSlotsPro } from "../../internals/material/index.js";
|
|
3
|
-
type ChartsToolbarZoomInButtonSlots = Partial<Pick<ChartsSlotsPro, 'baseTooltip' | 'zoomInIcon'>>;
|
|
4
|
-
type ChartsToolbarZoomInButtonSlotProps = { [K in keyof Required<ChartsToolbarZoomInButtonSlots>]: React.ComponentProps<Required<ChartsToolbarZoomInButtonSlots>[K]> };
|
|
5
|
-
interface ChartsToolbarZoomInButtonProps {
|
|
6
|
-
slots?: ChartsToolbarZoomInButtonSlots;
|
|
7
|
-
slotProps?: ChartsToolbarZoomInButtonSlotProps;
|
|
8
|
-
}
|
|
9
|
-
export declare function ChartsToolbarZoomInButton({
|
|
10
|
-
slots,
|
|
11
|
-
slotProps
|
|
12
|
-
}: ChartsToolbarZoomInButtonProps): React.JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { ToolbarButton } from '@mui/x-charts/Toolbar';
|
|
6
|
-
import { useChartContext } from '@mui/x-charts/internals';
|
|
7
|
-
import { useChartsLocalization } from '@mui/x-charts/hooks';
|
|
8
|
-
import { defaultSlotsMaterial } from "../../internals/material/index.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export function ChartsToolbarZoomInButton({
|
|
11
|
-
slots,
|
|
12
|
-
slotProps
|
|
13
|
-
}) {
|
|
14
|
-
const {
|
|
15
|
-
instance
|
|
16
|
-
} = useChartContext();
|
|
17
|
-
const ZoomInIcon = slots?.zoomInIcon ?? defaultSlotsMaterial.zoomInIcon;
|
|
18
|
-
const Tooltip = slots?.baseTooltip ?? defaultSlotsMaterial.baseTooltip;
|
|
19
|
-
const {
|
|
20
|
-
localeText
|
|
21
|
-
} = useChartsLocalization();
|
|
22
|
-
return /*#__PURE__*/_jsx(Tooltip, {
|
|
23
|
-
title: localeText.zoomIn,
|
|
24
|
-
children: /*#__PURE__*/_jsx(ToolbarButton, {
|
|
25
|
-
onClick: () => instance.zoomIn(),
|
|
26
|
-
children: /*#__PURE__*/_jsx(ZoomInIcon, _extends({}, slotProps?.zoomInIcon))
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ChartsSlotsPro } from "../../internals/material/index.js";
|
|
3
|
-
type ChartsToolbarZoomOutButtonSlots = Partial<Pick<ChartsSlotsPro, 'baseTooltip' | 'zoomOutIcon'>>;
|
|
4
|
-
type ChartsToolbarZoomOutButtonSlotProps = { [K in keyof Required<ChartsToolbarZoomOutButtonSlots>]: React.ComponentProps<Required<ChartsToolbarZoomOutButtonSlots>[K]> };
|
|
5
|
-
interface ChartsToolbarZoomOutButtonProps {
|
|
6
|
-
slots?: ChartsToolbarZoomOutButtonSlots;
|
|
7
|
-
slotProps?: ChartsToolbarZoomOutButtonSlotProps;
|
|
8
|
-
}
|
|
9
|
-
export declare function ChartsToolbarZoomOutButton({
|
|
10
|
-
slots,
|
|
11
|
-
slotProps
|
|
12
|
-
}: ChartsToolbarZoomOutButtonProps): React.JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { ToolbarButton } from '@mui/x-charts/Toolbar';
|
|
6
|
-
import { useChartContext } from '@mui/x-charts/internals';
|
|
7
|
-
import { useChartsLocalization } from '@mui/x-charts/hooks';
|
|
8
|
-
import { defaultSlotsMaterial } from "../../internals/material/index.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export function ChartsToolbarZoomOutButton({
|
|
11
|
-
slots,
|
|
12
|
-
slotProps
|
|
13
|
-
}) {
|
|
14
|
-
const {
|
|
15
|
-
instance
|
|
16
|
-
} = useChartContext();
|
|
17
|
-
const ZoomOutIcon = slots?.zoomOutIcon ?? defaultSlotsMaterial.zoomOutIcon;
|
|
18
|
-
const Tooltip = slots?.baseTooltip ?? defaultSlotsMaterial.baseTooltip;
|
|
19
|
-
const {
|
|
20
|
-
localeText
|
|
21
|
-
} = useChartsLocalization();
|
|
22
|
-
return /*#__PURE__*/_jsx(Tooltip, {
|
|
23
|
-
title: localeText.zoomOut,
|
|
24
|
-
children: /*#__PURE__*/_jsx(ToolbarButton, {
|
|
25
|
-
onClick: () => instance.zoomOut(),
|
|
26
|
-
children: /*#__PURE__*/_jsx(ZoomOutIcon, _extends({}, slotProps?.zoomOutIcon))
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
}
|