From 147a21db2724d8928be1b60e49b47ad00ca42be3 Mon Sep 17 00:00:00 2001 From: Tom Carpenter Date: Tue, 17 Mar 2026 06:25:23 +0000 Subject: [PATCH] Remove duplicate final point in bar statistics-chart (#30175) For bar charts, we don't need to close out the final segment. All this does is produce a duplicate final bar. --- src/components/chart/statistics-chart.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/chart/statistics-chart.ts b/src/components/chart/statistics-chart.ts index 280021742a..604cd09c2c 100644 --- a/src/components/chart/statistics-chart.ts +++ b/src/components/chart/statistics-chart.ts @@ -612,10 +612,10 @@ export class StatisticsChart extends LitElement { } }); - // Close out the last stat segment at prevEndTime + // For line charts, close out the last stat segment at prevEndTime const lastEndTime = prevEndTime; const lastValues = prevValues; - if (lastEndTime && lastValues) { + if (this.chartType === "line" && lastEndTime && lastValues) { statDataSets.forEach((d, i) => { d.data!.push( this._transformDataValue([lastEndTime, ...lastValues[i]!])