bar2.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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="#" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  34. <textarea id="code" name="code">
  35. option = {
  36. tooltip : {
  37. trigger: 'axis',
  38. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  39. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  40. }
  41. },
  42. legend: {
  43. data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎','百度','谷歌','必应','其他']
  44. },
  45. toolbox: {
  46. show : true,
  47. orient: 'vertical',
  48. x: 'right',
  49. y: 'center',
  50. feature : {
  51. mark : {show: true},
  52. dataView : {show: true, readOnly: false},
  53. magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
  54. restore : {show: true},
  55. saveAsImage : {show: true}
  56. }
  57. },
  58. calculable : true,
  59. xAxis : [
  60. {
  61. type : 'category',
  62. data : ['周一','周二','周三','周四','周五','周六','周日']
  63. }
  64. ],
  65. yAxis : [
  66. {
  67. type : 'value'
  68. }
  69. ],
  70. series : [
  71. {
  72. name:'直接访问',
  73. type:'bar',
  74. data:[320, 332, 301, 334, 390, 330, 320]
  75. },
  76. {
  77. name:'邮件营销',
  78. type:'bar',
  79. stack: '广告',
  80. data:[120, 132, 101, 134, 90, 230, 210]
  81. },
  82. {
  83. name:'联盟广告',
  84. type:'bar',
  85. stack: '广告',
  86. data:[220, 182, 191, 234, 290, 330, 310]
  87. },
  88. {
  89. name:'视频广告',
  90. type:'bar',
  91. stack: '广告',
  92. data:[150, 232, 201, 154, 190, 330, 410]
  93. },
  94. {
  95. name:'搜索引擎',
  96. type:'bar',
  97. data:[862, 1018, 964, 1026, 1679, 1600, 1570],
  98. markLine : {
  99. itemStyle:{
  100. normal:{
  101. lineStyle:{
  102. type: 'dashed'
  103. }
  104. }
  105. },
  106. data : [
  107. [{type : 'min'}, {type : 'max'}]
  108. ]
  109. }
  110. },
  111. {
  112. name:'百度',
  113. type:'bar',
  114. barWidth : 5,
  115. stack: '搜索引擎',
  116. data:[620, 732, 701, 734, 1090, 1130, 1120]
  117. },
  118. {
  119. name:'谷歌',
  120. type:'bar',
  121. stack: '搜索引擎',
  122. data:[120, 132, 101, 134, 290, 230, 220]
  123. },
  124. {
  125. name:'必应',
  126. type:'bar',
  127. stack: '搜索引擎',
  128. data:[60, 72, 71, 74, 190, 130, 110]
  129. },
  130. {
  131. name:'其他',
  132. type:'bar',
  133. stack: '搜索引擎',
  134. data:[62, 82, 91, 84, 109, 110, 120]
  135. }
  136. ]
  137. };
  138. </textarea>
  139. </div><!--/.well -->
  140. </div><!--/span-->
  141. <div id="graphic" class="col-md-8">
  142. <div id="main" class="main"></div>
  143. <div>
  144. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  145. <span class="text-primary">切换主题</span>
  146. <select id="theme-select"></select>
  147. <span id='wrong-message' style="color:red"></span>
  148. </div>
  149. </div><!--/span-->
  150. </div><!--/row-->
  151. </div><!--/.fluid-container-->
  152. <footer id="footer"></footer>
  153. <!-- Le javascript
  154. ================================================== -->
  155. <!-- Placed at the end of the document so the pages load faster -->
  156. <script src="../asset/js/jquery.min.js"></script>
  157. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  158. <script src="../asset/js/bootstrap.min.js"></script>
  159. <script src="../asset/js/echartsExample.js"></script>
  160. </body>
  161. </html>