mix11.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. color : [
  37. 'rgba(255, 69, 0, 0.5)',
  38. 'rgba(255, 150, 0, 0.5)',
  39. 'rgba(255, 200, 0, 0.5)',
  40. 'rgba(155, 200, 50, 0.5)',
  41. 'rgba(55, 200, 100, 0.5)'
  42. ],
  43. title : {
  44. text: '商业BI类图表',
  45. subtext: '纯属虚构'
  46. },
  47. tooltip : {
  48. trigger: 'item',
  49. formatter: "{a} <br/>{b} : {c}%"
  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. legend: {
  61. data : ['展现','点击','访问','咨询','订单']
  62. },
  63. series : [
  64. {
  65. name:'业务指标',
  66. type:'gauge',
  67. center: ['25%','55%'],
  68. splitNumber: 10, // 分割段数,默认为5
  69. axisLine: { // 坐标轴线
  70. lineStyle: { // 属性lineStyle控制线条样式
  71. color: [[0.2, '#228b22'],[0.8, '#48b'],[1, '#ff4500']],
  72. width: 8
  73. }
  74. },
  75. axisTick: { // 坐标轴小标记
  76. splitNumber: 10, // 每份split细分多少段
  77. length :12, // 属性length控制线长
  78. lineStyle: { // 属性lineStyle控制线条样式
  79. color: 'auto'
  80. }
  81. },
  82. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  83. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  84. color: 'auto'
  85. }
  86. },
  87. splitLine: { // 分隔线
  88. show: true, // 默认显示,属性show控制显示与否
  89. length :30, // 属性length控制线长
  90. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  91. color: 'auto'
  92. }
  93. },
  94. pointer : {
  95. width : 5
  96. },
  97. title : {
  98. show : true,
  99. offsetCenter: [0, '-40%'], // x, y,单位px
  100. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  101. fontWeight: 'bolder'
  102. }
  103. },
  104. detail : {
  105. formatter:'{value}%',
  106. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  107. color: 'auto',
  108. fontWeight: 'bolder'
  109. }
  110. },
  111. data:[{value: 50, name: '完成率'}]
  112. },
  113. {
  114. name:'预期',
  115. type:'funnel',
  116. x: '45%',
  117. width: '45%',
  118. itemStyle: {
  119. normal: {
  120. label: {
  121. formatter: '{b}预期'
  122. },
  123. labelLine: {
  124. show : false
  125. }
  126. },
  127. emphasis: {
  128. label: {
  129. position:'inside',
  130. formatter: '{b}预期 : {c}%'
  131. }
  132. }
  133. },
  134. data:[
  135. {value:60, name:'访问'},
  136. {value:40, name:'咨询'},
  137. {value:20, name:'订单'},
  138. {value:80, name:'点击'},
  139. {value:100, name:'展现'}
  140. ]
  141. },
  142. {
  143. name:'实际',
  144. type:'funnel',
  145. x: '45%',
  146. width: '45%',
  147. maxSize: '80%',
  148. itemStyle: {
  149. normal: {
  150. borderColor: '#fff',
  151. borderWidth: 2,
  152. label: {
  153. position: 'inside',
  154. formatter: '{c}%',
  155. textStyle: {
  156. color: '#fff'
  157. }
  158. }
  159. },
  160. emphasis: {
  161. label: {
  162. position:'inside',
  163. formatter: '{b}实际 : {c}%'
  164. }
  165. }
  166. },
  167. data:[
  168. {value:30, name:'访问'},
  169. {value:10, name:'咨询'},
  170. {value:5, name:'订单'},
  171. {value:50, name:'点击'},
  172. {value:80, name:'展现'}
  173. ]
  174. }
  175. ]
  176. };
  177. </textarea>
  178. </div><!--/.well -->
  179. </div><!--/span-->
  180. <div id="graphic" class="col-md-8">
  181. <div id="main" class="main"></div>
  182. <div>
  183. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  184. <span class="text-primary">切换主题</span>
  185. <select id="theme-select"></select>
  186. <span id='wrong-message' style="color:red"></span>
  187. </div>
  188. </div><!--/span-->
  189. </div><!--/row-->
  190. </div><!--/.fluid-container-->
  191. <footer id="footer"></footer>
  192. <!-- Le javascript
  193. ================================================== -->
  194. <!-- Placed at the end of the document so the pages load faster -->
  195. <script src="../asset/js/jquery.min.js"></script>
  196. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  197. <script src="../asset/js/bootstrap.min.js"></script>
  198. <script src="../asset/js/echartsExample.js"></script>
  199. </body>
  200. </html>