mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-02 08:33:31 +01:00
Use boundaryFilter data zoom mode only for line charts (#51307)
This commit is contained in:
committed by
Bram Kragten
parent
1ef13c5100
commit
2c5f491c9e
@@ -590,7 +590,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,
|
||||
|
||||
Reference in New Issue
Block a user