/
groupBarTest.html
51 lines (51 loc) · 1.12 KB
/
groupBarTest.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>GroupBar</title>
<link rel="stylesheet" type="text/css" href="css/frost.css">
</head>
<body>
<div id="node"></div>
<script type="text/javascript" src="lib/d3.v3.min.js"></script>
<script type="text/javascript" src="lib/frost.min.js" charset="utf-8"></script>
<script type="text/javascript">
var frost = new Frost.Graph({
element: "#node",
width: 500,
height: 300,
type: "bar",
stack: false,
// 1直接 2 需要转化
barType: 2,
series: [
{
color: "lightblue",
data: [
{value: 10,name: "一月"},
{value: 13,name: "二月"},
{value: 10,name: "三月"},
{value: 40,name: "四月"},
{value: 13,name: "五月"},
],
name: "Country"
},
{
color: 'steelblue',
data: [
{value: 6,name: "一月"},
{value: 20,name: "二月"},
{value: 20,name: "三月"},
{value: 50,name: "四月"}
],
name: "Village"
}],
xAxis: true,
yAxis: true,
legend: true,
hasDetail: true
});
frost.render();
</script>
</body>
</html>