fix(echarts): Series labels hard to read in dark mode (#34815)

This commit is contained in:
Kamil Gabryjelski
2025-08-25 14:03:00 +02:00
committed by GitHub
parent 5c3c2599db
commit 547f297171
3 changed files with 7 additions and 0 deletions

View File

@@ -450,6 +450,7 @@ export default function transformProps(
showValueIndexes: showValueIndexesA,
thresholdValues,
timeShiftColor,
theme,
},
);
if (transformedSeries) series.push(transformedSeries);
@@ -516,6 +517,7 @@ export default function transformProps(
showValueIndexes: showValueIndexesB,
thresholdValues: thresholdValuesB,
timeShiftColor,
theme,
},
);
if (transformedSeries) series.push(transformedSeries);

View File

@@ -331,6 +331,7 @@ export default function transformProps(
lineStyle,
timeCompare: array,
timeShiftColor,
theme,
},
);
if (transformedSeries) {

View File

@@ -168,6 +168,7 @@ export function transformSeries(
queryIndex?: number;
timeCompare?: string[];
timeShiftColor?: boolean;
theme?: SupersetTheme;
},
): SeriesOption | undefined {
const { name, data } = series;
@@ -197,6 +198,7 @@ export function transformSeries(
queryIndex = 0,
timeCompare = [],
timeShiftColor,
theme,
} = opts;
const contexts = seriesContexts[name || ''] || [];
const hasForecast =
@@ -323,6 +325,8 @@ export function transformSeries(
label: {
show: !!showValue,
position: isHorizontal ? 'right' : 'top',
color: theme?.colorText,
textBorderWidth: 0,
formatter: (params: any) => {
// don't show confidence band value labels, as they're already visible on the tooltip
if (