Update public/trends.html

This commit is contained in:
JoshBaneyCS 2025-04-30 06:26:50 +00:00
parent 17444fec63
commit 15fba9cb7b

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<title>Trends Fuego Heat Tracker</title> <title>Trends Fuego Heat Tracker</title>
<link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="/styles.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head> </head>
<body> <body>
@ -20,37 +20,45 @@
<div class="page-container"> <div class="page-container">
<h1>Trends</h1> <h1>Trends</h1>
<div style="display:flex;align-items:center;margin-bottom:1rem;"> <!-- Timeframe slider -->
<input id="timeframe-slider" type="range" min="0" max="4" value="0" style="flex:1"> <div style="display:flex; align-items:center; margin-bottom:1rem;">
<span id="timeframe-label" style="margin-left:1rem;white-space:nowrap"></span> <input id="timeframe-slider" type="range" min="0" max="4" value="0" style="flex:1;">
<span id="timeframe-label" style="margin-left:1rem; white-space:nowrap;"></span>
</div> </div>
<div style="margin-bottom:1rem"> <!-- Metric toggles -->
<div style="margin-bottom:1rem;">
<label><input type="checkbox" name="metric" value="temperature" checked> Temperature</label> <label><input type="checkbox" name="metric" value="temperature" checked> Temperature</label>
<label><input type="checkbox" name="metric" value="humidity" checked> Humidity</label> <label><input type="checkbox" name="metric" value="humidity" checked> Humidity</label>
<label><input type="checkbox" name="metric" value="heatIndex" checked> Heat Index</label> <label><input type="checkbox" name="metric" value="heatIndex" checked> Heat Index</label>
</div> </div>
<div id="chart-container" style="height:50vh;width:100%;margin-bottom:2rem"> <!-- Chart -->
<div id="chart-container">
<canvas id="trend-chart"></canvas> <canvas id="trend-chart"></canvas>
</div> </div>
<table id="trends-table" style="width:100%;border-collapse:collapse"> <!-- Scrollable, sortable data table -->
<thead> <div id="trends-table-container">
<tr> <table id="trends-table">
<th class="sortable">Date / Time</th> <thead>
<th class="sortable">Temperature (°F)</th> <tr>
<th class="sortable">Humidity (%)</th> <th class="sortable">Date / Time</th>
<th class="sortable">Heat Index (°F)</th> <th class="sortable">Temperature (°F)</th>
<th class="sortable">Station/Dock Door</th> <th class="sortable">Humidity (%)</th>
<th class="sortable">Location</th> <th class="sortable">Heat Index (°F)</th>
</tr> <th class="sortable">Station/Dock Door</th>
</thead> <th class="sortable">Location</th>
<tbody id="trends-table-body"></tbody> </tr>
</table> </thead>
<tbody id="trends-table-body"></tbody>
</table>
</div>
</div> </div>
<!-- Serverinjected initial data -->
<!--INITIAL_DATA--> <!--INITIAL_DATA-->
<script src="/scripts/trends.js"></script> <script src="/scripts/trends.js"></script>
</body> </body>
</html> </html>