Skip to content

Commit

Permalink
always zoom timeline charts on x axis (#23554)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Jan 2, 2025
1 parent 4a16d9b commit 8f58681
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/chart/ha-chart-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8f58681

Please sign in to comment.