sensor_wenshidu.js 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198
  1. $(function () {
  2. // var whdef = 100/1920;// 表示1920的设计图,使用100PX的默认值
  3. var whdef = 100/916;// 表示1920的设计图,使用100PX的默认值
  4. var wH = window.innerHeight;// 当前窗口的高度
  5. var wW = window.innerWidth;// 当前窗口的宽度
  6. // var rem = wW * whdef;// 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
  7. var rem = wH * whdef;// 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
  8. $('html').css('font-size', rem + "px");
  9. loadoOption_ec_lefttop_gauge();
  10. loadOption_ec_righttop_gauge();
  11. loadOption_ec_rightbtm_gauge();
  12. loadOption_ec_leftbtm_gauge();
  13. }) ;
  14. function loadOption_ec_leftbtm_gauge(){
  15. ec_leftbtm.clear();
  16. option = {
  17. // backgroundColor: '#1b1b1b',
  18. tooltip : {
  19. formatter: "{a} <br/>{c} {b}"
  20. },
  21. // toolbox: {
  22. // show : true,
  23. // feature : {
  24. // mark : {show: true},
  25. // restore : {show: true},
  26. // saveAsImage : {show: true}
  27. // }
  28. // },
  29. series : [
  30. {
  31. name:'A相温度',
  32. type:'gauge',
  33. min:0,
  34. max:100,
  35. center : ['20%', '50%'],
  36. splitNumber:10,
  37. axisLine: { // 坐标轴线
  38. lineStyle: { // 属性lineStyle控制线条样式
  39. color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
  40. width: 3,
  41. shadowColor : '#fff', //默认透明
  42. shadowBlur: 10
  43. }
  44. },
  45. axisLabel: { // 坐标轴小标记
  46. textStyle: { // 属性lineStyle控制线条样式
  47. fontWeight: 'bolder',
  48. color: '#fff',
  49. shadowColor : '#fff', //默认透明
  50. shadowBlur: 10
  51. }
  52. },
  53. axisTick: { // 坐标轴小标记
  54. length :15, // 属性length控制线长
  55. lineStyle: { // 属性lineStyle控制线条样式
  56. color: 'auto',
  57. shadowColor : '#fff', //默认透明
  58. shadowBlur: 10
  59. }
  60. },
  61. splitLine: { // 分隔线
  62. length :25, // 属性length控制线长
  63. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  64. width:3,
  65. color: '#fff',
  66. shadowColor : '#fff', //默认透明
  67. shadowBlur: 10
  68. }
  69. },
  70. pointer: { // 分隔线
  71. shadowColor : '#fff', //默认透明
  72. shadowBlur: 5
  73. },
  74. title : {
  75. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  76. fontWeight: 'bolder',
  77. fontSize: 20,
  78. fontStyle: 'italic',
  79. color: '#fff',
  80. shadowColor : '#fff', //默认透明
  81. shadowBlur: 10
  82. }
  83. },
  84. detail : {
  85. backgroundColor: 'rgba(30,144,255,0.8)',
  86. borderWidth: 1,
  87. borderColor: '#fff',
  88. shadowColor : '#fff', //默认透明
  89. shadowBlur: 5,
  90. offsetCenter: [0, '50%'], // x, y,单位px
  91. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  92. fontWeight: 'bolder',
  93. color: '#fff'
  94. }
  95. },
  96. data:[{value: 40, name: 'A相温度'}]
  97. },
  98. {
  99. name:'B相温度',
  100. type:'gauge',
  101. min:0,
  102. max:100,
  103. splitNumber:10,
  104. axisLine: { // 坐标轴线
  105. lineStyle: { // 属性lineStyle控制线条样式
  106. color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
  107. width: 3,
  108. shadowColor : '#fff', //默认透明
  109. shadowBlur: 10
  110. }
  111. },
  112. axisLabel: { // 坐标轴小标记
  113. textStyle: { // 属性lineStyle控制线条样式
  114. fontWeight: 'bolder',
  115. color: '#fff',
  116. shadowColor : '#fff', //默认透明
  117. shadowBlur: 10
  118. }
  119. },
  120. axisTick: { // 坐标轴小标记
  121. length :15, // 属性length控制线长
  122. lineStyle: { // 属性lineStyle控制线条样式
  123. color: 'auto',
  124. shadowColor : '#fff', //默认透明
  125. shadowBlur: 10
  126. }
  127. },
  128. splitLine: { // 分隔线
  129. length :25, // 属性length控制线长
  130. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  131. width:3,
  132. color: '#fff',
  133. shadowColor : '#fff', //默认透明
  134. shadowBlur: 10
  135. }
  136. },
  137. pointer: { // 分隔线
  138. shadowColor : '#fff', //默认透明
  139. shadowBlur: 5
  140. },
  141. title : {
  142. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  143. fontWeight: 'bolder',
  144. fontSize: 20,
  145. fontStyle: 'italic',
  146. color: '#fff',
  147. shadowColor : '#fff', //默认透明
  148. shadowBlur: 10
  149. }
  150. },
  151. detail : {
  152. backgroundColor: 'rgba(30,144,255,0.8)',
  153. borderWidth: 1,
  154. borderColor: '#fff',
  155. shadowColor : '#fff', //默认透明
  156. shadowBlur: 5,
  157. offsetCenter: [0, '50%'], // x, y,单位px
  158. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  159. fontWeight: 'bolder',
  160. color: '#fff'
  161. }
  162. },
  163. data:[{value: 40, name: 'B相温度'}]
  164. },
  165. {
  166. name:'C相温度',
  167. type:'gauge',
  168. min:0,
  169. max:100,
  170. center : ['80%', '50%'],
  171. splitNumber:10,
  172. axisLine: { // 坐标轴线
  173. lineStyle: { // 属性lineStyle控制线条样式
  174. color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
  175. width: 3,
  176. shadowColor : '#fff', //默认透明
  177. shadowBlur: 10
  178. }
  179. },
  180. axisLabel: { // 坐标轴小标记
  181. textStyle: { // 属性lineStyle控制线条样式
  182. fontWeight: 'bolder',
  183. color: '#fff',
  184. shadowColor : '#fff', //默认透明
  185. shadowBlur: 10
  186. }
  187. },
  188. axisTick: { // 坐标轴小标记
  189. length :15, // 属性length控制线长
  190. lineStyle: { // 属性lineStyle控制线条样式
  191. color: 'auto',
  192. shadowColor : '#fff', //默认透明
  193. shadowBlur: 10
  194. }
  195. },
  196. splitLine: { // 分隔线
  197. length :25, // 属性length控制线长
  198. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  199. width:3,
  200. color: '#fff',
  201. shadowColor : '#fff', //默认透明
  202. shadowBlur: 10
  203. }
  204. },
  205. pointer: { // 分隔线
  206. shadowColor : '#fff', //默认透明
  207. shadowBlur: 5
  208. },
  209. title : {
  210. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  211. fontWeight: 'bolder',
  212. fontSize: 20,
  213. fontStyle: 'italic',
  214. color: '#fff',
  215. shadowColor : '#fff', //默认透明
  216. shadowBlur: 10
  217. }
  218. },
  219. detail : {
  220. backgroundColor: 'rgba(30,144,255,0.8)',
  221. borderWidth: 1,
  222. borderColor: '#fff',
  223. shadowColor : '#fff', //默认透明
  224. shadowBlur: 5,
  225. offsetCenter: [0, '50%'], // x, y,单位px
  226. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  227. fontWeight: 'bolder',
  228. color: '#fff'
  229. }
  230. },
  231. data:[{value: 40, name: 'C相温度'}]
  232. }
  233. ]
  234. };
  235. ec_leftbtm.setOption(option);
  236. }
  237. function loadOption_ec_rightbtm_gauge(){
  238. ec_rightbtm.clear();
  239. option = {
  240. // backgroundColor: '#1b1b1b',
  241. tooltip : {
  242. formatter: "{a} <br/>{c} {b}"
  243. },
  244. // toolbox: {
  245. // show : true,
  246. // feature : {
  247. // mark : {show: true},
  248. // restore : {show: true},
  249. // saveAsImage : {show: true}
  250. // }
  251. // },
  252. series : [
  253. {
  254. name:'A相温度',
  255. type:'gauge',
  256. min:0,
  257. max:100,
  258. center : ['20%', '50%'],
  259. splitNumber:10,
  260. axisLine: { // 坐标轴线
  261. lineStyle: { // 属性lineStyle控制线条样式
  262. color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
  263. width: 3,
  264. shadowColor : '#fff', //默认透明
  265. shadowBlur: 10
  266. }
  267. },
  268. axisLabel: { // 坐标轴小标记
  269. textStyle: { // 属性lineStyle控制线条样式
  270. fontWeight: 'bolder',
  271. color: '#fff',
  272. shadowColor : '#fff', //默认透明
  273. shadowBlur: 10
  274. }
  275. },
  276. axisTick: { // 坐标轴小标记
  277. length :15, // 属性length控制线长
  278. lineStyle: { // 属性lineStyle控制线条样式
  279. color: 'auto',
  280. shadowColor : '#fff', //默认透明
  281. shadowBlur: 10
  282. }
  283. },
  284. splitLine: { // 分隔线
  285. length :25, // 属性length控制线长
  286. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  287. width:3,
  288. color: '#fff',
  289. shadowColor : '#fff', //默认透明
  290. shadowBlur: 10
  291. }
  292. },
  293. pointer: { // 分隔线
  294. shadowColor : '#fff', //默认透明
  295. shadowBlur: 5
  296. },
  297. title : {
  298. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  299. fontWeight: 'bolder',
  300. fontSize: 20,
  301. fontStyle: 'italic',
  302. color: '#fff',
  303. shadowColor : '#fff', //默认透明
  304. shadowBlur: 10
  305. }
  306. },
  307. detail : {
  308. backgroundColor: 'rgba(30,144,255,0.8)',
  309. borderWidth: 1,
  310. borderColor: '#fff',
  311. shadowColor : '#fff', //默认透明
  312. shadowBlur: 5,
  313. offsetCenter: [0, '50%'], // x, y,单位px
  314. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  315. fontWeight: 'bolder',
  316. color: '#fff'
  317. }
  318. },
  319. data:[{value: 40, name: 'A相温度'}]
  320. },
  321. {
  322. name:'B相温度',
  323. type:'gauge',
  324. min:0,
  325. max:100,
  326. splitNumber:10,
  327. axisLine: { // 坐标轴线
  328. lineStyle: { // 属性lineStyle控制线条样式
  329. color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
  330. width: 3,
  331. shadowColor : '#fff', //默认透明
  332. shadowBlur: 10
  333. }
  334. },
  335. axisLabel: { // 坐标轴小标记
  336. textStyle: { // 属性lineStyle控制线条样式
  337. fontWeight: 'bolder',
  338. color: '#fff',
  339. shadowColor : '#fff', //默认透明
  340. shadowBlur: 10
  341. }
  342. },
  343. axisTick: { // 坐标轴小标记
  344. length :15, // 属性length控制线长
  345. lineStyle: { // 属性lineStyle控制线条样式
  346. color: 'auto',
  347. shadowColor : '#fff', //默认透明
  348. shadowBlur: 10
  349. }
  350. },
  351. splitLine: { // 分隔线
  352. length :25, // 属性length控制线长
  353. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  354. width:3,
  355. color: '#fff',
  356. shadowColor : '#fff', //默认透明
  357. shadowBlur: 10
  358. }
  359. },
  360. pointer: { // 分隔线
  361. shadowColor : '#fff', //默认透明
  362. shadowBlur: 5
  363. },
  364. title : {
  365. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  366. fontWeight: 'bolder',
  367. fontSize: 20,
  368. fontStyle: 'italic',
  369. color: '#fff',
  370. shadowColor : '#fff', //默认透明
  371. shadowBlur: 10
  372. }
  373. },
  374. detail : {
  375. backgroundColor: 'rgba(30,144,255,0.8)',
  376. borderWidth: 1,
  377. borderColor: '#fff',
  378. shadowColor : '#fff', //默认透明
  379. shadowBlur: 5,
  380. offsetCenter: [0, '50%'], // x, y,单位px
  381. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  382. fontWeight: 'bolder',
  383. color: '#fff'
  384. }
  385. },
  386. data:[{value: 40, name: 'B相温度'}]
  387. },
  388. {
  389. name:'C相温度',
  390. type:'gauge',
  391. min:0,
  392. max:100,
  393. center : ['80%', '50%'],
  394. splitNumber:10,
  395. axisLine: { // 坐标轴线
  396. lineStyle: { // 属性lineStyle控制线条样式
  397. color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
  398. width: 3,
  399. shadowColor : '#fff', //默认透明
  400. shadowBlur: 10
  401. }
  402. },
  403. axisLabel: { // 坐标轴小标记
  404. textStyle: { // 属性lineStyle控制线条样式
  405. fontWeight: 'bolder',
  406. color: '#fff',
  407. shadowColor : '#fff', //默认透明
  408. shadowBlur: 10
  409. }
  410. },
  411. axisTick: { // 坐标轴小标记
  412. length :15, // 属性length控制线长
  413. lineStyle: { // 属性lineStyle控制线条样式
  414. color: 'auto',
  415. shadowColor : '#fff', //默认透明
  416. shadowBlur: 10
  417. }
  418. },
  419. splitLine: { // 分隔线
  420. length :25, // 属性length控制线长
  421. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  422. width:3,
  423. color: '#fff',
  424. shadowColor : '#fff', //默认透明
  425. shadowBlur: 10
  426. }
  427. },
  428. pointer: { // 分隔线
  429. shadowColor : '#fff', //默认透明
  430. shadowBlur: 5
  431. },
  432. title : {
  433. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  434. fontWeight: 'bolder',
  435. fontSize: 20,
  436. fontStyle: 'italic',
  437. color: '#fff',
  438. shadowColor : '#fff', //默认透明
  439. shadowBlur: 10
  440. }
  441. },
  442. detail : {
  443. backgroundColor: 'rgba(30,144,255,0.8)',
  444. borderWidth: 1,
  445. borderColor: '#fff',
  446. shadowColor : '#fff', //默认透明
  447. shadowBlur: 5,
  448. offsetCenter: [0, '50%'], // x, y,单位px
  449. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  450. fontWeight: 'bolder',
  451. color: '#fff'
  452. }
  453. },
  454. data:[{value: 40, name: 'C相温度'}]
  455. }
  456. ]
  457. };
  458. ec_rightbtm.setOption(option);
  459. }
  460. function loadoOption_ec_rightbtm(){
  461. ec_rightbtm.clear();
  462. var option = {
  463. title: {
  464. // text: '2号变压器温度监测(℃)',
  465. show: true,
  466. textStyle: {
  467. fontWeight: 'normal',
  468. fontSize: 22,
  469. color: '#3db3cb'
  470. },
  471. left: '2%',
  472. top: '2%'
  473. },
  474. tooltip: {
  475. trigger: 'axis'
  476. },
  477. legend: {
  478. data:['2号变压器A相温度','2号变压器B相温度','2号变压器C相温度'],
  479. textStyle: {
  480. fontSize: 14,
  481. color: '#799dff'
  482. }
  483. },
  484. grid: {
  485. left: '3%',
  486. right: '4%',
  487. bottom: '3%',
  488. containLabel: true
  489. },
  490. xAxis: [{
  491. type: 'category',
  492. boundaryGap: false,
  493. axisLine: {
  494. lineStyle: {
  495. color: 'rgba(128, 128, 128, 0.5)'
  496. }
  497. },
  498. axisLabel: {
  499. margin: 10,
  500. textStyle: {
  501. fontSize: 14,
  502. color: '#999'
  503. }
  504. },
  505. data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
  506. }],
  507. yAxis: [{
  508. type: 'value',
  509. name: '',
  510. axisTick: {
  511. show: false
  512. },
  513. axisLine: {
  514. show:false,
  515. lineStyle: {
  516. color: '#fff'
  517. }
  518. },
  519. axisLabel: {
  520. margin: 10,
  521. textStyle: {
  522. fontSize: 14,
  523. color: '#799dff'
  524. }
  525. },
  526. min: function(value) {
  527. return Math.round(value.min - 10);
  528. },
  529. max: function(value) {
  530. return Math.round(value.min + 10);
  531. },
  532. splitLine: {
  533. lineStyle: {
  534. type: 'dashed',
  535. color: 'rgba(121, 157, 255, 0.5)'
  536. }
  537. }
  538. }],
  539. series: [{
  540. name: '2号变压器A相温度',
  541. type: 'line',
  542. smooth: true,
  543. symbol: 'circle',
  544. symbolSize: 15,
  545. showSymbol: true,
  546. lineStyle: {
  547. normal: {
  548. width: 3
  549. }
  550. },
  551. markPoint : {
  552. data : [
  553. {type : 'max', name: '最大值'},
  554. {type : 'min', name: '最小值'}
  555. ]
  556. },
  557. markLine : {
  558. data : [
  559. {type : 'average', name: '平均值'},
  560. ]
  561. },
  562. data: [220, 210, 245, 222, 265, 250]
  563. },
  564. {
  565. name: '2号变压器B相温度',
  566. type: 'line',
  567. smooth: true,
  568. symbol: 'circle',
  569. symbolSize: 15,
  570. showSymbol: true,
  571. lineStyle: {
  572. normal: {
  573. width: 3
  574. }
  575. },
  576. markPoint : {
  577. data : [
  578. {type : 'max', name: '最大值'},
  579. {type : 'min', name: '最小值'}
  580. ]
  581. },
  582. markLine : {
  583. data : [
  584. {type : 'average', name: '平均值'},
  585. ]
  586. },
  587. data: [220, 210, 245, 222, 265, 250]
  588. },
  589. {
  590. name: '2号变压器C相温度',
  591. type: 'line',
  592. smooth: true,
  593. symbol: 'circle',
  594. symbolSize: 15,
  595. showSymbol: true,
  596. lineStyle: {
  597. normal: {
  598. width: 3
  599. }
  600. },
  601. markPoint : {
  602. data : [
  603. {type : 'max', name: '最大值'},
  604. {type : 'min', name: '最小值'}
  605. ]
  606. },
  607. markLine : {
  608. data : [
  609. {type : 'average', name: '平均值'},
  610. ]
  611. },
  612. data: [220, 210, 245, 222, 265, 250]
  613. }]
  614. }
  615. ec_rightbtm.setOption(option);
  616. }
  617. function loadoOption_ec_leftbtm(){
  618. ec_leftbtm.clear();
  619. var option = {
  620. title: {
  621. // text: '1号变压器温度监测(℃)',
  622. show: true,
  623. textStyle: {
  624. fontWeight: 'normal',
  625. fontSize: 22,
  626. color: '#3db3cb'
  627. },
  628. left: '2%',
  629. top: '2%'
  630. },
  631. tooltip: {
  632. trigger: 'axis'
  633. },
  634. legend: {
  635. data:['1号变压器A相温度','1号变压器B相温度','1号变压器C相温度'],
  636. textStyle: {
  637. fontSize: 14,
  638. color: '#799dff'
  639. }
  640. },
  641. grid: {
  642. left: '3%',
  643. right: '4%',
  644. bottom: '3%',
  645. containLabel: true
  646. },
  647. xAxis: [{
  648. type: 'category',
  649. boundaryGap: false,
  650. axisLine: {
  651. lineStyle: {
  652. color: 'rgba(128, 128, 128, 0.5)'
  653. }
  654. },
  655. axisLabel: {
  656. margin: 10,
  657. textStyle: {
  658. fontSize: 14,
  659. color: '#999'
  660. }
  661. },
  662. data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
  663. }],
  664. yAxis: [{
  665. type: 'value',
  666. name: '',
  667. axisTick: {
  668. show: false
  669. },
  670. axisLine: {
  671. show:false,
  672. lineStyle: {
  673. color: '#fff'
  674. }
  675. },
  676. axisLabel: {
  677. margin: 10,
  678. textStyle: {
  679. fontSize: 14,
  680. color: '#799dff'
  681. }
  682. },
  683. min: function(value) {
  684. return Math.round(value.min - 10);
  685. },
  686. max: function(value) {
  687. return Math.round(value.min + 10);
  688. },
  689. splitLine: {
  690. lineStyle: {
  691. type: 'dashed',
  692. color: 'rgba(121, 157, 255, 0.5)'
  693. }
  694. }
  695. }],
  696. series: [{
  697. name: '1号变压器A相温度',
  698. type: 'line',
  699. smooth: true,
  700. symbol: 'circle',
  701. symbolSize: 15,
  702. showSymbol: true,
  703. lineStyle: {
  704. normal: {
  705. width: 3
  706. }
  707. },
  708. markPoint : {
  709. data : [
  710. {type : 'max', name: '最大值'},
  711. {type : 'min', name: '最小值'}
  712. ]
  713. },
  714. markLine : {
  715. data : [
  716. {type : 'average', name: '平均值'},
  717. ]
  718. },
  719. data: [220, 210, 245, 222, 265, 250]
  720. },
  721. {
  722. name: '1号变压器B相温度',
  723. type: 'line',
  724. smooth: true,
  725. symbol: 'circle',
  726. symbolSize: 15,
  727. showSymbol: true,
  728. lineStyle: {
  729. normal: {
  730. width: 3
  731. }
  732. },
  733. markPoint : {
  734. data : [
  735. {type : 'max', name: '最大值'},
  736. {type : 'min', name: '最小值'}
  737. ]
  738. },
  739. markLine : {
  740. data : [
  741. {type : 'average', name: '平均值'},
  742. ]
  743. },
  744. data: [220, 210, 245, 222, 265, 250]
  745. },
  746. {
  747. name: '1号变压器C相温度',
  748. type: 'line',
  749. smooth: true,
  750. symbol: 'circle',
  751. symbolSize: 15,
  752. showSymbol: true,
  753. lineStyle: {
  754. normal: {
  755. width: 3
  756. }
  757. },
  758. markPoint : {
  759. data : [
  760. {type : 'max', name: '最大值'},
  761. {type : 'min', name: '最小值'}
  762. ]
  763. },
  764. markLine : {
  765. data : [
  766. {type : 'average', name: '平均值'},
  767. ]
  768. },
  769. data: [220, 210, 245, 222, 265, 250]
  770. }]
  771. }
  772. ec_leftbtm.setOption(option);
  773. }
  774. function loadOption_ec_righttop_gauge(){
  775. ec_righttop.clear();
  776. option = {
  777. tooltip : {
  778. formatter: "{a} <br/>{b} : {c}%"
  779. },
  780. series : [
  781. {
  782. name:'高配电室湿度(%RH)',
  783. type:'gauge',
  784. startAngle: 180,
  785. endAngle: 0,
  786. center : ['50%', '99%'], // 默认全局居中
  787. radius : 320,
  788. min:0,
  789. max:100,
  790. axisLine: { // 坐标轴线
  791. lineStyle: { // 属性lineStyle控制线条样式
  792. width: 100
  793. }
  794. },
  795. axisTick: { // 坐标轴小标记
  796. splitNumber: 10 , // 每份split细分多少段
  797. length :5, // 属性length控制线长
  798. },
  799. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  800. // formatter: function(v){
  801. // switch (v+''){
  802. // case '10': return '低';
  803. // case '40': return '中';
  804. // case '70': return '高';
  805. // default: return '';
  806. // }
  807. // },
  808. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  809. color: '#fff',
  810. fontSize: 18,
  811. fontWeight: 'bolder'
  812. }
  813. },
  814. pointer: {
  815. width:6,
  816. length: '80%',
  817. color: 'rgba(255, 255, 215, 0.2)'
  818. },
  819. title : {
  820. show : true,
  821. offsetCenter: [0, '-60%'], // x, y,单位px
  822. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  823. color: '#fff',
  824. fontSize: 20
  825. }
  826. },
  827. detail : {
  828. show : true,
  829. backgroundColor: 'rgba(0,0,0,0)',
  830. borderWidth: 0,
  831. borderColor: '#ccc',
  832. width: 100,
  833. height: 40,
  834. offsetCenter: [0, -120], // x, y,单位px
  835. formatter:'{value}%',
  836. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  837. fontSize : 50
  838. }
  839. },
  840. data:[{value: 50, name: '高配电室湿度(%RH)'}]
  841. }
  842. ]
  843. };
  844. ec_righttop.setOption(option);
  845. }
  846. function loadoOption_ec_righttop(){
  847. ec_righttop.clear();
  848. var option = {
  849. title: {
  850. // text: '高配电室与室外湿度监测(%RH)',
  851. show: true,
  852. textStyle: {
  853. fontWeight: 'normal',
  854. fontSize: 22,
  855. color: '#3db3cb'
  856. },
  857. left: '2%',
  858. top: '2%'
  859. },
  860. tooltip: {
  861. trigger: 'axis'
  862. },
  863. legend: {
  864. data:['高配电室湿度监测','室外湿度监测'],
  865. textStyle: {
  866. fontSize: 14,
  867. color: '#799dff'
  868. }
  869. },
  870. grid: {
  871. left: '3%',
  872. right: '4%',
  873. bottom: '3%',
  874. containLabel: true
  875. },
  876. xAxis: [{
  877. type: 'category',
  878. boundaryGap: false,
  879. axisLine: {
  880. lineStyle: {
  881. color: 'rgba(128, 128, 128, 0.5)'
  882. }
  883. },
  884. axisLabel: {
  885. margin: 10,
  886. textStyle: {
  887. fontSize: 14,
  888. color: '#999'
  889. }
  890. },
  891. data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
  892. }],
  893. yAxis: [{
  894. type: 'value',
  895. name: '',
  896. axisTick: {
  897. show: false
  898. },
  899. axisLine: {
  900. show:false,
  901. lineStyle: {
  902. color: '#fff'
  903. }
  904. },
  905. axisLabel: {
  906. margin: 10,
  907. textStyle: {
  908. fontSize: 14,
  909. color: '#799dff'
  910. }
  911. },
  912. splitLine: {
  913. lineStyle: {
  914. type: 'dashed',
  915. color: 'rgba(121, 157, 255, 0.5)'
  916. }
  917. }
  918. }],
  919. series: [{
  920. name: '高配电室湿度监测',
  921. type: 'line',
  922. smooth: true,
  923. symbol: 'circle',
  924. symbolSize: 15,
  925. showSymbol: true,
  926. lineStyle: {
  927. normal: {
  928. width: 3
  929. }
  930. },
  931. markPoint : {
  932. data : [
  933. {type : 'max', name: '最大值'},
  934. {type : 'min', name: '最小值'}
  935. ]
  936. },
  937. markLine : {
  938. data : [
  939. {type : 'average', name: '平均值'},
  940. ]
  941. },
  942. data: [12, 11, 14, 12, 16, 15]
  943. },
  944. {
  945. name: '室外湿度监测',
  946. type: 'line',
  947. smooth: true,
  948. symbol: 'circle',
  949. symbolSize: 15,
  950. showSymbol: true,
  951. lineStyle: {
  952. normal: {
  953. width: 3
  954. }
  955. },
  956. markPoint : {
  957. data : [
  958. {type : 'max', name: '最大值'},
  959. {type : 'min', name: '最小值'}
  960. ]
  961. },
  962. markLine : {
  963. data : [
  964. {type : 'average', name: '平均值'},
  965. ]
  966. },
  967. data: [12, 11, 14, 12, 16, 15]
  968. }]
  969. }
  970. ec_righttop.setOption(option);
  971. }
  972. function loadoOption_ec_lefttop_gauge(){
  973. ec_lefttop.clear();
  974. option = {
  975. tooltip : {
  976. formatter: "{a} <br/>{b} : {c}℃"
  977. },
  978. series : [
  979. {
  980. name:'高配电室温度(℃)',
  981. type:'gauge',
  982. startAngle: 180,
  983. endAngle: 0,
  984. center : ['50%', '99%'], // 默认全局居中
  985. radius : 320,
  986. min:0,
  987. max:50,
  988. axisLine: { // 坐标轴线
  989. lineStyle: { // 属性lineStyle控制线条样式
  990. width: 100
  991. }
  992. },
  993. axisTick: { // 坐标轴小标记
  994. splitNumber: 10 , // 每份split细分多少段
  995. length :5, // 属性length控制线长
  996. },
  997. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  998. formatter: function(v){
  999. switch (v+''){
  1000. case '10': return '低';
  1001. case '25': return '中';
  1002. case '40': return '高';
  1003. default: return '';
  1004. }
  1005. },
  1006. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1007. color: '#fff',
  1008. fontSize: 18,
  1009. fontWeight: 'bolder'
  1010. }
  1011. },
  1012. pointer: {
  1013. width:6,
  1014. length: '80%',
  1015. color: 'rgba(255, 255, 215, 0.2)'
  1016. },
  1017. title : {
  1018. show : true,
  1019. offsetCenter: [0, '-60%'], // x, y,单位px
  1020. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1021. color: '#fff',
  1022. fontSize: 20
  1023. }
  1024. },
  1025. detail : {
  1026. show : true,
  1027. backgroundColor: 'rgba(0,0,0,0)',
  1028. borderWidth: 0,
  1029. borderColor: '#ccc',
  1030. width: 100,
  1031. height: 40,
  1032. offsetCenter: [-0, -120], // x, y,单位px
  1033. formatter:'{value}℃',
  1034. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1035. fontSize : 50
  1036. }
  1037. },
  1038. data:[{value: 50, name: '高配电室温度(℃)'}]
  1039. }
  1040. ]
  1041. };
  1042. ec_lefttop.setOption(option);
  1043. }
  1044. function loadoOption_ec_lefttop(){
  1045. ec_lefttop.clear();
  1046. var option = {
  1047. title: {
  1048. // text: '高配电室与室外温度监测(℃)',
  1049. show: true,
  1050. textStyle: {
  1051. fontWeight: 'normal',
  1052. fontSize: 22,
  1053. color: '#3db3cb'
  1054. },
  1055. left: '2%',
  1056. top: '2%'
  1057. },
  1058. tooltip: {
  1059. trigger: 'axis'
  1060. },
  1061. legend: {
  1062. data:['高配电室温度','室外温度'],
  1063. textStyle: {
  1064. fontSize: 14,
  1065. color: '#799dff'
  1066. }
  1067. },
  1068. grid: {
  1069. left: '3%',
  1070. right: '4%',
  1071. bottom: '3%',
  1072. containLabel: true
  1073. },
  1074. xAxis: [{
  1075. type: 'category',
  1076. boundaryGap: false,
  1077. axisLine: {
  1078. lineStyle: {
  1079. color: 'rgba(128, 128, 128, 0.5)'
  1080. }
  1081. },
  1082. axisLabel: {
  1083. margin: 10,
  1084. textStyle: {
  1085. fontSize: 14,
  1086. color: '#999'
  1087. }
  1088. },
  1089. data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
  1090. }],
  1091. yAxis: [{
  1092. type: 'value',
  1093. name: '',
  1094. axisTick: {
  1095. show: false
  1096. },
  1097. axisLine: {
  1098. show:false,
  1099. lineStyle: {
  1100. color: '#fff'
  1101. }
  1102. },
  1103. axisLabel: {
  1104. margin: 10,
  1105. textStyle: {
  1106. fontSize: 14,
  1107. color: '#799dff'
  1108. }
  1109. },
  1110. min: function(value) {
  1111. return Math.round(value.min - 10);
  1112. },
  1113. max: function(value) {
  1114. return Math.round(value.min + 10);
  1115. },
  1116. splitLine: {
  1117. lineStyle: {
  1118. type: 'dashed',
  1119. color: 'rgba(121, 157, 255, 0.5)'
  1120. }
  1121. }
  1122. }],
  1123. series: [{
  1124. name: '高配电室温度',
  1125. type: 'line',
  1126. smooth: true,
  1127. symbol: 'circle',
  1128. symbolSize: 15,
  1129. showSymbol: true,
  1130. lineStyle: {
  1131. normal: {
  1132. width: 3
  1133. }
  1134. },
  1135. markPoint : {
  1136. data : [
  1137. {type : 'max', name: '最大值'},
  1138. {type : 'min', name: '最小值'}
  1139. ]
  1140. },
  1141. markLine : {
  1142. data : [
  1143. {type : 'average', name: '平均值'},
  1144. ]
  1145. },
  1146. data: [12, 11, 14, 12, 16, 15]
  1147. },
  1148. {
  1149. name: '室外温度',
  1150. type: 'line',
  1151. smooth: true,
  1152. symbol: 'circle',
  1153. symbolSize: 15,
  1154. showSymbol: true,
  1155. lineStyle: {
  1156. normal: {
  1157. width: 3
  1158. }
  1159. },
  1160. markPoint : {
  1161. data : [
  1162. {type : 'max', name: '最大值'},
  1163. {type : 'min', name: '最小值'}
  1164. ]
  1165. },
  1166. markLine : {
  1167. data : [
  1168. {type : 'average', name: '平均值'},
  1169. ]
  1170. },
  1171. data: [12, 11, 14, 12, 16, 15]
  1172. }
  1173. ]
  1174. }
  1175. ec_lefttop.setOption(option);
  1176. }