$(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}
{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}
{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}
{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}
{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);
}