roseExtreme.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <!DOCTYPE>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <script src="lib/esl.js"></script>
  6. <script src="lib/config.js"></script>
  7. <script src="lib/jquery.min.js"></script>
  8. <script src="lib/facePrint.js"></script>
  9. <meta name="viewport" content="width=device-width, initial-scale=1" />
  10. <link rel="stylesheet" href="lib/reset.css">
  11. </head>
  12. <body>
  13. <style>
  14. .chart {
  15. height: 500px;
  16. }
  17. </style>
  18. <h2>some empty</h2>
  19. <div class="chart" id="main1"></div>
  20. <h2>all empty</h2>
  21. <div class="chart" id="main2"></div>
  22. <h2>all zero</h2>
  23. <div class="chart" id="main3"></div>
  24. <script>
  25. var echarts;
  26. var colorTool;
  27. var chart;
  28. var myChart;
  29. var groupCategories = [];
  30. var groupColors = [];
  31. require([
  32. 'echarts'
  33. // 'zrender/tool/color',
  34. // 'echarts/chart/pie',
  35. // 'echarts/component/legend',
  36. // 'echarts/component/tooltip',
  37. // 'echarts/component/toolbox'
  38. ], function (ec) {
  39. echarts = ec;
  40. chart = myChart = echarts.init(document.getElementById('main1'));
  41. option = {
  42. color: ['#36bbd2', '#FEA054', '#FEE054', '#9CCC5A', '#F77157', '#9054FE', '#3988FF'],
  43. series: [{
  44. name: '访问来源',
  45. type: 'pie',
  46. radius: '60%',
  47. center: ['50%', '50%'],
  48. roseType: 'area',
  49. clockwise: false, // 逆时针
  50. minAngle: 20,
  51. stillShowZeroSum: false,
  52. hoverAnimation: false,
  53. selectedMode: false,
  54. selectedOffset: 0,
  55. legendHoverLink: false,
  56. data: [{
  57. value: 5,
  58. name: '本周到期'
  59. }, {
  60. value: '-',
  61. name: '下周到期'
  62. }, {
  63. value: 0,
  64. name: '本月到期'
  65. }, {
  66. value: '-',
  67. name: '未到期'
  68. }, {
  69. value: 66,
  70. name: '已完成'
  71. }, {
  72. value: 77,
  73. name: '暂停'
  74. }, {
  75. value: 88,
  76. name: '逾期'
  77. }],
  78. label: {
  79. normal: {
  80. textStyle: {
  81. color: '#999'
  82. },
  83. formatter: "{b}: {c}"
  84. }
  85. },
  86. labelLine: {
  87. normal: {
  88. lineStyle: {
  89. color: '#e5e5e5'
  90. },
  91. smooth: 0,
  92. length: 5,
  93. length2: 15
  94. }
  95. },
  96. itemStyle: {
  97. normal: {
  98. shadowBlur: 20,
  99. shadowColor: 'rgba(0, 0, 0, 0.3)'
  100. },
  101. },
  102. // animationType: 'scale',
  103. // animationEasing: 'elasticOut',
  104. // animationDelay: function(idx) {
  105. // return Math.random() * 200;
  106. // }
  107. }]
  108. };
  109. chart.setOption(option);
  110. });
  111. </script>
  112. <script>
  113. var echarts;
  114. var colorTool;
  115. var chart;
  116. var myChart;
  117. var groupCategories = [];
  118. var groupColors = [];
  119. require([
  120. 'echarts'
  121. // 'echarts/chart/pie',
  122. // 'echarts/component/legend',
  123. // 'echarts/component/tooltip',
  124. // 'echarts/component/toolbox'
  125. ], function (ec) {
  126. echarts = ec;
  127. chart = myChart = echarts.init(document.getElementById('main2'));
  128. option = {
  129. color: ['#36bbd2', '#FEA054', '#FEE054', '#9CCC5A', '#F77157', '#9054FE', '#3988FF'],
  130. series: [{
  131. name: '访问来源',
  132. type: 'pie',
  133. radius: '60%',
  134. center: ['50%', '50%'],
  135. roseType: 'area',
  136. clockwise: false, // 逆时针
  137. minAngle: 20,
  138. data: [{
  139. value: '-',
  140. name: '本周到期'
  141. }, {
  142. value: '-',
  143. name: '下周到期'
  144. }, {
  145. value: '-',
  146. name: '本月到期'
  147. }]
  148. }]
  149. };
  150. chart.setOption(option);
  151. });
  152. </script>
  153. <script>
  154. var echarts;
  155. var colorTool;
  156. var chart;
  157. var myChart;
  158. var groupCategories = [];
  159. var groupColors = [];
  160. require([
  161. 'echarts'
  162. // 'echarts/chart/pie',
  163. // 'echarts/component/legend',
  164. // 'echarts/component/tooltip',
  165. // 'echarts/component/toolbox'
  166. ], function (ec) {
  167. echarts = ec;
  168. chart = myChart = echarts.init(document.getElementById('main3'));
  169. option = {
  170. color: ['#36bbd2', '#FEA054', '#FEE054', '#9CCC5A', '#F77157', '#9054FE', '#3988FF'],
  171. series: [{
  172. name: '访问来源',
  173. type: 'pie',
  174. radius: '60%',
  175. center: ['50%', '50%'],
  176. roseType: 'area',
  177. clockwise: false, // 逆时针
  178. minAngle: 20,
  179. data: [{
  180. value: 0,
  181. name: '本周到期'
  182. }, {
  183. value: 0,
  184. name: '下周到期'
  185. }, {
  186. value: 0,
  187. name: '本月到期'
  188. }]
  189. }]
  190. };
  191. chart.setOption(option);
  192. });
  193. </script>
  194. </body>
  195. </html>