Changed endpoints and db queries, chart now shows suggested mins and maxes
This commit is contained in:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user