fix(Explore): Force different color for same metrics in Mixed Time-Series (#18603)

* Force different color for same metrics

* Conform to chart labels suffix

* Simplify
This commit is contained in:
Geido
2022-02-10 16:21:47 +02:00
committed by GitHub
parent bd0b9f25e4
commit f565230d8d
2 changed files with 9 additions and 1 deletions

View File

@@ -175,9 +175,11 @@ export default function transformProps(
stack,
yAxisIndex,
filterState,
seriesKey: entry.name,
});
if (transformedSeries) series.push(transformedSeries);
});
rawSeriesB.forEach(entry => {
const transformedSeries = transformSeries(entry, colorScale, {
area: areaB,
@@ -189,6 +191,9 @@ export default function transformProps(
stack: stackB,
yAxisIndex: yAxisIndexB,
filterState,
seriesKey: primarySeries.has(entry.name as string)
? `${entry.name} (1)`
: entry.name,
});
if (transformedSeries) series.push(transformedSeries);
});