From ae21017de8b24cb2e9c60b5628300018d4d82d0a Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Tue, 31 Mar 2026 12:44:52 +0200 Subject: [PATCH] Use boundaryFilter data zoom mode only for line charts (#51307) --- src/components/chart/ha-chart-base.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/chart/ha-chart-base.ts b/src/components/chart/ha-chart-base.ts index 62f801d14b..abef4002b9 100644 --- a/src/components/chart/ha-chart-base.ts +++ b/src/components/chart/ha-chart-base.ts @@ -609,7 +609,10 @@ export class HaChartBase extends LitElement { // "boundaryFilter" is a custom mode added via axis-proxy-patch.ts. // It rescales the Y-axis to the visible data while keeping one point // just outside each boundary to avoid line gaps at the zoom edges. - filterMode: "boundaryFilter" as any, + // Only use it for line charts — it causes issues with bar charts. + filterMode: (ensureArray(this.data).every((s) => s.type === "line") + ? "boundaryFilter" + : "filter") as any, xAxisIndex: 0, moveOnMouseMove: !this._isTouchDevice || this._isZoomed, preventDefaultMouseMove: !this._isTouchDevice || this._isZoomed,