From 8e0ed288e140f46a03b2dd68bc14b86d75f859c9 Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Mon, 21 Jul 2025 11:57:18 +0300 Subject: [PATCH] Tweak the color of sum/change lines in statistics chart (#26242) --- src/components/chart/statistics-chart.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/chart/statistics-chart.ts b/src/components/chart/statistics-chart.ts index a92ae83a50..c3df607bf6 100644 --- a/src/components/chart/statistics-chart.ts +++ b/src/components/chart/statistics-chart.ts @@ -478,6 +478,8 @@ export class StatisticsChart extends LitElement { this.statTypes.includes("min") && statisticsHaveType(stats, "min"); const drawBands = [hasMean, hasMax, hasMin].filter(Boolean).length > 1; + const hasState = this.statTypes.includes("state"); + const bandTop = hasMax ? "max" : "mean"; const bandBottom = hasMin ? "min" : "mean"; @@ -499,7 +501,8 @@ export class StatisticsChart extends LitElement { const band = drawBands && (type === bandTop || type === bandBottom); statTypes.push(type); const borderColor = - band && hasMin && hasMax && hasMean + (band && hasMin && hasMax && hasMean) || + (hasState && ["change", "sum"].includes(type)) ? color + (this.hideLegend ? "00" : "7F") : color; const backgroundColor = band ? color + "3F" : color + "7F";