-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
85 lines (82 loc) · 3.02 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
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
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
<div id="container" style="height: 100%"></div>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/echarts.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-stat/ecStat.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/dataTool.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/china.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/world.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=ZUONbpqGBsYGXNIYHicvbAbM"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/bmap.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/simplex.js"></script>
<script type="text/javascript">
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
option = null;
$.getJSON("https://raw.githubusercontent.com/robd2/neural-networks/master/test.json", function (data) {
data = data.filter(function (dataItem) {
return dataItem[2] > 0;
}).map(function (dataItem) {
return [dataItem[0], dataItem[1], Math.sqrt(dataItem[2])];
});
option = {
backgroundColor: '#000',
globe: {
baseTexture: "data-gl/asset/world.topo.bathy.200401.jpg",
heightTexture: "data-gl/asset/world.topo.bathy.200401.jpg",
shading: 'lambert',
environment: 'data-gl/asset/starfield.jpg',
light: {
main: {
intensity: 2
}
},
viewControl: {
autoRotate: true
}
},
visualMap: {
max: 40,
calculable: true,
realtime: false,
inRange: {
colorLightness: [0.2, 0.9]
},
textStyle: {
color: '#fff'
},
controller: {
inRange: {
color: 'orange'
}
},
outOfRange: {
colorAlpha: 0
}
},
series: [{
type: 'bar3D',
coordinateSystem: 'globe',
data: data,
barSize: 0.6,
minHeight: 0.2,
silent: true,
itemStyle: {
color: 'orange'
}
}]
};
myChart.setOption(option);
});
if (option && typeof option === "object") {
myChart.setOption(option, true);
}
</script>
</body>
</html>