-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (43 loc) · 1.33 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>windrosechart</title>
<meta charset="utf-8" />
<script src="windrose.js"></script>
<style>
#windrose, #log {
display: inline-block;
}
#windrose {
border: 1px solid gray;
}
#log {
width: 225px;
background-color: gray;
}
</style>
</head>
<body>
<div id="windrose" style="width: calc(100% - 250px); height: 600px;"></div>
<div id="log"></div>
<a href="" onclick="windRose.draw(); return false;">draw()</a>
<a href="" onclick="windRose.clear(); return false;">clear()</a>
<a href="" onclick="windRose.resize(); return false;">resize()</a>
<a href="" onclick="windRose.element.style.height = windRose.element.style.height === '600px' ? '800px' : '600px'; return false;">toggle height</a>
<script>
var windRose = new WindRose({
id: "windrose",
data: {
titles: ["A", "B", "C", "D", "E"],
colors: ["red", "green", "orange"],
series: [
[3, 6, 3, 7, 1],
[3, 5, 8, 1, 7],
[4, 2, 7, 2, 0]
]
}
}).draw();
</script>
</body>
</html>