Update graph creation and styling

This commit is contained in:
Sietse Jonker
2024-04-02 14:15:31 +02:00
parent 4edbe2312a
commit 8724691716
3 changed files with 6 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ class Graph {
makeGraph(line, lineColor, name) {
let div = document.createElement("div");
div.setAttribute("id", this.id);
document.body.appendChild(div);
document.graphBody.appendChild(div);
let lineArray;
switch (line) {
case "temp":
@@ -135,7 +135,7 @@ class DataProcessor {
this.graph.makeGraph("temp", "red", "Temperature");
this.graph.makeGraph("humi", "blue", "Humidity");
this.graph.makeGraph("eco2", "green", "eCO2");
this.graph.makeGraph("tvoc", "#F5G644", "TVOC");
this.graph.makeGraph("tvoc", "black", "TVOC");
}
updateGraph() {