From 9d4df46d5fccd09d51930ffdafe1b1dfe06a2fdc Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Mon, 17 Mar 2025 10:49:31 +0200 Subject: [PATCH] Fix for 0 values in line chart tooltip (#24658) --- src/components/chart/state-history-chart-line.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chart/state-history-chart-line.ts b/src/components/chart/state-history-chart-line.ts index 79d47fb90d..2eb31f2cd1 100644 --- a/src/components/chart/state-history-chart-line.ts +++ b/src/components/chart/state-history-chart-line.ts @@ -124,7 +124,7 @@ export class StateHistoryChartLine extends LitElement { const data = dataset.data || []; for (let i = data.length - 1; i >= 0; i--) { const point = data[i]; - if (point && point[0] <= time && point[1]) { + if (point && point[0] <= time && typeof point[1] === "number") { lastData = point; break; }