@mui/x-charts-pro 9.7.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 +249 -1
- 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
|
@@ -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
|
+
});
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
identifier,
|
|
6
|
-
axesConfig,
|
|
7
|
-
placement
|
|
8
|
-
} = params;
|
|
9
|
-
if (!identifier) {
|
|
1
|
+
import { createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
|
+
import { isBandScaleConfig, selectorChartsTooltipItem, selectorChartSeriesProcessed, selectorChartXAxis, selectorChartYAxis } from '@mui/x-charts/internals';
|
|
3
|
+
export const selectorTooltipItemPosition = createSelectorMemoized(selectorChartsTooltipItem, selectorChartSeriesProcessed, selectorChartXAxis, selectorChartYAxis, function selectorTooltipItemPosition(identifier, series, xAxes, yAxes, placement) {
|
|
4
|
+
if (!identifier || identifier.type !== 'heatmap') {
|
|
10
5
|
return null;
|
|
11
6
|
}
|
|
12
7
|
const itemSeries = series.heatmap?.series[identifier.seriesId];
|
|
13
8
|
if (itemSeries == null) {
|
|
14
9
|
return null;
|
|
15
10
|
}
|
|
16
|
-
|
|
11
|
+
const xAxis = xAxes.axis[itemSeries.xAxisId ?? xAxes.axisIds[0]];
|
|
12
|
+
const yAxis = yAxes.axis[itemSeries.yAxisId ?? yAxes.axisIds[0]];
|
|
13
|
+
if (xAxis === undefined || yAxis === undefined || !isBandScaleConfig(xAxis) || !isBandScaleConfig(yAxis)) {
|
|
17
14
|
return null;
|
|
18
15
|
}
|
|
19
|
-
const x =
|
|
20
|
-
const y =
|
|
16
|
+
const x = xAxis.scale(xAxis.scale.domain()[identifier.xIndex]);
|
|
17
|
+
const y = yAxis.scale(yAxis.scale.domain()[identifier.yIndex]);
|
|
21
18
|
if (x === undefined || y === undefined) {
|
|
22
19
|
return null;
|
|
23
20
|
}
|
|
24
|
-
const width =
|
|
25
|
-
const height =
|
|
21
|
+
const width = xAxis.scale.bandwidth();
|
|
22
|
+
const height = yAxis.scale.bandwidth();
|
|
26
23
|
switch (placement) {
|
|
27
24
|
case 'bottom':
|
|
28
25
|
return {
|
|
@@ -46,5 +43,4 @@ const tooltipItemPositionGetter = params => {
|
|
|
46
43
|
y
|
|
47
44
|
};
|
|
48
45
|
}
|
|
49
|
-
};
|
|
50
|
-
export default tooltipItemPositionGetter;
|
|
46
|
+
});
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { LineChartProps, LineChartSlots, LineChartSlotProps } from '@mui/x-charts/LineChart';
|
|
3
|
+
import type { SamplingMethod } from '@mui/x-charts/internals';
|
|
3
4
|
import type { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.mjs";
|
|
4
5
|
import type { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.mjs";
|
|
5
6
|
import type { ChartsContainerProProps } from "../ChartsContainerPro/index.mjs";
|
|
6
7
|
import type { LineChartProPluginSignatures } from "./LineChartPro.plugins.mjs";
|
|
7
8
|
export interface LineChartProSlots extends Omit<LineChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
9
|
export interface LineChartProSlotProps extends Omit<LineChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
|
-
export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartsContainerProProps<'line', LineChartProPluginSignatures>, 'series' | 'slots' | 'slotProps'> {
|
|
10
|
+
export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartsContainerProProps<'line', LineChartProPluginSignatures>, 'series' | 'slots' | 'slotProps' | 'sampling'> {
|
|
11
|
+
/**
|
|
12
|
+
* Sampling method used to render large datasets when zoomed out.
|
|
13
|
+
* - `'none'`: render every point (no sampling).
|
|
14
|
+
* - `'minmax'`: keep the min and max per bucket.
|
|
15
|
+
* - `'m4'`: pixel-accurate—keep the first, min, max, and last per bucket.
|
|
16
|
+
* - `'lttb'`: Largest-Triangle-Three-Buckets, preserves the visual shape.
|
|
17
|
+
* @default 'none'
|
|
18
|
+
*/
|
|
19
|
+
sampling?: SamplingMethod;
|
|
10
20
|
/**
|
|
11
21
|
* Overridable component slots.
|
|
12
22
|
* @default {}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { LineChartProps, LineChartSlots, LineChartSlotProps } from '@mui/x-charts/LineChart';
|
|
3
|
+
import type { SamplingMethod } from '@mui/x-charts/internals';
|
|
3
4
|
import type { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
4
5
|
import type { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
6
|
import type { ChartsContainerProProps } from "../ChartsContainerPro/index.js";
|
|
6
7
|
import type { LineChartProPluginSignatures } from "./LineChartPro.plugins.js";
|
|
7
8
|
export interface LineChartProSlots extends Omit<LineChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
9
|
export interface LineChartProSlotProps extends Omit<LineChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
|
-
export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartsContainerProProps<'line', LineChartProPluginSignatures>, 'series' | 'slots' | 'slotProps'> {
|
|
10
|
+
export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig'>, Omit<ChartsContainerProProps<'line', LineChartProPluginSignatures>, 'series' | 'slots' | 'slotProps' | 'sampling'> {
|
|
11
|
+
/**
|
|
12
|
+
* Sampling method used to render large datasets when zoomed out.
|
|
13
|
+
* - `'none'`: render every point (no sampling).
|
|
14
|
+
* - `'minmax'`: keep the min and max per bucket.
|
|
15
|
+
* - `'m4'`: pixel-accurate—keep the first, min, max, and last per bucket.
|
|
16
|
+
* - `'lttb'`: Largest-Triangle-Three-Buckets, preserves the visual shape.
|
|
17
|
+
* @default 'none'
|
|
18
|
+
*/
|
|
19
|
+
sampling?: SamplingMethod;
|
|
10
20
|
/**
|
|
11
21
|
* Overridable component slots.
|
|
12
22
|
* @default {}
|
|
@@ -30,7 +30,7 @@ var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContai
|
|
|
30
30
|
var _ChartsDataProviderPro = require("../ChartsDataProviderPro");
|
|
31
31
|
var _LineChartPro2 = require("./LineChartPro.plugins");
|
|
32
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
|
-
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef", "showToolbar"];
|
|
33
|
+
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef", "showToolbar", "sampling"];
|
|
34
34
|
/**
|
|
35
35
|
* Demos:
|
|
36
36
|
*
|
|
@@ -51,7 +51,8 @@ const LineChartPro = exports.LineChartPro = /*#__PURE__*/React.forwardRef(functi
|
|
|
51
51
|
zoomData,
|
|
52
52
|
onZoomChange,
|
|
53
53
|
apiRef,
|
|
54
|
-
showToolbar
|
|
54
|
+
showToolbar,
|
|
55
|
+
sampling
|
|
55
56
|
} = props,
|
|
56
57
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
57
58
|
const {
|
|
@@ -79,7 +80,10 @@ const LineChartPro = exports.LineChartPro = /*#__PURE__*/React.forwardRef(functi
|
|
|
79
80
|
onZoomChange,
|
|
80
81
|
apiRef,
|
|
81
82
|
plugins: _LineChartPro2.LINE_CHART_PRO_PLUGINS
|
|
82
|
-
})
|
|
83
|
+
}), {
|
|
84
|
+
seriesType: 'line',
|
|
85
|
+
method: sampling
|
|
86
|
+
});
|
|
83
87
|
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
84
88
|
const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
|
|
85
89
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsDataProviderPro.ChartsDataProviderPro, (0, _extends2.default)({}, chartsDataProviderProProps, {
|
|
@@ -364,6 +368,15 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes /* remove-proptyp
|
|
|
364
368
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
365
369
|
*/
|
|
366
370
|
onZoomChange: _propTypes.default.func,
|
|
371
|
+
/**
|
|
372
|
+
* Sampling method used to render large datasets when zoomed out.
|
|
373
|
+
* - `'none'`: render every point (no sampling).
|
|
374
|
+
* - `'minmax'`: keep the min and max per bucket.
|
|
375
|
+
* - `'m4'`: pixel-accurate—keep the first, min, max, and last per bucket.
|
|
376
|
+
* - `'lttb'`: Largest-Triangle-Three-Buckets, preserves the visual shape.
|
|
377
|
+
* @default 'none'
|
|
378
|
+
*/
|
|
379
|
+
sampling: _propTypes.default.oneOf(['lttb', 'm4', 'minmax', 'none']),
|
|
367
380
|
/**
|
|
368
381
|
* The series to display in the line chart.
|
|
369
382
|
* An array of [[LineSeries]] objects.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef", "showToolbar"];
|
|
5
|
+
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef", "showToolbar", "sampling"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useThemeProps } from '@mui/material/styles';
|
|
@@ -44,7 +44,8 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
44
44
|
zoomData,
|
|
45
45
|
onZoomChange,
|
|
46
46
|
apiRef,
|
|
47
|
-
showToolbar
|
|
47
|
+
showToolbar,
|
|
48
|
+
sampling
|
|
48
49
|
} = props,
|
|
49
50
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
50
51
|
const {
|
|
@@ -72,7 +73,10 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
72
73
|
onZoomChange,
|
|
73
74
|
apiRef,
|
|
74
75
|
plugins: LINE_CHART_PRO_PLUGINS
|
|
75
|
-
})
|
|
76
|
+
}), {
|
|
77
|
+
seriesType: 'line',
|
|
78
|
+
method: sampling
|
|
79
|
+
});
|
|
76
80
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
77
81
|
const Toolbar = props.slots?.toolbar ?? ChartsToolbarPro;
|
|
78
82
|
return /*#__PURE__*/_jsx(ChartsDataProviderPro, _extends({}, chartsDataProviderProProps, {
|
|
@@ -357,6 +361,15 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes /* remove-proptyp
|
|
|
357
361
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
358
362
|
*/
|
|
359
363
|
onZoomChange: PropTypes.func,
|
|
364
|
+
/**
|
|
365
|
+
* Sampling method used to render large datasets when zoomed out.
|
|
366
|
+
* - `'none'`: render every point (no sampling).
|
|
367
|
+
* - `'minmax'`: keep the min and max per bucket.
|
|
368
|
+
* - `'m4'`: pixel-accurate—keep the first, min, max, and last per bucket.
|
|
369
|
+
* - `'lttb'`: Largest-Triangle-Three-Buckets, preserves the visual shape.
|
|
370
|
+
* @default 'none'
|
|
371
|
+
*/
|
|
372
|
+
sampling: PropTypes.oneOf(['lttb', 'm4', 'minmax', 'none']),
|
|
360
373
|
/**
|
|
361
374
|
* The series to display in the line chart.
|
|
362
375
|
* An array of [[LineSeries]] objects.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartBrushSignature, ConvertSignaturesIntoPlugins, UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import type { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.mjs";
|
|
3
3
|
import type { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.mjs";
|
|
4
|
-
|
|
4
|
+
import type { UseChartProSamplingSignature } from "../internals/plugins/useChartProSampling/index.mjs";
|
|
5
|
+
export type LineChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<'line'>, UseChartInteractionSignature, UseChartCartesianAxisSignature<'line'>, UseChartHighlightSignature<'line'>, UseChartVisibilityManagerSignature<'line'>, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProSamplingSignature, UseChartProExportSignature];
|
|
5
6
|
export declare const LINE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<LineChartProPluginSignatures>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartBrushSignature, ConvertSignaturesIntoPlugins, UseChartVisibilityManagerSignature } from '@mui/x-charts/internals';
|
|
2
2
|
import type { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import type { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
|
|
4
|
+
import type { UseChartProSamplingSignature } from "../internals/plugins/useChartProSampling/index.js";
|
|
5
|
+
export type LineChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<'line'>, UseChartInteractionSignature, UseChartCartesianAxisSignature<'line'>, UseChartHighlightSignature<'line'>, UseChartVisibilityManagerSignature<'line'>, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProSamplingSignature, UseChartProExportSignature];
|
|
5
6
|
export declare const LINE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<LineChartProPluginSignatures>;
|
|
@@ -7,4 +7,5 @@ exports.LINE_CHART_PRO_PLUGINS = void 0;
|
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
9
|
var _useChartProZoom = require("../internals/plugins/useChartProZoom");
|
|
10
|
-
|
|
10
|
+
var _useChartProSampling = require("../internals/plugins/useChartProSampling");
|
|
11
|
+
const LINE_CHART_PRO_PLUGINS = exports.LINE_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartVisibilityManager, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProSampling.useChartProSampling, _useChartProExport.useChartProExport];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useChartZAxis, useChartCartesianAxis, useChartTooltip, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartBrush, useChartVisibilityManager } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProExport } from "../internals/plugins/useChartProExport/index.mjs";
|
|
3
3
|
import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.mjs";
|
|
4
|
-
|
|
4
|
+
import { useChartProSampling } from "../internals/plugins/useChartProSampling/index.mjs";
|
|
5
|
+
export const LINE_CHART_PRO_PLUGINS = [useChartZAxis, useChartBrush, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartVisibilityManager, useChartKeyboardNavigation, useChartProZoom, useChartProSampling, useChartProExport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function FocusedSankeyLink(props: React.SVGAttributes<SVGPathElement>): import("react
|
|
1
|
+
export declare function FocusedSankeyLink(props: React.SVGAttributes<SVGPathElement>): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function FocusedSankeyLink(props: React.SVGAttributes<SVGPathElement>): import("react
|
|
1
|
+
export declare function FocusedSankeyLink(props: React.SVGAttributes<SVGPathElement>): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function FocusedSankeyNode(props: React.SVGAttributes<SVGRectElement>): import("react
|
|
1
|
+
export declare function FocusedSankeyNode(props: React.SVGAttributes<SVGRectElement>): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function FocusedSankeyNode(props: React.SVGAttributes<SVGRectElement>): import("react
|
|
1
|
+
export declare function FocusedSankeyNode(props: React.SVGAttributes<SVGRectElement>): import("react").JSX.Element | null;
|
|
@@ -15,7 +15,7 @@ export interface SankeyDataProviderProps extends Omit<ChartsContainerProProps<'s
|
|
|
15
15
|
*
|
|
16
16
|
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
17
17
|
*/
|
|
18
|
-
declare function SankeyDataProvider(props: SankeyDataProviderProps):
|
|
18
|
+
declare function SankeyDataProvider(props: SankeyDataProviderProps): React.JSX.Element;
|
|
19
19
|
declare namespace SankeyDataProvider {
|
|
20
20
|
var propTypes: any;
|
|
21
21
|
}
|
|
@@ -15,7 +15,7 @@ export interface SankeyDataProviderProps extends Omit<ChartsContainerProProps<'s
|
|
|
15
15
|
*
|
|
16
16
|
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
17
17
|
*/
|
|
18
|
-
declare function SankeyDataProvider(props: SankeyDataProviderProps):
|
|
18
|
+
declare function SankeyDataProvider(props: SankeyDataProviderProps): React.JSX.Element;
|
|
19
19
|
declare namespace SankeyDataProvider {
|
|
20
20
|
var propTypes: any;
|
|
21
21
|
}
|
|
@@ -5,7 +5,7 @@ export interface SankeyLinkLabelPlotProps {
|
|
|
5
5
|
*/
|
|
6
6
|
classes?: Partial<SankeyClasses>;
|
|
7
7
|
}
|
|
8
|
-
declare function SankeyLinkLabelPlot(props: SankeyLinkLabelPlotProps): import("react
|
|
8
|
+
declare function SankeyLinkLabelPlot(props: SankeyLinkLabelPlotProps): import("react").JSX.Element | null;
|
|
9
9
|
declare namespace SankeyLinkLabelPlot {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ export interface SankeyLinkLabelPlotProps {
|
|
|
5
5
|
*/
|
|
6
6
|
classes?: Partial<SankeyClasses>;
|
|
7
7
|
}
|
|
8
|
-
declare function SankeyLinkLabelPlot(props: SankeyLinkLabelPlotProps): import("react
|
|
8
|
+
declare function SankeyLinkLabelPlot(props: SankeyLinkLabelPlotProps): import("react").JSX.Element | null;
|
|
9
9
|
declare namespace SankeyLinkLabelPlot {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -13,7 +13,7 @@ export interface SankeyLinkPlotProps {
|
|
|
13
13
|
*/
|
|
14
14
|
onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, link: SankeyLinkIdentifierWithData) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function SankeyLinkPlot(props: SankeyLinkPlotProps):
|
|
16
|
+
declare function SankeyLinkPlot(props: SankeyLinkPlotProps): React.JSX.Element | null;
|
|
17
17
|
declare namespace SankeyLinkPlot {
|
|
18
18
|
var propTypes: any;
|
|
19
19
|
}
|
|
@@ -13,7 +13,7 @@ export interface SankeyLinkPlotProps {
|
|
|
13
13
|
*/
|
|
14
14
|
onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, link: SankeyLinkIdentifierWithData) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function SankeyLinkPlot(props: SankeyLinkPlotProps):
|
|
16
|
+
declare function SankeyLinkPlot(props: SankeyLinkPlotProps): React.JSX.Element | null;
|
|
17
17
|
declare namespace SankeyLinkPlot {
|
|
18
18
|
var propTypes: any;
|
|
19
19
|
}
|
|
@@ -5,7 +5,7 @@ export interface SankeyNodeLabelPlotProps {
|
|
|
5
5
|
*/
|
|
6
6
|
classes?: Partial<SankeyClasses>;
|
|
7
7
|
}
|
|
8
|
-
declare function SankeyNodeLabelPlot(props: SankeyNodeLabelPlotProps): import("react
|
|
8
|
+
declare function SankeyNodeLabelPlot(props: SankeyNodeLabelPlotProps): import("react").JSX.Element | null;
|
|
9
9
|
declare namespace SankeyNodeLabelPlot {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ export interface SankeyNodeLabelPlotProps {
|
|
|
5
5
|
*/
|
|
6
6
|
classes?: Partial<SankeyClasses>;
|
|
7
7
|
}
|
|
8
|
-
declare function SankeyNodeLabelPlot(props: SankeyNodeLabelPlotProps): import("react
|
|
8
|
+
declare function SankeyNodeLabelPlot(props: SankeyNodeLabelPlotProps): import("react").JSX.Element | null;
|
|
9
9
|
declare namespace SankeyNodeLabelPlot {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -13,7 +13,7 @@ export interface SankeyNodePlotProps {
|
|
|
13
13
|
*/
|
|
14
14
|
onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, node: SankeyNodeIdentifierWithData) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function SankeyNodePlot(props: SankeyNodePlotProps):
|
|
16
|
+
declare function SankeyNodePlot(props: SankeyNodePlotProps): React.JSX.Element | null;
|
|
17
17
|
declare namespace SankeyNodePlot {
|
|
18
18
|
var propTypes: any;
|
|
19
19
|
}
|
|
@@ -13,7 +13,7 @@ export interface SankeyNodePlotProps {
|
|
|
13
13
|
*/
|
|
14
14
|
onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, node: SankeyNodeIdentifierWithData) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function SankeyNodePlot(props: SankeyNodePlotProps):
|
|
16
|
+
declare function SankeyNodePlot(props: SankeyNodePlotProps): React.JSX.Element | null;
|
|
17
17
|
declare namespace SankeyNodePlot {
|
|
18
18
|
var propTypes: any;
|
|
19
19
|
}
|
|
@@ -26,7 +26,7 @@ export interface SankeyPlotProps {
|
|
|
26
26
|
/**
|
|
27
27
|
* Renders a Sankey diagram plot.
|
|
28
28
|
*/
|
|
29
|
-
declare function SankeyPlot(props: SankeyPlotProps):
|
|
29
|
+
declare function SankeyPlot(props: SankeyPlotProps): React.JSX.Element | null;
|
|
30
30
|
declare namespace SankeyPlot {
|
|
31
31
|
var propTypes: any;
|
|
32
32
|
}
|
|
@@ -26,7 +26,7 @@ export interface SankeyPlotProps {
|
|
|
26
26
|
/**
|
|
27
27
|
* Renders a Sankey diagram plot.
|
|
28
28
|
*/
|
|
29
|
-
declare function SankeyPlot(props: SankeyPlotProps):
|
|
29
|
+
declare function SankeyPlot(props: SankeyPlotProps): React.JSX.Element | null;
|
|
30
30
|
declare namespace SankeyPlot {
|
|
31
31
|
var propTypes: any;
|
|
32
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SankeyTooltipProps } from "./SankeyTooltip.types.mjs";
|
|
2
|
-
declare function SankeyTooltip(props: SankeyTooltipProps): import("react
|
|
2
|
+
declare function SankeyTooltip(props: SankeyTooltipProps): import("react").JSX.Element;
|
|
3
3
|
declare namespace SankeyTooltip {
|
|
4
4
|
var propTypes: any;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SankeyTooltipProps } from "./SankeyTooltip.types.js";
|
|
2
|
-
declare function SankeyTooltip(props: SankeyTooltipProps): import("react
|
|
2
|
+
declare function SankeyTooltip(props: SankeyTooltipProps): import("react").JSX.Element;
|
|
3
3
|
declare namespace SankeyTooltip {
|
|
4
4
|
var propTypes: any;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SankeyTooltipProps } from "./SankeyTooltip.types.mjs";
|
|
2
2
|
export interface SankeyTooltipContentProps extends Pick<SankeyTooltipProps, 'classes'> {}
|
|
3
|
-
export declare function SankeyTooltipContent(props: SankeyTooltipContentProps): import("react
|
|
3
|
+
export declare function SankeyTooltipContent(props: SankeyTooltipContentProps): import("react").JSX.Element | null;
|
|
4
4
|
export declare namespace SankeyTooltipContent {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SankeyTooltipProps } from "./SankeyTooltip.types.js";
|
|
2
2
|
export interface SankeyTooltipContentProps extends Pick<SankeyTooltipProps, 'classes'> {}
|
|
3
|
-
export declare function SankeyTooltipContent(props: SankeyTooltipContentProps): import("react
|
|
3
|
+
export declare function SankeyTooltipContent(props: SankeyTooltipContentProps): import("react").JSX.Element | null;
|
|
4
4
|
export declare namespace SankeyTooltipContent {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -8,7 +8,7 @@ exports.sankeySeriesConfig = void 0;
|
|
|
8
8
|
var _getSeriesWithDefaultValues = require("./getSeriesWithDefaultValues");
|
|
9
9
|
var _tooltipGetter = require("./tooltipGetter");
|
|
10
10
|
var _calculateSankeyLayout = require("../calculateSankeyLayout");
|
|
11
|
-
var _tooltipPosition =
|
|
11
|
+
var _tooltipPosition = require("./tooltipPosition");
|
|
12
12
|
var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
|
|
13
13
|
var _identifierSerializer = _interopRequireDefault(require("./identifierSerializer"));
|
|
14
14
|
var _identifierCleaner = _interopRequireDefault(require("./identifierCleaner"));
|
|
@@ -35,7 +35,7 @@ const sankeySeriesConfig = exports.sankeySeriesConfig = {
|
|
|
35
35
|
colorProcessor,
|
|
36
36
|
legendGetter,
|
|
37
37
|
tooltipGetter: _tooltipGetter.tooltipGetter,
|
|
38
|
-
|
|
38
|
+
selectorTooltipItemPosition: _tooltipPosition.selectorTooltipItemPosition,
|
|
39
39
|
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.getSeriesWithDefaultValues,
|
|
40
40
|
keyboardFocusHandler: _keyboardFocusHandler.default,
|
|
41
41
|
identifierSerializer: _identifierSerializer.default,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getSeriesWithDefaultValues } from "./getSeriesWithDefaultValues.mjs";
|
|
2
2
|
import { tooltipGetter } from "./tooltipGetter.mjs";
|
|
3
3
|
import { calculateSankeyLayout } from "../calculateSankeyLayout.mjs";
|
|
4
|
-
import
|
|
4
|
+
import { selectorTooltipItemPosition } from "./tooltipPosition.mjs";
|
|
5
5
|
import keyboardFocusHandler from "./keyboardFocusHandler.mjs";
|
|
6
6
|
import identifierSerializer from "./identifierSerializer.mjs";
|
|
7
7
|
import identifierCleaner from "./identifierCleaner.mjs";
|
|
@@ -29,7 +29,7 @@ export const sankeySeriesConfig = {
|
|
|
29
29
|
colorProcessor,
|
|
30
30
|
legendGetter,
|
|
31
31
|
tooltipGetter,
|
|
32
|
-
|
|
32
|
+
selectorTooltipItemPosition,
|
|
33
33
|
getSeriesWithDefaultValues,
|
|
34
34
|
keyboardFocusHandler,
|
|
35
35
|
identifierSerializer,
|
|
@@ -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<'sankey'>;
|
|
@@ -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<'sankey'>;
|
|
@@ -3,15 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
identifier,
|
|
12
|
-
placement
|
|
13
|
-
} = params;
|
|
14
|
-
if (!identifier) {
|
|
6
|
+
exports.selectorTooltipItemPosition = void 0;
|
|
7
|
+
var _store = require("@mui/x-internals/store");
|
|
8
|
+
var _internals = require("@mui/x-charts/internals");
|
|
9
|
+
const selectorTooltipItemPosition = exports.selectorTooltipItemPosition = (0, _store.createSelectorMemoized)(_internals.selectorChartsTooltipItem, _internals.selectorChartSeriesProcessed, _internals.selectorChartSeriesLayout, function selectorTooltipItemPosition(identifier, series, seriesLayout, placement) {
|
|
10
|
+
if (!identifier || identifier.type !== 'sankey') {
|
|
15
11
|
return null;
|
|
16
12
|
}
|
|
17
13
|
const seriesItem = series.sankey?.series[identifier.seriesId];
|
|
@@ -92,5 +88,4 @@ const tooltipItemPositionGetter = params => {
|
|
|
92
88
|
}
|
|
93
89
|
}
|
|
94
90
|
return null;
|
|
95
|
-
};
|
|
96
|
-
var _default = exports.default = tooltipItemPositionGetter;
|
|
91
|
+
});
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
identifier,
|
|
6
|
-
placement
|
|
7
|
-
} = params;
|
|
8
|
-
if (!identifier) {
|
|
1
|
+
import { createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
|
+
import { selectorChartsTooltipItem, selectorChartSeriesProcessed, selectorChartSeriesLayout } from '@mui/x-charts/internals';
|
|
3
|
+
export const selectorTooltipItemPosition = createSelectorMemoized(selectorChartsTooltipItem, selectorChartSeriesProcessed, selectorChartSeriesLayout, function selectorTooltipItemPosition(identifier, series, seriesLayout, placement) {
|
|
4
|
+
if (!identifier || identifier.type !== 'sankey') {
|
|
9
5
|
return null;
|
|
10
6
|
}
|
|
11
7
|
const seriesItem = series.sankey?.series[identifier.seriesId];
|
|
@@ -86,5 +82,4 @@ const tooltipItemPositionGetter = params => {
|
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
84
|
return null;
|
|
89
|
-
};
|
|
90
|
-
export default tooltipItemPositionGetter;
|
|
85
|
+
});
|
package/index.js
CHANGED
package/index.mjs
CHANGED