fc73619c8bc6b4deb3777d48067c42ba7fca270a.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. subtext: '线、节点样式'
  39. },
  40. tooltip : {
  41. trigger: 'item',
  42. formatter: "{b}: {c}"
  43. },
  44. toolbox: {
  45. show : true,
  46. feature : {
  47. mark : {show: true},
  48. dataView : {show: true, readOnly: false},
  49. restore : {show: true},
  50. saveAsImage : {show: true}
  51. }
  52. },
  53. calculable : false,
  54. series : [
  55. {
  56. name:'树图',
  57. type:'tree',
  58. orient: 'horizontal', // vertical horizontal
  59. rootLocation: {x: 100, y: '60%'}, // 根节点位置 {x: 'center',y: 10}
  60. nodePadding: 20,
  61. symbol: 'circle',
  62. symbolSize: 40,
  63. itemStyle: {
  64. normal: {
  65. label: {
  66. show: true,
  67. position: 'inside',
  68. textStyle: {
  69. color: '#cc9999',
  70. fontSize: 15,
  71. fontWeight: 'bolder'
  72. }
  73. },
  74. lineStyle: {
  75. color: '#000',
  76. width: 1,
  77. type: 'broken' // 'curve'|'broken'|'solid'|'dotted'|'dashed'
  78. }
  79. },
  80. emphasis: {
  81. label: {
  82. show: true
  83. }
  84. }
  85. },
  86. data: [
  87. {
  88. name: '手机',
  89. value: 6,
  90. symbolSize: [90, 70],
  91. symbol: 'image://http://www.iconpng.com/png/ecommerce-business/iphone.png',
  92. itemStyle: {
  93. normal: {
  94. label: {
  95. show: false
  96. }
  97. }
  98. },
  99. children: [
  100. {
  101. name: '小米',
  102. value: 4,
  103. symbol: 'image://http://pic.58pic.com/58pic/12/36/51/66d58PICMUV.jpg',
  104. itemStyle: {
  105. normal: {
  106. label: {
  107. show: false
  108. }
  109. }
  110. },
  111. symbolSize: [60, 60],
  112. children: [
  113. {
  114. name: '小米1',
  115. symbol: 'circle',
  116. symbolSize: 20,
  117. value: 4,
  118. itemStyle: {
  119. normal: {
  120. color: '#fa6900',
  121. label: {
  122. show: true,
  123. position: 'right'
  124. },
  125. },
  126. emphasis: {
  127. label: {
  128. show: false
  129. },
  130. borderWidth: 0
  131. }
  132. }
  133. },
  134. {
  135. name: '小米2',
  136. value: 4,
  137. symbol: 'circle',
  138. symbolSize: 20,
  139. itemStyle: {
  140. normal: {
  141. label: {
  142. show: true,
  143. position: 'right',
  144. formatter: "{b}"
  145. },
  146. color: '#fa6900',
  147. borderWidth: 2,
  148. borderColor: '#cc66ff'
  149. },
  150. emphasis: {
  151. borderWidth: 0
  152. }
  153. }
  154. },
  155. {
  156. name: '小米3',
  157. value: 2,
  158. symbol: 'circle',
  159. symbolSize: 20,
  160. itemStyle: {
  161. normal: {
  162. label: {
  163. position: 'right'
  164. },
  165. color: '#fa6900',
  166. brushType: 'stroke',
  167. borderWidth: 1,
  168. borderColor: '#999966',
  169. },
  170. emphasis: {
  171. borderWidth: 0
  172. }
  173. }
  174. }
  175. ]
  176. },
  177. {
  178. name: '苹果',
  179. symbol: 'image://http://www.viastreaming.com/images/apple_logo2.png',
  180. symbolSize: [60, 60],
  181. itemStyle: {
  182. normal: {
  183. label: {
  184. show: false
  185. }
  186. }
  187. },
  188. value: 4
  189. },
  190. {
  191. name: '华为',
  192. symbol: 'image://http://market.huawei.com/hwgg/logo_cn/download/logo.jpg',
  193. symbolSize: [60, 60],
  194. itemStyle: {
  195. normal: {
  196. label: {
  197. show: false
  198. }
  199. }
  200. },
  201. value: 2
  202. },
  203. {
  204. name: '联想',
  205. symbol: 'image://http://www.lenovo.com.cn/HomeUpload/Home001/6d94ee9a20140714.jpg',
  206. symbolSize: [100, 40],
  207. itemStyle: {
  208. normal: {
  209. label: {
  210. show: false
  211. }
  212. }
  213. },
  214. value: 2
  215. }
  216. ]
  217. }
  218. ]
  219. }
  220. ]
  221. };
  222. </textarea>
  223. </div><!--/.well -->
  224. </div><!--/span-->
  225. <div id="graphic" class="col-md-8">
  226. <div id="main" class="main"></div>
  227. <div>
  228. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  229. <span class="text-primary">切换主题</span>
  230. <select id="theme-select"></select>
  231. <span id='wrong-message' style="color:red"></span>
  232. </div>
  233. </div><!--/span-->
  234. </div><!--/row-->
  235. </div><!--/.fluid-container-->
  236. <footer id="footer"></footer>
  237. <!-- Le javascript
  238. ================================================== -->
  239. <!-- Placed at the end of the document so the pages load faster -->
  240. <script src="../asset/js/jquery.min.js"></script>
  241. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  242. <script src="../asset/js/bootstrap.min.js"></script>
  243. <script src="../asset/js/echartsExample.js"></script>
  244. </body>
  245. </html>