@mui/x-charts-pro 9.8.0 → 9.9.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 +119 -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/ChartsToolbarPro/ChartsToolbarPro.d.mts +2 -1
- package/ChartsToolbarPro/ChartsToolbarPro.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/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/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/HeatmapItem.d.mts +1 -1
- package/Heatmap/HeatmapItem.d.ts +1 -1
- package/Heatmap/HeatmapSVGPlot.d.mts +2 -1
- package/Heatmap/HeatmapSVGPlot.d.ts +2 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.mts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.mts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
- 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.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/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/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/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/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/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 { 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;
|
|
@@ -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
|
}
|
|
@@ -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
|
+
});
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
|
+
import { findMinMax, selectorChartsTooltipItem, selectorChartSeriesProcessed, selectorChartXAxis, selectorChartYAxis } from '@mui/x-charts/internals';
|
|
2
3
|
import { createPositionGetter } from "../coordinateMapper.mjs";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
series,
|
|
6
|
-
identifier,
|
|
7
|
-
axesConfig,
|
|
8
|
-
placement
|
|
9
|
-
} = params;
|
|
10
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
4
|
+
export const selectorTooltipItemPosition = createSelectorMemoized(selectorChartsTooltipItem, selectorChartSeriesProcessed, selectorChartXAxis, selectorChartYAxis, (identifier, series, xAxes, yAxes, placement) => {
|
|
5
|
+
if (!identifier || identifier.type !== 'funnel' || identifier.dataIndex === undefined) {
|
|
11
6
|
return null;
|
|
12
7
|
}
|
|
13
8
|
const itemSeries = series.funnel?.series[identifier.seriesId];
|
|
14
9
|
if (itemSeries == null) {
|
|
15
10
|
return null;
|
|
16
11
|
}
|
|
17
|
-
|
|
12
|
+
const xAxis = xAxes.axis[itemSeries.xAxisId ?? xAxes.axisIds[0]];
|
|
13
|
+
const yAxis = yAxes.axis[itemSeries.yAxisId ?? yAxes.axisIds[0]];
|
|
14
|
+
if (xAxis === undefined || yAxis === undefined) {
|
|
18
15
|
return null;
|
|
19
16
|
}
|
|
20
17
|
const isHorizontal = itemSeries.layout === 'horizontal';
|
|
21
|
-
const baseScaleConfig = isHorizontal ?
|
|
18
|
+
const baseScaleConfig = isHorizontal ? xAxis : yAxis;
|
|
22
19
|
|
|
23
20
|
// FIXME gap should be obtained from the store.
|
|
24
21
|
// Maybe moving it to the series would be a good idea similar to what we do with bar charts and their stackingGroups
|
|
25
22
|
const gap = 0;
|
|
26
|
-
const xPosition = createPositionGetter(
|
|
27
|
-
const yPosition = createPositionGetter(
|
|
23
|
+
const xPosition = createPositionGetter(xAxis.scale, isHorizontal, gap, baseScaleConfig.data);
|
|
24
|
+
const yPosition = createPositionGetter(yAxis.scale, !isHorizontal, gap, baseScaleConfig.data);
|
|
28
25
|
const allY = itemSeries.dataPoints[identifier.dataIndex].map(v => yPosition(v.y, identifier.dataIndex, v.stackOffset, v.useBandWidth));
|
|
29
26
|
const allX = itemSeries.dataPoints[identifier.dataIndex].map(v => xPosition(v.x, identifier.dataIndex, v.stackOffset, v.useBandWidth));
|
|
30
27
|
const [x0, x1] = findMinMax(allX);
|
|
@@ -52,5 +49,4 @@ const tooltipItemPositionGetter = params => {
|
|
|
52
49
|
y: y0
|
|
53
50
|
};
|
|
54
51
|
}
|
|
55
|
-
};
|
|
56
|
-
export default tooltipItemPositionGetter;
|
|
52
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function FocusedHeatmapCell(props: React.SVGAttributes<SVGRectElement>): import("react
|
|
1
|
+
export declare function FocusedHeatmapCell(props: React.SVGAttributes<SVGRectElement>): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function FocusedHeatmapCell(props: React.SVGAttributes<SVGRectElement>): import("react
|
|
1
|
+
export declare function FocusedHeatmapCell(props: React.SVGAttributes<SVGRectElement>): import("react").JSX.Element | null;
|
|
@@ -42,7 +42,7 @@ export interface HeatmapItemProps {
|
|
|
42
42
|
/**
|
|
43
43
|
* @ignore - internal component.
|
|
44
44
|
*/
|
|
45
|
-
declare function HeatmapItem(props: HeatmapItemProps):
|
|
45
|
+
declare function HeatmapItem(props: HeatmapItemProps): React.JSX.Element;
|
|
46
46
|
declare namespace HeatmapItem {
|
|
47
47
|
var propTypes: any;
|
|
48
48
|
}
|
package/Heatmap/HeatmapItem.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export interface HeatmapItemProps {
|
|
|
42
42
|
/**
|
|
43
43
|
* @ignore - internal component.
|
|
44
44
|
*/
|
|
45
|
-
declare function HeatmapItem(props: HeatmapItemProps):
|
|
45
|
+
declare function HeatmapItem(props: HeatmapItemProps): React.JSX.Element;
|
|
46
46
|
declare namespace HeatmapItem {
|
|
47
47
|
var propTypes: any;
|
|
48
48
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { HeatmapRendererPlotProps } from "./Heatmap.types.mjs";
|
|
2
|
-
export declare function HeatmapSVGPlot(props: HeatmapRendererPlotProps):
|
|
3
|
+
export declare function HeatmapSVGPlot(props: HeatmapRendererPlotProps): React.JSX.Element | null;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { HeatmapRendererPlotProps } from "./Heatmap.types.js";
|
|
2
|
-
export declare function HeatmapSVGPlot(props: HeatmapRendererPlotProps):
|
|
3
|
+
export declare function HeatmapSVGPlot(props: HeatmapRendererPlotProps): React.JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HeatmapTooltipProps } from "./HeatmapTooltip.types.mjs";
|
|
2
|
-
declare function HeatmapTooltip(props: HeatmapTooltipProps): import("react
|
|
2
|
+
declare function HeatmapTooltip(props: HeatmapTooltipProps): import("react").JSX.Element;
|
|
3
3
|
declare namespace HeatmapTooltip {
|
|
4
4
|
var propTypes: any;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
2
|
-
declare function HeatmapTooltip(props: HeatmapTooltipProps): import("react
|
|
2
|
+
declare function HeatmapTooltip(props: HeatmapTooltipProps): import("react").JSX.Element;
|
|
3
3
|
declare namespace HeatmapTooltip {
|
|
4
4
|
var propTypes: any;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HeatmapTooltipProps } from "./HeatmapTooltip.types.mjs";
|
|
2
2
|
export interface HeatmapTooltipContentProps extends Pick<HeatmapTooltipProps, 'classes'> {}
|
|
3
|
-
export declare function HeatmapTooltipContent(props: HeatmapTooltipContentProps): import("react
|
|
3
|
+
export declare function HeatmapTooltipContent(props: HeatmapTooltipContentProps): import("react").JSX.Element | null;
|
|
4
4
|
export declare namespace HeatmapTooltipContent {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
2
2
|
export interface HeatmapTooltipContentProps extends Pick<HeatmapTooltipProps, 'classes'> {}
|
|
3
|
-
export declare function HeatmapTooltipContent(props: HeatmapTooltipContentProps): import("react
|
|
3
|
+
export declare function HeatmapTooltipContent(props: HeatmapTooltipContentProps): import("react").JSX.Element | null;
|
|
4
4
|
export declare namespace HeatmapTooltipContent {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -11,7 +11,7 @@ var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
|
|
|
11
11
|
var _getColor = _interopRequireDefault(require("./getColor"));
|
|
12
12
|
var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
13
13
|
var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
|
|
14
|
-
var _tooltipPosition =
|
|
14
|
+
var _tooltipPosition = require("./tooltipPosition");
|
|
15
15
|
var _getItemAtPosition = _interopRequireDefault(require("./getItemAtPosition"));
|
|
16
16
|
var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
|
|
17
17
|
var _highlight = require("./highlight");
|
|
@@ -24,7 +24,7 @@ const heatmapSeriesConfig = exports.heatmapSeriesConfig = {
|
|
|
24
24
|
colorProcessor: _getColor.default,
|
|
25
25
|
legendGetter: () => [],
|
|
26
26
|
tooltipGetter: _tooltip.default,
|
|
27
|
-
|
|
27
|
+
selectorTooltipItemPosition: _tooltipPosition.selectorTooltipItemPosition,
|
|
28
28
|
xExtremumGetter: _extremums.getBaseExtremum,
|
|
29
29
|
yExtremumGetter: _extremums.getBaseExtremum,
|
|
30
30
|
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
|
|
@@ -4,7 +4,7 @@ import seriesProcessor from "./seriesProcessor.mjs";
|
|
|
4
4
|
import getColor from "./getColor.mjs";
|
|
5
5
|
import tooltipGetter from "./tooltip.mjs";
|
|
6
6
|
import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.mjs";
|
|
7
|
-
import
|
|
7
|
+
import { selectorTooltipItemPosition } from "./tooltipPosition.mjs";
|
|
8
8
|
import getItemAtPosition from "./getItemAtPosition.mjs";
|
|
9
9
|
import keyboardFocusHandler from "./keyboardFocusHandler.mjs";
|
|
10
10
|
import { createIsFaded, createIsHighlighted } from "./highlight.mjs";
|
|
@@ -17,7 +17,7 @@ export const heatmapSeriesConfig = {
|
|
|
17
17
|
colorProcessor: getColor,
|
|
18
18
|
legendGetter: () => [],
|
|
19
19
|
tooltipGetter,
|
|
20
|
-
|
|
20
|
+
selectorTooltipItemPosition,
|
|
21
21
|
xExtremumGetter: getBaseExtremum,
|
|
22
22
|
yExtremumGetter: getBaseExtremum,
|
|
23
23
|
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<'heatmap'>;
|
|
@@ -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<'heatmap'>;
|
|
@@ -3,32 +3,29 @@
|
|
|
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
|
-
const
|
|
9
|
-
|
|
10
|
-
series,
|
|
11
|
-
identifier,
|
|
12
|
-
axesConfig,
|
|
13
|
-
placement
|
|
14
|
-
} = params;
|
|
15
|
-
if (!identifier) {
|
|
9
|
+
const selectorTooltipItemPosition = exports.selectorTooltipItemPosition = (0, _store.createSelectorMemoized)(_internals.selectorChartsTooltipItem, _internals.selectorChartSeriesProcessed, _internals.selectorChartXAxis, _internals.selectorChartYAxis, function selectorTooltipItemPosition(identifier, series, xAxes, yAxes, placement) {
|
|
10
|
+
if (!identifier || identifier.type !== 'heatmap') {
|
|
16
11
|
return null;
|
|
17
12
|
}
|
|
18
13
|
const itemSeries = series.heatmap?.series[identifier.seriesId];
|
|
19
14
|
if (itemSeries == null) {
|
|
20
15
|
return null;
|
|
21
16
|
}
|
|
22
|
-
|
|
17
|
+
const xAxis = xAxes.axis[itemSeries.xAxisId ?? xAxes.axisIds[0]];
|
|
18
|
+
const yAxis = yAxes.axis[itemSeries.yAxisId ?? yAxes.axisIds[0]];
|
|
19
|
+
if (xAxis === undefined || yAxis === undefined || !(0, _internals.isBandScaleConfig)(xAxis) || !(0, _internals.isBandScaleConfig)(yAxis)) {
|
|
23
20
|
return null;
|
|
24
21
|
}
|
|
25
|
-
const x =
|
|
26
|
-
const y =
|
|
22
|
+
const x = xAxis.scale(xAxis.scale.domain()[identifier.xIndex]);
|
|
23
|
+
const y = yAxis.scale(yAxis.scale.domain()[identifier.yIndex]);
|
|
27
24
|
if (x === undefined || y === undefined) {
|
|
28
25
|
return null;
|
|
29
26
|
}
|
|
30
|
-
const width =
|
|
31
|
-
const height =
|
|
27
|
+
const width = xAxis.scale.bandwidth();
|
|
28
|
+
const height = yAxis.scale.bandwidth();
|
|
32
29
|
switch (placement) {
|
|
33
30
|
case 'bottom':
|
|
34
31
|
return {
|
|
@@ -52,5 +49,4 @@ const tooltipItemPositionGetter = params => {
|
|
|
52
49
|
y
|
|
53
50
|
};
|
|
54
51
|
}
|
|
55
|
-
};
|
|
56
|
-
var _default = exports.default = tooltipItemPositionGetter;
|
|
52
|
+
});
|