信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. import ChartBar from '../../../src/chart/zaibei/ChartBar5/ChartBar5.js';
  2. import Title from "../../../src/chart/commonOptions/title";
  3. import Grid from "../../../src/chart/commonOptions/grid";
  4. import Legend from "../../../src/chart/commonOptions/legend";
  5. import ToolTip from "../../../src/chart/commonOptions/tooltip";
  6. // import Title from "../../../src/chart/commonOptions/title";
  7. // import Grid from "../../../src/chart/commonOptions/grid";
  8. let bar = new ChartBar(document.getElementsByClassName('c1')[0], {});
  9. window.addEventListener('resize', () => {
  10. bar.resize();
  11. });
  12. setTimeout(() => {
  13. console.log(3000);
  14. // bar.setOption(op1);
  15. }, 3000)
  16. setTimeout(() => {
  17. console.log(6000);
  18. // bar.setOption(op2);
  19. }, 6000)
  20. let op1 = {
  21. color: ['#0090ff'],
  22. bg: {
  23. backgroundColor: '#000713'
  24. },
  25. title: Title.option('新经济普查工作'),
  26. grid: Grid.option,
  27. tooltip: ToolTip.option,
  28. legend: Legend.option,
  29. xAxis: {
  30. type: "category",
  31. data: ['地区一', '地区二asdasdasdasdasdasddasdas', '地区三', '地区四', '地区五', '地区六', '地区七', '地区八'],
  32. // dataPlus:[
  33. // ['地一', '地二', '地三', '地三', '地五', '地六', '地七', '地七'],
  34. // ['正', '正', '正', '反', '反', '反', '正', '正'],
  35. // ],
  36. axisLine: {
  37. show: true,
  38. lineStyle: {
  39. color: '#224c69',
  40. width: 2,
  41. }
  42. },
  43. axisTick: {
  44. show: true,
  45. alignWithLabel: true,
  46. interval: 'auto',
  47. length: 3,
  48. lineStyle: {
  49. color: '#ffff00'
  50. }
  51. },
  52. axisLabel: {
  53. show: true,
  54. maxShow: '',
  55. overHidden: true,
  56. textStyle: {
  57. color: '#54b3ea'
  58. }
  59. // margin: 0,
  60. },
  61. // splitLine: {
  62. // show: false,
  63. // lineStyle: {
  64. // color: '#26426a',
  65. // width: 1,
  66. //
  67. // }
  68. // }
  69. },
  70. yAxis: {
  71. type: 'value',
  72. title: '(%)',
  73. nameTextStyle: {
  74. color: '#54b3ea'
  75. },
  76. axisLine: {
  77. show: true,
  78. lineStyle: {
  79. color: '#224c69',
  80. width: 2,
  81. type: 'solid'
  82. }
  83. },
  84. splitLine: {
  85. show: false,
  86. lineStyle: {
  87. color: '#26426a',
  88. width: 1,
  89. type: 'solid'
  90. }
  91. },
  92. axisTick: {
  93. show: true,
  94. interval: 'auto',
  95. length: 3,
  96. lineStyle: {
  97. color: '#ffff00',
  98. }
  99. },
  100. axisLabel: {
  101. show: true,
  102. textStyle: {
  103. color: '#54b3ea'
  104. }
  105. // margin: 0,
  106. },
  107. },
  108. shape: {
  109. barCategoryGap: '40%',
  110. bgRect: {
  111. lineColor: '#02434b',
  112. color: '#021427'
  113. },
  114. label: {
  115. show: false,
  116. textStyle: {
  117. fontSize: 12,
  118. fontWeight: 'normal',
  119. color: ''
  120. //'' 表示使用series默认颜色数组
  121. }
  122. },
  123. },
  124. series: [{
  125. name: '行业总产值',
  126. type: 'bar',
  127. data: [91, 5, 82, 78, 74, 79, 67, 89]
  128. }]
  129. };
  130. let op2 = {
  131. color: ['#0090ff'],
  132. bg: {
  133. backgroundColor: '#000713'
  134. },
  135. title: Title.option('新经济普查工作'),
  136. grid: Grid.option,
  137. tooltip: {},
  138. legend: Legend.option,
  139. xAxis: {
  140. type: "category",
  141. data: ['地区一', '地区二', '地区三', '地区四', '地区五', '地区六', '地区七', '地区八'],
  142. dataPlus: [
  143. ['正', '正', '正', '反', '反', '反', '正', '正']
  144. ],
  145. axisLine: {
  146. show: true,
  147. lineStyle: {
  148. color: '#224c69',
  149. width: 2,
  150. }
  151. },
  152. axisTick: {
  153. show: true,
  154. alignWithLabel: true,
  155. interval: 'auto',
  156. length: 3,
  157. lineStyle: {
  158. color: '#ffff00'
  159. }
  160. },
  161. axisLabel: {
  162. show: true,
  163. textStyle: {
  164. color: '#54b3ea'
  165. }
  166. // margin: 0,
  167. },
  168. // splitLine: {
  169. // show: false,
  170. // lineStyle: {
  171. // color: '#26426a',
  172. // width: 1,
  173. //
  174. // }
  175. // }
  176. },
  177. yAxis: {
  178. type: 'value',
  179. title: '(%)',
  180. nameTextStyle: {
  181. color: '#54b3ea'
  182. },
  183. axisLine: {
  184. show: true,
  185. lineStyle: {
  186. color: '#224c69',
  187. width: 2,
  188. type: 'solid'
  189. }
  190. },
  191. splitLine: {
  192. show: false,
  193. lineStyle: {
  194. color: '#26426a',
  195. width: 1,
  196. type: 'solid'
  197. }
  198. },
  199. axisTick: {
  200. show: true,
  201. interval: 'auto',
  202. length: 3,
  203. lineStyle: {
  204. color: '#ffff00',
  205. }
  206. },
  207. axisLabel: {
  208. show: true,
  209. textStyle: {
  210. color: '#54b3ea'
  211. }
  212. // margin: 0,
  213. },
  214. },
  215. shape: {
  216. barCategoryGap: '40%',
  217. bgRect: {
  218. lineColor: '#02434b',
  219. color: '#021427'
  220. },
  221. label: {
  222. show: false,
  223. textStyle: {
  224. fontSize: 12,
  225. fontWeight: 'normal',
  226. color: ''
  227. //'' 表示使用series默认颜色数组
  228. }
  229. },
  230. },
  231. series: [{
  232. name: '行业总产值',
  233. type: 'bar',
  234. data: [91, 5, 82, 78, 74, 79, 67, 89]
  235. }]
  236. }