@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
|
@@ -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.
|
|
@@ -61,6 +61,16 @@ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
|
61
61
|
color: resolvedColor
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
|
+
const highlightScope = {
|
|
65
|
+
nodes: {
|
|
66
|
+
highlight: seriesData.nodeOptions?.highlight ?? 'links',
|
|
67
|
+
fade: seriesData.nodeOptions?.fade ?? 'none'
|
|
68
|
+
},
|
|
69
|
+
links: {
|
|
70
|
+
highlight: seriesData.linkOptions?.highlight ?? 'links',
|
|
71
|
+
fade: seriesData.linkOptions?.fade ?? 'none'
|
|
72
|
+
}
|
|
73
|
+
};
|
|
64
74
|
if (!seriesData.data || !links) {
|
|
65
75
|
return (0, _extends2.default)({
|
|
66
76
|
id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
|
|
@@ -69,7 +79,8 @@ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
|
69
79
|
data: {
|
|
70
80
|
nodes: [],
|
|
71
81
|
links: []
|
|
72
|
-
}
|
|
82
|
+
},
|
|
83
|
+
highlightScope
|
|
73
84
|
});
|
|
74
85
|
}
|
|
75
86
|
|
|
@@ -100,6 +111,7 @@ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
|
100
111
|
id: seriesData.id ?? `auto-generated-id-${seriesIndex}`
|
|
101
112
|
}, seriesData, {
|
|
102
113
|
valueFormatter: seriesData.valueFormatter ?? defaultSankeyValueFormatter,
|
|
114
|
+
highlightScope,
|
|
103
115
|
data
|
|
104
116
|
});
|
|
105
117
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const identifierCleaner = identifier => {
|
|
8
|
+
if (identifier.subType === 'node') {
|
|
9
|
+
return {
|
|
10
|
+
type: identifier.type,
|
|
11
|
+
seriesId: identifier.seriesId,
|
|
12
|
+
subType: 'node',
|
|
13
|
+
nodeId: identifier.nodeId
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
type: identifier.type,
|
|
18
|
+
seriesId: identifier.seriesId,
|
|
19
|
+
subType: 'link',
|
|
20
|
+
sourceId: identifier.sourceId,
|
|
21
|
+
targetId: identifier.targetId
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
var _default = exports.default = identifierCleaner;
|
|
@@ -11,6 +11,7 @@ var _calculateSankeyLayout = require("../calculateSankeyLayout");
|
|
|
11
11
|
var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
|
|
12
12
|
var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
|
|
13
13
|
var _identifierSerializer = _interopRequireDefault(require("./identifierSerializer"));
|
|
14
|
+
var _identifierCleaner = _interopRequireDefault(require("./identifierCleaner"));
|
|
14
15
|
// Simple passthrough functions for sankey chart
|
|
15
16
|
const seriesProcessor = series => series;
|
|
16
17
|
const colorProcessor = series => series;
|
|
@@ -34,5 +35,6 @@ const sankeySeriesConfig = exports.sankeySeriesConfig = {
|
|
|
34
35
|
tooltipItemPositionGetter: _tooltipPosition.default,
|
|
35
36
|
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.getSeriesWithDefaultValues,
|
|
36
37
|
keyboardFocusHandler: _keyboardFocusHandler.default,
|
|
37
|
-
identifierSerializer: _identifierSerializer.default
|
|
38
|
+
identifierSerializer: _identifierSerializer.default,
|
|
39
|
+
identifierCleaner: _identifierCleaner.default
|
|
38
40
|
};
|
|
@@ -35,5 +35,5 @@ export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef' |
|
|
|
35
35
|
*
|
|
36
36
|
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
37
37
|
*/
|
|
38
|
-
declare const ScatterChartPro: React.ForwardRefExoticComponent<ScatterChartProProps & React.RefAttributes<
|
|
38
|
+
declare const ScatterChartPro: React.ForwardRefExoticComponent<ScatterChartProProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
39
|
export { ScatterChartPro };
|
|
@@ -73,11 +73,12 @@ const ScatterChartPro = exports.ScatterChartPro = /*#__PURE__*/React.forwardRef(
|
|
|
73
73
|
onZoomChange,
|
|
74
74
|
apiRef,
|
|
75
75
|
plugins: _ScatterChartPro2.SCATTER_CHART_PRO_PLUGINS
|
|
76
|
-
})
|
|
76
|
+
}));
|
|
77
77
|
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
78
78
|
const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
|
|
79
79
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
80
80
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
81
|
+
ref: ref,
|
|
81
82
|
children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
82
83
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartZoomSlider.ChartZoomSlider, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
83
84
|
"data-drawing-container": true,
|
|
@@ -103,6 +104,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
103
104
|
setZoomData: _propTypes.default.func.isRequired
|
|
104
105
|
})
|
|
105
106
|
}),
|
|
107
|
+
/**
|
|
108
|
+
* A gap added between axes when multiple axes are rendered on the same side of the chart.
|
|
109
|
+
* @default 0
|
|
110
|
+
*/
|
|
111
|
+
axesGap: _propTypes.default.number,
|
|
106
112
|
/**
|
|
107
113
|
* The configuration of axes highlight.
|
|
108
114
|
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
@@ -177,8 +183,8 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
177
183
|
*/
|
|
178
184
|
hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
179
185
|
dataIndex: _propTypes.default.number,
|
|
180
|
-
seriesId: _propTypes.default.
|
|
181
|
-
type: _propTypes.default.oneOf(['scatter'])
|
|
186
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
187
|
+
type: _propTypes.default.oneOf(['scatter'])
|
|
182
188
|
})),
|
|
183
189
|
/**
|
|
184
190
|
* If `true`, the legend is not rendered.
|
|
@@ -190,7 +196,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
190
196
|
*/
|
|
191
197
|
highlightedItem: _propTypes.default.shape({
|
|
192
198
|
dataIndex: _propTypes.default.number,
|
|
193
|
-
seriesId: _propTypes.default.
|
|
199
|
+
seriesId: _propTypes.default.string.isRequired
|
|
194
200
|
}),
|
|
195
201
|
/**
|
|
196
202
|
* This prop is used to help implement the accessibility logic.
|
|
@@ -220,8 +226,8 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
220
226
|
*/
|
|
221
227
|
initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
222
228
|
dataIndex: _propTypes.default.number,
|
|
223
|
-
seriesId: _propTypes.default.
|
|
224
|
-
type: _propTypes.default.oneOf(['scatter'])
|
|
229
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
230
|
+
type: _propTypes.default.oneOf(['scatter'])
|
|
225
231
|
})),
|
|
226
232
|
/**
|
|
227
233
|
* The list of zoom data related to each axis.
|
|
@@ -277,6 +283,14 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
277
283
|
* @param {ScatterItemIdentifier} scatterItemIdentifier The scatter item identifier.
|
|
278
284
|
*/
|
|
279
285
|
onItemClick: _propTypes.default.func,
|
|
286
|
+
/**
|
|
287
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
288
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
289
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
290
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
291
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
292
|
+
*/
|
|
293
|
+
onTooltipAxisChange: _propTypes.default.func,
|
|
280
294
|
/**
|
|
281
295
|
* The callback fired when the tooltip item changes.
|
|
282
296
|
*
|
|
@@ -326,14 +340,22 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
326
340
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
327
341
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
328
342
|
title: _propTypes.default.string,
|
|
343
|
+
/**
|
|
344
|
+
* The controlled axis tooltip.
|
|
345
|
+
* Identified by the axis id, and data index.
|
|
346
|
+
*/
|
|
347
|
+
tooltipAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
348
|
+
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
349
|
+
dataIndex: _propTypes.default.number.isRequired
|
|
350
|
+
})),
|
|
329
351
|
/**
|
|
330
352
|
* The tooltip item.
|
|
331
353
|
* Used when the tooltip is controlled.
|
|
332
354
|
*/
|
|
333
355
|
tooltipItem: _propTypes.default.shape({
|
|
334
356
|
dataIndex: _propTypes.default.number.isRequired,
|
|
335
|
-
seriesId: _propTypes.default.
|
|
336
|
-
type: _propTypes.default.oneOf(['scatter'])
|
|
357
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
358
|
+
type: _propTypes.default.oneOf(['scatter'])
|
|
337
359
|
}),
|
|
338
360
|
/**
|
|
339
361
|
* Defines the maximum distance between a scatter point and the pointer that triggers the interaction.
|
|
@@ -29,5 +29,5 @@ export interface BarChartProProps extends Omit<BarChartProps, 'apiRef' | 'slots'
|
|
|
29
29
|
*
|
|
30
30
|
* - [BarChart API](https://mui.com/x/api/charts/bar-chart/)
|
|
31
31
|
*/
|
|
32
|
-
declare const BarChartPro: React.ForwardRefExoticComponent<BarChartProProps & React.RefAttributes<
|
|
32
|
+
declare const BarChartPro: React.ForwardRefExoticComponent<BarChartProProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
33
|
export { BarChartPro };
|
|
@@ -70,11 +70,12 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
70
70
|
onZoomChange,
|
|
71
71
|
apiRef,
|
|
72
72
|
plugins: BAR_CHART_PRO_PLUGINS
|
|
73
|
-
})
|
|
73
|
+
}));
|
|
74
74
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
75
75
|
const Toolbar = props.slots?.toolbar ?? ChartsToolbarPro;
|
|
76
76
|
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
77
77
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
78
|
+
ref: ref,
|
|
78
79
|
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
79
80
|
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
80
81
|
children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
@@ -97,6 +98,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
97
98
|
setZoomData: PropTypes.func.isRequired
|
|
98
99
|
})
|
|
99
100
|
}),
|
|
101
|
+
/**
|
|
102
|
+
* A gap added between axes when multiple axes are rendered on the same side of the chart.
|
|
103
|
+
* @default 0
|
|
104
|
+
*/
|
|
105
|
+
axesGap: PropTypes.number,
|
|
100
106
|
/**
|
|
101
107
|
* The configuration of axes highlight.
|
|
102
108
|
* Default is set to 'band' in the bar direction.
|
|
@@ -180,8 +186,8 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
180
186
|
*/
|
|
181
187
|
hiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
182
188
|
dataIndex: PropTypes.number,
|
|
183
|
-
seriesId: PropTypes.
|
|
184
|
-
type: PropTypes.oneOf(['bar'])
|
|
189
|
+
seriesId: PropTypes.string.isRequired,
|
|
190
|
+
type: PropTypes.oneOf(['bar'])
|
|
185
191
|
})),
|
|
186
192
|
/**
|
|
187
193
|
* If `true`, the legend is not rendered.
|
|
@@ -201,7 +207,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
201
207
|
*/
|
|
202
208
|
highlightedItem: PropTypes.shape({
|
|
203
209
|
dataIndex: PropTypes.number,
|
|
204
|
-
seriesId: PropTypes.
|
|
210
|
+
seriesId: PropTypes.string.isRequired
|
|
205
211
|
}),
|
|
206
212
|
/**
|
|
207
213
|
* This prop is used to help implement the accessibility logic.
|
|
@@ -231,8 +237,8 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
231
237
|
*/
|
|
232
238
|
initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
233
239
|
dataIndex: PropTypes.number,
|
|
234
|
-
seriesId: PropTypes.
|
|
235
|
-
type: PropTypes.oneOf(['bar'])
|
|
240
|
+
seriesId: PropTypes.string.isRequired,
|
|
241
|
+
type: PropTypes.oneOf(['bar'])
|
|
236
242
|
})),
|
|
237
243
|
/**
|
|
238
244
|
* The list of zoom data related to each axis.
|
|
@@ -301,6 +307,14 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
301
307
|
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
302
308
|
*/
|
|
303
309
|
onItemClick: PropTypes.func,
|
|
310
|
+
/**
|
|
311
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
312
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
313
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
314
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
315
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
316
|
+
*/
|
|
317
|
+
onTooltipAxisChange: PropTypes.func,
|
|
304
318
|
/**
|
|
305
319
|
* The callback fired when the tooltip item changes.
|
|
306
320
|
*
|
|
@@ -350,14 +364,22 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
350
364
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
351
365
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
352
366
|
title: PropTypes.string,
|
|
367
|
+
/**
|
|
368
|
+
* The controlled axis tooltip.
|
|
369
|
+
* Identified by the axis id, and data index.
|
|
370
|
+
*/
|
|
371
|
+
tooltipAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
372
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
373
|
+
dataIndex: PropTypes.number.isRequired
|
|
374
|
+
})),
|
|
353
375
|
/**
|
|
354
376
|
* The tooltip item.
|
|
355
377
|
* Used when the tooltip is controlled.
|
|
356
378
|
*/
|
|
357
379
|
tooltipItem: PropTypes.shape({
|
|
358
380
|
dataIndex: PropTypes.number.isRequired,
|
|
359
|
-
seriesId: PropTypes.
|
|
360
|
-
type: PropTypes.oneOf(['bar'])
|
|
381
|
+
seriesId: PropTypes.string.isRequired,
|
|
382
|
+
type: PropTypes.oneOf(['bar'])
|
|
361
383
|
}),
|
|
362
384
|
/**
|
|
363
385
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
@@ -1,35 +1,21 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
1
|
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
2
|
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
-
import { type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { type ChartsContainerProProps, type ChartsContainerProSlotProps, type ChartsContainerProSlots } from "../ChartsContainerPro/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `ChartsContainerProSlots` instead. We added S to the charts prefix to align with other components.
|
|
6
|
+
*/
|
|
7
|
+
export type ChartContainerProSlots = ChartsContainerProSlots;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `ChartsContainerProSlotProps` instead. We added S to the charts prefix to align with other components.
|
|
10
|
+
*/
|
|
11
|
+
export type ChartContainerProSlotProps = ChartsContainerProSlotProps;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use `ChartsContainerProProps` instead. We added S to the charts prefix to align with other components.
|
|
14
|
+
*/
|
|
15
|
+
export type ChartContainerProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartsContainerProProps<TSeries, TSignatures>;
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* This is a combination of both the `ChartDataProviderPro` and `ChartsSurface` components.
|
|
14
|
-
*
|
|
15
|
-
* Demos:
|
|
16
|
-
*
|
|
17
|
-
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
18
|
-
*
|
|
19
|
-
* API:
|
|
20
|
-
*
|
|
21
|
-
* - [ChartContainer API](https://mui.com/x/api/charts/chart-container/)
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```jsx
|
|
25
|
-
* <ChartContainerPro
|
|
26
|
-
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
27
|
-
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
28
|
-
* >
|
|
29
|
-
* <BarPlot />
|
|
30
|
-
* <ChartsXAxis axisId="x-axis" />
|
|
31
|
-
* </ChartContainerPro>
|
|
32
|
-
* ```
|
|
17
|
+
* @deprecated Use `ChartsContainerPro` instead. We added S to the charts prefix to align with other components.
|
|
33
18
|
*/
|
|
34
|
-
declare const ChartContainerPro:
|
|
35
|
-
|
|
19
|
+
export declare const ChartContainerPro: <TSeries extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerProProps<TSeries, TSignatures> & {
|
|
20
|
+
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
21
|
+
}) => React.JSX.Element;
|