This repository was archived by the owner on Apr 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweather.html
More file actions
84 lines (80 loc) · 3.03 KB
/
weather.html
File metadata and controls
84 lines (80 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CruTech Weather Station</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
<script src="js/weather.js"></script>
<script src="js/Chart.js"></script>
</head>
<body>
<div class="wrapper">
<div class="header">
<h1>CruTech Weather Station</h1>
<p>Weather Stuff and Things</p>
</div>
<div class="nav">
<button><a href="index.html">Back To Home</a></button>
</div>
<div class="content">
<br>
<div class="data">
<p>Temprature: <span id="temp">Loading...</span></p>
<p>Humidity: <span id="humidity">Loading...</span></p>
<p>Pressure: <span id="pressure">Loading...</span></p>
<p>Last Update: <span id="lastupdate">Loading...</span></p>
</div>
<br>
<div class="chart">
<canvas id="myChart" width="600" height="400"></canvas>
<script>
var ctx = document.getElementById("myChart").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: [
"Temprature",
"Humidity",
"Pressure"
],
datasets: [{
label: [
'Temprature',
'Humidity',
'Pressure'
],
data: [12, 19, 3, 5, 2, 3],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)'
],
borderColor: [
'rgba(255,99,132,1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)'
],
borderWidth: 3
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});
</script>
</div>
</div>
<br>
<div class="footer">
<p>© CruTech Summer 2018 | Web Design & Development Elective</p>
</div>
</div>
</div>
</body>
</html>