chord.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. },
  39. tooltip : {
  40. trigger: 'item',
  41. formatter: function (params) {
  42. if (params.indicator2) { // is edge
  43. return params.value.weight;
  44. } else {// is node
  45. return params.name
  46. }
  47. }
  48. },
  49. toolbox: {
  50. show : true,
  51. y:'bottom',
  52. feature : {
  53. restore : {show: true},
  54. magicType: {show: true, type: ['force', 'chord']},
  55. saveAsImage : {show: true}
  56. }
  57. },
  58. legend: {
  59. x: 'right',
  60. data:['g1','g2', 'g3', 'g4']
  61. },
  62. series : [
  63. {
  64. type:'chord',
  65. radius : ['55%', '75%'],
  66. center : ['50%', '50%'],
  67. padding : 2,
  68. sort : 'descending', // can be 'none', 'ascending', 'descending'
  69. sortSub : 'descending', // can be 'none', 'ascending', 'descending'
  70. startAngle : 90,
  71. clockWise : false,
  72. showScale : true,
  73. showScaleText : true,
  74. itemStyle : {
  75. normal : {
  76. borderWidth : 0,
  77. borderColor : '#000',
  78. chordStyle : {
  79. borderWidth : 1,
  80. borderColor : '#333'
  81. },
  82. label: {
  83. show: true,
  84. color: 'red'
  85. }
  86. },
  87. emphasis : {
  88. borderWidth : 0,
  89. borderColor : '#000',
  90. chordStyle : {
  91. borderWidth : 2,
  92. borderColor : 'black'
  93. }
  94. }
  95. },
  96. data : [
  97. {
  98. name : 'g1',
  99. itemStyle : {
  100. normal: {
  101. color: 'rgba(255,30,30,0.5)',
  102. lineStyle : {
  103. width: 1,
  104. color: 'green'
  105. }
  106. },
  107. emphasis: {
  108. color: 'yellow',
  109. lineStyle : {
  110. width: 2,
  111. color: 'blue'
  112. }
  113. }
  114. }
  115. },
  116. {name : 'g2'},
  117. {name : 'g3'},
  118. {name : 'g4'}
  119. ],
  120. matrix : [
  121. [11975, 5871, 8916, 2868],
  122. [ 1951, 10048, 2060, 6171],
  123. [ 8010, 16145, 8090, 8045],
  124. [ 1013, 990, 940, 6907]
  125. ],
  126. markPoint : {
  127. symbol: 'star',
  128. data : [
  129. {name : '打酱油的标注', value : 100, x:'5%', y:'50%', symbolSize:32},
  130. {name : '打酱油的标注', value : 100, x:'95%', y:'50%', symbolSize:32}
  131. ]
  132. }
  133. }
  134. ]
  135. };
  136. </textarea>
  137. </div><!--/.well -->
  138. </div><!--/span-->
  139. <div id="graphic" class="col-md-8">
  140. <div id="main" class="main"></div>
  141. <div>
  142. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  143. <span class="text-primary">切换主题</span>
  144. <select id="theme-select"></select>
  145. <span id='wrong-message' style="color:red"></span>
  146. </div>
  147. </div><!--/span-->
  148. </div><!--/row-->
  149. </div><!--/.fluid-container-->
  150. <footer id="footer"></footer>
  151. <!-- Le javascript
  152. ================================================== -->
  153. <!-- Placed at the end of the document so the pages load faster -->
  154. <script src="../asset/js/jquery.min.js"></script>
  155. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  156. <script src="../asset/js/bootstrap.min.js"></script>
  157. <script src="../asset/js/echartsExample.js"></script>
  158. </body>
  159. </html>