funnel3.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. title : {
  37. text: '漏斗图',
  38. subtext: '纯属虚构',
  39. x: 'left',
  40. y: 'bottom'
  41. },
  42. tooltip : {
  43. trigger: 'item',
  44. formatter: "{a} <br/>{b} : {c}%"
  45. },
  46. toolbox: {
  47. show : true,
  48. orient: 'vertical',
  49. y: 'center',
  50. feature : {
  51. mark : {show: true},
  52. dataView : {show: true, readOnly: false},
  53. restore : {show: true},
  54. saveAsImage : {show: true}
  55. }
  56. },
  57. legend: {
  58. orient: 'vertical',
  59. x: 'left',
  60. data : ['展现','点击','访问','咨询','订单']
  61. },
  62. calculable : true,
  63. series : [
  64. {
  65. name:'漏斗图',
  66. type:'funnel',
  67. width: '40%',
  68. height: '45%',
  69. x:'5%',
  70. y:'50%',
  71. data:[
  72. {value:60, name:'访问'},
  73. {value:30, name:'咨询'},
  74. {value:10, name:'订单'},
  75. {value:80, name:'点击'},
  76. {value:100, name:'展现'}
  77. ]
  78. },
  79. {
  80. name:'金字塔',
  81. type:'funnel',
  82. width: '40%',
  83. height: '45%',
  84. x: '5%',
  85. y: '5%',
  86. sort : 'ascending',
  87. data:[
  88. {value:60, name:'访问'},
  89. {value:30, name:'咨询'},
  90. {value:10, name:'订单'},
  91. {value:80, name:'点击'},
  92. {value:100, name:'展现'}
  93. ]
  94. },
  95. {
  96. name:'漏斗图',
  97. type:'funnel',
  98. width: '40%',
  99. height: '45%',
  100. x:'55%',
  101. y: '5%',
  102. itemStyle: {
  103. normal: {
  104. // color: 各异,
  105. label: {
  106. position: 'left'
  107. }
  108. }
  109. },
  110. data:[
  111. {value:60, name:'访问'},
  112. {value:30, name:'咨询'},
  113. {value:10, name:'订单'},
  114. {value:80, name:'点击'},
  115. {value:100, name:'展现'}
  116. ]
  117. },
  118. {
  119. name:'金字塔',
  120. type:'funnel',
  121. width: '40%',
  122. height: '45%',
  123. x:'55%',
  124. y:'50%',
  125. sort : 'ascending',
  126. itemStyle: {
  127. normal: {
  128. // color: 各异,
  129. label: {
  130. position: 'left'
  131. }
  132. }
  133. },
  134. data:[
  135. {value:60, name:'访问'},
  136. {value:30, name:'咨询'},
  137. {value:10, name:'订单'},
  138. {value:80, name:'点击'},
  139. {value:100, name:'展现'}
  140. ]
  141. }
  142. ]
  143. };
  144. </textarea>
  145. </div><!--/.well -->
  146. </div><!--/span-->
  147. <div id="graphic" class="col-md-8">
  148. <div id="main" class="main"></div>
  149. <div>
  150. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  151. <span class="text-primary">切换主题</span>
  152. <select id="theme-select"></select>
  153. <span id='wrong-message' style="color:red"></span>
  154. </div>
  155. </div><!--/span-->
  156. </div><!--/row-->
  157. </div><!--/.fluid-container-->
  158. <footer id="footer"></footer>
  159. <!-- Le javascript
  160. ================================================== -->
  161. <!-- Placed at the end of the document so the pages load faster -->
  162. <script src="../asset/js/jquery.min.js"></script>
  163. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  164. <script src="../asset/js/bootstrap.min.js"></script>
  165. <script src="../asset/js/echartsExample.js"></script>
  166. </body>
  167. </html>