1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Use boundaryFilter data zoom mode only for line charts (#51307)

This commit is contained in:
Petar Petrov
2026-03-31 12:44:52 +02:00
committed by GitHub
parent f15f518cc2
commit ae21017de8

View File

@@ -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,