e2f0b8007314d0bde0f6075a91f2f702de2dd384.svn-base 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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="javascript:;" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  39. <textarea id="code" name="code">
  40. option = {
  41. backgroundColor: '#1b1b1b',
  42. color: ['gold','aqua','lime'],
  43. title : {
  44. text: '模拟迁徙',
  45. subtext:'数据纯属虚构',
  46. x:'center',
  47. textStyle : {
  48. color: '#fff'
  49. }
  50. },
  51. tooltip : {
  52. trigger: 'item',
  53. formatter: '{b}'
  54. },
  55. legend: {
  56. orient: 'vertical',
  57. x:'left',
  58. data:['北京', '上海', '广州'],
  59. selectedMode: 'single',
  60. selected:{
  61. '上海' : false,
  62. '广州' : false
  63. },
  64. textStyle : {
  65. color: '#fff'
  66. }
  67. },
  68. toolbox: {
  69. show : true,
  70. orient : 'vertical',
  71. x: 'right',
  72. y: 'center',
  73. feature : {
  74. mark : {show: true},
  75. dataView : {show: true, readOnly: false},
  76. restore : {show: true},
  77. saveAsImage : {show: true}
  78. }
  79. },
  80. dataRange: {
  81. min : 0,
  82. max : 100,
  83. calculable : true,
  84. color: ['#ff3333', 'orange', 'yellow','lime','aqua'],
  85. textStyle:{
  86. color:'#fff'
  87. }
  88. },
  89. animationDurationUpdate: 2000, // for update animation, like legend selected.
  90. series : [
  91. {
  92. name: '北京',
  93. type: 'map',
  94. roam: true,
  95. hoverable: false,
  96. mapType: 'china',
  97. itemStyle:{
  98. normal:{
  99. borderColor:'rgba(100,149,237,1)',
  100. borderWidth:0.5,
  101. areaStyle:{
  102. color: '#1b1b1b'
  103. }
  104. }
  105. },
  106. data:[],
  107. geoCoord: {
  108. '上海': [121.4648,31.2891],
  109. '广州': [113.5107,23.2196],
  110. '北京': [116.4551,40.2539]
  111. },
  112. markLine : {
  113. smooth:true,
  114. effect : {
  115. show: true,
  116. scaleSize: 1,
  117. period: 30,
  118. color: '#fff',
  119. shadowBlur: 10
  120. },
  121. itemStyle : {
  122. normal: {
  123. borderWidth:1,
  124. label: {
  125. show: false
  126. },
  127. lineStyle: {
  128. type: 'solid',
  129. shadowBlur: 10
  130. }
  131. }
  132. },
  133. data : [
  134. [{name:'北京', smoothness:0.2}, {name:'广州',value:95}],
  135. [{name:'北京', smoothness:0.3}, {name:'广州',value:90}],
  136. [{name:'北京', smoothness:0.4}, {name:'广州',value:80}],
  137. [{name:'北京', smoothness:0.5}, {name:'广州',value:70}],
  138. [{name:'北京', smoothness:0.6}, {name:'广州',value:60}],
  139. [{name:'广州', smoothness:0.2}, {name:'北京',value:50}],
  140. [{name:'广州', smoothness:0.3}, {name:'北京',value:40}],
  141. [{name:'广州', smoothness:0.4}, {name:'北京',value:30}],
  142. [{name:'广州', smoothness:0.5}, {name:'北京',value:20}],
  143. [{name:'广州', smoothness:0.6}, {name:'北京',value:10}]
  144. ]
  145. }
  146. },
  147. {
  148. name: '上海',
  149. type: 'map',
  150. mapType: 'china',
  151. data:[],
  152. markLine : {
  153. smooth:true,
  154. effect : {
  155. show: true,
  156. scaleSize: 1,
  157. period: 30,
  158. color: '#fff',
  159. shadowBlur: 10
  160. },
  161. itemStyle : {
  162. normal: {
  163. borderWidth:1,
  164. label: {
  165. show: false
  166. },
  167. lineStyle: {
  168. type: 'solid',
  169. shadowBlur: 10
  170. }
  171. }
  172. },
  173. data : [
  174. [{name:'北京', smoothness:0.2}, {name:'上海',value:95}],
  175. [{name:'北京', smoothness:0.3}, {name:'上海',value:90}],
  176. [{name:'北京', smoothness:0.4}, {name:'上海',value:80}],
  177. [{name:'北京', smoothness:0.5}, {name:'上海',value:70}],
  178. [{name:'北京', smoothness:0.6}, {name:'上海',value:60}],
  179. [{name:'上海', smoothness:0.2}, {name:'北京',value:50}],
  180. [{name:'上海', smoothness:0.3}, {name:'北京',value:40}],
  181. [{name:'上海', smoothness:0.4}, {name:'北京',value:30}],
  182. [{name:'上海', smoothness:0.5}, {name:'北京',value:20}],
  183. [{name:'上海', smoothness:0.6}, {name:'北京',value:10}]
  184. ]
  185. }
  186. },
  187. {
  188. name: '广州',
  189. type: 'map',
  190. mapType: 'china',
  191. data:[],
  192. markLine : {
  193. smooth:true,
  194. effect : {
  195. show: true,
  196. scaleSize: 1,
  197. period: 30,
  198. color: '#fff',
  199. shadowBlur: 10
  200. },
  201. itemStyle : {
  202. normal: {
  203. borderWidth:1,
  204. label: {
  205. show: false
  206. },
  207. lineStyle: {
  208. type: 'solid',
  209. shadowBlur: 10
  210. }
  211. }
  212. },
  213. data : [
  214. [{name:'上海', smoothness:0.2}, {name:'广州',value:95}],
  215. [{name:'上海', smoothness:0.3}, {name:'广州',value:90}],
  216. [{name:'上海', smoothness:0.4}, {name:'广州',value:80}],
  217. [{name:'上海', smoothness:0.5}, {name:'广州',value:70}],
  218. [{name:'上海', smoothness:0.6}, {name:'广州',value:60}],
  219. [{name:'广州', smoothness:0.2}, {name:'上海',value:50}],
  220. [{name:'广州', smoothness:0.3}, {name:'上海',value:40}],
  221. [{name:'广州', smoothness:0.4}, {name:'上海',value:30}],
  222. [{name:'广州', smoothness:0.5}, {name:'上海',value:20}],
  223. [{name:'广州', smoothness:0.6}, {name:'上海',value:10}]
  224. ]
  225. }
  226. }
  227. ]
  228. };
  229. </textarea>
  230. </div><!--/.well -->
  231. </div><!--/span-->
  232. <div id="graphic" class="col-md-8">
  233. <div id="main" class="main" style="height: 530px;"></div>
  234. <div>
  235. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  236. <span class="text-primary">切换主题</span>
  237. <select id="theme-select"></select>
  238. <span id='wrong-message' style="color:red"></span>
  239. </div>
  240. </div><!--/span-->
  241. </div><!--/row-->
  242. </div><!--/.fluid-container-->
  243. <footer id="footer"></footer>
  244. <!-- Le javascript
  245. ================================================== -->
  246. <!-- Placed at the end of the document so the pages load faster -->
  247. <script src="../asset/js/jquery.min.js"></script>
  248. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  249. <script src="../asset/js/bootstrap.min.js"></script>
  250. <script src="../asset/js/echartsExample.js"></script>
  251. </body>
  252. </html>