From 87246917161ab8f0dbca24ff5f16e67dcf728aeb Mon Sep 17 00:00:00 2001 From: Sietse Jonker Date: Tue, 2 Apr 2024 14:15:31 +0200 Subject: [PATCH] Update graph creation and styling --- web/newWebsite/graph-classes.js | 4 ++-- web/newWebsite/graphs.html | 2 ++ web/newWebsite/styles/graph-styles.css | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/web/newWebsite/graph-classes.js b/web/newWebsite/graph-classes.js index 9700ab0..491ecae 100644 --- a/web/newWebsite/graph-classes.js +++ b/web/newWebsite/graph-classes.js @@ -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() { diff --git a/web/newWebsite/graphs.html b/web/newWebsite/graphs.html index d4b62cc..18f4f4e 100644 --- a/web/newWebsite/graphs.html +++ b/web/newWebsite/graphs.html @@ -31,5 +31,7 @@ + +
\ No newline at end of file diff --git a/web/newWebsite/styles/graph-styles.css b/web/newWebsite/styles/graph-styles.css index 370617f..5d88644 100644 --- a/web/newWebsite/styles/graph-styles.css +++ b/web/newWebsite/styles/graph-styles.css @@ -111,6 +111,8 @@ body { align-self: center; width: 95%; height: 100%; + border-radius: 20px; + border: 2px solid #000; margin: 10px; } /* Additional styling as needed */