@mui/x-charts 9.2.0 → 9.4.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/BarChart/BarChart.js +10 -10
- package/BarChart/BarChart.mjs +10 -10
- package/BarChart/BarElement.d.mts +3 -2
- package/BarChart/BarElement.d.ts +3 -2
- package/BarChart/BarLabel/BarLabelItem.d.mts +3 -2
- package/BarChart/BarLabel/BarLabelItem.d.ts +3 -2
- package/BarChart/seriesConfig/bar/extremums.js +7 -2
- package/BarChart/seriesConfig/bar/extremums.mjs +7 -2
- package/BarChart/seriesConfig/bar/getColor.js +7 -53
- package/BarChart/seriesConfig/bar/getColor.mjs +7 -53
- package/BarChart/seriesConfig/bar/seriesProcessor.js +3 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +3 -1
- package/BarChart/seriesConfig/bar/tooltip.js +4 -27
- package/BarChart/seriesConfig/bar/tooltip.mjs +4 -27
- package/CHANGELOG.md +314 -0
- package/ChartsContainer/ChartsContainer.js +30 -9
- package/ChartsContainer/ChartsContainer.mjs +30 -9
- package/ChartsLabel/ChartsLabelMark.js +1 -23
- package/ChartsLabel/ChartsLabelMark.mjs +0 -22
- package/ChartsLabel/labelMarkClasses.d.mts +0 -1
- package/ChartsLabel/labelMarkClasses.d.ts +0 -1
- package/ChartsLabel/labelMarkClasses.js +1 -2
- package/ChartsLabel/labelMarkClasses.mjs +2 -2
- package/ChartsLayerContainer/ChartsLayerContainer.js +36 -30
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +36 -30
- package/ChartsLegend/chartsLegend.types.d.mts +3 -2
- package/ChartsLegend/chartsLegend.types.d.ts +3 -2
- package/ChartsLegend/piecewiseColorLegendClasses.js +8 -2
- package/ChartsLegend/piecewiseColorLegendClasses.mjs +8 -2
- package/ChartsOverlay/ChartsOverlay.d.mts +5 -4
- package/ChartsOverlay/ChartsOverlay.d.ts +5 -4
- package/ChartsReferenceLine/ChartsXReferenceLine.js +6 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.mjs +6 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -0
- package/ChartsReferenceLine/ChartsYReferenceLine.mjs +5 -0
- package/ChartsTooltip/ChartTooltip.types.d.mts +3 -2
- package/ChartsTooltip/ChartTooltip.types.d.ts +3 -2
- package/ChartsTooltip/useAxesTooltip.js +2 -2
- package/ChartsTooltip/useAxesTooltip.mjs +2 -2
- package/ChartsTooltip/useItemTooltip.js +2 -2
- package/ChartsTooltip/useItemTooltip.mjs +2 -2
- package/ChartsXAxis/ChartsXAxis.js +3 -1
- package/ChartsXAxis/ChartsXAxis.mjs +3 -1
- package/ChartsXAxis/useAxisTicksProps.d.mts +84 -3
- package/ChartsXAxis/useAxisTicksProps.d.ts +84 -3
- package/ChartsYAxis/ChartsYAxis.js +3 -1
- package/ChartsYAxis/ChartsYAxis.mjs +3 -1
- package/ChartsYAxis/useAxisTicksProps.d.mts +84 -3
- package/ChartsYAxis/useAxisTicksProps.d.ts +84 -3
- package/LineChart/AreaElement.d.mts +3 -2
- package/LineChart/AreaElement.d.ts +3 -2
- package/LineChart/LineChart.js +6 -6
- package/LineChart/LineChart.mjs +6 -6
- package/LineChart/LineElement.d.mts +3 -2
- package/LineChart/LineElement.d.ts +3 -2
- package/LineChart/LineHighlightPlot.d.mts +3 -2
- package/LineChart/LineHighlightPlot.d.ts +3 -2
- package/LineChart/LineHighlightPlot.js +65 -45
- package/LineChart/LineHighlightPlot.mjs +65 -45
- package/LineChart/MarkPlot.d.mts +3 -2
- package/LineChart/MarkPlot.d.ts +3 -2
- package/LineChart/seriesConfig/curveEvaluation.js +40 -15
- package/LineChart/seriesConfig/curveEvaluation.mjs +39 -15
- package/LineChart/seriesConfig/extremums.js +5 -1
- package/LineChart/seriesConfig/extremums.mjs +5 -1
- package/LineChart/seriesConfig/getColor.js +7 -54
- package/LineChart/seriesConfig/getColor.mjs +7 -54
- package/LineChart/seriesConfig/seriesProcessor.d.mts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.d.ts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.js +2 -139
- package/LineChart/seriesConfig/seriesProcessor.mjs +2 -138
- package/LineChart/seriesConfig/tooltip.js +4 -25
- package/LineChart/seriesConfig/tooltip.mjs +4 -25
- package/LineChart/useMarkPlotData.js +3 -1
- package/LineChart/useMarkPlotData.mjs +3 -1
- package/PieChart/PieArcLabelPlot.d.mts +3 -2
- package/PieChart/PieArcLabelPlot.d.ts +3 -2
- package/PieChart/PieArcPlot.d.mts +3 -2
- package/PieChart/PieArcPlot.d.ts +3 -2
- package/PieChart/PieChart.js +6 -6
- package/PieChart/PieChart.mjs +6 -6
- package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +2 -2
- package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
- package/RadarChart/RadarAxis/useRadarAxis.js +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.mjs +1 -1
- package/RadarChart/RadarChart.js +8 -8
- package/RadarChart/RadarChart.mjs +8 -8
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +1 -0
- package/ScatterChart/BatchScatter.d.mts +2 -8
- package/ScatterChart/BatchScatter.d.ts +2 -8
- package/ScatterChart/BatchScatter.js +17 -12
- package/ScatterChart/BatchScatter.mjs +17 -12
- package/ScatterChart/FocusedScatterMark.js +2 -2
- package/ScatterChart/FocusedScatterMark.mjs +2 -2
- package/ScatterChart/HighlightedScatterMark.js +3 -3
- package/ScatterChart/HighlightedScatterMark.mjs +3 -3
- package/ScatterChart/Scatter.d.mts +5 -0
- package/ScatterChart/Scatter.d.ts +5 -0
- package/ScatterChart/Scatter.js +7 -2
- package/ScatterChart/Scatter.mjs +7 -2
- package/ScatterChart/ScatterChart.d.mts +2 -1
- package/ScatterChart/ScatterChart.d.ts +2 -1
- package/ScatterChart/ScatterChart.js +32 -11
- package/ScatterChart/ScatterChart.mjs +32 -11
- package/ScatterChart/ScatterMarker.types.d.mts +3 -2
- package/ScatterChart/ScatterMarker.types.d.ts +3 -2
- package/ScatterChart/ScatterPlot.d.mts +3 -2
- package/ScatterChart/ScatterPlot.d.ts +3 -2
- package/ScatterChart/ScatterPlot.js +6 -1
- package/ScatterChart/ScatterPlot.mjs +6 -1
- package/ScatterChart/seriesConfig/extremums.js +6 -0
- package/ScatterChart/seriesConfig/extremums.mjs +6 -0
- package/ScatterChart/seriesConfig/getColor.js +1 -1
- package/ScatterChart/seriesConfig/getColor.mjs +1 -1
- package/ScatterChart/seriesConfig/getMarkerSize.d.mts +18 -0
- package/ScatterChart/seriesConfig/getMarkerSize.d.ts +18 -0
- package/ScatterChart/seriesConfig/getMarkerSize.js +43 -0
- package/ScatterChart/seriesConfig/getMarkerSize.mjs +37 -0
- package/ScatterChart/seriesConfig/seriesProcessor.js +23 -8
- package/ScatterChart/seriesConfig/seriesProcessor.mjs +23 -8
- package/ScatterChart/seriesConfig/tooltip.js +2 -24
- package/ScatterChart/seriesConfig/tooltip.mjs +2 -24
- package/ScatterChart/useScatterItemPosition.d.mts +4 -0
- package/ScatterChart/useScatterItemPosition.d.ts +4 -0
- package/ScatterChart/useScatterItemPosition.js +9 -0
- package/ScatterChart/useScatterItemPosition.mjs +8 -0
- package/SparkLineChart/SparkLineChart.js +27 -27
- package/SparkLineChart/SparkLineChart.mjs +27 -27
- package/Toolbar/Toolbar.types.d.mts +3 -2
- package/Toolbar/Toolbar.types.d.ts +3 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/animation/animation.d.mts +1 -2
- package/internals/animation/animation.d.ts +1 -2
- package/internals/commonNextFocusItem.d.mts +10 -2
- package/internals/commonNextFocusItem.d.ts +10 -2
- package/internals/commonNextFocusItem.js +12 -4
- package/internals/commonNextFocusItem.mjs +12 -4
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +1 -1
- package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
- package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
- package/internals/createCommonKeyboardFocusHandler.js +3 -3
- package/internals/createCommonKeyboardFocusHandler.mjs +3 -3
- package/internals/getLineLikeTooltip.d.mts +9 -0
- package/internals/getLineLikeTooltip.d.ts +9 -0
- package/internals/getLineLikeTooltip.js +38 -0
- package/internals/getLineLikeTooltip.mjs +31 -0
- package/internals/incompleteDatasetKeysError.d.mts +1 -0
- package/internals/incompleteDatasetKeysError.d.ts +1 -0
- package/internals/incompleteDatasetKeysError.js +11 -0
- package/internals/incompleteDatasetKeysError.mjs +4 -0
- package/internals/index.d.mts +5 -0
- package/internals/index.d.ts +5 -0
- package/internals/index.js +48 -0
- package/internals/index.mjs +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +4 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.mjs +4 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +10 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +10 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +18 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.mjs +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +24 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +24 -5
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +46 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.mjs +47 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +46 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +46 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +2 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +6 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +6 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.mts +4 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +4 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +3 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.mjs +1 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +5 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +7 -5
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +17 -3
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +17 -3
- package/internals/processLineLikeSeries.d.mts +6 -0
- package/internals/processLineLikeSeries.d.ts +6 -0
- package/internals/processLineLikeSeries.js +145 -0
- package/internals/processLineLikeSeries.mjs +138 -0
- package/internals/resolveColorProcessor.d.mts +11 -0
- package/internals/resolveColorProcessor.d.ts +11 -0
- package/internals/resolveColorProcessor.js +62 -0
- package/internals/resolveColorProcessor.mjs +56 -0
- package/internals/sizeScale.d.mts +6 -0
- package/internals/sizeScale.d.ts +6 -0
- package/internals/sizeScale.js +46 -0
- package/internals/sizeScale.mjs +38 -0
- package/models/axis.d.mts +18 -12
- package/models/axis.d.ts +18 -12
- package/models/chartsSlotsComponentsProps.d.mts +25 -0
- package/models/chartsSlotsComponentsProps.d.ts +25 -0
- package/models/chartsSlotsComponentsProps.js +5 -0
- package/models/chartsSlotsComponentsProps.mjs +1 -0
- package/models/index.d.mts +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +11 -0
- package/models/index.mjs +1 -0
- package/models/seriesType/line.d.mts +5 -2
- package/models/seriesType/line.d.ts +5 -2
- package/models/seriesType/scatter.d.mts +34 -2
- package/models/seriesType/scatter.d.ts +34 -2
- package/models/sizeMapping.d.mts +64 -0
- package/models/sizeMapping.d.ts +64 -0
- package/models/sizeMapping.js +5 -0
- package/models/sizeMapping.mjs +1 -0
- package/models/slots/chartsBaseSlots.d.mts +6 -5
- package/models/slots/chartsBaseSlots.d.ts +6 -5
- package/models/z-axis.d.mts +10 -1
- package/models/z-axis.d.ts +10 -1
- package/package.json +6 -6
|
@@ -38,12 +38,16 @@ const getExtremumY = params => {
|
|
|
38
38
|
getFilters
|
|
39
39
|
} = params;
|
|
40
40
|
return Object.keys(series).filter(seriesId => {
|
|
41
|
+
if (axis.domainSeries === 'visible' && series[seriesId].hidden) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
41
44
|
const yAxisId = series[seriesId].yAxisId;
|
|
42
45
|
return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;
|
|
43
46
|
}).reduce((acc, seriesId) => {
|
|
44
47
|
const {
|
|
45
48
|
area,
|
|
46
49
|
stackedData,
|
|
50
|
+
visibleStackedData,
|
|
47
51
|
data
|
|
48
52
|
} = series[seriesId];
|
|
49
53
|
const isArea = area !== undefined;
|
|
@@ -56,7 +60,7 @@ const getExtremumY = params => {
|
|
|
56
60
|
|
|
57
61
|
// Since this series is not used to display an area, we do not consider the base (the d[0]).
|
|
58
62
|
const getValues = isArea && axis.scaleType !== 'log' && typeof series[seriesId].baseline !== 'string' ? d => d : d => [d[1], d[1]];
|
|
59
|
-
const seriesExtremums = getSeriesExtremums(getValues, data, stackedData, filter);
|
|
63
|
+
const seriesExtremums = getSeriesExtremums(getValues, data, axis.domainSeries === 'visible' ? visibleStackedData : stackedData, filter);
|
|
60
64
|
const [seriesMin, seriesMax] = seriesExtremums;
|
|
61
65
|
return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];
|
|
62
66
|
}, [Infinity, -Infinity]);
|
|
@@ -31,12 +31,16 @@ export const getExtremumY = params => {
|
|
|
31
31
|
getFilters
|
|
32
32
|
} = params;
|
|
33
33
|
return Object.keys(series).filter(seriesId => {
|
|
34
|
+
if (axis.domainSeries === 'visible' && series[seriesId].hidden) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
34
37
|
const yAxisId = series[seriesId].yAxisId;
|
|
35
38
|
return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;
|
|
36
39
|
}).reduce((acc, seriesId) => {
|
|
37
40
|
const {
|
|
38
41
|
area,
|
|
39
42
|
stackedData,
|
|
43
|
+
visibleStackedData,
|
|
40
44
|
data
|
|
41
45
|
} = series[seriesId];
|
|
42
46
|
const isArea = area !== undefined;
|
|
@@ -49,7 +53,7 @@ export const getExtremumY = params => {
|
|
|
49
53
|
|
|
50
54
|
// Since this series is not used to display an area, we do not consider the base (the d[0]).
|
|
51
55
|
const getValues = isArea && axis.scaleType !== 'log' && typeof series[seriesId].baseline !== 'string' ? d => d : d => [d[1], d[1]];
|
|
52
|
-
const seriesExtremums = getSeriesExtremums(getValues, data, stackedData, filter);
|
|
56
|
+
const seriesExtremums = getSeriesExtremums(getValues, data, axis.domainSeries === 'visible' ? visibleStackedData : stackedData, filter);
|
|
53
57
|
const [seriesMin, seriesMax] = seriesExtremums;
|
|
54
58
|
return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];
|
|
55
59
|
}, [Infinity, -Infinity]);
|
|
@@ -4,58 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
8
|
-
const getColor = (series, xAxis, yAxis) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (dataIndex === undefined) {
|
|
15
|
-
return series.color;
|
|
16
|
-
}
|
|
17
|
-
const value = series.data[dataIndex];
|
|
18
|
-
const color = value === null ? getSeriesColor({
|
|
19
|
-
value,
|
|
20
|
-
dataIndex
|
|
21
|
-
}) : yColorScale(value);
|
|
22
|
-
if (color === null) {
|
|
23
|
-
return getSeriesColor({
|
|
24
|
-
value,
|
|
25
|
-
dataIndex
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return color;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
if (xColorScale) {
|
|
32
|
-
return dataIndex => {
|
|
33
|
-
if (dataIndex === undefined) {
|
|
34
|
-
return series.color;
|
|
35
|
-
}
|
|
36
|
-
const value = xAxis.data?.[dataIndex];
|
|
37
|
-
const color = value === null ? getSeriesColor({
|
|
38
|
-
value,
|
|
39
|
-
dataIndex
|
|
40
|
-
}) : xColorScale(value);
|
|
41
|
-
if (color === null) {
|
|
42
|
-
return getSeriesColor({
|
|
43
|
-
value,
|
|
44
|
-
dataIndex
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
return color;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
return dataIndex => {
|
|
51
|
-
if (dataIndex === undefined) {
|
|
52
|
-
return series.color;
|
|
53
|
-
}
|
|
54
|
-
const value = series.data[dataIndex];
|
|
55
|
-
return getSeriesColor({
|
|
56
|
-
value,
|
|
57
|
-
dataIndex
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
};
|
|
7
|
+
var _resolveColorProcessor = require("../../internals/resolveColorProcessor");
|
|
8
|
+
const getColor = (series, xAxis, yAxis) => (0, _resolveColorProcessor.resolveColorProcessor)({
|
|
9
|
+
series,
|
|
10
|
+
valueColorScale: yAxis?.colorScale,
|
|
11
|
+
categoryColorScale: xAxis?.colorScale,
|
|
12
|
+
categoryValues: xAxis?.data
|
|
13
|
+
});
|
|
61
14
|
var _default = exports.default = getColor;
|
|
@@ -1,55 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const getColor = (series, xAxis, yAxis) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (dataIndex === undefined) {
|
|
9
|
-
return series.color;
|
|
10
|
-
}
|
|
11
|
-
const value = series.data[dataIndex];
|
|
12
|
-
const color = value === null ? getSeriesColor({
|
|
13
|
-
value,
|
|
14
|
-
dataIndex
|
|
15
|
-
}) : yColorScale(value);
|
|
16
|
-
if (color === null) {
|
|
17
|
-
return getSeriesColor({
|
|
18
|
-
value,
|
|
19
|
-
dataIndex
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return color;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
if (xColorScale) {
|
|
26
|
-
return dataIndex => {
|
|
27
|
-
if (dataIndex === undefined) {
|
|
28
|
-
return series.color;
|
|
29
|
-
}
|
|
30
|
-
const value = xAxis.data?.[dataIndex];
|
|
31
|
-
const color = value === null ? getSeriesColor({
|
|
32
|
-
value,
|
|
33
|
-
dataIndex
|
|
34
|
-
}) : xColorScale(value);
|
|
35
|
-
if (color === null) {
|
|
36
|
-
return getSeriesColor({
|
|
37
|
-
value,
|
|
38
|
-
dataIndex
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return color;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
return dataIndex => {
|
|
45
|
-
if (dataIndex === undefined) {
|
|
46
|
-
return series.color;
|
|
47
|
-
}
|
|
48
|
-
const value = series.data[dataIndex];
|
|
49
|
-
return getSeriesColor({
|
|
50
|
-
value,
|
|
51
|
-
dataIndex
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
};
|
|
1
|
+
import { resolveColorProcessor } from "../../internals/resolveColorProcessor.mjs";
|
|
2
|
+
const getColor = (series, xAxis, yAxis) => resolveColorProcessor({
|
|
3
|
+
series,
|
|
4
|
+
valueColorScale: yAxis?.colorScale,
|
|
5
|
+
categoryColorScale: xAxis?.colorScale,
|
|
6
|
+
categoryValues: xAxis?.data
|
|
7
|
+
});
|
|
55
8
|
export default getColor;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import type { IsItemVisibleFunction } from "../../internals/plugins/featurePlugins/useChartVisibilityManager/index.mjs";
|
|
4
|
-
declare function seriesProcessor(params: SeriesProcessorParams<'line'>, dataset?: Readonly<DatasetType>, isItemVisible?: IsItemVisibleFunction): SeriesProcessorResult<'line'>;
|
|
1
|
+
import type { SeriesProcessor } from "../../internals/plugins/corePlugins/useChartSeriesConfig/index.mjs";
|
|
2
|
+
declare const seriesProcessor: SeriesProcessor<'line'>;
|
|
5
3
|
export default seriesProcessor;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import type { IsItemVisibleFunction } from "../../internals/plugins/featurePlugins/useChartVisibilityManager/index.js";
|
|
4
|
-
declare function seriesProcessor(params: SeriesProcessorParams<'line'>, dataset?: Readonly<DatasetType>, isItemVisible?: IsItemVisibleFunction): SeriesProcessorResult<'line'>;
|
|
1
|
+
import type { SeriesProcessor } from "../../internals/plugins/corePlugins/useChartSeriesConfig/index.js";
|
|
2
|
+
declare const seriesProcessor: SeriesProcessor<'line'>;
|
|
5
3
|
export default seriesProcessor;
|
|
@@ -1,146 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
11
|
-
var _warning = require("@mui/x-internals/warning");
|
|
12
|
-
var _stacking = require("../../internals/stacking");
|
|
13
|
-
const defaultShapes = ['circle', 'square', 'diamond', 'cross', 'star', 'triangle', 'wye'];
|
|
14
|
-
const lineValueFormatter = v => v == null ? '' : v.toLocaleString();
|
|
15
|
-
function seriesProcessor(params, dataset, isItemVisible) {
|
|
16
|
-
const {
|
|
17
|
-
seriesOrder,
|
|
18
|
-
series
|
|
19
|
-
} = params;
|
|
20
|
-
const stackingGroups = (0, _stacking.getStackingGroups)((0, _extends2.default)({}, params, {
|
|
21
|
-
defaultStrategy: {
|
|
22
|
-
stackOffset: 'none'
|
|
23
|
-
}
|
|
24
|
-
}));
|
|
25
|
-
const idToIndex = new Map();
|
|
26
|
-
// Create a data set with format adapted to d3
|
|
27
|
-
const d3Dataset = dataset ?? [];
|
|
28
|
-
seriesOrder.forEach((id, seriesIndex) => {
|
|
29
|
-
idToIndex.set(id, seriesIndex);
|
|
30
|
-
const data = series[id].data;
|
|
31
|
-
if (data !== undefined) {
|
|
32
|
-
data.forEach((value, dataIndex) => {
|
|
33
|
-
if (d3Dataset.length <= dataIndex) {
|
|
34
|
-
d3Dataset.push({
|
|
35
|
-
[id]: value
|
|
36
|
-
});
|
|
37
|
-
} else {
|
|
38
|
-
d3Dataset[dataIndex][id] = value;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
} else if (series[id].valueGetter && dataset) {
|
|
42
|
-
// When valueGetter is used without dataKey, populate d3Dataset with the series id as key
|
|
43
|
-
dataset.forEach((entry, dataIndex) => {
|
|
44
|
-
const value = series[id].valueGetter(entry);
|
|
45
|
-
if (d3Dataset.length <= dataIndex) {
|
|
46
|
-
d3Dataset.push({
|
|
47
|
-
[id]: value
|
|
48
|
-
});
|
|
49
|
-
} else {
|
|
50
|
-
d3Dataset[dataIndex][id] = value;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
} else if (dataset === undefined && process.env.NODE_ENV !== 'production') {
|
|
54
|
-
// TODO: fix mui/no-guarded-throw
|
|
55
|
-
// eslint-disable-next-line mui/no-guarded-throw
|
|
56
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Line series with id="${id}" has no data. ` + 'The chart cannot render this series without data. ' + 'Provide a data property to the series or use the dataset prop.' : (0, _formatErrorMessage2.default)(27, id));
|
|
57
|
-
}
|
|
58
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
59
|
-
if (!data && dataset) {
|
|
60
|
-
const dataKey = series[id].dataKey;
|
|
61
|
-
if (!dataKey && !series[id].valueGetter) {
|
|
62
|
-
// TODO: fix mui/no-guarded-throw
|
|
63
|
-
// eslint-disable-next-line mui/no-guarded-throw
|
|
64
|
-
throw new Error(`MUI X Charts: Line series with id="${id}" has no data, no dataKey, and no valueGetter. ` + 'When using the dataset prop, each series must have a dataKey or valueGetter to identify which dataset values to use. ' + 'Add a dataKey or valueGetter property to the series configuration.');
|
|
65
|
-
}
|
|
66
|
-
if (dataKey) {
|
|
67
|
-
dataset.forEach((entry, index) => {
|
|
68
|
-
const value = entry[dataKey];
|
|
69
|
-
if (value != null && typeof value !== 'number') {
|
|
70
|
-
(0, _warning.warnOnce)(`MUI X Charts: your dataset key "${dataKey}" is used for plotting lines, but the dataset contains the non-null non-numerical element "${value}" at index ${index}.
|
|
71
|
-
Line plots only support numeric and null values.`);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
const completedSeries = {};
|
|
79
|
-
stackingGroups.forEach(stackingGroup => {
|
|
80
|
-
const {
|
|
81
|
-
ids,
|
|
82
|
-
stackingOffset,
|
|
83
|
-
stackingOrder
|
|
84
|
-
} = stackingGroup;
|
|
85
|
-
const keys = ids.map(id => {
|
|
86
|
-
// Use dataKey if needed and available
|
|
87
|
-
const dataKey = series[id].dataKey;
|
|
88
|
-
return series[id].data === undefined && dataKey !== undefined ? dataKey : id;
|
|
89
|
-
});
|
|
90
|
-
const stackedData = (0, _d3Shape.stack)().keys(keys).value((d, key) => d[key] ?? 0) // defaultize null value to 0
|
|
91
|
-
.order(stackingOrder).offset(stackingOffset)(d3Dataset);
|
|
92
|
-
const idOrder = stackedData.map(s => s.index);
|
|
93
|
-
const fixedOrder = () => idOrder;
|
|
94
|
-
|
|
95
|
-
// Compute visible stacked data
|
|
96
|
-
const visibleStackedData = (0, _d3Shape.stack)().keys(keys).value((d, key) => {
|
|
97
|
-
const keyIndex = keys.indexOf(key);
|
|
98
|
-
const seriesId = ids[keyIndex];
|
|
99
|
-
if (!isItemVisible?.({
|
|
100
|
-
type: 'line',
|
|
101
|
-
seriesId
|
|
102
|
-
})) {
|
|
103
|
-
// For hidden series, return 0 so they don't contribute to the stack
|
|
104
|
-
return 0;
|
|
105
|
-
}
|
|
106
|
-
return d[key] ?? 0;
|
|
107
|
-
}).order(fixedOrder).offset(stackingOffset)(d3Dataset);
|
|
108
|
-
ids.forEach((id, index) => {
|
|
109
|
-
const {
|
|
110
|
-
dataKey,
|
|
111
|
-
valueGetter
|
|
112
|
-
} = series[id];
|
|
113
|
-
let data;
|
|
114
|
-
if (valueGetter) {
|
|
115
|
-
data = dataset.map(d => valueGetter(d));
|
|
116
|
-
} else if (dataKey) {
|
|
117
|
-
data = dataset.map(d => {
|
|
118
|
-
const value = d[dataKey];
|
|
119
|
-
return typeof value === 'number' ? value : null;
|
|
120
|
-
});
|
|
121
|
-
} else {
|
|
122
|
-
data = series[id].data;
|
|
123
|
-
}
|
|
124
|
-
const hidden = !isItemVisible?.({
|
|
125
|
-
type: 'line',
|
|
126
|
-
seriesId: id
|
|
127
|
-
});
|
|
128
|
-
completedSeries[id] = (0, _extends2.default)({
|
|
129
|
-
labelMarkType: 'line+mark'
|
|
130
|
-
}, series[id], {
|
|
131
|
-
shape: series[id].shape ?? defaultShapes[(idToIndex.get(id) ?? 0) % defaultShapes.length],
|
|
132
|
-
data,
|
|
133
|
-
valueFormatter: series[id].valueFormatter ?? lineValueFormatter,
|
|
134
|
-
hidden,
|
|
135
|
-
stackedData: stackedData[index],
|
|
136
|
-
visibleStackedData: visibleStackedData[index]
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
return {
|
|
141
|
-
seriesOrder,
|
|
142
|
-
stackingGroups,
|
|
143
|
-
series: completedSeries
|
|
144
|
-
};
|
|
145
|
-
}
|
|
7
|
+
var _processLineLikeSeries = require("../../internals/processLineLikeSeries");
|
|
8
|
+
const seriesProcessor = (params, dataset, isItemVisible) => (0, _processLineLikeSeries.processLineLikeSeries)(params, dataset, isItemVisible, 'line');
|
|
146
9
|
var _default = exports.default = seriesProcessor;
|
|
@@ -1,139 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape';
|
|
4
|
-
import { warnOnce } from '@mui/x-internals/warning';
|
|
5
|
-
import { getStackingGroups } from "../../internals/stacking/index.mjs";
|
|
6
|
-
const defaultShapes = ['circle', 'square', 'diamond', 'cross', 'star', 'triangle', 'wye'];
|
|
7
|
-
const lineValueFormatter = v => v == null ? '' : v.toLocaleString();
|
|
8
|
-
function seriesProcessor(params, dataset, isItemVisible) {
|
|
9
|
-
const {
|
|
10
|
-
seriesOrder,
|
|
11
|
-
series
|
|
12
|
-
} = params;
|
|
13
|
-
const stackingGroups = getStackingGroups(_extends({}, params, {
|
|
14
|
-
defaultStrategy: {
|
|
15
|
-
stackOffset: 'none'
|
|
16
|
-
}
|
|
17
|
-
}));
|
|
18
|
-
const idToIndex = new Map();
|
|
19
|
-
// Create a data set with format adapted to d3
|
|
20
|
-
const d3Dataset = dataset ?? [];
|
|
21
|
-
seriesOrder.forEach((id, seriesIndex) => {
|
|
22
|
-
idToIndex.set(id, seriesIndex);
|
|
23
|
-
const data = series[id].data;
|
|
24
|
-
if (data !== undefined) {
|
|
25
|
-
data.forEach((value, dataIndex) => {
|
|
26
|
-
if (d3Dataset.length <= dataIndex) {
|
|
27
|
-
d3Dataset.push({
|
|
28
|
-
[id]: value
|
|
29
|
-
});
|
|
30
|
-
} else {
|
|
31
|
-
d3Dataset[dataIndex][id] = value;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
} else if (series[id].valueGetter && dataset) {
|
|
35
|
-
// When valueGetter is used without dataKey, populate d3Dataset with the series id as key
|
|
36
|
-
dataset.forEach((entry, dataIndex) => {
|
|
37
|
-
const value = series[id].valueGetter(entry);
|
|
38
|
-
if (d3Dataset.length <= dataIndex) {
|
|
39
|
-
d3Dataset.push({
|
|
40
|
-
[id]: value
|
|
41
|
-
});
|
|
42
|
-
} else {
|
|
43
|
-
d3Dataset[dataIndex][id] = value;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
} else if (dataset === undefined && process.env.NODE_ENV !== 'production') {
|
|
47
|
-
// TODO: fix mui/no-guarded-throw
|
|
48
|
-
// eslint-disable-next-line mui/no-guarded-throw
|
|
49
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: Line series with id="${id}" has no data. ` + 'The chart cannot render this series without data. ' + 'Provide a data property to the series or use the dataset prop.' : _formatErrorMessage(27, id));
|
|
50
|
-
}
|
|
51
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
52
|
-
if (!data && dataset) {
|
|
53
|
-
const dataKey = series[id].dataKey;
|
|
54
|
-
if (!dataKey && !series[id].valueGetter) {
|
|
55
|
-
// TODO: fix mui/no-guarded-throw
|
|
56
|
-
// eslint-disable-next-line mui/no-guarded-throw
|
|
57
|
-
throw new Error(`MUI X Charts: Line series with id="${id}" has no data, no dataKey, and no valueGetter. ` + 'When using the dataset prop, each series must have a dataKey or valueGetter to identify which dataset values to use. ' + 'Add a dataKey or valueGetter property to the series configuration.');
|
|
58
|
-
}
|
|
59
|
-
if (dataKey) {
|
|
60
|
-
dataset.forEach((entry, index) => {
|
|
61
|
-
const value = entry[dataKey];
|
|
62
|
-
if (value != null && typeof value !== 'number') {
|
|
63
|
-
warnOnce(`MUI X Charts: your dataset key "${dataKey}" is used for plotting lines, but the dataset contains the non-null non-numerical element "${value}" at index ${index}.
|
|
64
|
-
Line plots only support numeric and null values.`);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
const completedSeries = {};
|
|
72
|
-
stackingGroups.forEach(stackingGroup => {
|
|
73
|
-
const {
|
|
74
|
-
ids,
|
|
75
|
-
stackingOffset,
|
|
76
|
-
stackingOrder
|
|
77
|
-
} = stackingGroup;
|
|
78
|
-
const keys = ids.map(id => {
|
|
79
|
-
// Use dataKey if needed and available
|
|
80
|
-
const dataKey = series[id].dataKey;
|
|
81
|
-
return series[id].data === undefined && dataKey !== undefined ? dataKey : id;
|
|
82
|
-
});
|
|
83
|
-
const stackedData = d3Stack().keys(keys).value((d, key) => d[key] ?? 0) // defaultize null value to 0
|
|
84
|
-
.order(stackingOrder).offset(stackingOffset)(d3Dataset);
|
|
85
|
-
const idOrder = stackedData.map(s => s.index);
|
|
86
|
-
const fixedOrder = () => idOrder;
|
|
87
|
-
|
|
88
|
-
// Compute visible stacked data
|
|
89
|
-
const visibleStackedData = d3Stack().keys(keys).value((d, key) => {
|
|
90
|
-
const keyIndex = keys.indexOf(key);
|
|
91
|
-
const seriesId = ids[keyIndex];
|
|
92
|
-
if (!isItemVisible?.({
|
|
93
|
-
type: 'line',
|
|
94
|
-
seriesId
|
|
95
|
-
})) {
|
|
96
|
-
// For hidden series, return 0 so they don't contribute to the stack
|
|
97
|
-
return 0;
|
|
98
|
-
}
|
|
99
|
-
return d[key] ?? 0;
|
|
100
|
-
}).order(fixedOrder).offset(stackingOffset)(d3Dataset);
|
|
101
|
-
ids.forEach((id, index) => {
|
|
102
|
-
const {
|
|
103
|
-
dataKey,
|
|
104
|
-
valueGetter
|
|
105
|
-
} = series[id];
|
|
106
|
-
let data;
|
|
107
|
-
if (valueGetter) {
|
|
108
|
-
data = dataset.map(d => valueGetter(d));
|
|
109
|
-
} else if (dataKey) {
|
|
110
|
-
data = dataset.map(d => {
|
|
111
|
-
const value = d[dataKey];
|
|
112
|
-
return typeof value === 'number' ? value : null;
|
|
113
|
-
});
|
|
114
|
-
} else {
|
|
115
|
-
data = series[id].data;
|
|
116
|
-
}
|
|
117
|
-
const hidden = !isItemVisible?.({
|
|
118
|
-
type: 'line',
|
|
119
|
-
seriesId: id
|
|
120
|
-
});
|
|
121
|
-
completedSeries[id] = _extends({
|
|
122
|
-
labelMarkType: 'line+mark'
|
|
123
|
-
}, series[id], {
|
|
124
|
-
shape: series[id].shape ?? defaultShapes[(idToIndex.get(id) ?? 0) % defaultShapes.length],
|
|
125
|
-
data,
|
|
126
|
-
valueFormatter: series[id].valueFormatter ?? lineValueFormatter,
|
|
127
|
-
hidden,
|
|
128
|
-
stackedData: stackedData[index],
|
|
129
|
-
visibleStackedData: visibleStackedData[index]
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
return {
|
|
134
|
-
seriesOrder,
|
|
135
|
-
stackingGroups,
|
|
136
|
-
series: completedSeries
|
|
137
|
-
};
|
|
138
|
-
}
|
|
1
|
+
import { processLineLikeSeries } from "../../internals/processLineLikeSeries.mjs";
|
|
2
|
+
const seriesProcessor = (params, dataset, isItemVisible) => processLineLikeSeries(params, dataset, isItemVisible, 'line');
|
|
139
3
|
export default seriesProcessor;
|
|
@@ -4,31 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.axisTooltipGetter = void 0;
|
|
7
|
-
var
|
|
8
|
-
const tooltipGetter = params => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
getColor,
|
|
12
|
-
identifier
|
|
13
|
-
} = params;
|
|
14
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
const label = (0, _getLabel.getLabel)(series.label, 'tooltip');
|
|
18
|
-
const value = series.data[identifier.dataIndex];
|
|
19
|
-
const formattedValue = series.valueFormatter(value, {
|
|
20
|
-
dataIndex: identifier.dataIndex
|
|
21
|
-
});
|
|
22
|
-
return {
|
|
23
|
-
identifier,
|
|
24
|
-
color: getColor(identifier.dataIndex),
|
|
25
|
-
label,
|
|
26
|
-
value,
|
|
27
|
-
formattedValue,
|
|
28
|
-
markType: series.labelMarkType,
|
|
29
|
-
markShape: series.showMark ? series.shape : undefined
|
|
30
|
-
};
|
|
31
|
-
};
|
|
7
|
+
var _getLineLikeTooltip = require("../../internals/getLineLikeTooltip");
|
|
8
|
+
const tooltipGetter = params => (0, _getLineLikeTooltip.getLineLikeTooltip)(params, {
|
|
9
|
+
includeMarkShape: true
|
|
10
|
+
});
|
|
32
11
|
const axisTooltipGetter = series => {
|
|
33
12
|
return Object.values(series).map(s => ({
|
|
34
13
|
direction: 'x',
|
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const tooltipGetter = params => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
getColor,
|
|
6
|
-
identifier
|
|
7
|
-
} = params;
|
|
8
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
const label = getLabel(series.label, 'tooltip');
|
|
12
|
-
const value = series.data[identifier.dataIndex];
|
|
13
|
-
const formattedValue = series.valueFormatter(value, {
|
|
14
|
-
dataIndex: identifier.dataIndex
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
identifier,
|
|
18
|
-
color: getColor(identifier.dataIndex),
|
|
19
|
-
label,
|
|
20
|
-
value,
|
|
21
|
-
formattedValue,
|
|
22
|
-
markType: series.labelMarkType,
|
|
23
|
-
markShape: series.showMark ? series.shape : undefined
|
|
24
|
-
};
|
|
25
|
-
};
|
|
1
|
+
import { getLineLikeTooltip } from "../../internals/getLineLikeTooltip.mjs";
|
|
2
|
+
const tooltipGetter = params => getLineLikeTooltip(params, {
|
|
3
|
+
includeMarkShape: true
|
|
4
|
+
});
|
|
26
5
|
export const axisTooltipGetter = series => {
|
|
27
6
|
return Object.values(series).map(s => ({
|
|
28
7
|
direction: 'x',
|
|
@@ -42,7 +42,9 @@ function useMarkPlotData(xAxes, yAxes) {
|
|
|
42
42
|
shape = 'circle',
|
|
43
43
|
hidden
|
|
44
44
|
} = series[seriesId];
|
|
45
|
-
|
|
45
|
+
|
|
46
|
+
// `'start'` and `'end'` marks are rendered by the `LineHighlightPlot` using the highlight element.
|
|
47
|
+
if (!showMark || showMark === 'start' || showMark === 'end') {
|
|
46
48
|
continue;
|
|
47
49
|
}
|
|
48
50
|
if (!(xAxisId in xAxes) || !(yAxisId in yAxes)) {
|
|
@@ -34,7 +34,9 @@ export function useMarkPlotData(xAxes, yAxes) {
|
|
|
34
34
|
shape = 'circle',
|
|
35
35
|
hidden
|
|
36
36
|
} = series[seriesId];
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
// `'start'` and `'end'` marks are rendered by the `LineHighlightPlot` using the highlight element.
|
|
39
|
+
if (!showMark || showMark === 'start' || showMark === 'end') {
|
|
38
40
|
continue;
|
|
39
41
|
}
|
|
40
42
|
if (!(xAxisId in xAxes) || !(yAxisId in yAxes)) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type ComputedPieRadius, type DefaultizedPieSeriesType } from "../models/seriesType/pie.mjs";
|
|
3
3
|
import { type PieArcLabelProps } from "./PieArcLabel.mjs";
|
|
4
|
+
import type { PieArcLabelPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
4
5
|
export interface PieArcLabelPlotSlots {
|
|
5
|
-
pieArcLabel?: React.JSXElementConstructor<PieArcLabelProps>;
|
|
6
|
+
pieArcLabel?: React.JSXElementConstructor<PieArcLabelProps & PieArcLabelPropsOverrides>;
|
|
6
7
|
}
|
|
7
8
|
export interface PieArcLabelPlotSlotProps {
|
|
8
|
-
pieArcLabel?: Partial<PieArcLabelProps
|
|
9
|
+
pieArcLabel?: Partial<PieArcLabelProps> & PieArcLabelPropsOverrides;
|
|
9
10
|
}
|
|
10
11
|
export interface PieArcLabelPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle' | 'arcLabel' | 'arcLabelMinAngle'>, ComputedPieRadius {
|
|
11
12
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type ComputedPieRadius, type DefaultizedPieSeriesType } from "../models/seriesType/pie.js";
|
|
3
3
|
import { type PieArcLabelProps } from "./PieArcLabel.js";
|
|
4
|
+
import type { PieArcLabelPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
4
5
|
export interface PieArcLabelPlotSlots {
|
|
5
|
-
pieArcLabel?: React.JSXElementConstructor<PieArcLabelProps>;
|
|
6
|
+
pieArcLabel?: React.JSXElementConstructor<PieArcLabelProps & PieArcLabelPropsOverrides>;
|
|
6
7
|
}
|
|
7
8
|
export interface PieArcLabelPlotSlotProps {
|
|
8
|
-
pieArcLabel?: Partial<PieArcLabelProps
|
|
9
|
+
pieArcLabel?: Partial<PieArcLabelProps> & PieArcLabelPropsOverrides;
|
|
9
10
|
}
|
|
10
11
|
export interface PieArcLabelPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle' | 'arcLabel' | 'arcLabelMinAngle'>, ComputedPieRadius {
|
|
11
12
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type PieArcProps } from "./PieArc.mjs";
|
|
3
3
|
import { type ComputedPieRadius, type DefaultizedPieSeriesType, type DefaultizedPieValueType, type PieItemIdentifier } from "../models/seriesType/pie.mjs";
|
|
4
|
+
import type { PieArcPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
4
5
|
export interface PieArcPlotSlots {
|
|
5
|
-
pieArc?: React.JSXElementConstructor<PieArcProps>;
|
|
6
|
+
pieArc?: React.JSXElementConstructor<PieArcProps & PieArcPropsOverrides>;
|
|
6
7
|
}
|
|
7
8
|
export interface PieArcPlotSlotProps {
|
|
8
|
-
pieArc?: Partial<PieArcProps
|
|
9
|
+
pieArc?: Partial<PieArcProps> & PieArcPropsOverrides;
|
|
9
10
|
}
|
|
10
11
|
export interface PieArcPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle'>, ComputedPieRadius {
|
|
11
12
|
/**
|
package/PieChart/PieArcPlot.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type PieArcProps } from "./PieArc.js";
|
|
3
3
|
import { type ComputedPieRadius, type DefaultizedPieSeriesType, type DefaultizedPieValueType, type PieItemIdentifier } from "../models/seriesType/pie.js";
|
|
4
|
+
import type { PieArcPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
4
5
|
export interface PieArcPlotSlots {
|
|
5
|
-
pieArc?: React.JSXElementConstructor<PieArcProps>;
|
|
6
|
+
pieArc?: React.JSXElementConstructor<PieArcProps & PieArcPropsOverrides>;
|
|
6
7
|
}
|
|
7
8
|
export interface PieArcPlotSlotProps {
|
|
8
|
-
pieArc?: Partial<PieArcProps
|
|
9
|
+
pieArc?: Partial<PieArcProps> & PieArcPropsOverrides;
|
|
9
10
|
}
|
|
10
11
|
export interface PieArcPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle'>, ComputedPieRadius {
|
|
11
12
|
/**
|