Remove extra closing div tag in graphs.html

This commit is contained in:
sietse jonker
2024-03-30 21:46:32 +01:00
parent 726d411321
commit 415a0c456e
2 changed files with 163 additions and 160 deletions

View File

@@ -29,7 +29,6 @@
<body> <body>
<div id="graph1"></div> <div id="graph1"></div>
</div>
<script src="graph-classes.js"></script> <script src="graph-classes.js"></script>
<script src="graph-main.js"></script> <script src="graph-main.js"></script>
</body> </body>

View File

@@ -1,213 +1,217 @@
* { * {
box-sizing: border-box; box-sizing: border-box;
font-family: "Roboto", sans-serif; font-family: "Roboto", sans-serif;
} }
body { body {
padding-top: 5vw; padding-top: 5vw;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100vh; height: 100vh;
margin: 0; margin: 0;
background-color: #f0f0f0; background-color: #f0f0f0;
flex-direction: column; flex-direction: column;
background-color: #afafaf; background-color: #afafaf;
} }
.gaugeGroup { .gaugeGroup {
width: 98vw; width: 98vw;
height: 20vh; height: 20vh;
display: flex; display: flex;
flex-direction: column; /* Keep as column */ flex-direction: column; /* Keep as column */
justify-content: flex-start; justify-content: flex-start;
background-color: #333; background-color: #333;
color: #fff; color: #fff;
padding: 10px; padding: 10px;
border-radius: 50px; border-radius: 50px;
border: 2px solid #333; border: 2px solid #333;
clear: both; clear: both;
margin-bottom: 10px; margin-bottom: 10px;
position: relative; position: relative;
float: top; float: top;
} }
.groupTitle { .groupTitle {
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 24px; font-size: 24px;
} }
.Node { .Node {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.Sensorvalues { .Sensorvalues {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
flex-wrap: wrap; flex-wrap: wrap;
width: 15%; width: 15%;
height: 110%; height: 110%;
background-color: #ddd; background-color: #ddd;
color: #333; color: #333;
padding: 10px; padding: 10px;
margin: 10px; margin: 10px;
border-radius: 10px; border-radius: 10px;
text-align: center; text-align: center;
position: relative; position: relative;
padding-bottom: 6vh; /* Increase bottom padding */ padding-bottom: 6vh; /* Increase bottom padding */
} }
.gaugeContainer { .gaugeContainer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
height: 80%; /* Increase the height from 70% to 80% */ height: 80%; /* Increase the height from 70% to 80% */
position: relative; position: relative;
overflow: visible; overflow: visible;
} }
.gaugeImage { .gaugeImage {
width: 100%; width: 100%;
height: auto; height: auto;
max-height: 200%; max-height: 200%;
object-fit: contain; object-fit: contain;
position: absolute; /* Make the image position absolute */ position: absolute; /* Make the image position absolute */
top: 0; top: 0;
left: 0; left: 0;
z-index: 1; /* Make the image display below the needle */ z-index: 1; /* Make the image display below the needle */
bottom: 0; bottom: 0;
margin-bottom: 10px; margin-bottom: 10px;
} }
.gaugeValue, .gaugeText { .gaugeValue,
width: 100%; .gaugeText {
text-align: center; width: 100%;
font-size: 24px; text-align: center;
z-index: 2; font-size: 24px;
z-index: 2;
} }
.gaugeText { .gaugeText {
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 1.4vw; font-size: 1.4vw;
z-index: 2; z-index: 2;
position: absolute; position: absolute;
bottom: -3.2vw; /* Adjust this value to move the text further down */ bottom: -3.2vw; /* Adjust this value to move the text further down */
} }
.valueContainer { .valueContainer {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-top: 10px; margin-top: 10px;
} }
#valueText { #valueText {
font-size: 20px; font-size: 20px;
} }
.needle { .needle {
position: absolute; position: absolute;
bottom: -40%; /* Lower the needle to the bottom */ bottom: -40%; /* Lower the needle to the bottom */
left: 50%; left: 50%;
width: 2px; width: 2px;
height: 110%; height: 110%;
background-color: black; background-color: black;
transform-origin: bottom; transform-origin: bottom;
z-index: 3; /* Make the needle display above the image */ z-index: 3; /* Make the needle display above the image */
} }
.contentContainer { .contentContainer {
display: flex; display: flex;
flex-direction: row; /* Layout children side by side */ flex-direction: row; /* Layout children side by side */
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.navbar { .navbar {
background-color: #333; background-color: #333;
height: 60px; height: 60px;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 20px; padding: 0 20px;
position: fixed; /* Fix the navbar at the top of the page */ position: fixed; /* Fix the navbar at the top of the page */
top: 0; /* Position it at the very top */ top: 0; /* Position it at the very top */
width: 100%; /* Make it span the full width of the page */ width: 100%; /* Make it span the full width of the page */
z-index: 1000; /* Make sure it's above all other elements */ z-index: 1000; /* Make sure it's above all other elements */
} }
.navbar-nav { .navbar-nav {
list-style: none; list-style: none;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; /* Center the links horizontally */ justify-content: center; /* Center the links horizontally */
height: 100%; height: 100%;
width: 100%; /* Make it span the full width of the navbar */ width: 100%; /* Make it span the full width of the navbar */
} }
.nav-item { .nav-item {
margin-right: 20px; margin-right: 20px;
} }
.nav-link { .nav-link {
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
font-size: 18px; font-size: 18px;
} }
.container { .container {
box-sizing: border-box; display: flex;
display: flex; flex-direction: row;
flex-wrap: wrap; align-items: center;
flex-direction: row; border: 2px solid #ccc;
justify-content: center; border-radius: 10px;
align-items: center; padding: 20px;
border: 2px solid #000000; width: 100%;
border-radius: 10px; box-sizing: border-box;
padding: 20px; }
}
.data-types { .data-types {
flex-direction: column; display: flex;
align-self: self-center; flex-direction: column; /* Display data types in a column */
justify-content: space-between; align-items: flex-start; /* Align to the start of the container */
padding: 20px; text-align: right; /* Align text to the right */
width: 30%; /* Adjust width as needed */ width: 20%; /* Set a fixed width for the data types */
background-color: #f1f1f1; }
}
.date-filter{ .filter {
align-content: center; display: flex;
flex-direction: column; flex-direction: column; /* Display filters in a column */
justify-content: space-between; align-items: center center; /* Align to the center of the container */
/* width: 30%; /* Adjust width as needed */ text-align: center center;
background-color: #f1f1f1; margin-left: 20px; /* Add some space between the data types and filters */
} }
.node-filter{ .date-filter {
align-self: center; flex-direction: column;
justify-content: space-between; align-items: center center;
width: 10%; /* Adjust width as needed */ justify-content: center;
border: none; align-self: center;
border-radius: 4px; width: 30%;
background-color: #f1f1f1; }
}
.filter-button { .node-filter {
width: 100%; align-items: center;
margin-top: 20px; text-align: center;
} justify-content: center;
align-self: flex-end;
width: 20%;
}
/* Additional styling as needed */ .filter-button {
text-align: center;
align-items: center;
justify-content: center;
width: 10%;
margin-top: auto;
}
/* Additional styling as needed */