@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,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;
|
package/Heatmap/Heatmap.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { MakeOptional } from '@mui/x-internals/types';
|
|
3
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
3
4
|
import type { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
4
5
|
import type { ChartsAxisSlots, ChartsAxisSlotProps, XAxis, YAxis } from '@mui/x-charts/internals';
|
|
5
6
|
import type { TooltipPropsOverrides } from '@mui/x-charts/models';
|
|
@@ -25,7 +26,7 @@ export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, Heatm
|
|
|
25
26
|
legend?: ChartsLegendSlots['legend'];
|
|
26
27
|
}
|
|
27
28
|
export interface HeatmapSlotProps extends ChartsAxisSlotProps, ChartsOverlaySlotProps, HeatmapItemSlotProps, ChartsLegendSlotProps, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {
|
|
28
|
-
tooltip?: Partial<HeatmapTooltipProps> & TooltipPropsOverrides
|
|
29
|
+
tooltip?: WithDataAttributes<Partial<HeatmapTooltipProps> & TooltipPropsOverrides>;
|
|
29
30
|
}
|
|
30
31
|
export type HeatmapSeries = MakeOptional<HeatmapSeriesType, 'type'>;
|
|
31
32
|
export interface HeatmapProps extends Omit<ChartsContainerProProps<'heatmap', HeatmapPluginSignatures>, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'axesGap' | 'skipAnimation' | 'slots' | 'slotProps' | 'highlightedAxis' | 'onHighlightedAxisChange' | 'seriesConfig' | 'onAxisClick'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
package/Heatmap/Heatmap.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { MakeOptional } from '@mui/x-internals/types';
|
|
3
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
3
4
|
import type { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
4
5
|
import type { ChartsAxisSlots, ChartsAxisSlotProps, XAxis, YAxis } from '@mui/x-charts/internals';
|
|
5
6
|
import type { TooltipPropsOverrides } from '@mui/x-charts/models';
|
|
@@ -25,7 +26,7 @@ export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, Heatm
|
|
|
25
26
|
legend?: ChartsLegendSlots['legend'];
|
|
26
27
|
}
|
|
27
28
|
export interface HeatmapSlotProps extends ChartsAxisSlotProps, ChartsOverlaySlotProps, HeatmapItemSlotProps, ChartsLegendSlotProps, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {
|
|
28
|
-
tooltip?: Partial<HeatmapTooltipProps> & TooltipPropsOverrides
|
|
29
|
+
tooltip?: WithDataAttributes<Partial<HeatmapTooltipProps> & TooltipPropsOverrides>;
|
|
29
30
|
}
|
|
30
31
|
export type HeatmapSeries = MakeOptional<HeatmapSeriesType, 'type'>;
|
|
31
32
|
export interface HeatmapProps extends Omit<ChartsContainerProProps<'heatmap', HeatmapPluginSignatures>, 'series' | 'plugins' | 'xAxis' | 'yAxis' | 'axesGap' | 'skipAnimation' | 'slots' | 'slotProps' | 'highlightedAxis' | 'onHighlightedAxisChange' | 'seriesConfig' | 'onAxisClick'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
2
3
|
import type { SeriesId } from '@mui/x-charts/internals';
|
|
3
4
|
import type { HeatmapCellProps } from "./HeatmapCell.mjs";
|
|
4
5
|
import type { CellPropsOverrides } from "../models/chartsSlotsComponentsPropsPro.mjs";
|
|
@@ -10,7 +11,7 @@ export interface HeatmapItemSlots {
|
|
|
10
11
|
cell?: React.ElementType<HeatmapCellProps & CellPropsOverrides>;
|
|
11
12
|
}
|
|
12
13
|
export interface HeatmapItemSlotProps {
|
|
13
|
-
cell?: Partial<HeatmapCellProps> & CellPropsOverrides
|
|
14
|
+
cell?: WithDataAttributes<Partial<HeatmapCellProps> & CellPropsOverrides>;
|
|
14
15
|
}
|
|
15
16
|
export interface HeatmapItemProps {
|
|
16
17
|
seriesId: SeriesId;
|
|
@@ -42,7 +43,7 @@ export interface HeatmapItemProps {
|
|
|
42
43
|
/**
|
|
43
44
|
* @ignore - internal component.
|
|
44
45
|
*/
|
|
45
|
-
declare function HeatmapItem(props: HeatmapItemProps):
|
|
46
|
+
declare function HeatmapItem(props: HeatmapItemProps): React.JSX.Element;
|
|
46
47
|
declare namespace HeatmapItem {
|
|
47
48
|
var propTypes: any;
|
|
48
49
|
}
|
package/Heatmap/HeatmapItem.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
2
3
|
import type { SeriesId } from '@mui/x-charts/internals';
|
|
3
4
|
import type { HeatmapCellProps } from "./HeatmapCell.js";
|
|
4
5
|
import type { CellPropsOverrides } from "../models/chartsSlotsComponentsPropsPro.js";
|
|
@@ -10,7 +11,7 @@ export interface HeatmapItemSlots {
|
|
|
10
11
|
cell?: React.ElementType<HeatmapCellProps & CellPropsOverrides>;
|
|
11
12
|
}
|
|
12
13
|
export interface HeatmapItemSlotProps {
|
|
13
|
-
cell?: Partial<HeatmapCellProps> & CellPropsOverrides
|
|
14
|
+
cell?: WithDataAttributes<Partial<HeatmapCellProps> & CellPropsOverrides>;
|
|
14
15
|
}
|
|
15
16
|
export interface HeatmapItemProps {
|
|
16
17
|
seriesId: SeriesId;
|
|
@@ -42,7 +43,7 @@ export interface HeatmapItemProps {
|
|
|
42
43
|
/**
|
|
43
44
|
* @ignore - internal component.
|
|
44
45
|
*/
|
|
45
|
-
declare function HeatmapItem(props: HeatmapItemProps):
|
|
46
|
+
declare function HeatmapItem(props: HeatmapItemProps): React.JSX.Element;
|
|
46
47
|
declare namespace HeatmapItem {
|
|
47
48
|
var propTypes: any;
|
|
48
49
|
}
|
|
@@ -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,2 +1,2 @@
|
|
|
1
1
|
import type { HeatmapTooltipProps } from "./HeatmapTooltip.types.mjs";
|
|
2
|
-
export declare const useUtilityClasses: (props: Pick<HeatmapTooltipProps,
|
|
2
|
+
export declare const useUtilityClasses: (props: Pick<HeatmapTooltipProps, 'classes'>) => Record<"cell" | "labelCell" | "mark" | "markContainer" | "paper" | "root" | "row" | "table" | "valueCell", string>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
2
|
-
export declare const useUtilityClasses: (props: Pick<HeatmapTooltipProps,
|
|
2
|
+
export declare const useUtilityClasses: (props: Pick<HeatmapTooltipProps, 'classes'>) => Record<"cell" | "labelCell" | "mark" | "markContainer" | "paper" | "root" | "row" | "table" | "valueCell", string>;
|
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
1
2
|
import type { ChartsTooltipContainerProps, ChartsTooltipClasses } from '@mui/x-charts/ChartsTooltip';
|
|
2
3
|
import type { TooltipPropsOverrides } from '@mui/x-charts/models';
|
|
3
4
|
export interface HeatmapTooltipSlots {
|
|
@@ -12,7 +13,7 @@ export interface HeatmapTooltipSlotProps {
|
|
|
12
13
|
* Custom component for the tooltip popper.
|
|
13
14
|
* @default ChartsTooltipRoot
|
|
14
15
|
*/
|
|
15
|
-
tooltip?: Partial<HeatmapTooltipProps> & TooltipPropsOverrides
|
|
16
|
+
tooltip?: WithDataAttributes<Partial<HeatmapTooltipProps> & TooltipPropsOverrides>;
|
|
16
17
|
}
|
|
17
18
|
export interface HeatmapTooltipClasses extends ChartsTooltipClasses {}
|
|
18
19
|
export interface HeatmapTooltipContentClasses extends ChartsTooltipClasses {}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithDataAttributes } from '@mui/utils/types';
|
|
1
2
|
import type { ChartsTooltipContainerProps, ChartsTooltipClasses } from '@mui/x-charts/ChartsTooltip';
|
|
2
3
|
import type { TooltipPropsOverrides } from '@mui/x-charts/models';
|
|
3
4
|
export interface HeatmapTooltipSlots {
|
|
@@ -12,7 +13,7 @@ export interface HeatmapTooltipSlotProps {
|
|
|
12
13
|
* Custom component for the tooltip popper.
|
|
13
14
|
* @default ChartsTooltipRoot
|
|
14
15
|
*/
|
|
15
|
-
tooltip?: Partial<HeatmapTooltipProps> & TooltipPropsOverrides
|
|
16
|
+
tooltip?: WithDataAttributes<Partial<HeatmapTooltipProps> & TooltipPropsOverrides>;
|
|
16
17
|
}
|
|
17
18
|
export interface HeatmapTooltipClasses extends ChartsTooltipClasses {}
|
|
18
19
|
export interface HeatmapTooltipContentClasses extends ChartsTooltipClasses {}
|
|
@@ -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
|
}
|
|
@@ -3,8 +3,8 @@ import type { HighlightItemIdentifier } from '@mui/x-charts/models';
|
|
|
3
3
|
/**
|
|
4
4
|
* The isHighlighted logic for main charts (those that are identified by an id and a dataIndex)
|
|
5
5
|
*/
|
|
6
|
-
export declare function createIsHighlighted(highlightScope: HighlightScope<'heatmap'> | null | undefined, highlightedItem: HighlightItemIdentifier<'heatmap'> | null): (item: HighlightItemIdentifier<
|
|
6
|
+
export declare function createIsHighlighted(highlightScope: HighlightScope<'heatmap'> | null | undefined, highlightedItem: HighlightItemIdentifier<'heatmap'> | null): (item: HighlightItemIdentifier<'heatmap'> | null) => boolean;
|
|
7
7
|
/**
|
|
8
8
|
* The isFade logic for main charts (those that are identified by an id and a dataIndex)
|
|
9
9
|
*/
|
|
10
|
-
export declare function createIsFaded(highlightScope: HighlightScope<'heatmap'> | null | undefined, highlightedItem: HighlightItemIdentifier<'heatmap'> | null): (item: HighlightItemIdentifier<
|
|
10
|
+
export declare function createIsFaded(highlightScope: HighlightScope<'heatmap'> | null | undefined, highlightedItem: HighlightItemIdentifier<'heatmap'> | null): (item: HighlightItemIdentifier<'heatmap'> | null) => boolean;
|
|
@@ -3,8 +3,8 @@ import type { HighlightItemIdentifier } from '@mui/x-charts/models';
|
|
|
3
3
|
/**
|
|
4
4
|
* The isHighlighted logic for main charts (those that are identified by an id and a dataIndex)
|
|
5
5
|
*/
|
|
6
|
-
export declare function createIsHighlighted(highlightScope: HighlightScope<'heatmap'> | null | undefined, highlightedItem: HighlightItemIdentifier<'heatmap'> | null): (item: HighlightItemIdentifier<
|
|
6
|
+
export declare function createIsHighlighted(highlightScope: HighlightScope<'heatmap'> | null | undefined, highlightedItem: HighlightItemIdentifier<'heatmap'> | null): (item: HighlightItemIdentifier<'heatmap'> | null) => boolean;
|
|
7
7
|
/**
|
|
8
8
|
* The isFade logic for main charts (those that are identified by an id and a dataIndex)
|
|
9
9
|
*/
|
|
10
|
-
export declare function createIsFaded(highlightScope: HighlightScope<'heatmap'> | null | undefined, highlightedItem: HighlightItemIdentifier<'heatmap'> | null): (item: HighlightItemIdentifier<
|
|
10
|
+
export declare function createIsFaded(highlightScope: HighlightScope<'heatmap'> | null | undefined, highlightedItem: HighlightItemIdentifier<'heatmap'> | null): (item: HighlightItemIdentifier<'heatmap'> | null) => boolean;
|
|
@@ -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
|
+
});
|
|
@@ -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;
|