Fix: exchange test data with measurement in plot

Signed-off-by: Thomas Klaehn <thomas.klaehn@perinet.io>
This commit is contained in:
Thomas Klaehn 2024-07-03 11:32:47 +02:00
parent 5822328d9d
commit d26f92a0f1
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@
},
{
label: data_label,
stroke: "red",
stroke: "#b6b6b6",
paths: uPlot.paths.spline(),
value: (u, v, sidx, didx) => {
if (didx == null) {

View File

@ -19,7 +19,7 @@
temperature_value = data.value
time = data.time.slice(11, 19)
if(plot) {
plot.add_data(Math.floor(Math.random() * 30) - 15);
plot.add_data(temperature_value);
}
updated = JSON.parse(data.valid);
}).catch(error => {