fix(mixed-timeseries-plugin): Second query stacks stacked on top of first query series (#29119)

This commit is contained in:
Kamil Gabryjelski
2024-06-10 12:22:35 +02:00
committed by GitHub
parent 5660f8e554
commit 68fd189586
3 changed files with 168 additions and 0 deletions

View File

@@ -392,6 +392,7 @@ export default function transformProps(
seriesType,
showValue,
stack: Boolean(stack),
stackIdSuffix: '\na',
yAxisIndex,
filterState,
seriesKey: entry.name,
@@ -438,6 +439,7 @@ export default function transformProps(
seriesType: seriesTypeB,
showValue: showValueB,
stack: Boolean(stackB),
stackIdSuffix: '\nb',
yAxisIndex: yAxisIndexB,
filterState,
seriesKey: primarySeries.has(entry.name as string)

View File

@@ -151,6 +151,7 @@ export function transformSeries(
areaOpacity?: number;
seriesType?: EchartsTimeseriesSeriesType;
stack?: StackType;
stackIdSuffix?: string;
yAxisIndex?: number;
showValue?: boolean;
onlyTotal?: boolean;
@@ -179,6 +180,7 @@ export function transformSeries(
areaOpacity = 1,
seriesType,
stack,
stackIdSuffix,
yAxisIndex = 0,
showValue,
onlyTotal,
@@ -225,6 +227,9 @@ export function transformSeries(
} else if (stack && isTrend) {
stackId = getTimeCompareStackId(forecastSeries.type, timeCompare, name);
}
if (stackId && stackIdSuffix) {
stackId += stackIdSuffix;
}
let plotType;
if (
!isConfidenceBand &&