From d26f92a0f110780dcc6e87f155f2b229617bbc72 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Wed, 3 Jul 2024 11:32:47 +0200 Subject: [PATCH] Fix: exchange test data with measurement in plot Signed-off-by: Thomas Klaehn --- webui/src/lib/Uplot.svelte | 2 +- webui/src/routes/sauna/+page.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webui/src/lib/Uplot.svelte b/webui/src/lib/Uplot.svelte index d2f9475..4b95e07 100644 --- a/webui/src/lib/Uplot.svelte +++ b/webui/src/lib/Uplot.svelte @@ -54,7 +54,7 @@ }, { label: data_label, - stroke: "red", + stroke: "#b6b6b6", paths: uPlot.paths.spline(), value: (u, v, sidx, didx) => { if (didx == null) { diff --git a/webui/src/routes/sauna/+page.svelte b/webui/src/routes/sauna/+page.svelte index 27235da..e3df515 100644 --- a/webui/src/routes/sauna/+page.svelte +++ b/webui/src/routes/sauna/+page.svelte @@ -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 => {