fixed first datapoint

This commit is contained in:
Ralf Bauer 2023-06-06 21:29:47 +02:00
parent 9b417f3592
commit 831cecc52c
3 changed files with 2 additions and 1 deletions

1
webapp/.yarnrc.yml Normal file
View File

@ -0,0 +1 @@
nodeLinker: node-modules

View File

@ -60,7 +60,7 @@ export default defineComponent({
data = [['Time', 'Energy']];
energy.forEach((x: any[]) => {
var d = new Date(x[0] + 2000, x[1] - 1, x[2], x[3]);
if ((d >= start) && (d <= end)) {
if ((d >= start) && (d <= end) && (old_energy > 0.0)) {
data.push([d, Math.round((x[4] - old_energy) * 1000)])
}
old_energy = x[4]

Binary file not shown.