always zoom timeline charts on x axis (#23554)

This commit is contained in:
Bram Kragten 2025-01-02 16:11:50 +01:00 committed by GitHub
parent 0fba0e2850
commit f19ca78b89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -433,7 +433,10 @@ export class HaChartBase extends LitElement {
speed: 0.05,
},
mode:
(this.options?.scales?.y as any)?.type === "category" ? "y" : "x",
this.chartType !== "timeline" &&
(this.options?.scales?.y as any)?.type === "category"
? "y"
: "x",
onZoomComplete: () => {
const isZoomed = this.chart?.isZoomedOrPanned() ?? false;
if (this._isZoomed && !isZoomed) {