forked from tomnomnom/tacho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (46 loc) · 1.19 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
<!doctype html>
<html lang="en">
<head>
<title>Tacho Tuesday</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
body {
background-color: #323232;
}
section {
text-align: center;
}
canvas {
padding: 1em;
}
</style>
</head>
<body>
<section class="main">
<canvas id="demo" width="400" height="400" data-val="0">No canvas</canvas>
</section>
<div style="text-align: center;">
<input type="range" id="demoInput" min="0" max="100" value="0">
</div>
<script src="tacho.js"></script>
<script>
window.onload = function(){
var demo = document.getElementById('demo');
tacho(demo, {
"title": "Widgets Per Second",
"max": 100,
"min": 0,
"markInterval": 2,
"bigMarkInterval": 10,
"redLinePoint": 0.85,
"autoScale": false
});
var demoInput = document.getElementById('demoInput');
demoInput.oninput = function(e){
console.log(this.value);
demo.setAttribute('data-val', this.value);
};
};
</script>
</body>
</html>