Fix updateGraph() method in DataProcessor class
This commit is contained in:
@@ -67,7 +67,7 @@ class Graph {
|
||||
x: [this.timeArray],
|
||||
y: [this.tempArray, this.humiArray, this.eco2Array, this.tvocArray],
|
||||
};
|
||||
|
||||
|
||||
Plotly.update(this.id, update);
|
||||
}
|
||||
}
|
||||
@@ -140,10 +140,12 @@ class DataProcessor {
|
||||
}
|
||||
|
||||
updateGraph() {
|
||||
for (let i = 0; i < this.data.length; i++) {
|
||||
this.graph.updateData(this.data[i].Type, this.data[i].Value, this.data[i].TimeStamp);
|
||||
console.log(this.data[i].Type, this.data[i].Value, this.data[i].TimeStamp);
|
||||
this.graph.updateGraph();
|
||||
for (let i = 0; i < this.data.length; i + 3) {
|
||||
for (let i = 0; i < 4; i++) {
|
||||
this.graph.updateData(this.data[i].Type, this.data[i].Value, this.data[i].TimeStamp);
|
||||
console.log(this.data[i].Type, this.data[i].Value, this.data[i].TimeStamp);
|
||||
this.graph.updateGraph();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user