信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. import ChartLine from '../../../src/chart/tufang/ChartLine11/ChartLine11.js';
  2. let chart = new ChartLine(document.getElementsByClassName('c1')[0], {});
  3. window.addEventListener('resize', () => {
  4. chart.resize();
  5. });
  6. // let option = {
  7. // color: ['#c6b146','#ffffff','#94ddf3', '#18c1f1', '#ed9c01', '#d0e3ff', '#00bfff', '#008b8b', '#00fa9a', '#0000ff'],
  8. // title: Title.option(''),
  9. // bg: {
  10. // backgroundColor: '#101029'
  11. // },
  12. // grid: Grid.option,
  13. // tooltip: {
  14. // // dangerline: {
  15. // // show: true,
  16. // // dangerData: 8
  17. // // },
  18. // // targetline: {
  19. // // show: true,
  20. // // targetData: 12
  21. // // },
  22. // // guideline: {
  23. // // show: true,
  24. // // color: '#ccc'
  25. // // }
  26. // backgroundColor: '#ffffff',
  27. // opacity: 0.05
  28. // },
  29. // legend: {
  30. // itemHeight: 10,
  31. // itemWidth: 10,
  32. // itemAngelR: 20,
  33. // left:'22%',
  34. // top:'8%'
  35. // },
  36. // xAxis: {
  37. // type: "category",
  38. // // title: '日期',
  39. // nameTextStyle: {
  40. // fontSize: 12,
  41. // color: '#797979',
  42. // },
  43. // namePosition: 'end',
  44. // // data: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", '八月', '九月', '十月', '十一月', '十二月'],
  45. // data: ['2012','2013','2014','2015','2016','2017','2018','2019'],
  46. // boundaryGap: false,
  47. // // scale: true,
  48. // axisLine: {
  49. // show: true,
  50. // lineStyle: {
  51. // color: '#ffffff',
  52. // opacity: 0.3,
  53. // width: 4,
  54. // type: 'solid'
  55. // }
  56. // },
  57. // axisTick: {
  58. // show: false,
  59. // alignWithLabel: false,
  60. // // interval: 'auto'
  61. // },
  62. // splitLine: {
  63. // show: true,
  64. // lineStyle: {
  65. // color: '#ffffff',
  66. // opacity:0.05,
  67. // width: 1,
  68. // type: 'solid'
  69. // }
  70. // },
  71. // axisLabel: {
  72. // show: true,
  73. // textStyle: {
  74. // color: '#797979',
  75. // textRotation:30
  76. // }
  77. // }
  78. // },
  79. // yAxis: {
  80. // type: 'value',
  81. // title: '单位',
  82. // nameTextStyle: {
  83. // fontSize: 12,
  84. // color: '#797979',
  85. // },
  86. // namePosition: 'end',
  87. // scale: true,
  88. // axisLine: {
  89. // show: true,
  90. // lineStyle: {
  91. // color: '#ffffff',
  92. // opacity: 0.3,
  93. // width: 4,
  94. // type: 'solid'
  95. // }
  96. // },
  97. // axisTick: {
  98. // show: false,
  99. // alignWithLabel: true,
  100. // interval: 'auto',
  101. // lineStyle: {
  102. // color: '#ffffff',
  103. // opacity: 0.3,
  104. // width: 1
  105. // }
  106. // },
  107. // splitLine: {
  108. // show: true,
  109. // lineStyle: {
  110. // color: '#ffffff',
  111. // opacity: 0.05,
  112. // width: 1,
  113. // type: 'solid'
  114. // }
  115. // },
  116. // axisLabel: {
  117. // show: true,
  118. // format:true,
  119. // textStyle: {
  120. // color: '#797979'
  121. // }
  122. // }
  123. // },
  124. // shape:{
  125. // label: {
  126. // show: false,
  127. // textStyle: {
  128. // fontSize: 12,
  129. // fontWeight: 'normal',
  130. // color: ''
  131. // }
  132. // },
  133. // lineStyle: {
  134. // width: 2,
  135. // smooth: false,
  136. // },
  137. // lineShadow: {
  138. // shadowColor: '#000000',
  139. // shadowOffsetX: 0,
  140. // shadowOffsetY: 0,
  141. // shadowBlur: 0
  142. // },
  143. // iconType: 'circle',
  144. // circleSize: 2,
  145. // circleFill: '#ffffff',
  146. // },
  147. // series: [
  148. // {
  149. // name: '类别一',
  150. // type: 'bar',
  151. // data: [4.1, 3.9, 3.7, 3.95, 3.3, 3.5, 2.9, 2.2],
  152. // }, {
  153. // name: '类别二',
  154. // type: 'bar',
  155. // data: [3, 3.5, 2.9, 3.1, 3, 3.2, 2.5, 3.3],
  156. // }
  157. // // {
  158. // // name: '目标值',
  159. // // type: 'bar',
  160. // // data: [810000, 1200000, 1600000, 2100000, 2560000, 3000000, 3400000, 3900000, 4330000, 4760000, 5340000, 5900000],
  161. // // }, {
  162. // // name: '实际值',
  163. // // type: 'bar',
  164. // // data: [610000, 1000000, 1800000, 2200000, 2400000, 2600000, 3050000, 3590000, 4220000, 4860000, 5640000, 6800000],
  165. // // }, {
  166. // // name: '同期值',
  167. // // type: 'bar',
  168. // // data: [510000, 800000, 1200000, 1700000, 2200000, 2500000, 2800000, 3390000, 3850000, 4660000, 5040000, 5300000],
  169. // // }
  170. // ]
  171. // };
  172. // let option2 = {
  173. // color: ['#c6b146','#ffffff','#94ddf3', '#18c1f1', '#ed9c01', '#d0e3ff', '#00bfff', '#008b8b', '#00fa9a', '#0000ff'],
  174. // title: Title.option(''),
  175. // bg: {
  176. // backgroundColor: '#101029'
  177. // },
  178. // grid: Grid.option,
  179. // tooltip: {
  180. // // dangerline: {
  181. // // show: true,
  182. // // dangerData: 8
  183. // // },
  184. // // targetline: {
  185. // // show: true,
  186. // // targetData: 12
  187. // // },
  188. // // guideline: {
  189. // // show: true,
  190. // // color: '#ccc'
  191. // // }
  192. // backgroundColor: '#ffffff',
  193. // opacity: 0.05
  194. // },
  195. // legend: {
  196. // itemHeight: 10,
  197. // itemWidth: 10,
  198. // itemAngelR: 20,
  199. // left:'22%',
  200. // top:'8%'
  201. // },
  202. // xAxis: {
  203. // type: "category",
  204. // // title: '日期',
  205. // nameTextStyle: {
  206. // fontSize: 12,
  207. // color: '#797979',
  208. // },
  209. // namePosition: 'end',
  210. // // data: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", '八月', '九月', '十月', '十一月', '十二月'],
  211. // data: ['2012','2013','2014','2015','2016','2017','2018','2019'],
  212. // boundaryGap: false,
  213. // // scale: true,
  214. // axisLine: {
  215. // show: true,
  216. // lineStyle: {
  217. // color: '#ffffff',
  218. // opacity: 0.3,
  219. // width: 4,
  220. // type: 'solid'
  221. // }
  222. // },
  223. // axisTick: {
  224. // show: false,
  225. // alignWithLabel: false,
  226. // // interval: 'auto'
  227. // },
  228. // splitLine: {
  229. // show: true,
  230. // lineStyle: {
  231. // color: '#ffffff',
  232. // opacity:0.05,
  233. // width: 1,
  234. // type: 'solid'
  235. // }
  236. // },
  237. // axisLabel: {
  238. // show: true,
  239. // textStyle: {
  240. // color: '#797979',
  241. // textRotation:30
  242. // }
  243. // }
  244. // },
  245. // yAxis: {
  246. // type: 'value',
  247. // title: '单位',
  248. // nameTextStyle: {
  249. // fontSize: 12,
  250. // color: '#797979',
  251. // },
  252. // namePosition: 'end',
  253. // scale: true,
  254. // axisLine: {
  255. // show: true,
  256. // lineStyle: {
  257. // color: '#ffffff',
  258. // opacity: 0.3,
  259. // width: 4,
  260. // type: 'solid'
  261. // }
  262. // },
  263. // axisTick: {
  264. // show: false,
  265. // alignWithLabel: true,
  266. // interval: 'auto',
  267. // lineStyle: {
  268. // color: '#ffffff',
  269. // opacity: 0.3,
  270. // width: 1
  271. // }
  272. // },
  273. // splitLine: {
  274. // show: true,
  275. // lineStyle: {
  276. // color: '#ffffff',
  277. // opacity: 0.05,
  278. // width: 1,
  279. // type: 'solid'
  280. // }
  281. // },
  282. // axisLabel: {
  283. // show: true,
  284. // format:true,
  285. // textStyle: {
  286. // color: '#797979'
  287. // }
  288. // }
  289. // },
  290. // shape:{
  291. // label: {
  292. // show: false,
  293. // textStyle: {
  294. // fontSize: 12,
  295. // fontWeight: 'normal',
  296. // color: ''
  297. // }
  298. // },
  299. // lineStyle: {
  300. // width: 2,
  301. // smooth: false,
  302. // },
  303. // lineShadow: {
  304. // shadowColor: '#000000',
  305. // shadowOffsetX: 0,
  306. // shadowOffsetY: 0,
  307. // shadowBlur: 0
  308. // },
  309. // iconType: 'trigon',
  310. // circleSize: 10,
  311. // circleFill: '#ffffff',
  312. // },
  313. // series: [
  314. // {
  315. // name: '类别一',
  316. // type: 'bar',
  317. // data: [4.1, 3.9, 3.7, 3.95, 3.3, 3.5, 2.9, 2.2],
  318. // }, {
  319. // name: '类别二',
  320. // type: 'bar',
  321. // data: [3, 3.5, 2.9, 3.1, 3, 3.2, 2.5, 3.3],
  322. // }
  323. // // {
  324. // // name: '目标值',
  325. // // type: 'bar',
  326. // // data: [810000, 1200000, 1600000, 2100000, 2560000, 3000000, 3400000, 3900000, 4330000, 4760000, 5340000, 5900000],
  327. // // }, {
  328. // // name: '实际值',
  329. // // type: 'bar',
  330. // // data: [610000, 1000000, 1800000, 2200000, 2400000, 2600000, 3050000, 3590000, 4220000, 4860000, 5640000, 6800000],
  331. // // }, {
  332. // // name: '同期值',
  333. // // type: 'bar',
  334. // // data: [510000, 800000, 1200000, 1700000, 2200000, 2500000, 2800000, 3390000, 3850000, 4660000, 5040000, 5300000],
  335. // // }
  336. // ]
  337. // };
  338. // setTimeout(()=>{
  339. // chart.setOption(option)
  340. // },2000)
  341. // setTimeout(()=>{
  342. // chart.setOption(option2)
  343. // },4000)