echarts-data.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782
  1. import * as echarts from 'echarts'
  2. import {fontSize} from "../../utils";
  3. export const gaugeOption = {
  4. series: [
  5. {
  6. type: 'gauge',
  7. center: ['50%', '70%'],
  8. startAngle: 200,
  9. endAngle: -20,
  10. min: 0,
  11. max: 60,
  12. // splitNumber: 12,
  13. itemStyle: {
  14. color: '#FFAB91'
  15. },
  16. progress: {
  17. show: true,
  18. width: fontSize(0.2)
  19. },
  20. pointer: {
  21. show: false
  22. },
  23. axisLine: {
  24. lineStyle: {
  25. width: fontSize(0.2)
  26. }
  27. },
  28. axisTick: {
  29. distance: -fontSize(.45),
  30. splitNumber: 5,
  31. lineStyle: {
  32. // width: 1,
  33. color: '#999'
  34. }
  35. },
  36. splitLine: {
  37. distance: -fontSize(.5),
  38. length: fontSize(.14),
  39. lineStyle: {
  40. // width: 3,
  41. color: '#999'
  42. }
  43. },
  44. axisLabel: {
  45. distance: -fontSize(.2),
  46. color: '#999',
  47. fontSize: fontSize(0.16)
  48. },
  49. anchor: {
  50. show: false
  51. },
  52. title: {
  53. show: false
  54. },
  55. detail: {
  56. valueAnimation: true,
  57. width: '60%',
  58. lineHeight: 40,
  59. borderRadius: 8,
  60. offsetCenter: [0, '-15%'],
  61. fontSize: 20,
  62. fontWeight: 'bolder',
  63. formatter: '{value} 个',
  64. color: 'inherit'
  65. },
  66. data: [
  67. {
  68. value: 20
  69. }
  70. ]
  71. },
  72. {
  73. type: 'gauge',
  74. center: ['50%', '75%'],
  75. startAngle: 200,
  76. endAngle: -20,
  77. min: 0,
  78. max: 60,
  79. itemStyle: {
  80. color: '#FD7347'
  81. },
  82. progress: {
  83. show: true,
  84. // width: 8
  85. },
  86. pointer: {
  87. show: false
  88. },
  89. axisLine: {
  90. show: false
  91. },
  92. axisTick: {
  93. show: false
  94. },
  95. splitLine: {
  96. show: false
  97. },
  98. axisLabel: {
  99. show: false
  100. },
  101. detail: {
  102. valueAnimation: true,
  103. width: '60%',
  104. lineHeight: 40,
  105. borderRadius: 8,
  106. offsetCenter: [0, '50%'],
  107. fontSize: fontSize(0.2),
  108. fontWeight: 'bolder',
  109. formatter: '限电场站数',
  110. color: 'inherit'
  111. },
  112. data: [
  113. {
  114. value: 20
  115. }
  116. ]
  117. }
  118. ]
  119. }
  120. /**
  121. * 功率曲线
  122. * */
  123. export let lineOption = {
  124. tooltip: {
  125. trigger: 'axis',
  126. axisPointer: {
  127. type: 'cross',
  128. animation: false,
  129. label: {
  130. backgroundColor: '#505765'
  131. }
  132. }
  133. }, grid: {
  134. left: 55,
  135. right: 30,
  136. bottom: 30
  137. },
  138. legend: {
  139. data: ['实际功率', '可用功率', '理论功率', '短期', '超短期'],
  140. itemStyle: {
  141. opacity: 0
  142. },
  143. textStyle: {fontSize: fontSize(0.12),color: '#89BFE5'},
  144. top: '2%'
  145. },
  146. xAxis: [
  147. {
  148. type: 'category',
  149. boundaryGap: false,
  150. axisLine: {
  151. onZero: false, lineStyle: {
  152. color: '#5fbbeb'
  153. }
  154. },
  155. axisLabel: {
  156. color: '#89BFE5',
  157. textStyle: {
  158. fontSize: fontSize(.12)
  159. }
  160. },
  161. axisTick: {
  162. show: false, // 隐藏X轴轴线
  163. alignWithLabel: true
  164. },
  165. data: ['00:00',
  166. '00:15', '00:30', '00:45', '01:00',
  167. '01:15', '01:30', '01:45', '02:00',
  168. '02:15', '02:30', '02:45', '03:00',
  169. '03:15', '03:30', '03:45', '04:00',
  170. '04:15', '04:30', '04:45', '05:00',
  171. '05:15', '05:30', '05:45', '06:00',
  172. '06:15', '06:30', '06:45', '07:00',
  173. '07:15', '07:30', '07:45', '08:00',
  174. '08:15', '08:30', '08:45', '09:00',
  175. '09:15', '09:30', '09:45', '10:00',
  176. '10:15', '10:30', '10:45', '11:00',
  177. '11:15', '11:30', '11:45', '12:00',
  178. '12:15', '12:30', '12:45', '13:00',
  179. '13:15', '13:30', '14:45', '14:00',
  180. '14:15', '14:30', '14:45', '15:00',
  181. '15:15', '15:30', '15:45', '16:00',
  182. '16:15', '16:30', '16:45', '17:00',
  183. '17:15', '17:30', '17:45', '18:00',
  184. '18:15', '18:30', '18:45', '19:00',
  185. '19:15', '19:30', '19:45', '20:00',
  186. '20:15', '20:30', '20:45', '21:00',
  187. '21:15', '21:30', '21:45', '22:00',
  188. '22:15', '22:30', '22:45', '23:00',
  189. '23:15', '23:30', '23:45'
  190. ]
  191. }
  192. ],
  193. yAxis: [
  194. {
  195. name: 'MW',
  196. type: 'value',
  197. nameTextStyle: {color: '#89BFE5',fontSize: fontSize(.14)},
  198. axisLabel: {
  199. textStyle: {
  200. fontSize: fontSize(.12), color: '#89BFE5'
  201. }
  202. },
  203. axisTick: {
  204. show: false,
  205. },
  206. axisLine: {
  207. lineStyle: {
  208. color: '#394458',
  209. },
  210. },
  211. splitLine: {
  212. lineStyle: {
  213. type: 'dashed',
  214. color: '#394458',
  215. },
  216. },
  217. }
  218. ],
  219. series: [
  220. {
  221. name: '实际功率',
  222. type: 'line',
  223. itemStyle: {
  224. color: 'rgb(2,207,253)'
  225. },
  226. areaStyle: {
  227. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  228. {
  229. offset: 0,
  230. color: 'rgb(2,205,251)'
  231. },
  232. {
  233. offset: 1,
  234. color: 'rgba(2,205,251,0)'
  235. }
  236. ])
  237. },
  238. lineStyle: {
  239. width: 1
  240. },
  241. emphasis: {
  242. focus: 'series'
  243. },
  244. // prettier-ignore
  245. data: []
  246. }, {
  247. name: '可用功率',
  248. type: 'line',
  249. itemStyle: {
  250. color: 'rgb(253,128,2)'
  251. },
  252. areaStyle: {
  253. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  254. {
  255. offset: 0,
  256. color: 'rgb(253,128,2)'
  257. },
  258. {
  259. offset: 1,
  260. color: 'rgba(2,205,251,0)'
  261. }
  262. ])
  263. },
  264. lineStyle: {
  265. width: 1
  266. },
  267. emphasis: {
  268. focus: 'series'
  269. },
  270. // prettier-ignore
  271. data: []
  272. }, {
  273. name: '理论功率',
  274. type: 'line',
  275. itemStyle: {
  276. color: 'rgb(253,10,2)'
  277. },
  278. areaStyle: {
  279. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  280. {
  281. offset: 0,
  282. color: 'rgb(253,10,2)'
  283. },
  284. {
  285. offset: 1,
  286. color: 'rgba(2,205,251,0)'
  287. }
  288. ])
  289. },
  290. lineStyle: {
  291. width: 1
  292. },
  293. emphasis: {
  294. focus: 'series'
  295. },
  296. // prettier-ignore
  297. data: []
  298. }, {
  299. name: '短期',
  300. type: 'line',
  301. itemStyle: {
  302. color: 'rgb(175,129,251)'
  303. },
  304. areaStyle: {
  305. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  306. {
  307. offset: 0,
  308. color: 'rgb(174,128,249)'
  309. },
  310. {
  311. offset: 1,
  312. color: 'rgba(173,127,247,0)'
  313. }
  314. ])
  315. },
  316. lineStyle: {
  317. width: 1
  318. },
  319. emphasis: {
  320. focus: 'series'
  321. },
  322. // prettier-ignore
  323. data: []
  324. }, {
  325. name: '超短期',
  326. type: 'line',
  327. itemStyle: {
  328. color: 'rgb(135,247,207)'
  329. },
  330. areaStyle: {
  331. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  332. {
  333. offset: 0,
  334. color: 'rgb(134,245,205)'
  335. },
  336. {
  337. offset: 1,
  338. color: 'rgba(134,245,205,0)'
  339. }
  340. ])
  341. },
  342. lineStyle: {
  343. width: 1
  344. },
  345. emphasis: {
  346. focus: 'series'
  347. },
  348. // prettier-ignore
  349. data: []
  350. },
  351. ]
  352. }
  353. /**
  354. * 气象预测曲线
  355. * */
  356. export let weatherLineOption = {
  357. tooltip: {
  358. trigger: 'axis',
  359. axisPointer: {
  360. type: 'cross',
  361. animation: false,
  362. label: {
  363. backgroundColor: '#505765'
  364. }
  365. }
  366. }, grid: {
  367. left: 30,
  368. right: 30,
  369. bottom: 30
  370. },
  371. legend: {
  372. data: ['实际功率', '短期', '超短期','辐照度'],
  373. itemStyle: {
  374. opacity: 0
  375. },
  376. textStyle: {fontSize: fontSize(0.12),color: '#89BFE5'},
  377. top: '2%'
  378. },
  379. xAxis: [
  380. {
  381. type: 'category',
  382. boundaryGap: false,
  383. axisLine: {
  384. onZero: false, lineStyle: {
  385. color: '#5fbbeb'
  386. }
  387. },
  388. axisLabel: {
  389. color: '#89BFE5',
  390. textStyle: {
  391. fontSize: fontSize(.12)
  392. }
  393. },
  394. axisTick: {
  395. show: false, // 隐藏X轴轴线
  396. alignWithLabel: true
  397. },
  398. data: ['00:00',
  399. '00:15', '00:30', '00:45', '01:00',
  400. '01:15', '01:30', '01:45', '02:00',
  401. '02:15', '02:30', '02:45', '03:00',
  402. '03:15', '03:30', '03:45', '04:00',
  403. '04:15', '04:30', '04:45', '05:00',
  404. '05:15', '05:30', '05:45', '06:00',
  405. '06:15', '06:30', '06:45', '07:00',
  406. '07:15', '07:30', '07:45', '08:00',
  407. '08:15', '08:30', '08:45', '09:00',
  408. '09:15', '09:30', '09:45', '10:00',
  409. '10:15', '10:30', '10:45', '11:00',
  410. '11:15', '11:30', '11:45', '12:00',
  411. '12:15', '12:30', '12:45', '13:00',
  412. '13:15', '13:30', '14:45', '14:00',
  413. '14:15', '14:30', '14:45', '15:00',
  414. '15:15', '15:30', '15:45', '16:00',
  415. '16:15', '16:30', '16:45', '17:00',
  416. '17:15', '17:30', '17:45', '18:00',
  417. '18:15', '18:30', '18:45', '19:00',
  418. '19:15', '19:30', '19:45', '20:00',
  419. '20:15', '20:30', '20:45', '21:00',
  420. '21:15', '21:30', '21:45', '22:00',
  421. '22:15', '22:30', '22:45', '23:00',
  422. '23:15', '23:30', '23:45'
  423. ]
  424. }
  425. ],
  426. yAxis: [
  427. {
  428. name: 'MW',
  429. type: 'value',
  430. nameTextStyle: {color: '#89BFE5',fontSize: fontSize(.14)},
  431. axisLabel: {
  432. textStyle: {
  433. fontSize: fontSize(.12), color: '#89BFE5'
  434. }
  435. },
  436. axisTick: {
  437. show: false,
  438. },
  439. axisLine: {
  440. lineStyle: {
  441. color: '#394458',
  442. },
  443. },
  444. splitLine: {
  445. lineStyle: {
  446. type: 'dashed',
  447. color: '#394458',
  448. },
  449. },
  450. },{
  451. name: 'W/㎡',
  452. type: 'value',
  453. nameTextStyle: {color: '#89BFE5',fontSize: fontSize(.14)},
  454. axisLabel: {
  455. textStyle: {
  456. fontSize: fontSize(.12), color: '#89BFE5'
  457. }
  458. },
  459. axisTick: {
  460. show: false,
  461. },
  462. axisLine: {
  463. lineStyle: {
  464. color: '#394458',
  465. },
  466. },
  467. splitLine: {
  468. lineStyle: {
  469. type: 'dashed',
  470. color: '#394458',
  471. },
  472. },
  473. }
  474. ],
  475. series: [
  476. {
  477. name: '实际功率',
  478. type: 'line',
  479. itemStyle: {
  480. color: 'rgb(2,207,253)'
  481. },
  482. areaStyle: {
  483. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  484. {
  485. offset: 0,
  486. color: 'rgb(2,205,251)'
  487. },
  488. {
  489. offset: 1,
  490. color: 'rgba(2,205,251,0)'
  491. }
  492. ])
  493. },
  494. lineStyle: {
  495. width: 1
  496. },
  497. emphasis: {
  498. focus: 'series'
  499. },
  500. // prettier-ignore
  501. data: []
  502. },
  503. {
  504. name: '短期',
  505. type: 'line',
  506. itemStyle: {
  507. color: 'rgb(175,129,251)'
  508. },
  509. areaStyle: {
  510. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  511. {
  512. offset: 0,
  513. color: 'rgb(174,128,249)'
  514. },
  515. {
  516. offset: 1,
  517. color: 'rgba(173,127,247,0)'
  518. }
  519. ])
  520. },
  521. lineStyle: {
  522. width: 1
  523. },
  524. emphasis: {
  525. focus: 'series'
  526. },
  527. // prettier-ignore
  528. data: []
  529. }, {
  530. name: '超短期',
  531. type: 'line',
  532. itemStyle: {
  533. color: 'rgb(135,247,207)'
  534. },
  535. areaStyle: {
  536. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  537. {
  538. offset: 0,
  539. color: 'rgb(134,245,205)'
  540. },
  541. {
  542. offset: 1,
  543. color: 'rgba(134,245,205,0)'
  544. }
  545. ])
  546. },
  547. lineStyle: {
  548. width: 1
  549. },
  550. emphasis: {
  551. focus: 'series'
  552. },
  553. // prettier-ignore
  554. data: []
  555. },{
  556. name: '辐照度',
  557. yAxisIndex:1,
  558. type: 'line',
  559. itemStyle: {
  560. color: 'rgb(253,128,2)'
  561. },
  562. areaStyle: {
  563. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  564. {
  565. offset: 0,
  566. color: 'rgb(253,128,2)'
  567. },
  568. {
  569. offset: 1,
  570. color: 'rgba(2,205,251,0)'
  571. }
  572. ])
  573. },
  574. lineStyle: {
  575. width: 1
  576. },
  577. emphasis: {
  578. focus: 'series'
  579. },
  580. // prettier-ignore
  581. data: []
  582. },
  583. ]
  584. }
  585. /**
  586. * 未来10天预测电量
  587. **/
  588. export const forecast10LineOption = {
  589. animation: false,
  590. tooltip: {
  591. trigger: 'axis',
  592. axisPointer: {
  593. type: 'shadow'
  594. }
  595. },
  596. grid: {
  597. left: 20,
  598. right: 30,
  599. bottom: 10,
  600. containLabel: true
  601. },
  602. xAxis: {
  603. type: 'category',
  604. data: [],
  605. axisLine: {
  606. lineStyle: {
  607. color: '#5fbbeb'
  608. }
  609. },
  610. axisTick: {
  611. show: false, // 隐藏X轴轴线
  612. alignWithLabel: true
  613. },
  614. axisLabel: {
  615. color: '#89BFE5'
  616. },
  617. },
  618. yAxis: {
  619. type: 'value',
  620. name: '万kWh',
  621. nameTextStyle: {
  622. color: '#89BFE5'
  623. },
  624. axisLabel: {
  625. padding: [3, 0, 0, 0],
  626. formatter: '{value}',
  627. textStyle: {
  628. fontSize: 14,
  629. color: '#89BFE5'
  630. },
  631. },
  632. axisTick: {
  633. show: false,
  634. },
  635. axisLine: {
  636. lineStyle: {
  637. color: '#394458',
  638. },
  639. },
  640. splitLine: {
  641. lineStyle: {
  642. type: 'dashed',
  643. color: '#394458',
  644. },
  645. },
  646. },
  647. series: [
  648. {
  649. type: 'bar',
  650. barWidth: '60%',
  651. data: [],
  652. color: 'rgb(95,187,235)',
  653. itemStyle: {
  654. // 柱子的颜色
  655. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  656. offset: 0,
  657. color: 'rgb(95,187,235)'
  658. }, {
  659. offset: 0.25,
  660. color: 'rgb(95,187,235,0.75)'
  661. }, {
  662. offset: 0.5,
  663. color: 'rgba(95,187,235,0.5)'
  664. }, {
  665. offset: 0.75,
  666. color: 'rgb(95,187,235,0.25)'
  667. }, {
  668. offset: 1,
  669. color: 'rgba(95,187,235,0.0)'
  670. }]),
  671. },
  672. emphasis: {
  673. itemStyle: {
  674. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  675. {offset: 1, color: 'rgb(95,187,235)'}
  676. ])
  677. }
  678. },
  679. // 鼠标放到柱子上显示数据
  680. tooltip: {
  681. valueFormatter: function (value) {
  682. return value + '万kWh';
  683. }
  684. },
  685. }
  686. ]
  687. }
  688. /**
  689. * 短期偏差统计
  690. */
  691. export const dqTickOptions= {
  692. grid: {
  693. top:30,
  694. left: 40,
  695. right: 10,
  696. bottom: 30
  697. },
  698. animation: false,
  699. tooltip: {
  700. trigger: 'axis',
  701. formatter: function (params){
  702. let str = params[0].axisValue +'<br/>'
  703. for(let param of params){
  704. if(param.componentSubType === 'scatter'){
  705. str = str + '<div class="flex justify-between"><div>'+param.marker+param.seriesName+'</div><div>'+param.value[1]+'</div></div>'
  706. }
  707. if(param.componentSubType === 'boxplot'){
  708. str = str + '<div class="flex justify-between"><div>'+param.marker+'min</div><div>'+param.value[1]+'</div></div>'+
  709. '<div class="flex justify-between"><div>'+param.marker+'Q1</div><div>'+param.value[2]+'</div></div>'+
  710. '<div class="flex justify-between"><div>'+param.marker+'median</div><div>'+param.value[3]+'</div></div>'+
  711. '<div class="flex justify-between"><div>'+param.marker+'Q3</div><div>'+param.value[4]+'</div></div>'+
  712. '<div class="flex justify-between"><div>'+param.marker+'max</div><div>'+param.value[5]+'</div></div>'
  713. }
  714. }
  715. return str
  716. }
  717. },
  718. xAxis: {
  719. type: 'category',
  720. axisLabel: {
  721. color: '#89BFE5'
  722. },
  723. axisTick: {show: true},
  724. axisLine: {
  725. onZero: false,
  726. lineStyle: {
  727. color: '#5fbbeb'
  728. }
  729. },
  730. data: []
  731. },
  732. yAxis: {
  733. type: 'value',
  734. axisLabel: {
  735. padding: [3, 0, 0, 0],
  736. formatter: '{value}',
  737. textStyle: {
  738. fontSize: 14,
  739. color: '#89BFE5'
  740. },
  741. },
  742. axisTick: {
  743. show: false,
  744. },
  745. axisLine: {
  746. lineStyle: {
  747. color: '#394458',
  748. },
  749. },
  750. splitLine: {
  751. lineStyle: {
  752. type: 'dashed',
  753. color: '#394458',
  754. },
  755. },
  756. },
  757. series: [
  758. {
  759. name: '',
  760. type: 'boxplot',
  761. itemStyle: {
  762. color:'rgba(126,199,250,0.86)',
  763. // 边线颜色
  764. borderColor: '#89BFE5',
  765. // 边线宽度
  766. borderWidth: 2
  767. },
  768. data: []
  769. },
  770. {
  771. type: 'scatter',
  772. itemStyle: {
  773. color:'orange',
  774. },
  775. data: []
  776. }
  777. ]
  778. }