98d4d3e78b11ccf1960296aa9094c4ab2a24ce8b.svn-base 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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. </head>
  26. <body>
  27. <!-- Fixed navbar -->
  28. <div class="navbar navbar-default navbar-fixed-top" role="navigation" id="head"></div>
  29. <div class="container-fluid">
  30. <div class="row-fluid example">
  31. <div id="sidebar-code" class="col-md-4">
  32. <div class="well sidebar-nav">
  33. <div class="nav-header"><a href="javascript:;" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  34. <textarea id="code" name="code">
  35. option = {
  36. title : {
  37. text : '类目坐标散点图',
  38. subtext : 'dataZoom支持'
  39. },
  40. tooltip : {
  41. trigger: 'axis',
  42. axisPointer:{
  43. show: true,
  44. type : 'cross',
  45. lineStyle: {
  46. type : 'dashed',
  47. width : 1
  48. }
  49. }
  50. },
  51. toolbox: {
  52. show : true,
  53. feature : {
  54. mark : {show: true},
  55. dataView : {show: true, readOnly: false},
  56. restore : {show: true},
  57. saveAsImage : {show: true}
  58. }
  59. },
  60. dataZoom: {
  61. show: true,
  62. start : 30,
  63. end : 70
  64. },
  65. legend : {
  66. data : ['series1', 'series2']
  67. },
  68. dataRange: {
  69. min: 0,
  70. max: 100,
  71. orient: 'horizontal',
  72. y: 30,
  73. x: 'center',
  74. //text:['高','低'], // 文本,默认为数值文本
  75. color:['lightgreen','orange'],
  76. splitNumber: 5
  77. },
  78. xAxis : [
  79. {
  80. type : 'category',
  81. axisLabel: {
  82. formatter : function(v) {
  83. return '类目' + v
  84. }
  85. },
  86. data : function (){
  87. var list = [];
  88. var len = 0;
  89. while (len++ < 500) {
  90. list.push(len);
  91. }
  92. return list;
  93. }()
  94. }
  95. ],
  96. yAxis : [
  97. {
  98. type : 'value'
  99. }
  100. ],
  101. animation: false,
  102. series : [
  103. {
  104. name:'series1',
  105. type:'scatter',
  106. tooltip : {
  107. trigger: 'item',
  108. formatter : function (params) {
  109. return params.seriesName + ' (' + '类目' + params.value[0] + ')<br/>'
  110. + params.value[1] + ', '
  111. + params.value[2];
  112. },
  113. axisPointer:{
  114. show: true
  115. }
  116. },
  117. symbolSize: function (value){
  118. return Math.round(value[2]/10);
  119. },
  120. data: (function () {
  121. var d = [];
  122. var len = 0;
  123. var value;
  124. while (len++ < 500) {
  125. d.push([
  126. len,
  127. (Math.random()*30).toFixed(2) - 0,
  128. (Math.random()*100).toFixed(2) - 0
  129. ]);
  130. }
  131. return d;
  132. })()
  133. },
  134. {
  135. name:'series2',
  136. type:'scatter',
  137. tooltip : {
  138. trigger: 'item',
  139. formatter : function (params) {
  140. return params.seriesName + ' (' + '类目' + params.value[0] + ')<br/>'
  141. + params.value[1] + ', '
  142. + params.value[2];
  143. },
  144. axisPointer:{
  145. show: true
  146. }
  147. },
  148. symbolSize: function (value){
  149. return Math.round(value[2]/10);
  150. },
  151. data: (function () {
  152. var d = [];
  153. var len = 0;
  154. var value;
  155. while (len++ < 500) {
  156. d.push([
  157. len,
  158. (Math.random()*30).toFixed(2) - 0,
  159. (Math.random()*100).toFixed(2) - 0
  160. ]);
  161. }
  162. return d;
  163. })()
  164. }
  165. ]
  166. };
  167. </textarea>
  168. </div><!--/.well -->
  169. </div><!--/span-->
  170. <div id="graphic" class="col-md-8">
  171. <div id="main" class="main"></div>
  172. <div>
  173. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  174. <span class="text-primary">切换主题</span>
  175. <select id="theme-select"></select>
  176. <span id='wrong-message' style="color:red"></span>
  177. </div>
  178. </div><!--/span-->
  179. </div><!--/row-->
  180. </div><!--/.fluid-container-->
  181. <footer id="footer"></footer>
  182. <!-- Le javascript
  183. ================================================== -->
  184. <!-- Placed at the end of the document so the pages load faster -->
  185. <script src="../asset/js/jquery.min.js"></script>
  186. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  187. <script src="../asset/js/bootstrap.min.js"></script>
  188. <script src="../asset/js/echartsExample.js"></script>
  189. </body>
  190. </html>