From e67998e1f477514040c75d321de40b01baa923d7 Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sat, 7 Nov 2020 01:11:52 +0100 Subject: [PATCH] Changed endpoints and db queries, chart now shows suggested mins and maxes --- charts.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts.html b/charts.html index 68c9479..619901f 100644 --- a/charts.html +++ b/charts.html @@ -124,7 +124,7 @@ function startFetchTimeout(chart) { setInterval(async () => { - const newDatum = await fetch("data/1"); + const newDatum = await fetch("data/last/"); const snapshot = (await newDatum.json()).snapshots[0]; chart.data.datasets[0].data.splice(0, 1, {x: snapshot.time, y: snapshot.humidity}); chart.data.datasets[1].data.splice(0, 1, {x: snapshot.time, y: snapshot.temp});