/
lineTest.html
52 lines (52 loc) · 1.2 KB
/
lineTest.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Line</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: "line",
lineType: "linear",
isXLinear: false,
series: [
{
color: "steelblue",
data: [
{x: 0, value: 10,name: "一月"},
{x: 1, value: 13,name: "二月"},
{x: 2, value: 18,name: "三月"},
{x: 3, value: 24,name: "四月"},
{x: 4, value: 30,name: "五月"},
],
name: "Country"
},
{
color: "lightblue",
data: [
{x: 0, value: 8,name: "一月"},
{x: 1, value: 12,name: "二月"},
{x: 2, value: 18,name: "三月"},
{x: 3, value: 27,name: "四月"},
{x: 4, value: 38,name: "五月"},
],
name: "Village"
}
],
xAxis: true,
yAxis: true,
legend: true,
hasStandard: true,
});
frost.render();
</script>
</body>
</html>