chord4.html 6.0 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. x:'right',
  39. y:'bottom'
  40. },
  41. tooltip : {
  42. trigger: 'item',
  43. formatter: function (params) {
  44. if (params.indicator2) { // is edge
  45. return params.indicator2 + ' ' + params.name + ' ' + params.indicator;
  46. } else { // is node
  47. return params.name
  48. }
  49. }
  50. },
  51. toolbox: {
  52. show : true,
  53. feature : {
  54. restore : {show: true},
  55. magicType: {show: true, type: ['force', 'chord']},
  56. saveAsImage : {show: true}
  57. }
  58. },
  59. legend: {
  60. x: 'left',
  61. data:['阿森纳', '拜仁慕尼黑', '多特蒙德']
  62. },
  63. series : [
  64. {
  65. name: '德国队效力联盟',
  66. type:'chord',
  67. sort : 'ascending',
  68. sortSub : 'descending',
  69. ribbonType: false,
  70. radius: '60%',
  71. itemStyle : {
  72. normal : {
  73. label : {
  74. rotate : true
  75. }
  76. }
  77. },
  78. minRadius: 7,
  79. maxRadius: 20,
  80. // 使用 nodes links 表达和弦图
  81. nodes: [
  82. {name:'默特萨克'},
  83. {name:'厄齐尔'},
  84. {name:'波多尔斯基'},
  85. {name:'诺伊尔'},
  86. {name:'博阿滕'},
  87. {name:'施魏因施泰格'},
  88. {name:'拉姆'},
  89. {name:'克罗斯'},
  90. {name:'穆勒', symbol: 'star'},
  91. {name:'格策'},
  92. {name:'胡梅尔斯'},
  93. {name:'魏登费勒'},
  94. {name:'杜尔姆'},
  95. {name:'格罗斯克罗伊茨'},
  96. {name:'阿森纳'},
  97. {name:'拜仁慕尼黑'},
  98. {name:'多特蒙德'}
  99. ],
  100. links: [
  101. {source: '阿森纳', target: '默特萨克', weight: 1, name: '效力'},
  102. {source: '阿森纳', target: '厄齐尔', weight: 1, name: '效力'},
  103. {source: '阿森纳', target: '波多尔斯基', weight: 1, name: '效力'},
  104. {source: '拜仁慕尼黑', target: '诺伊尔', weight: 1, name: '效力'},
  105. {source: '拜仁慕尼黑', target: '博阿滕', weight: 1, name: '效力'},
  106. {source: '拜仁慕尼黑', target: '施魏因施泰格', weight: 1, name: '效力'},
  107. {source: '拜仁慕尼黑', target: '拉姆', weight: 1, name: '效力'},
  108. {source: '拜仁慕尼黑', target: '克罗斯', weight: 1, name: '效力'},
  109. {source: '拜仁慕尼黑', target: '穆勒', weight: 1, name: '效力'},
  110. {source: '拜仁慕尼黑', target: '格策', weight: 1, name: '效力'},
  111. {source: '多特蒙德', target: '胡梅尔斯', weight: 1, name: '效力'},
  112. {source: '多特蒙德', target: '魏登费勒', weight: 1, name: '效力'},
  113. {source: '多特蒙德', target: '杜尔姆', weight: 1, name: '效力'},
  114. {source: '多特蒙德', target: '格罗斯克罗伊茨', weight: 1, 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>