webkit-dep2.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. <style type="text/css">
  26. .CodeMirror {
  27. height: 620px;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <!-- Fixed navbar -->
  33. <div class="navbar navbar-default navbar-fixed-top" role="navigation" id="head"></div>
  34. <div class="container-fluid">
  35. <div class="row-fluid example">
  36. <div id="sidebar-code" class="col-md-3">
  37. <div class="well sidebar-nav">
  38. <div class="nav-header"><a href="#" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  39. <textarea id="code" name="code">
  40. option = {
  41. title : {
  42. text: 'webkit内核依赖',
  43. subtext: '数据来自网络',
  44. x:'right',
  45. y:'bottom'
  46. },
  47. tooltip : {
  48. trigger: 'item',
  49. formatter : "{b}"
  50. },
  51. toolbox: {
  52. show : true,
  53. feature : {
  54. restore : {show: true},
  55. magicType: {
  56. show: true,
  57. type: ['force', 'chord'],
  58. option: {
  59. chord: {
  60. minRadius : 2,
  61. maxRadius : 10,
  62. ribbonType: false,
  63. itemStyle: {
  64. normal: {
  65. label: {
  66. show: true,
  67. rotate: true
  68. },
  69. chordStyle: {
  70. opacity: 0.2
  71. }
  72. }
  73. }
  74. },
  75. force: {
  76. minRadius : 5,
  77. maxRadius : 8,
  78. itemStyle : {
  79. normal : {
  80. label: {
  81. show: false
  82. },
  83. linkStyle : {
  84. opacity : 0.5
  85. }
  86. }
  87. }
  88. }
  89. }
  90. },
  91. saveAsImage : {show: true}
  92. }
  93. },
  94. legend : {
  95. data : ['HTMLElement', 'WebGL', 'SVG', 'CSS', 'Other'],
  96. orient : 'vertical',
  97. x : 'left'
  98. },
  99. noDataEffect: 'none',
  100. series :[{
  101. //FIXME No data
  102. type: 'force',
  103. }],
  104. };
  105. $.ajax({
  106. url: 'data/webkit-dep.json',
  107. dataType: 'json',
  108. success: function (data) {
  109. option.series[0] = {
  110. type: 'chord',
  111. ribbonType: false,
  112. name: 'webkit-dep',
  113. itemStyle: {
  114. normal: {
  115. label: {
  116. show: true,
  117. rotate: true
  118. },
  119. chordStyle: {
  120. opacity: 0.2
  121. }
  122. }
  123. },
  124. categories: data.categories,
  125. nodes: data.nodes,
  126. links: data.links,
  127. minRadius: 2,
  128. maxRadius: 10,
  129. gravity: 1.1,
  130. scaling: 1.1,
  131. steps: 20,
  132. large: true,
  133. useWorker: true,
  134. coolDown: 0.995
  135. };
  136. myChart.setOption(option);
  137. myChart.hideLoading();
  138. }
  139. });
  140. </textarea>
  141. </div><!--/.well -->
  142. </div><!--/span-->
  143. <div id="graphic" class="col-md-9">
  144. <div id="main" class="main" style="height:600px;"></div>
  145. <div>
  146. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  147. <span class="text-primary">切换主题</span>
  148. <select id="theme-select"></select>
  149. <span id='wrong-message' style="color:red"></span>
  150. </div>
  151. </div><!--/span-->
  152. </div><!--/row-->
  153. </div><!--/.fluid-container-->
  154. <footer id="footer"></footer>
  155. <!-- Le javascript
  156. ================================================== -->
  157. <!-- Placed at the end of the document so the pages load faster -->
  158. <script src="../asset/js/jquery.min.js"></script>
  159. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  160. <script src="../asset/js/bootstrap.min.js"></script>
  161. <script src="../asset/js/echartsExample.js"></script>
  162. </body>
  163. </html>