pie1.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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:'center'
  40. },
  41. tooltip : {
  42. trigger: 'item',
  43. formatter: "{a} <br/>{b} : {c} ({d}%)"
  44. },
  45. legend: {
  46. orient : 'vertical',
  47. x : 'left',
  48. data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
  49. },
  50. toolbox: {
  51. show : true,
  52. feature : {
  53. mark : {show: true},
  54. dataView : {show: true, readOnly: false},
  55. magicType : {
  56. show: true,
  57. type: ['pie', 'funnel'],
  58. option: {
  59. funnel: {
  60. x: '25%',
  61. width: '50%',
  62. funnelAlign: 'left',
  63. max: 1548
  64. }
  65. }
  66. },
  67. restore : {show: true},
  68. saveAsImage : {show: true}
  69. }
  70. },
  71. calculable : true,
  72. series : [
  73. {
  74. name:'访问来源',
  75. type:'pie',
  76. radius : '55%',
  77. center: ['50%', '60%'],
  78. data:[
  79. {value:335, name:'直接访问'},
  80. {value:310, name:'邮件营销'},
  81. {value:234, name:'联盟广告'},
  82. {value:135, name:'视频广告'},
  83. {value:1548, name:'搜索引擎'}
  84. ]
  85. }
  86. ]
  87. };
  88. </textarea>
  89. </div><!--/.well -->
  90. </div><!--/span-->
  91. <div id="graphic" class="col-md-8">
  92. <div id="main" class="main"></div>
  93. <div>
  94. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  95. <span class="text-primary">切换主题</span>
  96. <select id="theme-select"></select>
  97. <span id='wrong-message' style="color:red"></span>
  98. </div>
  99. </div><!--/span-->
  100. </div><!--/row-->
  101. </div><!--/.fluid-container-->
  102. <footer id="footer"></footer>
  103. <!-- Le javascript
  104. ================================================== -->
  105. <!-- Placed at the end of the document so the pages load faster -->
  106. <script src="../asset/js/jquery.min.js"></script>
  107. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  108. <script src="../asset/js/bootstrap.min.js"></script>
  109. <script src="../asset/js/echartsExample.js"></script>
  110. </body>
  111. </html>