7d8052e4050b2df121cc8b73e4c647adc6b2a844.svn-base 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. title : {
  42. text: '订单量',
  43. subtext: '纯属虚构',
  44. x:'center'
  45. },
  46. tooltip : {
  47. trigger: 'item'
  48. },
  49. legend: {
  50. orient: 'vertical',
  51. x:'left',
  52. data:['订单量']
  53. },
  54. dataRange: {
  55. x: 'left',
  56. y: 'bottom',
  57. splitList: [
  58. {start: 1500},
  59. {start: 900, end: 1500},
  60. {start: 310, end: 1000},
  61. {start: 200, end: 300},
  62. {start: 10, end: 200, label: '10 到 200(自定义label)'},
  63. {start: 5, end: 5, label: '5(自定义特殊颜色)', color: 'black'},
  64. {end: 10}
  65. ],
  66. color: ['#E0022B', '#E09107', '#A3E00B']
  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. roamController: {
  81. show: true,
  82. x: 'right',
  83. mapTypeControl: {
  84. 'china': true
  85. }
  86. },
  87. series : [
  88. {
  89. name: '订单量',
  90. type: 'map',
  91. mapType: 'china',
  92. roam: false,
  93. itemStyle:{
  94. normal:{
  95. label:{
  96. show:true,
  97. textStyle: {
  98. color: "rgb(249, 249, 249)"
  99. }
  100. }
  101. },
  102. emphasis:{label:{show:true}}
  103. },
  104. data:[
  105. {name: '北京',value: Math.round(Math.random()*2000)},
  106. {name: '天津',value: Math.round(Math.random()*2000)},
  107. {name: '上海',value: Math.round(Math.random()*2000)},
  108. {name: '重庆',value: Math.round(Math.random()*2000)},
  109. {name: '河北',value: 0},
  110. {name: '河南',value: Math.round(Math.random()*2000)},
  111. {name: '云南',value: 5},
  112. {name: '辽宁',value: 305},
  113. {name: '黑龙江',value: Math.round(Math.random()*2000)},
  114. {name: '湖南',value: 200},
  115. {name: '安徽',value: Math.round(Math.random()*2000)},
  116. {name: '山东',value: Math.round(Math.random()*2000)},
  117. {name: '新疆',value: Math.round(Math.random()*2000)},
  118. {name: '江苏',value: Math.round(Math.random()*2000)},
  119. {name: '浙江',value: Math.round(Math.random()*2000)},
  120. {name: '江西',value: Math.round(Math.random()*2000)},
  121. {name: '湖北',value: Math.round(Math.random()*2000)},
  122. {name: '广西',value: Math.round(Math.random()*2000)},
  123. {name: '甘肃',value: Math.round(Math.random()*2000)},
  124. {name: '山西',value: Math.round(Math.random()*2000)},
  125. {name: '内蒙古',value: Math.round(Math.random()*2000)},
  126. {name: '陕西',value: Math.round(Math.random()*2000)},
  127. {name: '吉林',value: Math.round(Math.random()*2000)},
  128. {name: '福建',value: Math.round(Math.random()*2000)},
  129. {name: '贵州',value: Math.round(Math.random()*2000)},
  130. {name: '广东',value: Math.round(Math.random()*2000)},
  131. {name: '青海',value: Math.round(Math.random()*2000)},
  132. {name: '西藏',value: Math.round(Math.random()*2000)},
  133. {name: '四川',value: Math.round(Math.random()*2000)},
  134. {name: '宁夏',value: Math.round(Math.random()*2000)},
  135. {name: '海南',value: Math.round(Math.random()*2000)},
  136. {name: '台湾',value: Math.round(Math.random()*2000)},
  137. {name: '香港',value: Math.round(Math.random()*2000)},
  138. {name: '澳门',value: Math.round(Math.random()*2000)}
  139. ]
  140. }
  141. ]
  142. };
  143. </textarea>
  144. </div><!--/.well -->
  145. </div><!--/span-->
  146. <div id="graphic" class="col-md-8">
  147. <div id="main" class="main" style="height: 530px;"></div>
  148. <div>
  149. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  150. <span class="text-primary">切换主题</span>
  151. <select id="theme-select"></select>
  152. <span id='wrong-message' style="color:red"></span>
  153. </div>
  154. </div><!--/span-->
  155. </div><!--/row-->
  156. </div><!--/.fluid-container-->
  157. <footer id="footer"></footer>
  158. <!-- Le javascript
  159. ================================================== -->
  160. <!-- Placed at the end of the document so the pages load faster -->
  161. <script src="../asset/js/jquery.min.js"></script>
  162. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  163. <script src="../asset/js/bootstrap.min.js"></script>
  164. <script type="text/javascript">
  165. var curIndex = 0;
  166. </script>
  167. <script src="../asset/js/echartsExample.js"></script>
  168. <script>
  169. function focusGraphic() {
  170. domCode.className = 'col-md-4 ani';
  171. domGraphic.className = 'col-md-8 ani';
  172. refresh();
  173. }
  174. </script>
  175. </body>
  176. </html>