pie4.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. x : 'center',
  47. y : 'bottom',
  48. data:['rose1','rose2','rose3','rose4','rose5','rose6','rose7','rose8']
  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. },
  59. restore : {show: true},
  60. saveAsImage : {show: true}
  61. }
  62. },
  63. calculable : true,
  64. series : [
  65. {
  66. name:'半径模式',
  67. type:'pie',
  68. radius : [20, 110],
  69. center : ['25%', 200],
  70. roseType : 'radius',
  71. width: '40%', // for funnel
  72. max: 40, // for funnel
  73. itemStyle : {
  74. normal : {
  75. label : {
  76. show : false
  77. },
  78. labelLine : {
  79. show : false
  80. }
  81. },
  82. emphasis : {
  83. label : {
  84. show : true
  85. },
  86. labelLine : {
  87. show : true
  88. }
  89. }
  90. },
  91. data:[
  92. {value:10, name:'rose1'},
  93. {value:5, name:'rose2'},
  94. {value:15, name:'rose3'},
  95. {value:25, name:'rose4'},
  96. {value:20, name:'rose5'},
  97. {value:35, name:'rose6'},
  98. {value:30, name:'rose7'},
  99. {value:40, name:'rose8'}
  100. ]
  101. },
  102. {
  103. name:'面积模式',
  104. type:'pie',
  105. radius : [30, 110],
  106. center : ['75%', 200],
  107. roseType : 'area',
  108. x: '50%', // for funnel
  109. max: 40, // for funnel
  110. sort : 'ascending', // for funnel
  111. data:[
  112. {value:10, name:'rose1'},
  113. {value:5, name:'rose2'},
  114. {value:15, name:'rose3'},
  115. {value:25, name:'rose4'},
  116. {value:20, name:'rose5'},
  117. {value:35, name:'rose6'},
  118. {value:30, name:'rose7'},
  119. {value:40, name:'rose8'}
  120. ]
  121. }
  122. ]
  123. };
  124. </textarea>
  125. </div><!--/.well -->
  126. </div><!--/span-->
  127. <div id="graphic" class="col-md-8">
  128. <div id="main" class="main"></div>
  129. <div>
  130. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  131. <span class="text-primary">切换主题</span>
  132. <select id="theme-select"></select>
  133. <span id='wrong-message' style="color:red"></span>
  134. </div>
  135. </div><!--/span-->
  136. </div><!--/row-->
  137. </div><!--/.fluid-container-->
  138. <footer id="footer"></footer>
  139. <!-- Le javascript
  140. ================================================== -->
  141. <!-- Placed at the end of the document so the pages load faster -->
  142. <script src="../asset/js/jquery.min.js"></script>
  143. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  144. <script src="../asset/js/bootstrap.min.js"></script>
  145. <script src="../asset/js/echartsExample.js"></script>
  146. </body>
  147. </html>