funnel.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. },
  40. tooltip : {
  41. trigger: 'item',
  42. formatter: "{a} <br/>{b} : {c}%"
  43. },
  44. toolbox: {
  45. show : true,
  46. feature : {
  47. mark : {show: true},
  48. dataView : {show: true, readOnly: false},
  49. restore : {show: true},
  50. saveAsImage : {show: true}
  51. }
  52. },
  53. legend: {
  54. data : ['展现','点击','访问','咨询','订单']
  55. },
  56. calculable : true,
  57. series : [
  58. {
  59. name:'漏斗图',
  60. type:'funnel',
  61. x: '10%',
  62. y: 60,
  63. //x2: 80,
  64. y2: 60,
  65. width: '80%',
  66. // height: {totalHeight} - y - y2,
  67. min: 0,
  68. max: 100,
  69. minSize: '0%',
  70. maxSize: '100%',
  71. sort : 'descending', // 'ascending', 'descending'
  72. gap : 10,
  73. itemStyle: {
  74. normal: {
  75. // color: 各异,
  76. borderColor: '#fff',
  77. borderWidth: 1,
  78. label: {
  79. show: true,
  80. position: 'inside'
  81. // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
  82. },
  83. labelLine: {
  84. show: false,
  85. length: 10,
  86. lineStyle: {
  87. // color: 各异,
  88. width: 1,
  89. type: 'solid'
  90. }
  91. }
  92. },
  93. emphasis: {
  94. // color: 各异,
  95. borderColor: 'red',
  96. borderWidth: 5,
  97. label: {
  98. show: true,
  99. formatter: '{b}:{c}%',
  100. textStyle:{
  101. fontSize:20
  102. }
  103. },
  104. labelLine: {
  105. show: true
  106. }
  107. }
  108. },
  109. data:[
  110. {value:60, name:'访问'},
  111. {value:40, name:'咨询'},
  112. {value:20, name:'订单'},
  113. {value:80, name:'点击'},
  114. {value:100, name:'展现'}
  115. ]
  116. }
  117. ]
  118. };
  119. </textarea>
  120. </div><!--/.well -->
  121. </div><!--/span-->
  122. <div id="graphic" class="col-md-8">
  123. <div id="main" class="main"></div>
  124. <div>
  125. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  126. <span class="text-primary">切换主题</span>
  127. <select id="theme-select"></select>
  128. <span id='wrong-message' style="color:red"></span>
  129. </div>
  130. </div><!--/span-->
  131. </div><!--/row-->
  132. </div><!--/.fluid-container-->
  133. <footer id="footer"></footer>
  134. <!-- Le javascript
  135. ================================================== -->
  136. <!-- Placed at the end of the document so the pages load faster -->
  137. <script src="../asset/js/jquery.min.js"></script>
  138. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  139. <script src="../asset/js/bootstrap.min.js"></script>
  140. <script src="../asset/js/echartsExample.js"></script>
  141. </body>
  142. </html>