mirror of
https://github.com/apache/superset.git
synced 2026-04-23 10:04:45 +00:00
feat: Make time shifted series colors match the original series (#24048)
This commit is contained in:
committed by
GitHub
parent
ea5d0cc74e
commit
df4d16a7ee
@@ -51,7 +51,6 @@ import {
|
||||
MarkArea2DDataItemOption,
|
||||
} from 'echarts/types/src/component/marker/MarkAreaModel';
|
||||
import { MarkLine1DDataItemOption } from 'echarts/types/src/component/marker/MarkLineModel';
|
||||
|
||||
import { extractForecastSeriesContext } from '../utils/forecast';
|
||||
import {
|
||||
EchartsTimeseriesSeriesType,
|
||||
@@ -144,6 +143,7 @@ export const getBaselineSeriesForStream = (
|
||||
export function transformSeries(
|
||||
series: SeriesOption,
|
||||
colorScale: CategoricalColorScale,
|
||||
colorScaleKey: string,
|
||||
opts: {
|
||||
area?: boolean;
|
||||
filterState?: FilterState;
|
||||
@@ -186,7 +186,6 @@ export function transformSeries(
|
||||
showValueIndexes = [],
|
||||
thresholdValues = [],
|
||||
richTooltip,
|
||||
seriesKey,
|
||||
sliceId,
|
||||
isHorizontal = false,
|
||||
queryIndex = 0,
|
||||
@@ -236,7 +235,7 @@ export function transformSeries(
|
||||
}
|
||||
// forcing the colorScale to return a different color for same metrics across different queries
|
||||
const itemStyle = {
|
||||
color: colorScale(seriesKey || forecastSeries.name, sliceId),
|
||||
color: colorScale(colorScaleKey, sliceId),
|
||||
opacity,
|
||||
};
|
||||
let emphasis = {};
|
||||
|
||||
Reference in New Issue
Block a user