map4.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="ECharts">
  8. <meta name="author" content="kener.linfeng@gmail.com">
  9. <title>ECharts · Example</title>
  10. <link rel="shortcut icon" href="../asset/ico/favicon.png">
  11. <link href="../asset/css/font-awesome.min.css" rel="stylesheet">
  12. <link href="../asset/css/bootstrap.css" rel="stylesheet">
  13. <link href="../asset/css/carousel.css" rel="stylesheet">
  14. <link href="../asset/css/echartsHome.css" rel="stylesheet">
  15. <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  16. <!--[if lt IE 9]>
  17. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  18. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  19. <![endif]-->
  20. <script src="./www/js/echarts.js"></script>
  21. <script src="../asset/js/codemirror.js"></script>
  22. <script src="../asset/js/javascript.js"></script>
  23. <link href="../asset/css/codemirror.css" rel="stylesheet">
  24. <link href="../asset/css/monokai.css" rel="stylesheet">
  25. <style type="text/css">
  26. .CodeMirror {
  27. height: 550px;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <!-- Fixed navbar -->
  33. <div class="navbar navbar-default navbar-fixed-top" role="navigation" id="head"></div>
  34. <div class="container-fluid">
  35. <div class="row-fluid example">
  36. <div id="sidebar-code" class="col-md-4">
  37. <div class="well sidebar-nav">
  38. <div class="nav-header"><a href="#" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  39. <textarea id="code" name="code">
  40. option = {
  41. title : {
  42. text: 'World Population (2010)',
  43. subtext: 'from United Nations, Total population, both sexes combined, as of 1 July (thousands)',
  44. sublink : 'http://esa.un.org/wpp/Excel-Data/population.htm',
  45. x:'center',
  46. y:'top'
  47. },
  48. tooltip : {
  49. trigger: 'item',
  50. formatter : function (params) {
  51. var value = (params.value + '').split('.');
  52. value = value[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, '$1,')
  53. + '.' + value[1];
  54. return params.seriesName + '<br/>' + params.name + ' : ' + value;
  55. }
  56. },
  57. toolbox: {
  58. show : true,
  59. orient : 'vertical',
  60. x: 'right',
  61. y: 'center',
  62. feature : {
  63. mark : {show: true},
  64. dataView : {show: true, readOnly: false},
  65. restore : {show: true},
  66. saveAsImage : {show: true}
  67. }
  68. },
  69. dataRange: {
  70. min: 0,
  71. max: 1000000,
  72. text:['High','Low'],
  73. realtime: false,
  74. calculable : true,
  75. color: ['orangered','yellow','lightskyblue']
  76. },
  77. series : [
  78. {
  79. name: 'World Population (2010)',
  80. type: 'map',
  81. mapType: 'world',
  82. roam: true,
  83. mapLocation: {
  84. y : 60
  85. },
  86. itemStyle:{
  87. emphasis:{label:{show:true}}
  88. },
  89. data:[
  90. {name : 'Afghanistan', value : 28397.812},
  91. {name : 'Angola', value : 19549.124},
  92. {name : 'Albania', value : 3150.143},
  93. {name : 'United Arab Emirates', value : 8441.537},
  94. {name : 'Argentina', value : 40374.224},
  95. {name : 'Armenia', value : 2963.496},
  96. {name : 'French Southern and Antarctic Lands', value : 268.065},
  97. {name : 'Australia', value : 22404.488},
  98. {name : 'Austria', value : 8401.924},
  99. {name : 'Azerbaijan', value : 9094.718},
  100. {name : 'Burundi', value : 9232.753},
  101. {name : 'Belgium', value : 10941.288},
  102. {name : 'Benin', value : 9509.798},
  103. {name : 'Burkina Faso', value : 15540.284},
  104. {name : 'Bangladesh', value : 151125.475},
  105. {name : 'Bulgaria', value : 7389.175},
  106. {name : 'The Bahamas', value : 66402.316},
  107. {name : 'Bosnia and Herzegovina', value : 3845.929},
  108. {name : 'Belarus', value : 9491.07},
  109. {name : 'Belize', value : 308.595},
  110. {name : 'Bermuda', value : 64.951},
  111. {name : 'Bolivia', value : 716.939},
  112. {name : 'Brazil', value : 195210.154},
  113. {name : 'Brunei', value : 27.223},
  114. {name : 'Bhutan', value : 716.939},
  115. {name : 'Botswana', value : 1969.341},
  116. {name : 'Central African Republic', value : 4349.921},
  117. {name : 'Canada', value : 34126.24},
  118. {name : 'Switzerland', value : 7830.534},
  119. {name : 'Chile', value : 17150.76},
  120. {name : 'China', value : 1359821.465},
  121. {name : 'Ivory Coast', value : 60508.978},
  122. {name : 'Cameroon', value : 20624.343},
  123. {name : 'Democratic Republic of the Congo', value : 62191.161},
  124. {name : 'Republic of the Congo', value : 3573.024},
  125. {name : 'Colombia', value : 46444.798},
  126. {name : 'Costa Rica', value : 4669.685},
  127. {name : 'Cuba', value : 11281.768},
  128. {name : 'Northern Cyprus', value : 1.468},
  129. {name : 'Cyprus', value : 1103.685},
  130. {name : 'Czech Republic', value : 10553.701},
  131. {name : 'Germany', value : 83017.404},
  132. {name : 'Djibouti', value : 834.036},
  133. {name : 'Denmark', value : 5550.959},
  134. {name : 'Dominican Republic', value : 10016.797},
  135. {name : 'Algeria', value : 37062.82},
  136. {name : 'Ecuador', value : 15001.072},
  137. {name : 'Egypt', value : 78075.705},
  138. {name : 'Eritrea', value : 5741.159},
  139. {name : 'Spain', value : 46182.038},
  140. {name : 'Estonia', value : 1298.533},
  141. {name : 'Ethiopia', value : 87095.281},
  142. {name : 'Finland', value : 5367.693},
  143. {name : 'Fiji', value : 860.559},
  144. {name : 'Falkland Islands', value : 49.581},
  145. {name : 'France', value : 63230.866},
  146. {name : 'Gabon', value : 1556.222},
  147. {name : 'United Kingdom', value : 62066.35},
  148. {name : 'Georgia', value : 4388.674},
  149. {name : 'Ghana', value : 24262.901},
  150. {name : 'Guinea', value : 10876.033},
  151. {name : 'Gambia', value : 1680.64},
  152. {name : 'Guinea Bissau', value : 10876.033},
  153. {name : 'Equatorial Guinea', value : 696.167},
  154. {name : 'Greece', value : 11109.999},
  155. {name : 'Greenland', value : 56.546},
  156. {name : 'Guatemala', value : 14341.576},
  157. {name : 'French Guiana', value : 231.169},
  158. {name : 'Guyana', value : 786.126},
  159. {name : 'Honduras', value : 7621.204},
  160. {name : 'Croatia', value : 4338.027},
  161. {name : 'Haiti', value : 9896.4},
  162. {name : 'Hungary', value : 10014.633},
  163. {name : 'Indonesia', value : 240676.485},
  164. {name : 'India', value : 1205624.648},
  165. {name : 'Ireland', value : 4467.561},
  166. {name : 'Iran', value : 240676.485},
  167. {name : 'Iraq', value : 30962.38},
  168. {name : 'Iceland', value : 318.042},
  169. {name : 'Israel', value : 7420.368},
  170. {name : 'Italy', value : 60508.978},
  171. {name : 'Jamaica', value : 2741.485},
  172. {name : 'Jordan', value : 6454.554},
  173. {name : 'Japan', value : 127352.833},
  174. {name : 'Kazakhstan', value : 15921.127},
  175. {name : 'Kenya', value : 40909.194},
  176. {name : 'Kyrgyzstan', value : 5334.223},
  177. {name : 'Cambodia', value : 14364.931},
  178. {name : 'South Korea', value : 51452.352},
  179. {name : 'Kosovo', value : 97.743},
  180. {name : 'Kuwait', value : 2991.58},
  181. {name : 'Laos', value : 6395.713},
  182. {name : 'Lebanon', value : 4341.092},
  183. {name : 'Liberia', value : 3957.99},
  184. {name : 'Libya', value : 6040.612},
  185. {name : 'Sri Lanka', value : 20758.779},
  186. {name : 'Lesotho', value : 2008.921},
  187. {name : 'Lithuania', value : 3068.457},
  188. {name : 'Luxembourg', value : 507.885},
  189. {name : 'Latvia', value : 2090.519},
  190. {name : 'Morocco', value : 31642.36},
  191. {name : 'Moldova', value : 103.619},
  192. {name : 'Madagascar', value : 21079.532},
  193. {name : 'Mexico', value : 117886.404},
  194. {name : 'Macedonia', value : 507.885},
  195. {name : 'Mali', value : 13985.961},
  196. {name : 'Myanmar', value : 51931.231},
  197. {name : 'Montenegro', value : 620.078},
  198. {name : 'Mongolia', value : 2712.738},
  199. {name : 'Mozambique', value : 23967.265},
  200. {name : 'Mauritania', value : 3609.42},
  201. {name : 'Malawi', value : 15013.694},
  202. {name : 'Malaysia', value : 28275.835},
  203. {name : 'Namibia', value : 2178.967},
  204. {name : 'New Caledonia', value : 246.379},
  205. {name : 'Niger', value : 15893.746},
  206. {name : 'Nigeria', value : 159707.78},
  207. {name : 'Nicaragua', value : 5822.209},
  208. {name : 'Netherlands', value : 16615.243},
  209. {name : 'Norway', value : 4891.251},
  210. {name : 'Nepal', value : 26846.016},
  211. {name : 'New Zealand', value : 4368.136},
  212. {name : 'Oman', value : 2802.768},
  213. {name : 'Pakistan', value : 173149.306},
  214. {name : 'Panama', value : 3678.128},
  215. {name : 'Peru', value : 29262.83},
  216. {name : 'Philippines', value : 93444.322},
  217. {name : 'Papua New Guinea', value : 6858.945},
  218. {name : 'Poland', value : 38198.754},
  219. {name : 'Puerto Rico', value : 3709.671},
  220. {name : 'North Korea', value : 1.468},
  221. {name : 'Portugal', value : 10589.792},
  222. {name : 'Paraguay', value : 6459.721},
  223. {name : 'Qatar', value : 1749.713},
  224. {name : 'Romania', value : 21861.476},
  225. {name : 'Russia', value : 21861.476},
  226. {name : 'Rwanda', value : 10836.732},
  227. {name : 'Western Sahara', value : 514.648},
  228. {name : 'Saudi Arabia', value : 27258.387},
  229. {name : 'Sudan', value : 35652.002},
  230. {name : 'South Sudan', value : 9940.929},
  231. {name : 'Senegal', value : 12950.564},
  232. {name : 'Solomon Islands', value : 526.447},
  233. {name : 'Sierra Leone', value : 5751.976},
  234. {name : 'El Salvador', value : 6218.195},
  235. {name : 'Somaliland', value : 9636.173},
  236. {name : 'Somalia', value : 9636.173},
  237. {name : 'Republic of Serbia', value : 3573.024},
  238. {name : 'Suriname', value : 524.96},
  239. {name : 'Slovakia', value : 5433.437},
  240. {name : 'Slovenia', value : 2054.232},
  241. {name : 'Sweden', value : 9382.297},
  242. {name : 'Swaziland', value : 1193.148},
  243. {name : 'Syria', value : 7830.534},
  244. {name : 'Chad', value : 11720.781},
  245. {name : 'Togo', value : 6306.014},
  246. {name : 'Thailand', value : 66402.316},
  247. {name : 'Tajikistan', value : 7627.326},
  248. {name : 'Turkmenistan', value : 5041.995},
  249. {name : 'East Timor', value : 10016.797},
  250. {name : 'Trinidad and Tobago', value : 1328.095},
  251. {name : 'Tunisia', value : 10631.83},
  252. {name : 'Turkey', value : 72137.546},
  253. {name : 'United Republic of Tanzania', value : 44973.33},
  254. {name : 'Uganda', value : 33987.213},
  255. {name : 'Ukraine', value : 46050.22},
  256. {name : 'Uruguay', value : 3371.982},
  257. {name : 'United States of America', value : 312247.116},
  258. {name : 'Uzbekistan', value : 27769.27},
  259. {name : 'Venezuela', value : 236.299},
  260. {name : 'Vietnam', value : 89047.397},
  261. {name : 'Vanuatu', value : 236.299},
  262. {name : 'West Bank', value : 13.565},
  263. {name : 'Yemen', value : 22763.008},
  264. {name : 'South Africa', value : 51452.352},
  265. {name : 'Zambia', value : 13216.985},
  266. {name : 'Zimbabwe', value : 13076.978}
  267. ]
  268. }
  269. ]
  270. };
  271. </textarea>
  272. </div><!--/.well -->
  273. </div><!--/span-->
  274. <div id="graphic" class="col-md-8">
  275. <div id="main" class="main" style="height: 530px;"></div>
  276. <div>
  277. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  278. <span class="text-primary">切换主题</span>
  279. <select id="theme-select"></select>
  280. <span id='wrong-message' style="color:red"></span>
  281. </div>
  282. </div><!--/span-->
  283. </div><!--/row-->
  284. </div><!--/.fluid-container-->
  285. <footer id="footer"></footer>
  286. <!-- Le javascript
  287. ================================================== -->
  288. <!-- Placed at the end of the document so the pages load faster -->
  289. <script src="../asset/js/jquery.min.js"></script>
  290. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  291. <script src="../asset/js/bootstrap.min.js"></script>
  292. <script src="../asset/js/echartsExample.js"></script>
  293. </body>
  294. </html>