@mui/x-charts-pro 8.27.2 → 9.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChartPro/BarChartPro.d.ts +1 -1
- package/BarChartPro/BarChartPro.js +30 -8
- package/CHANGELOG.md +279 -34
- package/ChartContainerPro/ChartContainerPro.d.ts +17 -31
- package/ChartContainerPro/ChartContainerPro.js +14 -287
- package/ChartContainerPro/useChartContainerProProps.d.ts +10 -7
- package/ChartContainerPro/useChartContainerProProps.js +10 -35
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
- package/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
- package/ChartDataProviderPro/index.d.ts +1 -1
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +8 -6
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +6 -4
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
- package/ChartsContainerPro/ChartsContainerPro.js +188 -0
- package/ChartsContainerPro/index.d.ts +9 -0
- package/ChartsContainerPro/index.js +17 -0
- package/ChartsContainerPro/useChartsContainerProProps.d.ts +8 -0
- package/ChartsContainerPro/useChartsContainerProProps.js +44 -0
- package/FunnelChart/FunnelChart.d.ts +1 -1
- package/FunnelChart/FunnelChart.js +9 -8
- package/FunnelChart/FunnelSection.d.ts +1 -1
- package/FunnelChart/funnel.types.d.ts +1 -1
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +12 -9
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
- package/FunnelChart/funnelSlots.types.d.ts +3 -9
- package/FunnelChart/index.d.ts +2 -1
- package/FunnelChart/index.js +12 -0
- package/FunnelChart/seriesConfig/index.js +2 -1
- package/FunnelChart/seriesConfig/keyboardFocusHandler.js +1 -14
- package/FunnelChart/seriesConfig/legend.js +0 -1
- package/Heatmap/Heatmap.d.ts +6 -3
- package/Heatmap/Heatmap.js +46 -135
- package/Heatmap/Heatmap.types.d.ts +19 -0
- package/Heatmap/Heatmap.types.js +5 -0
- package/Heatmap/HeatmapItem.d.ts +6 -0
- package/Heatmap/HeatmapItem.js +11 -3
- package/Heatmap/HeatmapPlot.d.ts +7 -3
- package/Heatmap/HeatmapPlot.js +16 -54
- package/Heatmap/HeatmapSVGPlot.d.ts +2 -0
- package/Heatmap/HeatmapSVGPlot.js +70 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +18 -2
- package/Heatmap/HeatmapTooltip/index.d.ts +1 -1
- package/Heatmap/index.d.ts +3 -2
- package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
- package/Heatmap/seriesConfig/getItemAtPosition.js +6 -2
- package/Heatmap/seriesConfig/index.js +1 -0
- package/Heatmap/useHeatmapProps.d.ts +24 -0
- package/Heatmap/useHeatmapProps.js +159 -0
- package/LineChartPro/LineChartPro.d.ts +1 -1
- package/LineChartPro/LineChartPro.js +30 -8
- package/PieChartPro/PieChartPro.d.ts +1 -1
- package/PieChartPro/PieChartPro.js +9 -8
- package/RadarChartPro/RadarChartPro.d.ts +1 -1
- package/RadarChartPro/RadarChartPro.js +8 -8
- package/SankeyChart/SankeyChart.d.ts +1 -1
- package/SankeyChart/SankeyChart.js +9 -23
- package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
- package/SankeyChart/SankeyTooltip/index.d.ts +1 -1
- package/SankeyChart/index.d.ts +1 -1
- package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
- package/SankeyChart/sankey.highlight.types.d.ts +4 -0
- package/SankeyChart/sankey.types.d.ts +6 -3
- package/SankeyChart/sankeySlots.types.d.ts +3 -9
- package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
- package/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
- package/SankeyChart/seriesConfig/identifierCleaner.js +24 -0
- package/SankeyChart/seriesConfig/index.js +3 -1
- package/ScatterChartPro/ScatterChartPro.d.ts +1 -1
- package/ScatterChartPro/ScatterChartPro.js +30 -8
- package/esm/BarChartPro/BarChartPro.d.ts +1 -1
- package/esm/BarChartPro/BarChartPro.js +30 -8
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +17 -31
- package/esm/ChartContainerPro/ChartContainerPro.js +15 -286
- package/esm/ChartContainerPro/useChartContainerProProps.d.ts +10 -7
- package/esm/ChartContainerPro/useChartContainerProProps.js +11 -34
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +5 -3
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +2 -2
- package/esm/ChartDataProviderPro/index.d.ts +1 -1
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +9 -7
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +7 -5
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +4 -4
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +1 -1
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +4 -4
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +2 -0
- package/esm/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
- package/esm/ChartsContainerPro/ChartsContainerPro.js +182 -0
- package/esm/ChartsContainerPro/index.d.ts +9 -0
- package/esm/ChartsContainerPro/index.js +6 -0
- package/esm/ChartsContainerPro/useChartsContainerProProps.d.ts +8 -0
- package/esm/ChartsContainerPro/useChartsContainerProProps.js +37 -0
- package/esm/FunnelChart/FunnelChart.d.ts +1 -1
- package/esm/FunnelChart/FunnelChart.js +9 -8
- package/esm/FunnelChart/FunnelSection.d.ts +1 -1
- package/esm/FunnelChart/funnel.types.d.ts +1 -1
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +13 -10
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +3 -2
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +3 -3
- package/esm/FunnelChart/funnelSlots.types.d.ts +3 -9
- package/esm/FunnelChart/index.d.ts +2 -1
- package/esm/FunnelChart/index.js +1 -0
- package/esm/FunnelChart/seriesConfig/index.js +3 -2
- package/esm/FunnelChart/seriesConfig/keyboardFocusHandler.js +2 -15
- package/esm/FunnelChart/seriesConfig/legend.js +0 -1
- package/esm/Heatmap/Heatmap.d.ts +6 -3
- package/esm/Heatmap/Heatmap.js +47 -136
- package/esm/Heatmap/Heatmap.types.d.ts +19 -0
- package/esm/Heatmap/Heatmap.types.js +1 -0
- package/esm/Heatmap/HeatmapItem.d.ts +6 -0
- package/esm/Heatmap/HeatmapItem.js +11 -3
- package/esm/Heatmap/HeatmapPlot.d.ts +7 -3
- package/esm/Heatmap/HeatmapPlot.js +17 -56
- package/esm/Heatmap/HeatmapSVGPlot.d.ts +2 -0
- package/esm/Heatmap/HeatmapSVGPlot.js +64 -0
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +18 -2
- package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -1
- package/esm/Heatmap/index.d.ts +3 -2
- package/esm/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
- package/esm/Heatmap/seriesConfig/getItemAtPosition.js +6 -2
- package/esm/Heatmap/seriesConfig/index.js +2 -1
- package/esm/Heatmap/useHeatmapProps.d.ts +24 -0
- package/esm/Heatmap/useHeatmapProps.js +151 -0
- package/esm/LineChartPro/LineChartPro.d.ts +1 -1
- package/esm/LineChartPro/LineChartPro.js +30 -8
- package/esm/PieChartPro/PieChartPro.d.ts +1 -1
- package/esm/PieChartPro/PieChartPro.js +9 -8
- package/esm/RadarChartPro/RadarChartPro.d.ts +1 -1
- package/esm/RadarChartPro/RadarChartPro.js +8 -8
- package/esm/SankeyChart/SankeyChart.d.ts +1 -1
- package/esm/SankeyChart/SankeyChart.js +9 -23
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +5 -1
- package/esm/SankeyChart/SankeyTooltip/index.d.ts +1 -1
- package/esm/SankeyChart/index.d.ts +1 -1
- package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +7 -7
- package/esm/SankeyChart/sankey.highlight.types.d.ts +4 -0
- package/esm/SankeyChart/sankey.types.d.ts +6 -3
- package/esm/SankeyChart/sankeySlots.types.d.ts +3 -9
- package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +13 -1
- package/esm/SankeyChart/seriesConfig/identifierCleaner.d.ts +3 -0
- package/esm/SankeyChart/seriesConfig/identifierCleaner.js +18 -0
- package/esm/SankeyChart/seriesConfig/index.js +3 -1
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +1 -1
- package/esm/ScatterChartPro/ScatterChartPro.js +30 -8
- package/esm/index.d.ts +3 -1
- package/esm/index.js +2 -1
- package/esm/internals/index.d.ts +7 -1
- package/esm/internals/index.js +5 -1
- package/esm/internals/plugins/useChartProExport/common.d.ts +5 -1
- package/esm/internals/plugins/useChartProExport/common.js +36 -0
- package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
- package/esm/internals/plugins/useChartProExport/exportImage.js +2 -1
- package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
- package/esm/internals/plugins/useChartProExport/print.js +2 -1
- package/esm/internals/plugins/useChartProExport/useChartProExport.js +4 -2
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +6 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +7 -5
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +6 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +6 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +6 -4
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
- package/esm/models/seriesType/heatmap.d.ts +3 -3
- package/esm/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
- package/esm/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
- package/esm/typeOverloads/modules.d.ts +9 -5
- package/index.d.ts +3 -1
- package/index.js +9 -1
- package/internals/index.d.ts +7 -1
- package/internals/index.js +43 -1
- package/internals/plugins/useChartProExport/common.d.ts +5 -1
- package/internals/plugins/useChartProExport/common.js +37 -0
- package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
- package/internals/plugins/useChartProExport/exportImage.js +1 -0
- package/internals/plugins/useChartProExport/print.d.ts +1 -1
- package/internals/plugins/useChartProExport/print.js +1 -0
- package/internals/plugins/useChartProExport/useChartProExport.js +4 -2
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +5 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +6 -4
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +4 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +5 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +5 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +5 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +5 -5
- package/models/seriesType/heatmap.d.ts +3 -3
- package/package.json +19 -11
- package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +1 -1
- package/plugins/selectors/useChartHeatmapPosition.selectors.js +3 -1
- package/typeOverloads/modules.d.ts +9 -5
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import useId from '@mui/utils/useId';
|
|
3
|
+
import { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '@mui/x-charts/constants';
|
|
6
|
+
import { ContinuousColorLegend } from '@mui/x-charts/ChartsLegend';
|
|
7
|
+
import { HEATMAP_PLUGINS } from "./Heatmap.plugins.js";
|
|
8
|
+
import { heatmapSeriesConfig } from "./seriesConfig/index.js";
|
|
9
|
+
const seriesConfig = {
|
|
10
|
+
heatmap: heatmapSeriesConfig
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
|
|
14
|
+
const defaultColorMap = interpolateRgbBasis(['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081']);
|
|
15
|
+
function getDefaultDataForAxis(series, dimension) {
|
|
16
|
+
if (series?.[0]?.data === undefined || series[0].data.length === 0) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
return Array.from({
|
|
20
|
+
length: Math.max(...series[0].data.map(dataPoint => dataPoint[dimension])) + 1
|
|
21
|
+
}, (_, index) => index);
|
|
22
|
+
}
|
|
23
|
+
const getDefaultDataForXAxis = series => getDefaultDataForAxis(series, 0);
|
|
24
|
+
const getDefaultDataForYAxis = series => getDefaultDataForAxis(series, 1);
|
|
25
|
+
export function useHeatmapProps(props) {
|
|
26
|
+
const {
|
|
27
|
+
apiRef,
|
|
28
|
+
xAxis,
|
|
29
|
+
yAxis,
|
|
30
|
+
zAxis,
|
|
31
|
+
series,
|
|
32
|
+
width,
|
|
33
|
+
height,
|
|
34
|
+
margin,
|
|
35
|
+
colors,
|
|
36
|
+
dataset,
|
|
37
|
+
sx,
|
|
38
|
+
onAxisClick,
|
|
39
|
+
onItemClick,
|
|
40
|
+
children,
|
|
41
|
+
slots,
|
|
42
|
+
slotProps,
|
|
43
|
+
loading,
|
|
44
|
+
highlightedItem,
|
|
45
|
+
onHighlightChange,
|
|
46
|
+
enableKeyboardNavigation,
|
|
47
|
+
borderRadius,
|
|
48
|
+
hideLegend
|
|
49
|
+
} = props;
|
|
50
|
+
const id = useId();
|
|
51
|
+
const clipPathId = `${id}-clip-path`;
|
|
52
|
+
const xAxisWithDefault = React.useMemo(() => (xAxis && xAxis.length > 0 ? xAxis : [{
|
|
53
|
+
id: DEFAULT_X_AXIS_KEY
|
|
54
|
+
}]).map(axis => _extends({
|
|
55
|
+
scaleType: 'band',
|
|
56
|
+
categoryGapRatio: 0
|
|
57
|
+
}, axis, {
|
|
58
|
+
data: axis.data ?? getDefaultDataForXAxis(series)
|
|
59
|
+
})), [series, xAxis]);
|
|
60
|
+
const yAxisWithDefault = React.useMemo(() => (yAxis && yAxis.length > 0 ? yAxis : [{
|
|
61
|
+
id: DEFAULT_Y_AXIS_KEY
|
|
62
|
+
}]).map(axis => _extends({
|
|
63
|
+
scaleType: 'band',
|
|
64
|
+
categoryGapRatio: 0
|
|
65
|
+
}, axis, {
|
|
66
|
+
data: axis.data ?? getDefaultDataForYAxis(series)
|
|
67
|
+
})), [series, yAxis]);
|
|
68
|
+
const zAxisWithDefault = React.useMemo(() => zAxis ?? [{
|
|
69
|
+
colorMap: {
|
|
70
|
+
type: 'continuous',
|
|
71
|
+
min: 0,
|
|
72
|
+
max: 100,
|
|
73
|
+
color: defaultColorMap
|
|
74
|
+
}
|
|
75
|
+
}], [zAxis]);
|
|
76
|
+
const seriesWithDefault = series.map(s => _extends({
|
|
77
|
+
type: 'heatmap'
|
|
78
|
+
}, s));
|
|
79
|
+
const chartsWrapperProps = {
|
|
80
|
+
sx,
|
|
81
|
+
legendPosition: props.slotProps?.legend?.position,
|
|
82
|
+
legendDirection: props.slotProps?.legend?.direction,
|
|
83
|
+
hideLegend
|
|
84
|
+
};
|
|
85
|
+
const chartDataProviderProProps = {
|
|
86
|
+
apiRef,
|
|
87
|
+
seriesConfig,
|
|
88
|
+
series: seriesWithDefault,
|
|
89
|
+
width,
|
|
90
|
+
height,
|
|
91
|
+
margin,
|
|
92
|
+
xAxis: xAxisWithDefault,
|
|
93
|
+
yAxis: yAxisWithDefault,
|
|
94
|
+
zAxis: zAxisWithDefault,
|
|
95
|
+
colors,
|
|
96
|
+
dataset,
|
|
97
|
+
disableAxisListener: true,
|
|
98
|
+
highlightedItem,
|
|
99
|
+
onHighlightChange,
|
|
100
|
+
enableKeyboardNavigation,
|
|
101
|
+
onAxisClick,
|
|
102
|
+
onItemClick,
|
|
103
|
+
plugins: HEATMAP_PLUGINS
|
|
104
|
+
};
|
|
105
|
+
const heatmapPlotProps = {
|
|
106
|
+
borderRadius,
|
|
107
|
+
slots,
|
|
108
|
+
slotProps
|
|
109
|
+
};
|
|
110
|
+
const overlayProps = {
|
|
111
|
+
slots,
|
|
112
|
+
slotProps,
|
|
113
|
+
loading
|
|
114
|
+
};
|
|
115
|
+
const clipPathGroupProps = {
|
|
116
|
+
clipPath: `url(#${clipPathId})`
|
|
117
|
+
};
|
|
118
|
+
const clipPathProps = {
|
|
119
|
+
id: clipPathId
|
|
120
|
+
};
|
|
121
|
+
const chartsAxisProps = {
|
|
122
|
+
slots,
|
|
123
|
+
slotProps
|
|
124
|
+
};
|
|
125
|
+
const legendProps = {
|
|
126
|
+
slots: _extends({}, slots, {
|
|
127
|
+
legend: slots?.legend ?? ContinuousColorLegend
|
|
128
|
+
}),
|
|
129
|
+
slotProps: {
|
|
130
|
+
legend: _extends({
|
|
131
|
+
labelPosition: 'extremes'
|
|
132
|
+
}, slotProps?.legend)
|
|
133
|
+
},
|
|
134
|
+
sx: slotProps?.legend?.direction === 'vertical' ? {
|
|
135
|
+
height: 150
|
|
136
|
+
} : {
|
|
137
|
+
width: '50%'
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
return {
|
|
141
|
+
chartDataProviderProProps,
|
|
142
|
+
chartsWrapperProps,
|
|
143
|
+
heatmapPlotProps,
|
|
144
|
+
clipPathProps,
|
|
145
|
+
clipPathGroupProps,
|
|
146
|
+
overlayProps,
|
|
147
|
+
chartsAxisProps,
|
|
148
|
+
legendProps,
|
|
149
|
+
children
|
|
150
|
+
};
|
|
151
|
+
}
|
|
@@ -28,5 +28,5 @@ export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slot
|
|
|
28
28
|
*
|
|
29
29
|
* - [LineChart API](https://mui.com/x/api/charts/line-chart/)
|
|
30
30
|
*/
|
|
31
|
-
declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<
|
|
31
|
+
declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
32
|
export { LineChartPro };
|
|
@@ -72,11 +72,12 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
72
72
|
onZoomChange,
|
|
73
73
|
apiRef,
|
|
74
74
|
plugins: LINE_CHART_PRO_PLUGINS
|
|
75
|
-
})
|
|
75
|
+
}));
|
|
76
76
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
77
77
|
const Toolbar = props.slots?.toolbar ?? ChartsToolbarPro;
|
|
78
78
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
79
79
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
80
|
+
ref: ref,
|
|
80
81
|
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
81
82
|
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
82
83
|
children: [/*#__PURE__*/_jsx(AreaPlot, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlot, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
@@ -102,6 +103,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
102
103
|
setZoomData: PropTypes.func.isRequired
|
|
103
104
|
})
|
|
104
105
|
}),
|
|
106
|
+
/**
|
|
107
|
+
* A gap added between axes when multiple axes are rendered on the same side of the chart.
|
|
108
|
+
* @default 0
|
|
109
|
+
*/
|
|
110
|
+
axesGap: PropTypes.number,
|
|
105
111
|
/**
|
|
106
112
|
* The configuration of axes highlight.
|
|
107
113
|
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
@@ -181,8 +187,8 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
181
187
|
*/
|
|
182
188
|
hiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
183
189
|
dataIndex: PropTypes.number,
|
|
184
|
-
seriesId: PropTypes.
|
|
185
|
-
type: PropTypes.oneOf(['line'])
|
|
190
|
+
seriesId: PropTypes.string.isRequired,
|
|
191
|
+
type: PropTypes.oneOf(['line'])
|
|
186
192
|
})),
|
|
187
193
|
/**
|
|
188
194
|
* If `true`, the legend is not rendered.
|
|
@@ -202,7 +208,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
202
208
|
*/
|
|
203
209
|
highlightedItem: PropTypes.shape({
|
|
204
210
|
dataIndex: PropTypes.number,
|
|
205
|
-
seriesId: PropTypes.
|
|
211
|
+
seriesId: PropTypes.string.isRequired
|
|
206
212
|
}),
|
|
207
213
|
/**
|
|
208
214
|
* This prop is used to help implement the accessibility logic.
|
|
@@ -232,8 +238,8 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
232
238
|
*/
|
|
233
239
|
initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
234
240
|
dataIndex: PropTypes.number,
|
|
235
|
-
seriesId: PropTypes.
|
|
236
|
-
type: PropTypes.oneOf(['line'])
|
|
241
|
+
seriesId: PropTypes.string.isRequired,
|
|
242
|
+
type: PropTypes.oneOf(['line'])
|
|
237
243
|
})),
|
|
238
244
|
/**
|
|
239
245
|
* The list of zoom data related to each axis.
|
|
@@ -303,6 +309,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
303
309
|
* Callback fired when a mark element is clicked.
|
|
304
310
|
*/
|
|
305
311
|
onMarkClick: PropTypes.func,
|
|
312
|
+
/**
|
|
313
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
314
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
315
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
316
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
317
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
318
|
+
*/
|
|
319
|
+
onTooltipAxisChange: PropTypes.func,
|
|
306
320
|
/**
|
|
307
321
|
* The callback fired when the tooltip item changes.
|
|
308
322
|
*
|
|
@@ -343,14 +357,22 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
343
357
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
344
358
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
345
359
|
title: PropTypes.string,
|
|
360
|
+
/**
|
|
361
|
+
* The controlled axis tooltip.
|
|
362
|
+
* Identified by the axis id, and data index.
|
|
363
|
+
*/
|
|
364
|
+
tooltipAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
365
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
366
|
+
dataIndex: PropTypes.number.isRequired
|
|
367
|
+
})),
|
|
346
368
|
/**
|
|
347
369
|
* The tooltip item.
|
|
348
370
|
* Used when the tooltip is controlled.
|
|
349
371
|
*/
|
|
350
372
|
tooltipItem: PropTypes.shape({
|
|
351
373
|
dataIndex: PropTypes.number,
|
|
352
|
-
seriesId: PropTypes.
|
|
353
|
-
type: PropTypes.oneOf(['line'])
|
|
374
|
+
seriesId: PropTypes.string.isRequired,
|
|
375
|
+
type: PropTypes.oneOf(['line'])
|
|
354
376
|
}),
|
|
355
377
|
/**
|
|
356
378
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
@@ -18,5 +18,5 @@ export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots'
|
|
|
18
18
|
*/
|
|
19
19
|
slotProps?: PieChartProSlotProps;
|
|
20
20
|
}
|
|
21
|
-
declare const PieChartPro: React.ForwardRefExoticComponent<PieChartProProps & React.RefAttributes<
|
|
21
|
+
declare const PieChartPro: React.ForwardRefExoticComponent<PieChartProProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
22
|
export { PieChartPro };
|
|
@@ -58,7 +58,7 @@ const PieChartPro = /*#__PURE__*/React.forwardRef(function PieChartPro(inProps,
|
|
|
58
58
|
className,
|
|
59
59
|
skipAnimation,
|
|
60
60
|
plugins: PIE_CHART_PRO_PLUGINS
|
|
61
|
-
})
|
|
61
|
+
}));
|
|
62
62
|
const Tooltip = slots?.tooltip ?? ChartsTooltip;
|
|
63
63
|
const Toolbar = slots?.toolbar ?? ChartsToolbarPro;
|
|
64
64
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
@@ -67,6 +67,7 @@ const PieChartPro = /*#__PURE__*/React.forwardRef(function PieChartPro(inProps,
|
|
|
67
67
|
legendDirection: slotProps?.legend?.direction ?? 'vertical',
|
|
68
68
|
sx: sx,
|
|
69
69
|
hideLegend: hideLegend ?? false,
|
|
70
|
+
ref: ref,
|
|
70
71
|
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/_jsx(ChartsLegend, {
|
|
71
72
|
direction: slotProps?.legend?.direction ?? 'vertical',
|
|
72
73
|
slots: slots,
|
|
@@ -138,8 +139,8 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
138
139
|
*/
|
|
139
140
|
hiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
140
141
|
dataIndex: PropTypes.number,
|
|
141
|
-
seriesId: PropTypes.
|
|
142
|
-
type: PropTypes.oneOf(['pie'])
|
|
142
|
+
seriesId: PropTypes.string.isRequired,
|
|
143
|
+
type: PropTypes.oneOf(['pie'])
|
|
143
144
|
})),
|
|
144
145
|
/**
|
|
145
146
|
* If `true`, the legend is not rendered.
|
|
@@ -151,7 +152,7 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
151
152
|
*/
|
|
152
153
|
highlightedItem: PropTypes.shape({
|
|
153
154
|
dataIndex: PropTypes.number,
|
|
154
|
-
seriesId: PropTypes.
|
|
155
|
+
seriesId: PropTypes.string.isRequired
|
|
155
156
|
}),
|
|
156
157
|
/**
|
|
157
158
|
* This prop is used to help implement the accessibility logic.
|
|
@@ -181,8 +182,8 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
181
182
|
*/
|
|
182
183
|
initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
183
184
|
dataIndex: PropTypes.number,
|
|
184
|
-
seriesId: PropTypes.
|
|
185
|
-
type: PropTypes.oneOf(['pie'])
|
|
185
|
+
seriesId: PropTypes.string.isRequired,
|
|
186
|
+
type: PropTypes.oneOf(['pie'])
|
|
186
187
|
})),
|
|
187
188
|
/**
|
|
188
189
|
* If `true`, a loading overlay is displayed.
|
|
@@ -260,8 +261,8 @@ process.env.NODE_ENV !== "production" ? PieChartPro.propTypes = {
|
|
|
260
261
|
*/
|
|
261
262
|
tooltipItem: PropTypes.shape({
|
|
262
263
|
dataIndex: PropTypes.number.isRequired,
|
|
263
|
-
seriesId: PropTypes.
|
|
264
|
-
type: PropTypes.oneOf(['pie'])
|
|
264
|
+
seriesId: PropTypes.string.isRequired,
|
|
265
|
+
type: PropTypes.oneOf(['pie'])
|
|
265
266
|
}),
|
|
266
267
|
/**
|
|
267
268
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
@@ -26,5 +26,5 @@ export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'sl
|
|
|
26
26
|
*
|
|
27
27
|
* - [RadarChart API](https://mui.com/x/api/charts/radar-chart/)
|
|
28
28
|
*/
|
|
29
|
-
declare const RadarChartPro: React.ForwardRefExoticComponent<RadarChartProProps & React.RefAttributes<
|
|
29
|
+
declare const RadarChartPro: React.ForwardRefExoticComponent<RadarChartProProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
30
|
export { RadarChartPro };
|
|
@@ -46,8 +46,8 @@ const RadarChartPro = /*#__PURE__*/React.forwardRef(function RadarChartPro(inPro
|
|
|
46
46
|
});
|
|
47
47
|
return /*#__PURE__*/_jsx(RadarDataProvider, _extends({}, radarDataProviderProProps, {
|
|
48
48
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
49
|
+
ref: ref,
|
|
49
50
|
children: [props.showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
50
|
-
ref: ref,
|
|
51
51
|
children: [/*#__PURE__*/_jsx(RadarGrid, _extends({}, radarGrid)), /*#__PURE__*/_jsx(RadarMetricLabels, {}), /*#__PURE__*/_jsx(RadarSeriesArea, {}), highlight === 'axis' && /*#__PURE__*/_jsx(RadarAxisHighlight, {}), /*#__PURE__*/_jsx(RadarSeriesMarks, {}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), children]
|
|
52
52
|
})), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip))]
|
|
53
53
|
}))
|
|
@@ -110,8 +110,8 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
110
110
|
*/
|
|
111
111
|
hiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
112
112
|
dataIndex: PropTypes.number,
|
|
113
|
-
seriesId: PropTypes.
|
|
114
|
-
type: PropTypes.oneOf(['radar'])
|
|
113
|
+
seriesId: PropTypes.string.isRequired,
|
|
114
|
+
type: PropTypes.oneOf(['radar'])
|
|
115
115
|
})),
|
|
116
116
|
/**
|
|
117
117
|
* If `true`, the legend is not rendered.
|
|
@@ -128,7 +128,7 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
128
128
|
*/
|
|
129
129
|
highlightedItem: PropTypes.shape({
|
|
130
130
|
dataIndex: PropTypes.number,
|
|
131
|
-
seriesId: PropTypes.
|
|
131
|
+
seriesId: PropTypes.string.isRequired
|
|
132
132
|
}),
|
|
133
133
|
/**
|
|
134
134
|
* This prop is used to help implement the accessibility logic.
|
|
@@ -158,8 +158,8 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
158
158
|
*/
|
|
159
159
|
initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
160
160
|
dataIndex: PropTypes.number,
|
|
161
|
-
seriesId: PropTypes.
|
|
162
|
-
type: PropTypes.oneOf(['radar'])
|
|
161
|
+
seriesId: PropTypes.string.isRequired,
|
|
162
|
+
type: PropTypes.oneOf(['radar'])
|
|
163
163
|
})),
|
|
164
164
|
/**
|
|
165
165
|
* If `true`, a loading overlay is displayed.
|
|
@@ -278,8 +278,8 @@ process.env.NODE_ENV !== "production" ? RadarChartPro.propTypes = {
|
|
|
278
278
|
*/
|
|
279
279
|
tooltipItem: PropTypes.shape({
|
|
280
280
|
dataIndex: PropTypes.number,
|
|
281
|
-
seriesId: PropTypes.
|
|
282
|
-
type: PropTypes.oneOf(['radar'])
|
|
281
|
+
seriesId: PropTypes.string.isRequired,
|
|
282
|
+
type: PropTypes.oneOf(['radar'])
|
|
283
283
|
}),
|
|
284
284
|
/**
|
|
285
285
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
@@ -28,5 +28,5 @@ export interface SankeyChartProps extends Omit<ChartContainerProProps<'sankey',
|
|
|
28
28
|
*
|
|
29
29
|
* - [SankeyChart API](https://mui.com/x/api/charts/sankey-chart/)
|
|
30
30
|
*/
|
|
31
|
-
declare const SankeyChart: React.ForwardRefExoticComponent<SankeyChartProps & React.RefAttributes<
|
|
31
|
+
declare const SankeyChart: React.ForwardRefExoticComponent<SankeyChartProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
32
|
export { SankeyChart };
|
|
@@ -43,7 +43,7 @@ const SankeyChart = /*#__PURE__*/React.forwardRef(function SankeyChart(props, re
|
|
|
43
43
|
chartsWrapperProps,
|
|
44
44
|
children
|
|
45
45
|
} = useSankeyChartProps(themedProps);
|
|
46
|
-
const _useChartContainerPro = useChartContainerProProps(chartContainerProps
|
|
46
|
+
const _useChartContainerPro = useChartContainerProProps(chartContainerProps),
|
|
47
47
|
{
|
|
48
48
|
chartDataProviderProProps: {
|
|
49
49
|
series
|
|
@@ -56,6 +56,7 @@ const SankeyChart = /*#__PURE__*/React.forwardRef(function SankeyChart(props, re
|
|
|
56
56
|
series: series
|
|
57
57
|
}, chartDataProviderProProps, {
|
|
58
58
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
59
|
+
ref: ref,
|
|
59
60
|
children: [/*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
60
61
|
children: [/*#__PURE__*/_jsx(SankeyPlot, _extends({}, sankeyPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(FocusedSankeyNode, {}), /*#__PURE__*/_jsx(FocusedSankeyLink, {}), children]
|
|
61
62
|
})), !themedProps.loading && /*#__PURE__*/_jsx(Tooltip, _extends({
|
|
@@ -104,7 +105,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
|
|
|
104
105
|
*/
|
|
105
106
|
highlightedItem: PropTypes.oneOfType([PropTypes.shape({
|
|
106
107
|
nodeId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
107
|
-
seriesId: PropTypes.
|
|
108
|
+
seriesId: PropTypes.string.isRequired,
|
|
108
109
|
subType: PropTypes.oneOf([
|
|
109
110
|
/**
|
|
110
111
|
* Subtype to differentiate between node and link
|
|
@@ -112,7 +113,7 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
|
|
|
112
113
|
'node']).isRequired,
|
|
113
114
|
type: PropTypes.oneOf(['sankey']).isRequired
|
|
114
115
|
}), PropTypes.shape({
|
|
115
|
-
seriesId: PropTypes.
|
|
116
|
+
seriesId: PropTypes.string.isRequired,
|
|
116
117
|
sourceId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
117
118
|
subType: PropTypes.oneOf([
|
|
118
119
|
/**
|
|
@@ -194,26 +195,11 @@ process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
|
|
|
194
195
|
* The tooltip item.
|
|
195
196
|
* Used when the tooltip is controlled.
|
|
196
197
|
*/
|
|
197
|
-
tooltipItem: PropTypes.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
* Subtype to differentiate between node and link
|
|
203
|
-
*/
|
|
204
|
-
'node']).isRequired,
|
|
205
|
-
type: PropTypes.oneOf(['sankey']).isRequired
|
|
206
|
-
}), PropTypes.shape({
|
|
207
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
208
|
-
sourceId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
209
|
-
subType: PropTypes.oneOf([
|
|
210
|
-
/**
|
|
211
|
-
* Subtype to differentiate between node and link
|
|
212
|
-
*/
|
|
213
|
-
'link']).isRequired,
|
|
214
|
-
targetId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
215
|
-
type: PropTypes.oneOf(['sankey']).isRequired
|
|
216
|
-
})]),
|
|
198
|
+
tooltipItem: PropTypes.shape({
|
|
199
|
+
seriesId: PropTypes.string.isRequired,
|
|
200
|
+
subType: PropTypes.oneOf(['link', 'node']).isRequired,
|
|
201
|
+
type: PropTypes.oneOf(['sankey'])
|
|
202
|
+
}),
|
|
217
203
|
/**
|
|
218
204
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
219
205
|
*/
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { type ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
|
|
1
|
+
import { type ChartsTooltipContainerProps, type ChartsTooltipClasses, type ChartsTooltipSlots, type ChartsTooltipSlotProps } from '@mui/x-charts/ChartsTooltip';
|
|
2
|
+
export interface SankeyTooltipSlots extends ChartsTooltipSlots {}
|
|
3
|
+
export interface SankeyTooltipSlotProps extends ChartsTooltipSlotProps {}
|
|
4
|
+
export interface SankeyTooltipClasses extends ChartsTooltipClasses {}
|
|
5
|
+
export interface SankeyTooltipContentClasses extends ChartsTooltipClasses {}
|
|
2
6
|
export interface SankeyTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {
|
|
3
7
|
/**
|
|
4
8
|
* Select the kind of tooltip to display
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./SankeyTooltip.js";
|
|
2
2
|
export * from "./SankeyTooltipContent.js";
|
|
3
|
-
export type { SankeyTooltipProps } from "./SankeyTooltip.types.js";
|
|
3
|
+
export type { SankeyTooltipProps, SankeyTooltipClasses, SankeyTooltipContentClasses, SankeyTooltipSlots, SankeyTooltipSlotProps } from "./SankeyTooltip.types.js";
|
|
@@ -14,4 +14,4 @@ export * from "./sankeyHighlightHooks.js";
|
|
|
14
14
|
export * from "../hooks/useSankeySeries.js";
|
|
15
15
|
export { type SankeyPlotClasses, sankeyPlotClasses } from "./sankeyClasses.js";
|
|
16
16
|
export { SankeyTooltip, SankeyTooltipContent } from "./SankeyTooltip/index.js";
|
|
17
|
-
export type { SankeyTooltipProps } from "./SankeyTooltip/index.js";
|
|
17
|
+
export type { SankeyTooltipProps, SankeyTooltipClasses, SankeyTooltipContentClasses, SankeyTooltipSlots, SankeyTooltipSlotProps } from "./SankeyTooltip/index.js";
|
|
@@ -4,28 +4,28 @@ import type { SankeyLinkFade, SankeyLinkHighlight, SankeyNodeFade, SankeyNodeHig
|
|
|
4
4
|
* Get the node highlight configuration from the Sankey series.
|
|
5
5
|
* Defaults to 'nodes' if not specified.
|
|
6
6
|
*/
|
|
7
|
-
export declare const selectorNodeHighlightConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
7
|
+
export declare const selectorNodeHighlightConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
8
8
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
9
9
|
}) => SankeyNodeHighlight;
|
|
10
10
|
/**
|
|
11
11
|
* Get the node fade configuration from the Sankey series.
|
|
12
12
|
* Defaults to 'none' if not specified.
|
|
13
13
|
*/
|
|
14
|
-
export declare const selectorNodeFadeConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
14
|
+
export declare const selectorNodeFadeConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
15
15
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
16
16
|
}) => SankeyNodeFade;
|
|
17
17
|
/**
|
|
18
18
|
* Get the link highlight configuration from the Sankey series.
|
|
19
19
|
* Defaults to 'links' if not specified.
|
|
20
20
|
*/
|
|
21
|
-
export declare const selectorLinkHighlightConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
21
|
+
export declare const selectorLinkHighlightConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
22
22
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
23
23
|
}) => SankeyLinkHighlight;
|
|
24
24
|
/**
|
|
25
25
|
* Get the link fade configuration from the Sankey series.
|
|
26
26
|
* Defaults to 'none' if not specified.
|
|
27
27
|
*/
|
|
28
|
-
export declare const selectorLinkFadeConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
28
|
+
export declare const selectorLinkFadeConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
29
29
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
30
30
|
}) => SankeyLinkFade;
|
|
31
31
|
/**
|
|
@@ -40,7 +40,7 @@ export declare const selectorSankeyHighlightedItem: (args_0: import("./useSankey
|
|
|
40
40
|
* - It's the highlighted node (unless highlight mode is 'none')
|
|
41
41
|
* - It's connected to a highlighted link (based on linkOptions.highlight)
|
|
42
42
|
*/
|
|
43
|
-
export declare const selectorIsNodeHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
43
|
+
export declare const selectorIsNodeHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
44
44
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
45
45
|
}, nodeId: SankeyNodeId) => boolean;
|
|
46
46
|
/**
|
|
@@ -49,7 +49,7 @@ export declare const selectorIsNodeHighlighted: (args_0: import("@mui/x-charts/i
|
|
|
49
49
|
* - It's the highlighted link (unless highlight mode is 'none')
|
|
50
50
|
* - It's connected to a highlighted node (based on nodeOptions.highlight)
|
|
51
51
|
*/
|
|
52
|
-
export declare const selectorIsLinkHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
52
|
+
export declare const selectorIsLinkHighlighted: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
53
53
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
54
54
|
}, link: import("../index.js").SankeyLayoutLinkWithPosition) => boolean;
|
|
55
55
|
/**
|
|
@@ -59,6 +59,6 @@ export declare const selectorIsLinkHighlighted: (args_0: import("@mui/x-charts/i
|
|
|
59
59
|
* - This item is not highlighted
|
|
60
60
|
* - The fade mode is 'global' for the highlighted element type
|
|
61
61
|
*/
|
|
62
|
-
export declare const selectorIsSankeyItemFaded: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
62
|
+
export declare const selectorIsSankeyItemFaded: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & Partial<{}> & {
|
|
63
63
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
64
64
|
}, isHighlighted: boolean) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SeriesId } from '@mui/x-charts/internals';
|
|
2
2
|
import type { DefaultizedProps, MakeRequired } from '@mui/x-internals/types';
|
|
3
3
|
import type { SankeyLink as D3SankeyLink, SankeyNode as D3SankeyNode } from "./d3Sankey/index.js";
|
|
4
|
-
import type { SankeyLinkHighlightScope, SankeyNodeHighlightScope } from "./sankey.highlight.types.js";
|
|
4
|
+
import type { SankeyHighlightScope, SankeyLinkHighlightScope, SankeyNodeHighlightScope } from "./sankey.highlight.types.js";
|
|
5
5
|
export type SankeyNodeId = string | number;
|
|
6
6
|
export interface SankeyNode {
|
|
7
7
|
/**
|
|
@@ -216,7 +216,10 @@ export interface SankeyLayout<WithPosition extends boolean = true> {
|
|
|
216
216
|
}
|
|
217
217
|
export interface DefaultizedSankeySeriesType extends DefaultizedProps<Omit<SankeySeriesType, 'data'>, 'id' | 'valueFormatter'> {
|
|
218
218
|
data: SankeyLayout<false>;
|
|
219
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Highlight scope for the series derived from nodeOptions and linksOptions
|
|
221
|
+
*/
|
|
222
|
+
highlightScope: SankeyHighlightScope;
|
|
220
223
|
}
|
|
221
224
|
type SankeyNodeIdentifierBase = {
|
|
222
225
|
type: 'sankey';
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { type ChartsOverlaySlotProps, type ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ChartsTooltipSlotProps, type ChartsTooltipSlots } from '@mui/x-charts/ChartsTooltip';
|
|
3
3
|
import { type ChartsSlotProps, type ChartsSlots } from '@mui/x-charts/internals';
|
|
4
4
|
import { type ChartsToolbarSlotProps, type ChartsToolbarSlots } from '@mui/x-charts/Toolbar';
|
|
5
|
-
export interface SankeyChartSlots extends ChartsTooltipSlots
|
|
6
|
-
export interface SankeyChartSlotProps extends
|
|
7
|
-
/**
|
|
8
|
-
* Slot props for the tooltip component.
|
|
9
|
-
* @default {}
|
|
10
|
-
*/
|
|
11
|
-
tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
|
|
12
|
-
}
|
|
5
|
+
export interface SankeyChartSlots extends ChartsTooltipSlots<'item' | 'none'>, ChartsOverlaySlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
|
|
6
|
+
export interface SankeyChartSlotProps extends ChartsTooltipSlotProps<'item' | 'none'>, ChartsOverlaySlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
|
|
13
7
|
export interface SankeyChartSlotExtension {
|
|
14
8
|
/**
|
|
15
9
|
* Overridable component slots.
|