From 6dba158ff04d15a5d59ebcc81f115cf3b60cdfee Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sat, 7 Nov 2020 16:32:40 +0100 Subject: [PATCH] Changed endpoints and db queries, chart now shows suggested mins and maxes --- charts.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts.html b/charts.html index 355f214..e1c748b 100644 --- a/charts.html +++ b/charts.html @@ -2,7 +2,7 @@ - Ledda's Rooms Climate + Ledda's Room Climate @@ -134,14 +134,14 @@ removeExpiredData(chart, snapshot.time); insertSnapshot(chart, snapshot); } - }, 10 * 1000); + }, 30 * 1000); } function insertSnapshot(chart, snapshot) { chart.data.datasets[0].data.push({x: snapshot.time, y: snapshot.humidity}); chart.data.datasets[1].data.push({x: snapshot.time, y: snapshot.temp}); chart.data.datasets[2].data.push({x: snapshot.time, y: snapshot.co2}); - chart.update(0); + chart.update(); } function removeExpiredData(chart, latestTime) {