bugfix: only accept data later than the last entry of the dataset (tempchart)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
1 parent
f147dc7810
commit
0dfb06d656
1 file changed
+9
-4
@@ -27,10 +27,15 @@ export default {
|
||||
])
|
||||
}
|
||||
} else {
|
||||
dataset.data.push([
|
||||
payload.time,
|
||||
Math.round(payload.value * multi * 100)/100
|
||||
])
|
||||
if (
|
||||
dataset.data.length &&
|
||||
dataset.data[dataset.data.length-1][0] < payload.time
|
||||
) {
|
||||
dataset.data.push([
|
||||
payload.time,
|
||||
Math.round(payload.value * multi * 100)/100
|
||||
])
|
||||
}
|
||||
|
||||
let i
|
||||
const timeOld = new Date().getTime() - (1000 * payload.maxHistory)
|
||||
|
||||
Reference in new issue
Block a user