From f5496c21e8e59f11da607da0e4af0b7e827f9e9d Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 31 Mar 2025 03:13:03 -0700 Subject: [PATCH] Bar charts start from 0 (#24854) --- src/components/chart/statistics-chart.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/chart/statistics-chart.ts b/src/components/chart/statistics-chart.ts index 15353a1034..0bec8532ec 100644 --- a/src/components/chart/statistics-chart.ts +++ b/src/components/chart/statistics-chart.ts @@ -296,7 +296,11 @@ export class StatisticsChart extends LitElement { align: "left", }, position: computeRTL(this.hass) ? "right" : "left", - scale: true, + scale: + this.chartType !== "bar" || + this.logarithmicScale || + minYAxis !== undefined || + maxYAxis !== undefined, min: this._clampYAxis(minYAxis), max: this._clampYAxis(maxYAxis), splitLine: {