f960dd89cfcd603078e7e08f91952a7b6364b001.svn-base 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. dataRangeStyle = [
  41. // 0
  42. {
  43. min: 0,
  44. max: 2000,
  45. formatter : function(v, v2){
  46. if (v2 < 1000) { return '低于' + v2}
  47. else if (v > 1000) { return '高于' + v}
  48. else { return '中' }
  49. }
  50. },
  51. // 1
  52. {
  53. orient: 'horizontal', // 'vertical'
  54. min: 0,
  55. max: 2000,
  56. formatter : '{value} 到 {value2}'
  57. },
  58. // 2
  59. {
  60. text:['高','低'], // 文本,默认为数值文本
  61. min: 0,
  62. max: 2000
  63. },
  64. // 3
  65. {
  66. orient: 'horizontal', // 'vertical'
  67. text:['高','低'], // 文本,默认为数值文本
  68. min: 0,
  69. max: 2000
  70. },
  71. // 4
  72. {
  73. splitNumber: 0,
  74. min: 0,
  75. max: 2000
  76. },
  77. // 5
  78. {
  79. orient: 'horizontal', // 'vertical'
  80. splitNumber: 0,
  81. min: 0,
  82. max: 2000
  83. },
  84. // 6
  85. {
  86. splitNumber: 0,
  87. text:['高','低'], // 文本,默认为数值文本
  88. min: 0,
  89. max: 2000
  90. },
  91. // 7
  92. {
  93. orient: 'horizontal', // 'vertical'
  94. splitNumber: 0,
  95. text:['高','低'], // 文本,默认为数值文本
  96. min: 0,
  97. max: 2000
  98. },
  99. // 8
  100. {
  101. calculable : true,
  102. min: 0,
  103. max: 2000,
  104. formatter : function(v) {
  105. if (v > 1500) {return v + ' (高)'}
  106. else if (v < 500) {return v + ' (低)'}
  107. else {return v + ' (中)'};
  108. }
  109. },
  110. // 9
  111. {
  112. orient: 'horizontal', // 'vertical'
  113. calculable : true,
  114. min: 0,
  115. max: 2000
  116. },
  117. // 10
  118. {
  119. color:['red','yellow'], //颜色
  120. text:['高','低'], // 文本,默认为数值文本
  121. calculable : true,
  122. min: 0,
  123. max: 2000
  124. },
  125. // 11
  126. {
  127. orient: 'horizontal', // 'vertical'
  128. color:['red','yellow'], //颜色
  129. text:['高','低'], // 文本,默认为数值文本
  130. calculable : true,
  131. min: 0,
  132. max: 2000
  133. },
  134. // 12
  135. {
  136. orient: 'vertical', // 'vertical'
  137. color: ['red', 'pink'], //颜色
  138. splitList: [
  139. {start: 300000},
  140. {start: 900, end: 200000},
  141. {start: 310, end: 1000},
  142. {start: 200, end: 300},
  143. {start: 10, end: 200, label: '自定义label: 10 到 200'},
  144. {start: 5, end: 5},
  145. {end: 10, color: 'black'}
  146. ]
  147. }
  148. ]
  149. var cur = curIndex++%dataRangeStyle.length;
  150. option = {
  151. title:{
  152. text: '当前样式序号:' + cur,
  153. subtext: 'NO.' + cur
  154. },
  155. dataRange: dataRangeStyle[cur],
  156. series : [
  157. {
  158. name: '',
  159. type: 'map',
  160. data:[]
  161. }
  162. ]
  163. };
  164. </textarea>
  165. </div><!--/.well -->
  166. </div><!--/span-->
  167. <div id="graphic" class="col-md-8">
  168. <div id="main" class="main" style="height: 530px;"></div>
  169. <div>
  170. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  171. <span class="text-primary">切换主题</span>
  172. <select id="theme-select"></select>
  173. &nbsp;&nbsp;&nbsp;
  174. <a target="_blank" href="./dataRange2.html">dataRange间隔自定义(customize split)</a>
  175. <span id='wrong-message' style="color:red"></span>
  176. </div>
  177. </div><!--/span-->
  178. </div><!--/row-->
  179. </div><!--/.fluid-container-->
  180. <footer id="footer"></footer>
  181. <!-- Le javascript
  182. ================================================== -->
  183. <!-- Placed at the end of the document so the pages load faster -->
  184. <script src="../asset/js/jquery.min.js"></script>
  185. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  186. <script src="../asset/js/bootstrap.min.js"></script>
  187. <script type="text/javascript">
  188. var curIndex = 0;
  189. </script>
  190. <script src="../asset/js/echartsExample.js"></script>
  191. <script>
  192. function focusGraphic() {
  193. domCode.className = 'col-md-4 ani';
  194. domGraphic.className = 'col-md-8 ani';
  195. refresh();
  196. }
  197. </script>
  198. </body>
  199. </html>