From a03b30029d9654536cc3dede84ccf72f19e0fb2c Mon Sep 17 00:00:00 2001 From: Serhii Orlivskyi Date: Fri, 9 Jan 2026 22:48:50 +0100 Subject: [PATCH] Dashboard: Fix charts skipping 0 values Signed-off-by: Serhii Orlivskyi (Cedalo GmbH) --- dashboard/src/app/dashboard.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dashboard/src/app/dashboard.js b/dashboard/src/app/dashboard.js index 38a3feb3..57c617c1 100644 --- a/dashboard/src/app/dashboard.js +++ b/dashboard/src/app/dashboard.js @@ -1350,10 +1350,10 @@ class MosquittoDashboard { lastDataPoint, isUpdatingAllCharts, ) { - if (datapoint || isUpdatingAllCharts) { + if (datapoint !== undefined || isUpdatingAllCharts) { this.updateChartInner( id, - datapoint || lastDataPoint, + datapoint !== undefined ? datapoint : lastDataPoint, timestampMilliseconds, dashboardDataObject, ); @@ -1368,7 +1368,11 @@ class MosquittoDashboard { firstSubChartId, secondSubChartId, ) { - if (firstChartDatapoint || secondChartDatapoint || isUpdatingAllCharts) { + if ( + firstChartDatapoint !== undefined || + secondChartDatapoint !== undefined || + isUpdatingAllCharts + ) { this.updateOverviewChartInner(id, firstSubChartId, secondSubChartId); } }