-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
159 lines (148 loc) · 4.11 KB
/
index.html
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, shrink-to-fit=no" />
<link rel="stylesheet" href="./materialize/css/materialize.css" />
<link rel="icon" type="image/x-icon" href="./materialize/icon.png" />
<link rel="stylesheet" href="style.css" />
<script src="./materialize/js/materialize.js"></script>
<title>Ringo Rain Gauge</title>
<script>
var chart = null;
var dataPoints = [];
var dataPoints2 = [];
document.addEventListener("DOMContentLoaded", function () {
if (!document.documentMode) {
// https://github.com/Dogfalo/materialize/issues/5801
M.Materialbox.init(document.querySelectorAll(".materialboxed"));
}
});
window.onload = function () {
chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
theme: "dark2",
title: {
text: "Weekly Rain Data",
},
axisY: {
title: "Volume (Inches)",
titleFontSize: 24,
},
data: [
{
type: "column",
yValueFormatString: "#,###.## Inches",
dataPoints: dataPoints,
},
{
type: "column",
yValueFormatString: "#,###.## Inches Cube",
dataPoints: dataPoints2,
},
],
});
$.getJSON("./data.json", callback);
};
function callback(data) {
for (var i = 0; i < data.dps.length; i++) {
dataPoints.push({
x: new Date(data.dps[i].date),
y: data.dps[i].units,
});
dataPoints2.push({
x: new Date(data.dps[i].date),
y: Math.PI * 2.25 ** 2 * data.dps[i].units,
});
}
chart.render();
}
</script>
</head>
<body class="grey darken-4" style="font-family: Helvetica, Arial, sans-serif !important">
<nav>
<div class="nav-wrapper grey darken-2">
<a href="#" class="brand-logo center">Ringo Rain Gauge</a>
<ul id="nav-mobile" class="left hide-on-med-and-down">
<li><a href="https://ringomar.github.io/">PROJECTS</a></li>
</ul>
</div>
</nav>
<main>
<div class="flex-container">
<div class="sidenavv">
<ul class="navbtn">
<li>
<a href="#about">About</a>
</li>
<li>
<a href="#stats">Stats</a>
</li>
<li>
<a href="#img">Images</a>
</li>
<li>
<a href="#chart">Chart</a>
</li>
</ul>
</div>
<div class="content markdown">
<h1 class="blue-text darken-4" id="about">ABOUT</h1>
<p class="white-text">
The main objective of this project is to keep a weekly recoding of
the rains through out the dry season of 2022. Also testing out a few
theories on night chill and the soil moisture. Weeks start at every
Woo Back Wednesday.<br />
Recording start: 22/1/27
</p>
<h1 class="blue-text darken-4">Gauge Statistics</h1>
<p class="white-text">
<ol style="list-style-type: circle" class="white-text">
<ul>
► 4.5In Diameter
</ul>
<ul>
► 5.8In Measure Offset
</ul>
<ul>
► 5.2In Measurement Height
</ul>
<ul>
► 41.8In Offset from floor
</ul>
</ol>
</p>
<h1 class="blue-text darken-4" id="img">Images</h1>
<div class="row" id="chart">
<div class="col">
<img class="materialboxed" data-caption="A picture of the real rain gauge" width="220"
src="img1.jpg" />
</div>
<div class="col">
<img class="materialboxed" data-caption="Front view of the rain gauge" width="220"
src="img3.jpg" />
</div>
<div class="col">
<img class="materialboxed" data-caption="Close up view of scale and measurements" width="220"
src="img2.jpg" />
</div>
</div>
<h1 class="blue-text darken-4">Chart</h1>
<div class="row">
<div class="col">
<div class="box1"></div>
<p class="white-text">Height of water</p>
</div>
<div class="col">
<div class="box2"></div>
<p class="white-text">Volume of rain gauge</p>
</div>
</div>
<div id="chartContainer" style="height: auto; max-width: px; margin: 0px auto"></div>
</div>
</div>
</main>
<script src="https://canvasjs.com/assets/script/jquery-1.11.1.min.js"></script>
<script src="canvasjs.min.js"></script>
</body>
</html>