echarts-data.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. import * as echarts from 'echarts'
  2. export const gaugeOption = {
  3. series: [
  4. {
  5. type: 'gauge',
  6. center: ['50%', '75%'],
  7. startAngle: 200,
  8. endAngle: -20,
  9. min: 0,
  10. max: 60,
  11. // splitNumber: 12,
  12. itemStyle: {
  13. color: '#FFAB91'
  14. },
  15. progress: {
  16. show: true,
  17. width: 20
  18. },
  19. pointer: {
  20. show: false
  21. },
  22. axisLine: {
  23. lineStyle: {
  24. width: 20
  25. }
  26. },
  27. axisTick: {
  28. distance: -45,
  29. // splitNumber: 5,
  30. lineStyle: {
  31. // width: 1,
  32. color: '#999'
  33. }
  34. },
  35. splitLine: {
  36. distance: -52,
  37. length: 14,
  38. lineStyle: {
  39. // width: 3,
  40. color: '#999'
  41. }
  42. },
  43. axisLabel: {
  44. distance: -20,
  45. color: '#999',
  46. fontSize: 14
  47. },
  48. anchor: {
  49. show: false
  50. },
  51. title: {
  52. show: false
  53. },
  54. detail: {
  55. valueAnimation: true,
  56. width: '60%',
  57. lineHeight: 40,
  58. borderRadius: 8,
  59. offsetCenter: [0, '-15%'],
  60. fontSize: 20,
  61. fontWeight: 'bolder',
  62. formatter: '{value} 个',
  63. color: 'inherit'
  64. },
  65. data: [
  66. {
  67. value: 20
  68. }
  69. ]
  70. },
  71. {
  72. type: 'gauge',
  73. center: ['50%', '75%'],
  74. startAngle: 200,
  75. endAngle: -20,
  76. min: 0,
  77. max: 60,
  78. itemStyle: {
  79. color: '#FD7347'
  80. },
  81. progress: {
  82. show: true,
  83. // width: 8
  84. },
  85. pointer: {
  86. show: false
  87. },
  88. axisLine: {
  89. show: false
  90. },
  91. axisTick: {
  92. show: false
  93. },
  94. splitLine: {
  95. show: false
  96. },
  97. axisLabel: {
  98. show: false
  99. },
  100. detail: {
  101. valueAnimation: true,
  102. width: '60%',
  103. lineHeight: 40,
  104. borderRadius: 8,
  105. offsetCenter: [0, '50%'],
  106. fontSize: 20,
  107. fontWeight: 'bolder',
  108. formatter: '限电场站数',
  109. color: 'inherit'
  110. },
  111. data: [
  112. {
  113. value: 20
  114. }
  115. ]
  116. }
  117. ]
  118. }
  119. export let lineOption = {
  120. tooltip: {
  121. trigger: 'axis',
  122. axisPointer: {
  123. type: 'cross',
  124. animation: false,
  125. label: {
  126. backgroundColor: '#505765'
  127. }
  128. }
  129. },grid: {
  130. bottom: 30
  131. },
  132. legend: {
  133. data: ['实际功率', '可用功率','理论功率','短期','超短期'],
  134. itemStyle:{
  135. opacity:0
  136. },
  137. top:'2%'
  138. },
  139. xAxis: [
  140. {
  141. type: 'category',
  142. boundaryGap: false,
  143. axisLine: { onZero: false },
  144. // prettier-ignore
  145. data: ['00:00',
  146. '00:15', '00:30', '00:45', '01:00',
  147. '01:15', '01:30', '01:45', '02:00',
  148. '02:15', '02:30', '02:45', '03:00',
  149. '03:15', '03:30', '03:45', '04:00',
  150. '04:15', '04:30', '04:45', '05:00',
  151. '05:15', '05:30', '05:45', '06:00',
  152. '06:15', '06:30', '06:45', '07:00',
  153. '07:15', '07:30', '07:45', '08:00',
  154. '08:15', '08:30', '08:45', '09:00',
  155. '09:15', '09:30', '09:45', '10:00',
  156. '10:15', '10:30', '10:45', '11:00',
  157. '11:15', '11:30', '11:45', '12:00',
  158. '12:15', '12:30', '12:45', '13:00',
  159. '13:15', '13:30', '14:45', '14:00',
  160. '14:15', '14:30', '14:45', '15:00',
  161. '15:15', '15:30', '15:45', '16:00',
  162. '16:15', '16:30', '16:45', '17:00',
  163. '17:15', '17:30', '17:45', '18:00',
  164. '18:15', '18:30', '18:45', '19:00',
  165. '19:15', '19:30', '19:45', '20:00',
  166. '20:15', '20:30', '20:45', '21:00',
  167. '21:15', '21:30', '21:45', '22:00',
  168. '22:15', '22:30', '22:45', '23:00',
  169. '23:15', '23:30', '23:45'
  170. ]
  171. }
  172. ],
  173. yAxis: [
  174. {
  175. name: '万KW',
  176. type: 'value'
  177. }
  178. ],
  179. series: [
  180. {
  181. name: '实际功率',
  182. type: 'line',
  183. itemStyle: {
  184. color: 'rgb(2,207,253)'
  185. },
  186. areaStyle: {
  187. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  188. {
  189. offset: 0,
  190. color: 'rgb(2,205,251)'
  191. },
  192. {
  193. offset: 1,
  194. color: 'rgba(2,205,251,0)'
  195. }
  196. ])
  197. },
  198. lineStyle: {
  199. width: 1
  200. },
  201. emphasis: {
  202. focus: 'series'
  203. },
  204. // prettier-ignore
  205. data: []
  206. },{
  207. name: '可用功率',
  208. type: 'line',
  209. itemStyle: {
  210. color: 'rgb(253,128,2)'
  211. },
  212. areaStyle: {
  213. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  214. {
  215. offset: 0,
  216. color: 'rgb(253,128,2)'
  217. },
  218. {
  219. offset: 1,
  220. color: 'rgba(2,205,251,0)'
  221. }
  222. ])
  223. },
  224. lineStyle: {
  225. width: 1
  226. },
  227. emphasis: {
  228. focus: 'series'
  229. },
  230. // prettier-ignore
  231. data: []
  232. },{
  233. name: '理论功率',
  234. type: 'line',
  235. itemStyle: {
  236. color: 'rgb(253,10,2)'
  237. },
  238. areaStyle: {
  239. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  240. {
  241. offset: 0,
  242. color: 'rgb(253,10,2)'
  243. },
  244. {
  245. offset: 1,
  246. color: 'rgba(2,205,251,0)'
  247. }
  248. ])
  249. },
  250. lineStyle: {
  251. width: 1
  252. },
  253. emphasis: {
  254. focus: 'series'
  255. },
  256. // prettier-ignore
  257. data: []
  258. },{
  259. name: '短期',
  260. type: 'line',
  261. itemStyle: {
  262. color: 'rgb(175,129,251)'
  263. },
  264. areaStyle: {
  265. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  266. {
  267. offset: 0,
  268. color: 'rgb(174,128,249)'
  269. },
  270. {
  271. offset: 1,
  272. color: 'rgba(173,127,247,0)'
  273. }
  274. ])
  275. },
  276. lineStyle: {
  277. width: 1
  278. },
  279. emphasis: {
  280. focus: 'series'
  281. },
  282. // prettier-ignore
  283. data: []
  284. },{
  285. name: '超短期',
  286. type: 'line',
  287. itemStyle: {
  288. color: 'rgb(135,247,207)'
  289. },
  290. areaStyle: {
  291. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  292. {
  293. offset: 0,
  294. color: 'rgb(134,245,205)'
  295. },
  296. {
  297. offset: 1,
  298. color: 'rgba(134,245,205,0)'
  299. }
  300. ])
  301. },
  302. lineStyle: {
  303. width: 1
  304. },
  305. emphasis: {
  306. focus: 'series'
  307. },
  308. // prettier-ignore
  309. data: []
  310. },
  311. ]
  312. }