option0.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. function option0 () {
  2. return {
  3. title : {
  4. text: '2011全国GDP',
  5. subtext: '数据来自国家统计局',
  6. x:'right',
  7. y: 'top'
  8. },
  9. tooltip : {
  10. trigger: 'item'
  11. },
  12. dataRange: {
  13. min: 600,
  14. max: 60000,
  15. orient: 'horizontal',
  16. color:['red','yellow'],
  17. text:['高','低'], // 文本,默认为数值文本
  18. calculable : true,
  19. x: 'center',
  20. y: 'bottom',
  21. textStyle: {
  22. color: 'orange'
  23. }
  24. },
  25. toolbox: {
  26. show : true,
  27. //orient : 'vertical',
  28. x: 'left',
  29. y: 'top',
  30. feature : {
  31. mark : {show: true},
  32. dataView : {show: true, readOnly: false},
  33. restore : {show: true},
  34. saveAsImage : {show: true}
  35. }
  36. },
  37. grid:{
  38. x: 50,
  39. x2: 200,
  40. y2: 10,
  41. borderWidth:0
  42. },
  43. xAxis : [
  44. {
  45. type : 'value',
  46. position: 'top',
  47. name: '(亿元)',
  48. splitLine: {show:false},
  49. boundaryGap : [0, 0.01]
  50. }
  51. ],
  52. yAxis : [
  53. {
  54. type : 'category',
  55. splitLine: {show:false},
  56. axisLabel: {
  57. interval:0
  58. },
  59. data : ['西藏','青海','宁夏','海南','甘肃','贵州','新疆','云南','重庆','吉林','山西','天津','江西','广西','陕西','黑龙江','内蒙古','安徽','北京','福建','上海','湖北','湖南','四川','辽宁','河北','河南','浙江','山东','江苏','广东']
  60. }
  61. ],
  62. series : [
  63. {
  64. name: '2011全国GDP',
  65. type: 'map',
  66. mapType: 'china',
  67. itemSdtyle:{
  68. normal:{label:{show:true}}
  69. },
  70. mapLocation: {
  71. x: 'right',
  72. y: 80
  73. },
  74. data:[
  75. {name:'西藏', value:605.83},
  76. {name:'青海', value:1670.44},
  77. {name:'宁夏', value:2102.21},
  78. {name:'海南', value:2522.66},
  79. {name:'甘肃', value:5020.37},
  80. {name:'贵州', value:5701.84},
  81. {name:'新疆', value:6610.05},
  82. {name:'云南', value:8893.12},
  83. {name:'重庆', value:10011.37},
  84. {name:'吉林', value:10568.83},
  85. {name:'山西', value:11237.55},
  86. {name:'天津', value:11307.28},
  87. {name:'江西', value:11702.82},
  88. {name:'广西', value:11720.87},
  89. {name:'陕西', value:12512.3},
  90. {name:'黑龙江', value:12582},
  91. {name:'内蒙古', value:14359.88},
  92. {name:'安徽', value:15300.65},
  93. {name:'北京', value:16251.93},
  94. {name:'福建', value:17560.18},
  95. {name:'上海', value:19195.69},
  96. {name:'湖北', value:19632.26},
  97. {name:'湖南', value:19669.56},
  98. {name:'四川', value:21026.68},
  99. {name:'辽宁', value:22226.7},
  100. {name:'河北', value:24515.76},
  101. {name:'河南', value:26931.03},
  102. {name:'浙江', value:32318.85},
  103. {name:'山东', value:45361.85},
  104. {name:'江苏', value:49110.27},
  105. {name:'广东', value:53210.28}
  106. ]
  107. },
  108. {
  109. type: 'bar',
  110. itemStyle : {
  111. normal : {
  112. color : (function (){
  113. var zrColor = require('zrender/tool/color');
  114. return zrColor.getLinearGradient(
  115. 0, 80, 0, 500,
  116. [[0, 'red'],[0.2, 'orange'],[1, 'yellow']]
  117. )
  118. })(),
  119. label : {
  120. show : false
  121. }
  122. },
  123. emphasis : {
  124. label : {
  125. show : true,
  126. textStyle : {
  127. color : 'orange',
  128. fontWeight : 'bold'
  129. }
  130. }
  131. }
  132. },
  133. data:[
  134. {name:'西藏', value:605.83},
  135. {name:'青海', value:1670.44},
  136. {name:'宁夏', value:2102.21},
  137. {name:'海南', value:2522.66},
  138. {name:'甘肃', value:5020.37},
  139. {name:'贵州', value:5701.84},
  140. {name:'新疆', value:6610.05},
  141. {name:'云南', value:8893.12},
  142. {name:'重庆', value:10011.37},
  143. {name:'吉林', value:10568.83},
  144. {name:'山西', value:11237.55},
  145. {name:'天津', value:11307.28},
  146. {name:'江西', value:11702.82},
  147. {name:'广西', value:11720.87},
  148. {name:'陕西', value:12512.3},
  149. {name:'黑龙江', value:12582},
  150. {name:'内蒙古', value:14359.88},
  151. {name:'安徽', value:15300.65},
  152. {name:'北京', value:16251.93},
  153. {name:'福建', value:17560.18},
  154. {name:'上海', value:19195.69},
  155. {name:'湖北', value:19632.26},
  156. {name:'湖南', value:19669.56},
  157. {name:'四川', value:21026.68},
  158. {name:'辽宁', value:22226.7},
  159. {name:'河北', value:24515.76},
  160. {name:'河南', value:26931.03},
  161. {name:'浙江', value:32318.85},
  162. {name:'山东', value:45361.85},
  163. {name:'江苏', value:49110.27},
  164. {name:'广东', value:53210.28}
  165. ]
  166. }
  167. ]
  168. };
  169. }