-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_vis.html
More file actions
69 lines (66 loc) · 1.93 KB
/
Copy pathdata_vis.html
File metadata and controls
69 lines (66 loc) · 1.93 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Echarts</title>
<script src="echarts.js"></script>
</head>
<body>
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据
option = {
title : {
text: 'Gps轨迹采样率分布情况',
subtext: '--共计1105个Gps点',
x:'center'
},
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
x : 'center',
y : 'bottom',
data:['小于30秒','30~60秒','60~120秒','大于120秒']
},
toolbox: {
show : true,
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
magicType : {
show: true,
type: ['pie', 'funnel']
},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
series : [
{
type:'pie',
radius : [30, 110],
center : ['50%', '50%'],
label: {
formatter: '{b}: {@2012} ({d}%)'
},
roseType : 'area',
data:[
{value:372, name:'小于30秒'},
{value:263, name:'30~60秒'},
{value:248, name:'60~120秒'},
{value:222, name:'大于120秒'}
]
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
</body>
</html>