提交 4ecf6df1 编写于 作者: 一只迷路的伦's avatar 一只迷路的伦

Merge branch 'dev' of https://gitcode.net/qq_52783287/pairproject into dev

此差异已折叠。
...@@ -2,24 +2,23 @@ ...@@ -2,24 +2,23 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<script src="js/jquery-1.10.1.min.js"></script>
<script src="js/echarts.min.js"></script> <script src="js/echarts.min.js"></script>
<script src = "js/world.js"></script> <script src = "js/world.js"></script>
<script src="data/total.json"></script>
</head> </head>
<body> <body>
<div id="main" style="background-color: aqua ; margin-left: 100px; width: 1200px;height:600px;border:1px solid #ccc"></div> <div id="main" style="background-color: aqua ; margin-left: 100px; width: 1200px;height:600px;border:1px solid #ccc"></div>
<script type="text/javascript"> <script type="text/javascript">
var myChart = echarts.init(document.getElementById('main')); var myChart = echarts.init(document.getElementById('main'));
option = { option = {
title: { title: {
sublink: 'http://esa.un.org/wpp/Excel-Data/population.htm', sublink: 'http://esa.un.org/wpp/Excel-Data/population.htm',
left: 'center', left: 'center',
top: 'top' top: 'top'
}, },
/* tooltip: { /*tooltip: {
trigger: 'item', trigger: 'item',
formatter: function (params) { formatter: function (params) {
var value = (params.value + '').split('.'); var value = (params.value + '').split('.');
...@@ -27,7 +26,17 @@ ...@@ -27,7 +26,17 @@
+ '.' + value[1]; + '.' + value[1];
return params.seriesName + '<br/>' + params.name + ' : ' + value; return params.seriesName + '<br/>' + params.name + ' : ' + value;
} }
},*/ }, */
tooltip: {
trigger: 'item',
formatter: function (params) {
var string = '';
string = params.name + '<br/>' + '金:' + params.value +'<br/>'+'银:'+ params.value +'<br/>';
return string;
}
},
visualMap: { visualMap: {
min: 0, min: 0,
max: 1000000, max: 1000000,
...@@ -38,7 +47,7 @@ ...@@ -38,7 +47,7 @@
}, },
series: [ series: [
{ {
name: 'World Population (2010)', name: '奖牌榜',
type: 'map', type: 'map',
mapType: 'world', mapType: 'world',
roam: true, roam: true,
...@@ -76,7 +85,7 @@ ...@@ -76,7 +85,7 @@
{name: 'Canada', value: 34126.24}, {name: 'Canada', value: 34126.24},
{name: 'Switzerland', value: 7830.534}, {name: 'Switzerland', value: 7830.534},
{name: 'Chile', value: 17150.76}, {name: 'Chile', value: 17150.76},
{name: 'China', }, {name: 'China','value': 10,age:20},
{name: 'Ivory Coast', value: 60508.978}, {name: 'Ivory Coast', value: 60508.978},
{name: 'Cameroon', value: 20624.343}, {name: 'Cameroon', value: 20624.343},
{name: 'Democratic Republic of the Congo', value: 62191.161}, {name: 'Democratic Republic of the Congo', value: 62191.161},
...@@ -226,8 +235,12 @@ ...@@ -226,8 +235,12 @@
] ]
} }
] ]
}; };
myChart.setOption(option); myChart.setOption(option);
</script> </script>
</body> </body>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册