map1.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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: 'iphone销量',
  43. subtext: '纯属虚构',
  44. x:'center'
  45. },
  46. tooltip : {
  47. trigger: 'item'
  48. },
  49. legend: {
  50. orient: 'vertical',
  51. x:'left',
  52. data:['iphone3','iphone4','iphone5']
  53. },
  54. dataRange: {
  55. min: 0,
  56. max: 2500,
  57. x: 'left',
  58. y: 'bottom',
  59. text:['高','低'], // 文本,默认为数值文本
  60. calculable : true
  61. },
  62. toolbox: {
  63. show: true,
  64. orient : 'vertical',
  65. x: 'right',
  66. y: 'center',
  67. feature : {
  68. mark : {show: true},
  69. dataView : {show: true, readOnly: false},
  70. restore : {show: true},
  71. saveAsImage : {show: true}
  72. }
  73. },
  74. roamController: {
  75. show: true,
  76. x: 'right',
  77. mapTypeControl: {
  78. 'china': true
  79. }
  80. },
  81. series : [
  82. {
  83. name: 'iphone3',
  84. type: 'map',
  85. mapType: 'china',
  86. roam: false,
  87. itemStyle:{
  88. normal:{label:{show:true}},
  89. emphasis:{label:{show:true}}
  90. },
  91. data:[
  92. {name: '北京',value: Math.round(Math.random()*1000)},
  93. {name: '天津',value: Math.round(Math.random()*1000)},
  94. {name: '上海',value: Math.round(Math.random()*1000)},
  95. {name: '重庆',value: Math.round(Math.random()*1000)},
  96. {name: '河北',value: Math.round(Math.random()*1000)},
  97. {name: '河南',value: Math.round(Math.random()*1000)},
  98. {name: '云南',value: Math.round(Math.random()*1000)},
  99. {name: '辽宁',value: Math.round(Math.random()*1000)},
  100. {name: '黑龙江',value: Math.round(Math.random()*1000)},
  101. {name: '湖南',value: Math.round(Math.random()*1000)},
  102. {name: '安徽',value: Math.round(Math.random()*1000)},
  103. {name: '山东',value: Math.round(Math.random()*1000)},
  104. {name: '新疆',value: Math.round(Math.random()*1000)},
  105. {name: '江苏',value: Math.round(Math.random()*1000)},
  106. {name: '浙江',value: Math.round(Math.random()*1000)},
  107. {name: '江西',value: Math.round(Math.random()*1000)},
  108. {name: '湖北',value: Math.round(Math.random()*1000)},
  109. {name: '广西',value: Math.round(Math.random()*1000)},
  110. {name: '甘肃',value: Math.round(Math.random()*1000)},
  111. {name: '山西',value: Math.round(Math.random()*1000)},
  112. {name: '内蒙古',value: Math.round(Math.random()*1000)},
  113. {name: '陕西',value: Math.round(Math.random()*1000)},
  114. {name: '吉林',value: Math.round(Math.random()*1000)},
  115. {name: '福建',value: Math.round(Math.random()*1000)},
  116. {name: '贵州',value: Math.round(Math.random()*1000)},
  117. {name: '广东',value: Math.round(Math.random()*1000)},
  118. {name: '青海',value: Math.round(Math.random()*1000)},
  119. {name: '西藏',value: Math.round(Math.random()*1000)},
  120. {name: '四川',value: Math.round(Math.random()*1000)},
  121. {name: '宁夏',value: Math.round(Math.random()*1000)},
  122. {name: '海南',value: Math.round(Math.random()*1000)},
  123. {name: '台湾',value: Math.round(Math.random()*1000)},
  124. {name: '香港',value: Math.round(Math.random()*1000)},
  125. {name: '澳门',value: Math.round(Math.random()*1000)}
  126. ]
  127. },
  128. {
  129. name: 'iphone4',
  130. type: 'map',
  131. mapType: 'china',
  132. itemStyle:{
  133. normal:{label:{show:true}},
  134. emphasis:{label:{show:true}}
  135. },
  136. data:[
  137. {name: '北京',value: Math.round(Math.random()*1000)},
  138. {name: '天津',value: Math.round(Math.random()*1000)},
  139. {name: '上海',value: Math.round(Math.random()*1000)},
  140. {name: '重庆',value: Math.round(Math.random()*1000)},
  141. {name: '河北',value: Math.round(Math.random()*1000)},
  142. {name: '安徽',value: Math.round(Math.random()*1000)},
  143. {name: '新疆',value: Math.round(Math.random()*1000)},
  144. {name: '浙江',value: Math.round(Math.random()*1000)},
  145. {name: '江西',value: Math.round(Math.random()*1000)},
  146. {name: '山西',value: Math.round(Math.random()*1000)},
  147. {name: '内蒙古',value: Math.round(Math.random()*1000)},
  148. {name: '吉林',value: Math.round(Math.random()*1000)},
  149. {name: '福建',value: Math.round(Math.random()*1000)},
  150. {name: '广东',value: Math.round(Math.random()*1000)},
  151. {name: '西藏',value: Math.round(Math.random()*1000)},
  152. {name: '四川',value: Math.round(Math.random()*1000)},
  153. {name: '宁夏',value: Math.round(Math.random()*1000)},
  154. {name: '香港',value: Math.round(Math.random()*1000)},
  155. {name: '澳门',value: Math.round(Math.random()*1000)}
  156. ]
  157. },
  158. {
  159. name: 'iphone5',
  160. type: 'map',
  161. mapType: 'china',
  162. itemStyle:{
  163. normal:{label:{show:true}},
  164. emphasis:{label:{show:true}}
  165. },
  166. data:[
  167. {name: '北京',value: Math.round(Math.random()*1000)},
  168. {name: '天津',value: Math.round(Math.random()*1000)},
  169. {name: '上海',value: Math.round(Math.random()*1000)},
  170. {name: '广东',value: Math.round(Math.random()*1000)},
  171. {name: '台湾',value: Math.round(Math.random()*1000)},
  172. {name: '香港',value: Math.round(Math.random()*1000)},
  173. {name: '澳门',value: Math.round(Math.random()*1000)}
  174. ]
  175. }
  176. ]
  177. };
  178. </textarea>
  179. </div><!--/.well -->
  180. </div><!--/span-->
  181. <div id="graphic" class="col-md-8">
  182. <div id="main" class="main" style="height: 530px;"></div>
  183. <div>
  184. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  185. <span class="text-primary">切换主题</span>
  186. <select id="theme-select"></select>
  187. <span id='wrong-message' style="color:red"></span>
  188. </div>
  189. </div><!--/span-->
  190. </div><!--/row-->
  191. </div><!--/.fluid-container-->
  192. <footer id="footer"></footer>
  193. <!-- Le javascript
  194. ================================================== -->
  195. <!-- Placed at the end of the document so the pages load faster -->
  196. <script src="../asset/js/jquery.min.js"></script>
  197. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  198. <script src="../asset/js/bootstrap.min.js"></script>
  199. <script src="../asset/js/echartsExample.js"></script>
  200. </body>
  201. </html>