622cf6f48106edd15e44d2a4bfaad5e65c201568.svn-base 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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. timeline:{
  37. data:[
  38. '2002-01-01','2003-01-01','2004-01-01','2005-01-01','2006-01-01',
  39. '2007-01-01','2008-01-01','2009-01-01','2010-01-01','2011-01-01'
  40. ],
  41. label : {
  42. formatter : function(s) {
  43. return s.slice(0, 4);
  44. }
  45. },
  46. autoPlay : true,
  47. playInterval : 1000
  48. },
  49. options:[
  50. {
  51. title : {
  52. 'text':'2002全国宏观经济关联分析(GDP vs 房地产)',
  53. 'subtext':'数据来自国家统计局'
  54. },
  55. tooltip : {
  56. trigger: 'axis',
  57. showDelay : 0,
  58. axisPointer:{
  59. show: true,
  60. type : 'cross',
  61. lineStyle: {
  62. type : 'dashed',
  63. width : 1
  64. }
  65. }
  66. },
  67. toolbox : {
  68. 'show':true,
  69. orient : 'vertical',
  70. x: 'right',
  71. y: 'center',
  72. 'feature':{
  73. 'mark':{'show':true},
  74. 'dataView':{'show':true,'readOnly':false},
  75. 'restore':{'show':true},
  76. 'saveAsImage':{'show':true}
  77. }
  78. },
  79. grid : {'y':80,'y2':100},
  80. xAxis : [{
  81. 'type':'value',
  82. 'name':'房地产(亿元)',
  83. 'max':3400
  84. }],
  85. yAxis : [{
  86. 'type':'value',
  87. 'name':'GDP(亿元)',
  88. 'max':53500
  89. }],
  90. series : [
  91. {
  92. 'name':'GDP',
  93. 'type':'scatter',
  94. markLine : {
  95. data : [
  96. {type : 'average', name: 'y平均值', itemStyle:{normal:{borderColor:'red'}}},
  97. {type : 'average', name: 'x平均值', valueIndex : 0, itemStyle:{normal:{borderColor:'red'}}}
  98. ]
  99. },
  100. symbolSize : 5,
  101. itemStyle: {
  102. normal : {
  103. label : {
  104. show: true,
  105. formatter : '{b}'
  106. }
  107. }
  108. },
  109. 'data': dataMap.dataGDP_Estate['2002']
  110. }
  111. ]
  112. },
  113. {
  114. title : {'text':'2003全国宏观经济关联分析(GDP vs 房地产)'},
  115. series : [
  116. {'data': dataMap.dataGDP_Estate['2003']}
  117. ]
  118. },
  119. {
  120. title : {'text':'2004全国宏观经济关联分析(GDP vs 房地产)'},
  121. series : [
  122. {'data': dataMap.dataGDP_Estate['2004']}
  123. ]
  124. },
  125. {
  126. title : {'text':'2005全国宏观经济关联分析(GDP vs 房地产)'},
  127. series : [
  128. {'data': dataMap.dataGDP_Estate['2005']}
  129. ]
  130. },
  131. {
  132. title : {'text':'2006全国宏观经济关联分析(GDP vs 房地产)'},
  133. series : [
  134. {'data': dataMap.dataGDP_Estate['2006']}
  135. ]
  136. },
  137. {
  138. title : {'text':'2007全国宏观经济关联分析(GDP vs 房地产)'},
  139. series : [
  140. {'data': dataMap.dataGDP_Estate['2007']}
  141. ]
  142. },
  143. {
  144. title : {'text':'2008全国宏观经济关联分析(GDP vs 房地产)'},
  145. series : [
  146. {'data': dataMap.dataGDP_Estate['2008']}
  147. ]
  148. },
  149. {
  150. title : {'text':'2009全国宏观经济关联分析(GDP vs 房地产)'},
  151. series : [
  152. {'data': dataMap.dataGDP_Estate['2009']}
  153. ]
  154. },
  155. {
  156. title : {'text':'2010全国宏观经济关联分析(GDP vs 房地产)'},
  157. series : [
  158. {'data': dataMap.dataGDP_Estate['2010']}
  159. ]
  160. },
  161. {
  162. title : {'text':'2011全国宏观经济关联分析(GDP vs 房地产)'},
  163. series : [
  164. {'data': dataMap.dataGDP_Estate['2011']}
  165. ]
  166. }
  167. ]
  168. };
  169. </textarea>
  170. </div><!--/.well -->
  171. </div><!--/span-->
  172. <div id="graphic" class="col-md-8">
  173. <div id="main" class="main"></div>
  174. <div>
  175. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  176. <span class="text-primary">切换主题</span>
  177. <select id="theme-select"></select>
  178. <span id='wrong-message' style="color:red"></span>
  179. </div>
  180. </div><!--/span-->
  181. </div><!--/row-->
  182. </div><!--/.fluid-container-->
  183. <footer id="footer"></footer>
  184. <!-- Le javascript
  185. ================================================== -->
  186. <!-- Placed at the end of the document so the pages load faster -->
  187. <script src="../asset/js/jquery.min.js"></script>
  188. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  189. <script src="../asset/js/bootstrap.min.js"></script>
  190. <script src="timelineOption.js"></script>
  191. <script src="../asset/js/echartsExample.js"></script>
  192. </body>
  193. </html>