-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtester.html
92 lines (79 loc) · 1.52 KB
/
tester.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Doughnuts testing</title>
<script src="lib/jquery-2.1.3.min.js"></script>
<script src="lib/chart.min.js"></script>
<script src="pretty-doughtnut.js"></script>
<style>
body {
margin: 0;
}
.margin {
margin-top: 5px;
margin-bottom: 1px;
margin-left: 20px;
margin-right: 20px;
}
canvas {
z-index: 100;
}
.labelPercentage {
font-size: x-large;
}
.labelText {
font-size: small;
color: #CCCCCC;
}
.labelContainer {
display: block;
text-align: center;
width: 100px;
font-family: Helvetica;
}
</style>
<script>
$(window).load(function() {
doughnutWidget.options = {
container: $('#container'),
width: 100,
height: 100,
class: 'myClass',
cutout: 50
};
doughnutWidget.render(data());
setInterval(init, 2000);
});
function init() {
doughnutWidget.render(data());
}
function data() {
var data = {
pending: {
val: Math.round(Math.random() * 100),
color: '#57B4F2',
click: function(e) {
console.log('hi');
}
},
delivered: {
val: Math.round(Math.random() * 100),
color: '#6DED5C'
},
delayed: {
val: Math.round(Math.random() * 100),
color: '#E63329',
link: 'http://www.google.com'
}
};
return data;
}
</script>
</head>
<body>
<div id="container" class="margin" role="group"></div>
</body>
</html>