| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198 |
- $(function () {
- // var whdef = 100/1920;// 表示1920的设计图,使用100PX的默认值
- var whdef = 100/916;// 表示1920的设计图,使用100PX的默认值
- var wH = window.innerHeight;// 当前窗口的高度
- var wW = window.innerWidth;// 当前窗口的宽度
- // var rem = wW * whdef;// 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
- var rem = wH * whdef;// 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
- $('html').css('font-size', rem + "px");
- loadoOption_ec_lefttop_gauge();
- loadOption_ec_righttop_gauge();
- loadOption_ec_rightbtm_gauge();
- loadOption_ec_leftbtm_gauge();
- }) ;
- function loadOption_ec_leftbtm_gauge(){
- ec_leftbtm.clear();
- option = {
- // backgroundColor: '#1b1b1b',
- tooltip : {
- formatter: "{a} <br/>{c} {b}"
- },
- // toolbox: {
- // show : true,
- // feature : {
- // mark : {show: true},
- // restore : {show: true},
- // saveAsImage : {show: true}
- // }
- // },
- series : [
- {
- name:'A相温度',
- type:'gauge',
- min:0,
- max:100,
- center : ['20%', '50%'],
- splitNumber:10,
- axisLine: { // 坐标轴线
- lineStyle: { // 属性lineStyle控制线条样式
- color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
- width: 3,
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisLabel: { // 坐标轴小标记
- textStyle: { // 属性lineStyle控制线条样式
- fontWeight: 'bolder',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisTick: { // 坐标轴小标记
- length :15, // 属性length控制线长
- lineStyle: { // 属性lineStyle控制线条样式
- color: 'auto',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- splitLine: { // 分隔线
- length :25, // 属性length控制线长
- lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
- width:3,
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- pointer: { // 分隔线
- shadowColor : '#fff', //默认透明
- shadowBlur: 5
- },
- title : {
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- fontSize: 20,
- fontStyle: 'italic',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- detail : {
- backgroundColor: 'rgba(30,144,255,0.8)',
- borderWidth: 1,
- borderColor: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 5,
- offsetCenter: [0, '50%'], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- color: '#fff'
- }
- },
- data:[{value: 40, name: 'A相温度'}]
- },
- {
- name:'B相温度',
- type:'gauge',
- min:0,
- max:100,
- splitNumber:10,
- axisLine: { // 坐标轴线
- lineStyle: { // 属性lineStyle控制线条样式
- color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
- width: 3,
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisLabel: { // 坐标轴小标记
- textStyle: { // 属性lineStyle控制线条样式
- fontWeight: 'bolder',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisTick: { // 坐标轴小标记
- length :15, // 属性length控制线长
- lineStyle: { // 属性lineStyle控制线条样式
- color: 'auto',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- splitLine: { // 分隔线
- length :25, // 属性length控制线长
- lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
- width:3,
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- pointer: { // 分隔线
- shadowColor : '#fff', //默认透明
- shadowBlur: 5
- },
- title : {
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- fontSize: 20,
- fontStyle: 'italic',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- detail : {
- backgroundColor: 'rgba(30,144,255,0.8)',
- borderWidth: 1,
- borderColor: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 5,
- offsetCenter: [0, '50%'], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- color: '#fff'
- }
- },
- data:[{value: 40, name: 'B相温度'}]
- },
- {
- name:'C相温度',
- type:'gauge',
- min:0,
- max:100,
- center : ['80%', '50%'],
- splitNumber:10,
- axisLine: { // 坐标轴线
- lineStyle: { // 属性lineStyle控制线条样式
- color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
- width: 3,
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisLabel: { // 坐标轴小标记
- textStyle: { // 属性lineStyle控制线条样式
- fontWeight: 'bolder',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisTick: { // 坐标轴小标记
- length :15, // 属性length控制线长
- lineStyle: { // 属性lineStyle控制线条样式
- color: 'auto',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- splitLine: { // 分隔线
- length :25, // 属性length控制线长
- lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
- width:3,
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- pointer: { // 分隔线
- shadowColor : '#fff', //默认透明
- shadowBlur: 5
- },
- title : {
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- fontSize: 20,
- fontStyle: 'italic',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- detail : {
- backgroundColor: 'rgba(30,144,255,0.8)',
- borderWidth: 1,
- borderColor: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 5,
- offsetCenter: [0, '50%'], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- color: '#fff'
- }
- },
- data:[{value: 40, name: 'C相温度'}]
- }
- ]
- };
- ec_leftbtm.setOption(option);
- }
- function loadOption_ec_rightbtm_gauge(){
- ec_rightbtm.clear();
- option = {
- // backgroundColor: '#1b1b1b',
- tooltip : {
- formatter: "{a} <br/>{c} {b}"
- },
- // toolbox: {
- // show : true,
- // feature : {
- // mark : {show: true},
- // restore : {show: true},
- // saveAsImage : {show: true}
- // }
- // },
- series : [
- {
- name:'A相温度',
- type:'gauge',
- min:0,
- max:100,
- center : ['20%', '50%'],
- splitNumber:10,
- axisLine: { // 坐标轴线
- lineStyle: { // 属性lineStyle控制线条样式
- color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
- width: 3,
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisLabel: { // 坐标轴小标记
- textStyle: { // 属性lineStyle控制线条样式
- fontWeight: 'bolder',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisTick: { // 坐标轴小标记
- length :15, // 属性length控制线长
- lineStyle: { // 属性lineStyle控制线条样式
- color: 'auto',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- splitLine: { // 分隔线
- length :25, // 属性length控制线长
- lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
- width:3,
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- pointer: { // 分隔线
- shadowColor : '#fff', //默认透明
- shadowBlur: 5
- },
- title : {
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- fontSize: 20,
- fontStyle: 'italic',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- detail : {
- backgroundColor: 'rgba(30,144,255,0.8)',
- borderWidth: 1,
- borderColor: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 5,
- offsetCenter: [0, '50%'], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- color: '#fff'
- }
- },
- data:[{value: 40, name: 'A相温度'}]
- },
- {
- name:'B相温度',
- type:'gauge',
- min:0,
- max:100,
- splitNumber:10,
- axisLine: { // 坐标轴线
- lineStyle: { // 属性lineStyle控制线条样式
- color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
- width: 3,
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisLabel: { // 坐标轴小标记
- textStyle: { // 属性lineStyle控制线条样式
- fontWeight: 'bolder',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisTick: { // 坐标轴小标记
- length :15, // 属性length控制线长
- lineStyle: { // 属性lineStyle控制线条样式
- color: 'auto',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- splitLine: { // 分隔线
- length :25, // 属性length控制线长
- lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
- width:3,
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- pointer: { // 分隔线
- shadowColor : '#fff', //默认透明
- shadowBlur: 5
- },
- title : {
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- fontSize: 20,
- fontStyle: 'italic',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- detail : {
- backgroundColor: 'rgba(30,144,255,0.8)',
- borderWidth: 1,
- borderColor: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 5,
- offsetCenter: [0, '50%'], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- color: '#fff'
- }
- },
- data:[{value: 40, name: 'B相温度'}]
- },
- {
- name:'C相温度',
- type:'gauge',
- min:0,
- max:100,
- center : ['80%', '50%'],
- splitNumber:10,
- axisLine: { // 坐标轴线
- lineStyle: { // 属性lineStyle控制线条样式
- color: [[0.09, 'lime'],[0.82, '#1e90ff'],[1, '#ff4500']],
- width: 3,
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisLabel: { // 坐标轴小标记
- textStyle: { // 属性lineStyle控制线条样式
- fontWeight: 'bolder',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- axisTick: { // 坐标轴小标记
- length :15, // 属性length控制线长
- lineStyle: { // 属性lineStyle控制线条样式
- color: 'auto',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- splitLine: { // 分隔线
- length :25, // 属性length控制线长
- lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
- width:3,
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- pointer: { // 分隔线
- shadowColor : '#fff', //默认透明
- shadowBlur: 5
- },
- title : {
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- fontSize: 20,
- fontStyle: 'italic',
- color: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 10
- }
- },
- detail : {
- backgroundColor: 'rgba(30,144,255,0.8)',
- borderWidth: 1,
- borderColor: '#fff',
- shadowColor : '#fff', //默认透明
- shadowBlur: 5,
- offsetCenter: [0, '50%'], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: 'bolder',
- color: '#fff'
- }
- },
- data:[{value: 40, name: 'C相温度'}]
- }
- ]
- };
- ec_rightbtm.setOption(option);
- }
- function loadoOption_ec_rightbtm(){
- ec_rightbtm.clear();
- var option = {
- title: {
- // text: '2号变压器温度监测(℃)',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data:['2号变压器A相温度','2号变压器B相温度','2号变压器C相温度'],
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- min: function(value) {
- return Math.round(value.min - 10);
- },
- max: function(value) {
- return Math.round(value.min + 10);
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
- }],
- series: [{
- name: '2号变压器A相温度',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [220, 210, 245, 222, 265, 250]
- },
- {
- name: '2号变压器B相温度',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [220, 210, 245, 222, 265, 250]
- },
- {
- name: '2号变压器C相温度',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [220, 210, 245, 222, 265, 250]
- }]
- }
- ec_rightbtm.setOption(option);
- }
- function loadoOption_ec_leftbtm(){
- ec_leftbtm.clear();
- var option = {
- title: {
- // text: '1号变压器温度监测(℃)',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data:['1号变压器A相温度','1号变压器B相温度','1号变压器C相温度'],
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- min: function(value) {
- return Math.round(value.min - 10);
- },
- max: function(value) {
- return Math.round(value.min + 10);
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
- }],
- series: [{
- name: '1号变压器A相温度',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [220, 210, 245, 222, 265, 250]
- },
- {
- name: '1号变压器B相温度',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [220, 210, 245, 222, 265, 250]
- },
- {
- name: '1号变压器C相温度',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [220, 210, 245, 222, 265, 250]
- }]
- }
- ec_leftbtm.setOption(option);
- }
- function loadOption_ec_righttop_gauge(){
- ec_righttop.clear();
- option = {
- tooltip : {
- formatter: "{a} <br/>{b} : {c}%"
- },
-
- series : [
- {
- name:'高配电室湿度(%RH)',
- type:'gauge',
- startAngle: 180,
- endAngle: 0,
- center : ['50%', '99%'], // 默认全局居中
- radius : 320,
- min:0,
- max:100,
- axisLine: { // 坐标轴线
- lineStyle: { // 属性lineStyle控制线条样式
- width: 100
- }
- },
- axisTick: { // 坐标轴小标记
- splitNumber: 10 , // 每份split细分多少段
- length :5, // 属性length控制线长
- },
- axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
- // formatter: function(v){
- // switch (v+''){
- // case '10': return '低';
- // case '40': return '中';
- // case '70': return '高';
- // default: return '';
- // }
- // },
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: '#fff',
- fontSize: 18,
- fontWeight: 'bolder'
- }
- },
- pointer: {
- width:6,
- length: '80%',
- color: 'rgba(255, 255, 215, 0.2)'
- },
- title : {
- show : true,
- offsetCenter: [0, '-60%'], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: '#fff',
- fontSize: 20
- }
- },
- detail : {
- show : true,
- backgroundColor: 'rgba(0,0,0,0)',
- borderWidth: 0,
- borderColor: '#ccc',
- width: 100,
- height: 40,
- offsetCenter: [0, -120], // x, y,单位px
- formatter:'{value}%',
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontSize : 50
- }
- },
- data:[{value: 50, name: '高配电室湿度(%RH)'}]
- }
- ]
- };
- ec_righttop.setOption(option);
- }
- function loadoOption_ec_righttop(){
- ec_righttop.clear();
- var option = {
- title: {
- // text: '高配电室与室外湿度监测(%RH)',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data:['高配电室湿度监测','室外湿度监测'],
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
-
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
- }],
- series: [{
- name: '高配电室湿度监测',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- },
- {
- name: '室外湿度监测',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- }]
- }
- ec_righttop.setOption(option);
- }
- function loadoOption_ec_lefttop_gauge(){
- ec_lefttop.clear();
- option = {
- tooltip : {
- formatter: "{a} <br/>{b} : {c}℃"
- },
-
- series : [
- {
- name:'高配电室温度(℃)',
- type:'gauge',
- startAngle: 180,
- endAngle: 0,
- center : ['50%', '99%'], // 默认全局居中
- radius : 320,
- min:0,
- max:50,
- axisLine: { // 坐标轴线
- lineStyle: { // 属性lineStyle控制线条样式
- width: 100
- }
- },
- axisTick: { // 坐标轴小标记
- splitNumber: 10 , // 每份split细分多少段
- length :5, // 属性length控制线长
- },
- axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
- formatter: function(v){
- switch (v+''){
- case '10': return '低';
- case '25': return '中';
- case '40': return '高';
- default: return '';
- }
- },
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: '#fff',
- fontSize: 18,
- fontWeight: 'bolder'
- }
- },
- pointer: {
- width:6,
- length: '80%',
- color: 'rgba(255, 255, 215, 0.2)'
- },
- title : {
- show : true,
- offsetCenter: [0, '-60%'], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: '#fff',
- fontSize: 20
- }
- },
- detail : {
- show : true,
- backgroundColor: 'rgba(0,0,0,0)',
- borderWidth: 0,
- borderColor: '#ccc',
- width: 100,
- height: 40,
- offsetCenter: [-0, -120], // x, y,单位px
- formatter:'{value}℃',
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontSize : 50
- }
- },
- data:[{value: 50, name: '高配电室温度(℃)'}]
- }
- ]
- };
- ec_lefttop.setOption(option);
- }
- function loadoOption_ec_lefttop(){
- ec_lefttop.clear();
- var option = {
- title: {
- // text: '高配电室与室外温度监测(℃)',
- show: true,
- textStyle: {
- fontWeight: 'normal',
- fontSize: 22,
- color: '#3db3cb'
- },
- left: '2%',
- top: '2%'
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data:['高配电室温度','室外温度'],
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- axisLine: {
- lineStyle: {
- color: 'rgba(128, 128, 128, 0.5)'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#999'
- }
- },
- data: ['12:00:00', '12:00:05', '12:00:10', '12:00:15', '12:00:20', '12:00:25']
- }],
- yAxis: [{
- type: 'value',
- name: '',
- axisTick: {
- show: false
- },
- axisLine: {
- show:false,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- margin: 10,
- textStyle: {
- fontSize: 14,
- color: '#799dff'
- }
- },
- min: function(value) {
- return Math.round(value.min - 10);
- },
- max: function(value) {
- return Math.round(value.min + 10);
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: 'rgba(121, 157, 255, 0.5)'
- }
- }
- }],
- series: [{
- name: '高配电室温度',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- },
- {
- name: '室外温度',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 15,
- showSymbol: true,
- lineStyle: {
- normal: {
- width: 3
- }
- },
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'},
- ]
- },
- data: [12, 11, 14, 12, 16, 15]
- }
- ]
- }
- ec_lefttop.setOption(option);
- }
|