Update graph colors and scale for temperature, eCO2, and TVOC
This commit is contained in:
@@ -17,7 +17,7 @@ class liveGraph {
|
||||
x: this.timeArray, // Use timeArray as x values
|
||||
y: this.tempArray,
|
||||
mode: "lines",
|
||||
line: { color: "#80CAF6" },
|
||||
line: { color: "#FF0000" },
|
||||
name: "Temperature",
|
||||
},
|
||||
]);
|
||||
@@ -35,8 +35,8 @@ class liveGraph {
|
||||
x: this.timeArray, // Use timeArray as x values
|
||||
y: this.eco2Array,
|
||||
mode: "lines",
|
||||
line: { color: "#80CAF6" },
|
||||
name: "eCO2",
|
||||
line: { color: "#FFA500" },
|
||||
name: "eCO2 / 10",
|
||||
},
|
||||
]);
|
||||
Plotly.plot(this.nodeId, [
|
||||
@@ -44,8 +44,8 @@ class liveGraph {
|
||||
x: this.timeArray, // Use timeArray as x values
|
||||
y: this.tvocArray,
|
||||
mode: "lines",
|
||||
line: { color: "#80CAF6" },
|
||||
name: "TVOC",
|
||||
line: { color: "#000000" },
|
||||
name: "TVOC / 10",
|
||||
},
|
||||
]);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class liveGraph {
|
||||
// Update the graph
|
||||
this.tempArray.push(temperature);
|
||||
this.humiArray.push(humidity);
|
||||
this.eco2Array.push(eCO2);
|
||||
this.tvocArray.push(TVOC);
|
||||
this.eco2Array.push(eCO2 / 10);
|
||||
this.tvocArray.push(TVOC / 10);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user