9700e626cd80fa42991d843e2a20c98c46706562.svn-base 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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="javascript:;" 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. type:'chord',
  66. sort : 'ascending',
  67. sortSub : 'descending',
  68. showScale : false,
  69. itemStyle : {
  70. normal : {
  71. label : {
  72. rotate : true
  73. }
  74. }
  75. },
  76. // 使用 nodes links 表达和弦图
  77. nodes: [
  78. {name:'默特萨克'},
  79. {name:'厄齐尔'},
  80. {name:'波多尔斯基'},
  81. {name:'诺伊尔'},
  82. {name:'博阿滕'},
  83. {name:'施魏因施泰格'},
  84. {name:'拉姆'},
  85. {name:'克罗斯'},
  86. {name:'穆勒'},
  87. {name:'格策'},
  88. {name:'胡梅尔斯'},
  89. {name:'魏登费勒'},
  90. {name:'杜尔姆'},
  91. {name:'格罗斯克罗伊茨'},
  92. {name:'阿森纳'},
  93. {name:'拜仁慕尼黑'},
  94. {name:'多特蒙德'}
  95. ],
  96. links: [
  97. {source: '阿森纳', target: '默特萨克', weight: 0.9, name: '效力'},
  98. {source: '阿森纳', target: '厄齐尔', weight: 0.9, name: '效力'},
  99. {source: '阿森纳', target: '波多尔斯基', weight: 0.9, name: '效力'},
  100. {source: '拜仁慕尼黑', target: '诺伊尔', weight: 0.9, name: '效力'},
  101. {source: '拜仁慕尼黑', target: '博阿滕', weight: 0.9, name: '效力'},
  102. {source: '拜仁慕尼黑', target: '施魏因施泰格', weight: 0.9, name: '效力'},
  103. {source: '拜仁慕尼黑', target: '拉姆', weight: 0.9, name: '效力'},
  104. {source: '拜仁慕尼黑', target: '克罗斯', weight: 0.9, name: '效力'},
  105. {source: '拜仁慕尼黑', target: '穆勒', weight: 0.9, name: '效力'},
  106. {source: '拜仁慕尼黑', target: '格策', weight: 0.9, name: '效力'},
  107. {source: '多特蒙德', target: '胡梅尔斯', weight: 0.9, name: '效力'},
  108. {source: '多特蒙德', target: '魏登费勒', weight: 0.9, name: '效力'},
  109. {source: '多特蒙德', target: '杜尔姆', weight: 0.9, name: '效力'},
  110. {source: '多特蒙德', target: '格罗斯克罗伊茨', weight: 0.9, name: '效力'},
  111. // Ribbon Type 的和弦图每一对节点之间必须是双向边
  112. {target: '阿森纳', source: '默特萨克', weight: 1},
  113. {target: '阿森纳', source: '厄齐尔', weight: 1},
  114. {target: '阿森纳', source: '波多尔斯基', weight: 1},
  115. {target: '拜仁慕尼黑', source: '诺伊尔', weight: 1},
  116. {target: '拜仁慕尼黑', source: '博阿滕', weight: 1},
  117. {target: '拜仁慕尼黑', source: '施魏因施泰格', weight: 1},
  118. {target: '拜仁慕尼黑', source: '拉姆', weight: 1},
  119. {target: '拜仁慕尼黑', source: '克罗斯', weight: 1},
  120. {target: '拜仁慕尼黑', source: '穆勒', weight: 1},
  121. {target: '拜仁慕尼黑', source: '格策', weight: 1},
  122. {target: '多特蒙德', source: '胡梅尔斯', weight: 1},
  123. {target: '多特蒙德', source: '魏登费勒', weight: 1},
  124. {target: '多特蒙德', source: '杜尔姆', weight: 1},
  125. {target: '多特蒙德', source: '格罗斯克罗伊茨', weight: 1}
  126. ]
  127. }
  128. ]
  129. };
  130. </textarea>
  131. </div><!--/.well -->
  132. </div><!--/span-->
  133. <div id="graphic" class="col-md-8">
  134. <div id="main" class="main"></div>
  135. <div>
  136. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  137. <span class="text-primary">切换主题</span>
  138. <select id="theme-select"></select>
  139. <span id='wrong-message' style="color:red"></span>
  140. </div>
  141. </div><!--/span-->
  142. </div><!--/row-->
  143. </div><!--/.fluid-container-->
  144. <footer id="footer"></footer>
  145. <!-- Le javascript
  146. ================================================== -->
  147. <!-- Placed at the end of the document so the pages load faster -->
  148. <script src="../asset/js/jquery.min.js"></script>
  149. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  150. <script src="../asset/js/bootstrap.min.js"></script>
  151. <script src="../asset/js/echartsExample.js"></script>
  152. </body>
  153. </html>