@mui/x-charts-pro 9.8.0 → 9.10.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.mts +9 -1
- package/BarChartPro/BarChartPro.d.ts +9 -1
- package/BarChartPro/BarChartPro.js +14 -3
- package/BarChartPro/BarChartPro.mjs +14 -3
- package/BarChartPro/BarChartPro.plugins.d.mts +2 -1
- package/BarChartPro/BarChartPro.plugins.d.ts +2 -1
- package/BarChartPro/BarChartPro.plugins.js +2 -1
- package/BarChartPro/BarChartPro.plugins.mjs +2 -1
- package/CHANGELOG.md +230 -0
- package/ChartsContainerPro/useChartsContainerProProps.d.mts +6 -2
- package/ChartsContainerPro/useChartsContainerProProps.d.ts +6 -2
- package/ChartsContainerPro/useChartsContainerProProps.js +9 -1
- package/ChartsContainerPro/useChartsContainerProProps.mjs +8 -1
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.mts +1 -1
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +1 -1
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +14 -3
- package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +14 -3
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.mts +1 -1
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.d.mts +2 -1
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -1
- package/ChartsToolbarPro/Toolbar.types.d.mts +2 -1
- package/ChartsToolbarPro/Toolbar.types.d.ts +2 -1
- package/ChartsToolbarPro/internals/ChartsMenu.d.mts +1 -1
- package/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
- package/ChartsZoomSlider/ChartsZoomSlider.d.mts +2 -1
- package/ChartsZoomSlider/ChartsZoomSlider.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSlider.d.mts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSlider.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.d.mts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.d.mts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.d.mts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.d.ts +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.d.mts +1 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.d.ts +1 -1
- package/ChartsZoomSlider/internals/ChartsTooltipZoomSliderValue.d.mts +1 -1
- package/ChartsZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
- package/ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.d.mts +1 -1
- package/ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/AreaPreviewPlot.d.mts +1 -1
- package/ChartsZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/BarPreviewPlot.d.mts +1 -1
- package/ChartsZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/LineAreaPreviewPlot.d.mts +2 -1
- package/ChartsZoomSlider/internals/previews/LineAreaPreviewPlot.d.ts +2 -1
- package/ChartsZoomSlider/internals/previews/LinePreviewPlot.d.mts +1 -1
- package/ChartsZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
- package/ChartsZoomSlider/internals/previews/LinePreviewPlot.js +16 -1
- package/ChartsZoomSlider/internals/previews/LinePreviewPlot.mjs +17 -2
- package/ChartsZoomSlider/internals/previews/ScatterPreviewPlot.d.mts +2 -1
- package/ChartsZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +2 -1
- package/FunnelChart/FocusedFunnelSection.d.mts +1 -1
- package/FunnelChart/FocusedFunnelSection.d.ts +1 -1
- package/FunnelChart/FunnelPlot.d.mts +1 -1
- package/FunnelChart/FunnelPlot.d.ts +1 -1
- package/FunnelChart/curves/getFunnelCurve.d.mts +1 -1
- package/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
- package/FunnelChart/funnelClasses.d.mts +1 -1
- package/FunnelChart/funnelClasses.d.ts +1 -1
- package/FunnelChart/funnelPlotSlots.types.d.mts +3 -2
- package/FunnelChart/funnelPlotSlots.types.d.ts +3 -2
- package/FunnelChart/labelUtils.d.mts +2 -2
- package/FunnelChart/labelUtils.d.ts +2 -2
- package/FunnelChart/seriesConfig/index.js +2 -2
- package/FunnelChart/seriesConfig/index.mjs +2 -2
- package/FunnelChart/seriesConfig/tooltipPosition.d.mts +2 -3
- package/FunnelChart/seriesConfig/tooltipPosition.d.ts +2 -3
- package/FunnelChart/seriesConfig/tooltipPosition.js +11 -15
- package/FunnelChart/seriesConfig/tooltipPosition.mjs +11 -15
- package/Heatmap/FocusedHeatmapCell.d.mts +1 -1
- package/Heatmap/FocusedHeatmapCell.d.ts +1 -1
- package/Heatmap/Heatmap.d.mts +2 -1
- package/Heatmap/Heatmap.d.ts +2 -1
- package/Heatmap/HeatmapItem.d.mts +3 -2
- package/Heatmap/HeatmapItem.d.ts +3 -2
- package/Heatmap/HeatmapSVGPlot.d.mts +2 -1
- package/Heatmap/HeatmapSVGPlot.d.ts +2 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.mts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.mts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.mts +2 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +2 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.mts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
- package/Heatmap/seriesConfig/highlight.d.mts +2 -2
- package/Heatmap/seriesConfig/highlight.d.ts +2 -2
- package/Heatmap/seriesConfig/index.js +2 -2
- package/Heatmap/seriesConfig/index.mjs +2 -2
- package/Heatmap/seriesConfig/tooltipPosition.d.mts +2 -3
- package/Heatmap/seriesConfig/tooltipPosition.d.ts +2 -3
- package/Heatmap/seriesConfig/tooltipPosition.js +12 -16
- package/Heatmap/seriesConfig/tooltipPosition.mjs +12 -16
- package/LineChartPro/LineChartPro.d.mts +11 -1
- package/LineChartPro/LineChartPro.d.ts +11 -1
- package/LineChartPro/LineChartPro.js +16 -3
- package/LineChartPro/LineChartPro.mjs +16 -3
- package/LineChartPro/LineChartPro.plugins.d.mts +2 -1
- package/LineChartPro/LineChartPro.plugins.d.ts +2 -1
- package/LineChartPro/LineChartPro.plugins.js +2 -1
- package/LineChartPro/LineChartPro.plugins.mjs +2 -1
- package/SankeyChart/FocusedSankeyLink.d.mts +1 -1
- package/SankeyChart/FocusedSankeyLink.d.ts +1 -1
- package/SankeyChart/FocusedSankeyNode.d.mts +1 -1
- package/SankeyChart/FocusedSankeyNode.d.ts +1 -1
- package/SankeyChart/SankeyDataProvider.d.mts +1 -1
- package/SankeyChart/SankeyDataProvider.d.ts +1 -1
- package/SankeyChart/SankeyLinkLabelPlot.d.mts +1 -1
- package/SankeyChart/SankeyLinkLabelPlot.d.ts +1 -1
- package/SankeyChart/SankeyLinkPlot.d.mts +1 -1
- package/SankeyChart/SankeyLinkPlot.d.ts +1 -1
- package/SankeyChart/SankeyNodeLabelPlot.d.mts +1 -1
- package/SankeyChart/SankeyNodeLabelPlot.d.ts +1 -1
- package/SankeyChart/SankeyNodePlot.d.mts +1 -1
- package/SankeyChart/SankeyNodePlot.d.ts +1 -1
- package/SankeyChart/SankeyPlot.d.mts +1 -1
- package/SankeyChart/SankeyPlot.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.d.mts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.d.mts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.mts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
- package/SankeyChart/sankeyClasses.d.mts +1 -1
- package/SankeyChart/sankeyClasses.d.ts +1 -1
- package/SankeyChart/seriesConfig/createIsFaded.d.mts +1 -1
- package/SankeyChart/seriesConfig/createIsFaded.d.ts +1 -1
- package/SankeyChart/seriesConfig/index.js +2 -2
- package/SankeyChart/seriesConfig/index.mjs +2 -2
- package/SankeyChart/seriesConfig/tooltipPosition.d.mts +2 -3
- package/SankeyChart/seriesConfig/tooltipPosition.d.ts +2 -3
- package/SankeyChart/seriesConfig/tooltipPosition.js +6 -11
- package/SankeyChart/seriesConfig/tooltipPosition.mjs +5 -10
- package/SankeyChart/utils.d.mts +2 -2
- package/SankeyChart/utils.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.d.mts +2 -1
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/ChartsWatermark.d.mts +2 -1
- package/internals/ChartsWatermark.d.ts +2 -1
- package/internals/index.d.mts +2 -0
- package/internals/index.d.ts +2 -0
- package/internals/index.js +30 -0
- package/internals/index.mjs +2 -0
- package/internals/material/components/BaseMenuItem.d.mts +1 -1
- package/internals/material/components/BaseMenuItem.d.ts +1 -1
- package/internals/material/components/BasePopper.d.mts +2 -1
- package/internals/material/components/BasePopper.d.ts +2 -1
- package/internals/plugins/allPlugins.d.mts +2 -2
- package/internals/plugins/allPlugins.d.ts +2 -2
- package/internals/plugins/useChartProSampling/barSampler.d.mts +8 -0
- package/internals/plugins/useChartProSampling/barSampler.d.ts +8 -0
- package/internals/plugins/useChartProSampling/barSampler.js +18 -0
- package/internals/plugins/useChartProSampling/barSampler.mjs +12 -0
- package/internals/plugins/useChartProSampling/index.d.mts +2 -0
- package/internals/plugins/useChartProSampling/index.d.ts +2 -0
- package/internals/plugins/useChartProSampling/index.js +12 -0
- package/internals/plugins/useChartProSampling/index.mjs +1 -0
- package/internals/plugins/useChartProSampling/lineSampler.d.mts +8 -0
- package/internals/plugins/useChartProSampling/lineSampler.d.ts +8 -0
- package/internals/plugins/useChartProSampling/lineSampler.js +47 -0
- package/internals/plugins/useChartProSampling/lineSampler.mjs +41 -0
- package/internals/plugins/useChartProSampling/sampling.d.mts +38 -0
- package/internals/plugins/useChartProSampling/sampling.d.ts +38 -0
- package/internals/plugins/useChartProSampling/sampling.js +175 -0
- package/internals/plugins/useChartProSampling/sampling.line.d.mts +22 -0
- package/internals/plugins/useChartProSampling/sampling.line.d.ts +22 -0
- package/internals/plugins/useChartProSampling/sampling.line.js +172 -0
- package/internals/plugins/useChartProSampling/sampling.line.mjs +164 -0
- package/internals/plugins/useChartProSampling/sampling.mjs +164 -0
- package/internals/plugins/useChartProSampling/sampling.pyramid.types.d.mts +33 -0
- package/internals/plugins/useChartProSampling/sampling.pyramid.types.d.ts +33 -0
- package/internals/plugins/useChartProSampling/sampling.pyramid.types.js +5 -0
- package/internals/plugins/useChartProSampling/sampling.pyramid.types.mjs +1 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.d.mts +4 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.d.ts +4 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.js +59 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.mjs +52 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.types.d.mts +25 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.types.d.ts +25 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.types.js +5 -0
- package/internals/plugins/useChartProSampling/useChartProSampling.types.mjs +1 -0
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.mts +26 -26
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +26 -26
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useRegisterZoomGestures.d.mts +4 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useRegisterZoomGestures.d.ts +4 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useRegisterZoomGestures.mjs +1 -0
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.mts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +1 -1
- package/package.json +6 -6
- package/typeOverloads/modules.d.mts +9 -1
- package/typeOverloads/modules.d.ts +9 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { ChartsToolbarProps } from '@mui/x-charts/Toolbar';
|
|
2
3
|
import type { AxisId } from '@mui/x-charts/internals';
|
|
3
4
|
import type { RangeButtonValue } from "./rangeButtonValueToZoom.js";
|
|
@@ -42,7 +43,7 @@ declare function ChartsToolbarPro({
|
|
|
42
43
|
rangeButtons,
|
|
43
44
|
rangeButtonsAxisId,
|
|
44
45
|
...other
|
|
45
|
-
}: ChartsToolbarProProps):
|
|
46
|
+
}: ChartsToolbarProProps): React.JSX.Element | null;
|
|
46
47
|
declare namespace ChartsToolbarPro {
|
|
47
48
|
var propTypes: any;
|
|
48
49
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
2
3
|
import type { ToolbarPropsOverrides } from '@mui/x-charts/models';
|
|
3
4
|
import type { ChartsToolbarProProps } from "./ChartsToolbarPro.mjs";
|
|
4
5
|
export interface ChartsToolbarProSlots {
|
|
@@ -12,5 +13,5 @@ export interface ChartsToolbarProSlotProps {
|
|
|
12
13
|
/**
|
|
13
14
|
* Props for the toolbar component.
|
|
14
15
|
*/
|
|
15
|
-
toolbar?: Partial<ChartsToolbarProProps> & ToolbarPropsOverrides
|
|
16
|
+
toolbar?: WithDataAttributes<Partial<ChartsToolbarProProps> & ToolbarPropsOverrides>;
|
|
16
17
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
2
3
|
import type { ToolbarPropsOverrides } from '@mui/x-charts/models';
|
|
3
4
|
import type { ChartsToolbarProProps } from "./ChartsToolbarPro.js";
|
|
4
5
|
export interface ChartsToolbarProSlots {
|
|
@@ -12,5 +13,5 @@ export interface ChartsToolbarProSlotProps {
|
|
|
12
13
|
/**
|
|
13
14
|
* Props for the toolbar component.
|
|
14
15
|
*/
|
|
15
|
-
toolbar?: Partial<ChartsToolbarProProps> & ToolbarPropsOverrides
|
|
16
|
+
toolbar?: WithDataAttributes<Partial<ChartsToolbarProProps> & ToolbarPropsOverrides>;
|
|
16
17
|
}
|
|
@@ -7,7 +7,7 @@ export interface ChartsMenuProps extends Pick<ChartBasePopperProps, 'className'
|
|
|
7
7
|
position?: Placement;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
declare function ChartsMenu(props: ChartsMenuProps):
|
|
10
|
+
declare function ChartsMenu(props: ChartsMenuProps): React.JSX.Element;
|
|
11
11
|
declare namespace ChartsMenu {
|
|
12
12
|
var propTypes: any;
|
|
13
13
|
}
|
|
@@ -7,7 +7,7 @@ export interface ChartsMenuProps extends Pick<ChartBasePopperProps, 'className'
|
|
|
7
7
|
position?: Placement;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
declare function ChartsMenu(props: ChartsMenuProps):
|
|
10
|
+
declare function ChartsMenu(props: ChartsMenuProps): React.JSX.Element;
|
|
11
11
|
declare namespace ChartsMenu {
|
|
12
12
|
var propTypes: any;
|
|
13
13
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AxisId } from '@mui/x-charts/internals';
|
|
2
3
|
interface ChartsZoomSliderProps {
|
|
3
4
|
/**
|
|
@@ -16,5 +17,5 @@ interface ChartsZoomSliderProps {
|
|
|
16
17
|
export declare function ChartsAxisZoomSlider({
|
|
17
18
|
axisDirection,
|
|
18
19
|
axisId
|
|
19
|
-
}: ChartsZoomSliderProps):
|
|
20
|
+
}: ChartsZoomSliderProps): React.JSX.Element | null;
|
|
20
21
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AxisId } from '@mui/x-charts/internals';
|
|
2
3
|
interface ChartsZoomSliderProps {
|
|
3
4
|
/**
|
|
@@ -16,5 +17,5 @@ interface ChartsZoomSliderProps {
|
|
|
16
17
|
export declare function ChartsAxisZoomSlider({
|
|
17
18
|
axisDirection,
|
|
18
19
|
axisId
|
|
19
|
-
}: ChartsZoomSliderProps):
|
|
20
|
+
}: ChartsZoomSliderProps): React.JSX.Element | null;
|
|
20
21
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AxisId, ZoomData } from '@mui/x-charts/internals';
|
|
2
3
|
export interface ChartsAxisZoomSliderActiveTrackProps {
|
|
3
4
|
axisId: AxisId;
|
|
@@ -26,4 +27,4 @@ export declare function ChartsAxisZoomSliderActiveTrack({
|
|
|
26
27
|
onPointerLeave,
|
|
27
28
|
onInteractionStart,
|
|
28
29
|
onInteractionEnd
|
|
29
|
-
}: ChartsAxisZoomSliderActiveTrackProps):
|
|
30
|
+
}: ChartsAxisZoomSliderActiveTrackProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AxisId, ZoomData } from '@mui/x-charts/internals';
|
|
2
3
|
export interface ChartsAxisZoomSliderActiveTrackProps {
|
|
3
4
|
axisId: AxisId;
|
|
@@ -26,4 +27,4 @@ export declare function ChartsAxisZoomSliderActiveTrack({
|
|
|
26
27
|
onPointerLeave,
|
|
27
28
|
onInteractionStart,
|
|
28
29
|
onInteractionEnd
|
|
29
|
-
}: ChartsAxisZoomSliderActiveTrackProps):
|
|
30
|
+
}: ChartsAxisZoomSliderActiveTrackProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AxisId, SeriesId } from '@mui/x-charts/internals';
|
|
2
3
|
interface ChartsAxisZoomSliderPreviewProps {
|
|
3
4
|
axisId: AxisId;
|
|
@@ -18,5 +19,5 @@ export declare function ChartsAxisZoomSliderPreview({
|
|
|
18
19
|
reverse,
|
|
19
20
|
seriesIds,
|
|
20
21
|
...props
|
|
21
|
-
}: ChartsAxisZoomSliderPreviewProps):
|
|
22
|
+
}: ChartsAxisZoomSliderPreviewProps): React.JSX.Element;
|
|
22
23
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AxisId, SeriesId } from '@mui/x-charts/internals';
|
|
2
3
|
interface ChartsAxisZoomSliderPreviewProps {
|
|
3
4
|
axisId: AxisId;
|
|
@@ -18,5 +19,5 @@ export declare function ChartsAxisZoomSliderPreview({
|
|
|
18
19
|
reverse,
|
|
19
20
|
seriesIds,
|
|
20
21
|
...props
|
|
21
|
-
}: ChartsAxisZoomSliderPreviewProps):
|
|
22
|
+
}: ChartsAxisZoomSliderPreviewProps): React.JSX.Element;
|
|
22
23
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AxisId, SeriesId } from '@mui/x-charts/internals';
|
|
2
3
|
export interface ChartsAxisZoomSliderPreviewContentProps {
|
|
3
4
|
axisId: AxisId;
|
|
@@ -10,4 +11,4 @@ export interface ChartsAxisZoomSliderPreviewContentProps {
|
|
|
10
11
|
*/
|
|
11
12
|
seriesIds?: SeriesId[];
|
|
12
13
|
}
|
|
13
|
-
export declare function ChartsAxisZoomSliderPreviewContent(props: ChartsAxisZoomSliderPreviewContentProps):
|
|
14
|
+
export declare function ChartsAxisZoomSliderPreviewContent(props: ChartsAxisZoomSliderPreviewContentProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { AxisId, SeriesId } from '@mui/x-charts/internals';
|
|
2
3
|
export interface ChartsAxisZoomSliderPreviewContentProps {
|
|
3
4
|
axisId: AxisId;
|
|
@@ -10,4 +11,4 @@ export interface ChartsAxisZoomSliderPreviewContentProps {
|
|
|
10
11
|
*/
|
|
11
12
|
seriesIds?: SeriesId[];
|
|
12
13
|
}
|
|
13
|
-
export declare function ChartsAxisZoomSliderPreviewContent(props: ChartsAxisZoomSliderPreviewContentProps):
|
|
14
|
+
export declare function ChartsAxisZoomSliderPreviewContent(props: ChartsAxisZoomSliderPreviewContentProps): React.JSX.Element;
|
|
@@ -12,4 +12,4 @@ export interface ChartsAxisZoomSliderTrackClasses {
|
|
|
12
12
|
export type ChartsAxisZoomSliderTrackClassKey = keyof ChartsAxisZoomSliderTrackClasses;
|
|
13
13
|
export declare const chartsAxisZoomSliderTrackClasses: ChartsAxisZoomSliderTrackClasses;
|
|
14
14
|
export declare function getAxisZoomSliderTrackUtilityClass(slot: string): string;
|
|
15
|
-
export declare const useUtilityClasses: (props: Partial<ChartsAxisZoomSliderActiveTrackProps>) => Record<"
|
|
15
|
+
export declare const useUtilityClasses: (props: Partial<ChartsAxisZoomSliderActiveTrackProps>) => Record<"active" | "background", string>;
|
|
@@ -12,4 +12,4 @@ export interface ChartsAxisZoomSliderTrackClasses {
|
|
|
12
12
|
export type ChartsAxisZoomSliderTrackClassKey = keyof ChartsAxisZoomSliderTrackClasses;
|
|
13
13
|
export declare const chartsAxisZoomSliderTrackClasses: ChartsAxisZoomSliderTrackClasses;
|
|
14
14
|
export declare function getAxisZoomSliderTrackUtilityClass(slot: string): string;
|
|
15
|
-
export declare const useUtilityClasses: (props: Partial<ChartsAxisZoomSliderActiveTrackProps>) => Record<"
|
|
15
|
+
export declare const useUtilityClasses: (props: Partial<ChartsAxisZoomSliderActiveTrackProps>) => Record<"active" | "background", string>;
|
|
@@ -5,7 +5,7 @@ interface AreaPreviewPlotProps extends Pick<PreviewPlotProps, 'axisId' | 'series
|
|
|
5
5
|
export declare function AreaPreviewPlot({
|
|
6
6
|
axisId,
|
|
7
7
|
seriesIds
|
|
8
|
-
}: AreaPreviewPlotProps):
|
|
8
|
+
}: AreaPreviewPlotProps): React.JSX.Element;
|
|
9
9
|
export interface PreviewAreaElementProps extends Omit<React.SVGProps<SVGPathElement>, 'ref' | 'color' | 'id'> {
|
|
10
10
|
seriesId: SeriesId;
|
|
11
11
|
gradientId?: string;
|
|
@@ -5,7 +5,7 @@ interface AreaPreviewPlotProps extends Pick<PreviewPlotProps, 'axisId' | 'series
|
|
|
5
5
|
export declare function AreaPreviewPlot({
|
|
6
6
|
axisId,
|
|
7
7
|
seriesIds
|
|
8
|
-
}: AreaPreviewPlotProps):
|
|
8
|
+
}: AreaPreviewPlotProps): React.JSX.Element;
|
|
9
9
|
export interface PreviewAreaElementProps extends Omit<React.SVGProps<SVGPathElement>, 'ref' | 'color' | 'id'> {
|
|
10
10
|
seriesId: SeriesId;
|
|
11
11
|
gradientId?: string;
|
|
@@ -5,5 +5,5 @@ interface BarPreviewPlotProps extends PreviewPlotProps {
|
|
|
5
5
|
height: number;
|
|
6
6
|
width: number;
|
|
7
7
|
}
|
|
8
|
-
export declare function BarPreviewPlot(props: BarPreviewPlotProps): import("react
|
|
8
|
+
export declare function BarPreviewPlot(props: BarPreviewPlotProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,5 +5,5 @@ interface BarPreviewPlotProps extends PreviewPlotProps {
|
|
|
5
5
|
height: number;
|
|
6
6
|
width: number;
|
|
7
7
|
}
|
|
8
|
-
export declare function BarPreviewPlot(props: BarPreviewPlotProps): import("react
|
|
8
|
+
export declare function BarPreviewPlot(props: BarPreviewPlotProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PreviewPlotProps } from "./PreviewPlot.types.mjs";
|
|
2
3
|
export declare function LineAreaPreviewPlot({
|
|
3
4
|
axisId,
|
|
4
5
|
seriesIds
|
|
5
|
-
}: PreviewPlotProps):
|
|
6
|
+
}: PreviewPlotProps): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PreviewPlotProps } from "./PreviewPlot.types.js";
|
|
2
3
|
export declare function LineAreaPreviewPlot({
|
|
3
4
|
axisId,
|
|
4
5
|
seriesIds
|
|
5
|
-
}: PreviewPlotProps):
|
|
6
|
+
}: PreviewPlotProps): React.JSX.Element;
|
|
@@ -5,7 +5,7 @@ interface LinePreviewPlotProps extends Pick<PreviewPlotProps, 'axisId' | 'series
|
|
|
5
5
|
export declare function LinePreviewPlot({
|
|
6
6
|
axisId,
|
|
7
7
|
seriesIds
|
|
8
|
-
}: LinePreviewPlotProps):
|
|
8
|
+
}: LinePreviewPlotProps): React.JSX.Element;
|
|
9
9
|
export interface PreviewLineElementProps extends Omit<React.SVGProps<SVGPathElement>, 'ref' | 'color' | 'id'> {
|
|
10
10
|
seriesId: SeriesId;
|
|
11
11
|
gradientId?: string;
|
|
@@ -5,7 +5,7 @@ interface LinePreviewPlotProps extends Pick<PreviewPlotProps, 'axisId' | 'series
|
|
|
5
5
|
export declare function LinePreviewPlot({
|
|
6
6
|
axisId,
|
|
7
7
|
seriesIds
|
|
8
|
-
}: LinePreviewPlotProps):
|
|
8
|
+
}: LinePreviewPlotProps): React.JSX.Element;
|
|
9
9
|
export interface PreviewLineElementProps extends Omit<React.SVGProps<SVGPathElement>, 'ref' | 'color' | 'id'> {
|
|
10
10
|
seriesId: SeriesId;
|
|
11
11
|
gradientId?: string;
|
|
@@ -60,5 +60,20 @@ function useLinePreviewData(axisId) {
|
|
|
60
60
|
const store = (0, _internals.useStore)();
|
|
61
61
|
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
62
62
|
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
63
|
-
|
|
63
|
+
const zoomOptions = store.use(_internals.selectorChartAxisZoomOptionsLookup, axisId);
|
|
64
|
+
|
|
65
|
+
// The preview is a full-range overview, so sample against its own range and width rather than the
|
|
66
|
+
// active zoom — otherwise the main chart's zoom would change the preview's point density.
|
|
67
|
+
const samplingOverride = React.useMemo(() => {
|
|
68
|
+
const range = xAxes[axisId]?.scale.range() ?? [0, 0];
|
|
69
|
+
return {
|
|
70
|
+
zoomMap: new Map([[axisId, {
|
|
71
|
+
axisId,
|
|
72
|
+
start: zoomOptions.minStart,
|
|
73
|
+
end: zoomOptions.maxEnd
|
|
74
|
+
}]]),
|
|
75
|
+
availableSize: Math.abs(range[range.length - 1] - range[0])
|
|
76
|
+
};
|
|
77
|
+
}, [xAxes, axisId, zoomOptions.minStart, zoomOptions.maxEnd]);
|
|
78
|
+
return (0, _internals.useLinePlotData)(xAxes, yAxes, samplingOverride);
|
|
64
79
|
}
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["seriesId", "color", "gradientId", "onClick"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { useStore, useLinePlotData, selectorChartPreviewComputedXAxis, selectorChartPreviewComputedYAxis } from '@mui/x-charts/internals';
|
|
5
|
+
import { useStore, useLinePlotData, selectorChartPreviewComputedXAxis, selectorChartPreviewComputedYAxis, selectorChartAxisZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export function LinePreviewPlot({
|
|
8
8
|
axisId,
|
|
@@ -52,5 +52,20 @@ function useLinePreviewData(axisId) {
|
|
|
52
52
|
const store = useStore();
|
|
53
53
|
const xAxes = store.use(selectorChartPreviewComputedXAxis, axisId);
|
|
54
54
|
const yAxes = store.use(selectorChartPreviewComputedYAxis, axisId);
|
|
55
|
-
|
|
55
|
+
const zoomOptions = store.use(selectorChartAxisZoomOptionsLookup, axisId);
|
|
56
|
+
|
|
57
|
+
// The preview is a full-range overview, so sample against its own range and width rather than the
|
|
58
|
+
// active zoom — otherwise the main chart's zoom would change the preview's point density.
|
|
59
|
+
const samplingOverride = React.useMemo(() => {
|
|
60
|
+
const range = xAxes[axisId]?.scale.range() ?? [0, 0];
|
|
61
|
+
return {
|
|
62
|
+
zoomMap: new Map([[axisId, {
|
|
63
|
+
axisId,
|
|
64
|
+
start: zoomOptions.minStart,
|
|
65
|
+
end: zoomOptions.maxEnd
|
|
66
|
+
}]]),
|
|
67
|
+
availableSize: Math.abs(range[range.length - 1] - range[0])
|
|
68
|
+
};
|
|
69
|
+
}, [xAxes, axisId, zoomOptions.minStart, zoomOptions.maxEnd]);
|
|
70
|
+
return useLinePlotData(xAxes, yAxes, samplingOverride);
|
|
56
71
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PreviewPlotProps } from "./PreviewPlot.types.mjs";
|
|
2
3
|
interface ScatterPreviewPlotProps extends PreviewPlotProps {
|
|
3
4
|
x: number;
|
|
@@ -12,5 +13,5 @@ export declare function ScatterPreviewPlot({
|
|
|
12
13
|
height,
|
|
13
14
|
width,
|
|
14
15
|
seriesIds
|
|
15
|
-
}: ScatterPreviewPlotProps):
|
|
16
|
+
}: ScatterPreviewPlotProps): React.JSX.Element | null;
|
|
16
17
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PreviewPlotProps } from "./PreviewPlot.types.js";
|
|
2
3
|
interface ScatterPreviewPlotProps extends PreviewPlotProps {
|
|
3
4
|
x: number;
|
|
@@ -12,5 +13,5 @@ export declare function ScatterPreviewPlot({
|
|
|
12
13
|
height,
|
|
13
14
|
width,
|
|
14
15
|
seriesIds
|
|
15
|
-
}: ScatterPreviewPlotProps):
|
|
16
|
+
}: ScatterPreviewPlotProps): React.JSX.Element | null;
|
|
16
17
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare function FocusedFunnelSection(props: React.SVGAttributes<SVGRectElement>):
|
|
2
|
+
export declare function FocusedFunnelSection(props: React.SVGAttributes<SVGRectElement>): React.JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare function FocusedFunnelSection(props: React.SVGAttributes<SVGRectElement>):
|
|
2
|
+
export declare function FocusedFunnelSection(props: React.SVGAttributes<SVGRectElement>): React.JSX.Element | null;
|
|
@@ -13,7 +13,7 @@ export interface FunnelPlotProps extends FunnelPlotSlotExtension {
|
|
|
13
13
|
*/
|
|
14
14
|
onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, funnelItemIdentifier: FunnelItemIdentifier) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function FunnelPlot(props: FunnelPlotProps):
|
|
16
|
+
declare function FunnelPlot(props: FunnelPlotProps): React.JSX.Element;
|
|
17
17
|
declare namespace FunnelPlot {
|
|
18
18
|
var propTypes: any;
|
|
19
19
|
}
|
|
@@ -13,7 +13,7 @@ export interface FunnelPlotProps extends FunnelPlotSlotExtension {
|
|
|
13
13
|
*/
|
|
14
14
|
onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, funnelItemIdentifier: FunnelItemIdentifier) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function FunnelPlot(props: FunnelPlotProps):
|
|
16
|
+
declare function FunnelPlot(props: FunnelPlotProps): React.JSX.Element;
|
|
17
17
|
declare namespace FunnelPlot {
|
|
18
18
|
var propTypes: any;
|
|
19
19
|
}
|
|
@@ -5,4 +5,4 @@ import { Linear } from "./linear.mjs";
|
|
|
5
5
|
import { Bump } from "./bump.mjs";
|
|
6
6
|
import { Pyramid } from "./pyramid.mjs";
|
|
7
7
|
import { StepPyramid } from "./step-pyramid.mjs";
|
|
8
|
-
export declare const getFunnelCurve: (curve: FunnelCurveType | undefined, options: CurveOptions) => (context: CanvasRenderingContext2D | Path) =>
|
|
8
|
+
export declare const getFunnelCurve: (curve: FunnelCurveType | undefined, options: CurveOptions) => (context: CanvasRenderingContext2D | Path) => Bump | Linear | Pyramid | Step | StepPyramid;
|
|
@@ -5,4 +5,4 @@ import { Linear } from "./linear.js";
|
|
|
5
5
|
import { Bump } from "./bump.js";
|
|
6
6
|
import { Pyramid } from "./pyramid.js";
|
|
7
7
|
import { StepPyramid } from "./step-pyramid.js";
|
|
8
|
-
export declare const getFunnelCurve: (curve: FunnelCurveType | undefined, options: CurveOptions) => (context: CanvasRenderingContext2D | Path) =>
|
|
8
|
+
export declare const getFunnelCurve: (curve: FunnelCurveType | undefined, options: CurveOptions) => (context: CanvasRenderingContext2D | Path) => Bump | Linear | Pyramid | Step | StepPyramid;
|
|
@@ -26,4 +26,4 @@ export interface UseUtilityClassesOptions {
|
|
|
26
26
|
variant?: 'filled' | 'outlined';
|
|
27
27
|
classes?: Partial<FunnelClasses>;
|
|
28
28
|
}
|
|
29
|
-
export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"
|
|
29
|
+
export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"root" | "section" | "sectionLabel", string>;
|
|
@@ -26,4 +26,4 @@ export interface UseUtilityClassesOptions {
|
|
|
26
26
|
variant?: 'filled' | 'outlined';
|
|
27
27
|
classes?: Partial<FunnelClasses>;
|
|
28
28
|
}
|
|
29
|
-
export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"
|
|
29
|
+
export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"root" | "section" | "sectionLabel", string>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
2
3
|
import type { FunnelSectionProps } from "./FunnelSection.mjs";
|
|
3
4
|
import type { FunnelSectionLabelProps } from "./FunnelSectionLabel.mjs";
|
|
4
5
|
import type { FunnelSectionPropsOverrides, FunnelSectionLabelPropsOverrides } from "../models/chartsSlotsComponentsPropsPro.mjs";
|
|
@@ -15,8 +16,8 @@ export interface FunnelPlotSlots {
|
|
|
15
16
|
funnelSectionLabel?: React.ElementType<FunnelSectionLabelProps & FunnelSectionLabelPropsOverrides>;
|
|
16
17
|
}
|
|
17
18
|
export interface FunnelPlotSlotProps {
|
|
18
|
-
funnelSection?: Partial<FunnelSectionProps> & FunnelSectionPropsOverrides
|
|
19
|
-
funnelSectionLabel?: Partial<FunnelSectionLabelProps> & FunnelSectionLabelPropsOverrides
|
|
19
|
+
funnelSection?: WithDataAttributes<Partial<FunnelSectionProps> & FunnelSectionPropsOverrides>;
|
|
20
|
+
funnelSectionLabel?: WithDataAttributes<Partial<FunnelSectionLabelProps> & FunnelSectionLabelPropsOverrides>;
|
|
20
21
|
}
|
|
21
22
|
export interface FunnelPlotSlotExtension {
|
|
22
23
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
2
3
|
import type { FunnelSectionProps } from "./FunnelSection.js";
|
|
3
4
|
import type { FunnelSectionLabelProps } from "./FunnelSectionLabel.js";
|
|
4
5
|
import type { FunnelSectionPropsOverrides, FunnelSectionLabelPropsOverrides } from "../models/chartsSlotsComponentsPropsPro.js";
|
|
@@ -15,8 +16,8 @@ export interface FunnelPlotSlots {
|
|
|
15
16
|
funnelSectionLabel?: React.ElementType<FunnelSectionLabelProps & FunnelSectionLabelPropsOverrides>;
|
|
16
17
|
}
|
|
17
18
|
export interface FunnelPlotSlotProps {
|
|
18
|
-
funnelSection?: Partial<FunnelSectionProps> & FunnelSectionPropsOverrides
|
|
19
|
-
funnelSectionLabel?: Partial<FunnelSectionLabelProps> & FunnelSectionLabelPropsOverrides
|
|
19
|
+
funnelSection?: WithDataAttributes<Partial<FunnelSectionProps> & FunnelSectionPropsOverrides>;
|
|
20
|
+
funnelSectionLabel?: WithDataAttributes<Partial<FunnelSectionLabelProps> & FunnelSectionLabelPropsOverrides>;
|
|
20
21
|
}
|
|
21
22
|
export interface FunnelPlotSlotExtension {
|
|
22
23
|
/**
|
|
@@ -13,7 +13,7 @@ export declare const alignLabel: ({
|
|
|
13
13
|
position,
|
|
14
14
|
textAnchor,
|
|
15
15
|
dominantBaseline
|
|
16
|
-
}: Omit<FunnelLabelOptions,
|
|
16
|
+
}: Omit<FunnelLabelOptions, 'margin'>) => AlignReturnType;
|
|
17
17
|
/**
|
|
18
18
|
* This function calculates the position of the label based on the position and margin.
|
|
19
19
|
*
|
|
@@ -27,7 +27,7 @@ export declare const positionLabel: ({
|
|
|
27
27
|
offset,
|
|
28
28
|
isHorizontal,
|
|
29
29
|
values
|
|
30
|
-
}: Omit<FunnelLabelOptions,
|
|
30
|
+
}: Omit<FunnelLabelOptions, 'textAnchor' | 'dominantBaseline'> & {
|
|
31
31
|
isHorizontal: boolean;
|
|
32
32
|
values: readonly Point[];
|
|
33
33
|
}) => {
|
|
@@ -13,7 +13,7 @@ export declare const alignLabel: ({
|
|
|
13
13
|
position,
|
|
14
14
|
textAnchor,
|
|
15
15
|
dominantBaseline
|
|
16
|
-
}: Omit<FunnelLabelOptions,
|
|
16
|
+
}: Omit<FunnelLabelOptions, 'margin'>) => AlignReturnType;
|
|
17
17
|
/**
|
|
18
18
|
* This function calculates the position of the label based on the position and margin.
|
|
19
19
|
*
|
|
@@ -27,7 +27,7 @@ export declare const positionLabel: ({
|
|
|
27
27
|
offset,
|
|
28
28
|
isHorizontal,
|
|
29
29
|
values
|
|
30
|
-
}: Omit<FunnelLabelOptions,
|
|
30
|
+
}: Omit<FunnelLabelOptions, 'textAnchor' | 'dominantBaseline'> & {
|
|
31
31
|
isHorizontal: boolean;
|
|
32
32
|
values: readonly Point[];
|
|
33
33
|
}) => {
|
|
@@ -12,7 +12,7 @@ var _getColor = _interopRequireDefault(require("./getColor"));
|
|
|
12
12
|
var _legend = _interopRequireDefault(require("./legend"));
|
|
13
13
|
var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
14
14
|
var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
|
|
15
|
-
var _tooltipPosition =
|
|
15
|
+
var _tooltipPosition = require("./tooltipPosition");
|
|
16
16
|
var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
|
|
17
17
|
var _descriptionGetter = _interopRequireDefault(require("./descriptionGetter"));
|
|
18
18
|
const funnelSeriesConfig = exports.funnelSeriesConfig = {
|
|
@@ -20,7 +20,7 @@ const funnelSeriesConfig = exports.funnelSeriesConfig = {
|
|
|
20
20
|
colorProcessor: _getColor.default,
|
|
21
21
|
legendGetter: _legend.default,
|
|
22
22
|
tooltipGetter: _tooltip.default,
|
|
23
|
-
|
|
23
|
+
selectorTooltipItemPosition: _tooltipPosition.selectorTooltipItemPosition,
|
|
24
24
|
xExtremumGetter: _extremums.getExtremumX,
|
|
25
25
|
yExtremumGetter: _extremums.getExtremumY,
|
|
26
26
|
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
|
|
@@ -5,7 +5,7 @@ import getColor from "./getColor.mjs";
|
|
|
5
5
|
import legendGetter from "./legend.mjs";
|
|
6
6
|
import tooltipGetter from "./tooltip.mjs";
|
|
7
7
|
import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.mjs";
|
|
8
|
-
import
|
|
8
|
+
import { selectorTooltipItemPosition } from "./tooltipPosition.mjs";
|
|
9
9
|
import keyboardFocusHandler from "./keyboardFocusHandler.mjs";
|
|
10
10
|
import descriptionGetter from "./descriptionGetter.mjs";
|
|
11
11
|
export const funnelSeriesConfig = {
|
|
@@ -13,7 +13,7 @@ export const funnelSeriesConfig = {
|
|
|
13
13
|
colorProcessor: getColor,
|
|
14
14
|
legendGetter,
|
|
15
15
|
tooltipGetter,
|
|
16
|
-
|
|
16
|
+
selectorTooltipItemPosition,
|
|
17
17
|
xExtremumGetter: getExtremumX,
|
|
18
18
|
yExtremumGetter: getExtremumY,
|
|
19
19
|
getSeriesWithDefaultValues,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
export default tooltipItemPositionGetter;
|
|
1
|
+
import type { TooltipItemPositionSelector } from '@mui/x-charts/internals';
|
|
2
|
+
export declare const selectorTooltipItemPosition: TooltipItemPositionSelector<'funnel'>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
export default tooltipItemPositionGetter;
|
|
1
|
+
import type { TooltipItemPositionSelector } from '@mui/x-charts/internals';
|
|
2
|
+
export declare const selectorTooltipItemPosition: TooltipItemPositionSelector<'funnel'>;
|
|
@@ -3,34 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.selectorTooltipItemPosition = void 0;
|
|
7
|
+
var _store = require("@mui/x-internals/store");
|
|
7
8
|
var _internals = require("@mui/x-charts/internals");
|
|
8
9
|
var _coordinateMapper = require("../coordinateMapper");
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
series,
|
|
12
|
-
identifier,
|
|
13
|
-
axesConfig,
|
|
14
|
-
placement
|
|
15
|
-
} = params;
|
|
16
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
10
|
+
const selectorTooltipItemPosition = exports.selectorTooltipItemPosition = (0, _store.createSelectorMemoized)(_internals.selectorChartsTooltipItem, _internals.selectorChartSeriesProcessed, _internals.selectorChartXAxis, _internals.selectorChartYAxis, (identifier, series, xAxes, yAxes, placement) => {
|
|
11
|
+
if (!identifier || identifier.type !== 'funnel' || identifier.dataIndex === undefined) {
|
|
17
12
|
return null;
|
|
18
13
|
}
|
|
19
14
|
const itemSeries = series.funnel?.series[identifier.seriesId];
|
|
20
15
|
if (itemSeries == null) {
|
|
21
16
|
return null;
|
|
22
17
|
}
|
|
23
|
-
|
|
18
|
+
const xAxis = xAxes.axis[itemSeries.xAxisId ?? xAxes.axisIds[0]];
|
|
19
|
+
const yAxis = yAxes.axis[itemSeries.yAxisId ?? yAxes.axisIds[0]];
|
|
20
|
+
if (xAxis === undefined || yAxis === undefined) {
|
|
24
21
|
return null;
|
|
25
22
|
}
|
|
26
23
|
const isHorizontal = itemSeries.layout === 'horizontal';
|
|
27
|
-
const baseScaleConfig = isHorizontal ?
|
|
24
|
+
const baseScaleConfig = isHorizontal ? xAxis : yAxis;
|
|
28
25
|
|
|
29
26
|
// FIXME gap should be obtained from the store.
|
|
30
27
|
// Maybe moving it to the series would be a good idea similar to what we do with bar charts and their stackingGroups
|
|
31
28
|
const gap = 0;
|
|
32
|
-
const xPosition = (0, _coordinateMapper.createPositionGetter)(
|
|
33
|
-
const yPosition = (0, _coordinateMapper.createPositionGetter)(
|
|
29
|
+
const xPosition = (0, _coordinateMapper.createPositionGetter)(xAxis.scale, isHorizontal, gap, baseScaleConfig.data);
|
|
30
|
+
const yPosition = (0, _coordinateMapper.createPositionGetter)(yAxis.scale, !isHorizontal, gap, baseScaleConfig.data);
|
|
34
31
|
const allY = itemSeries.dataPoints[identifier.dataIndex].map(v => yPosition(v.y, identifier.dataIndex, v.stackOffset, v.useBandWidth));
|
|
35
32
|
const allX = itemSeries.dataPoints[identifier.dataIndex].map(v => xPosition(v.x, identifier.dataIndex, v.stackOffset, v.useBandWidth));
|
|
36
33
|
const [x0, x1] = (0, _internals.findMinMax)(allX);
|
|
@@ -58,5 +55,4 @@ const tooltipItemPositionGetter = params => {
|
|
|
58
55
|
y: y0
|
|
59
56
|
};
|
|
60
57
|
}
|
|
61
|
-
};
|
|
62
|
-
var _default = exports.default = tooltipItemPositionGetter;
|
|
58
|
+
});
|