var picHeight;
var endTime=getEndTime();
var startTime=getStartTime("月份",endTime);
var lineIndex=window.parent.document.getElementById("lineIndex").value;
startTime=filterXSS(startTime);
endTime=filterXSS(endTime);
lineIndex=filterXSS(lineIndex);
window.parent.parent.thisUrl = "zlpg"
$("#interval").val("月份");

$(function () {
	$("#startTime").val(startTime);
    picHeight=$(window).height()-170;

    getSteady(startTime,endTime,lineIndex);
})

$("#interval").change(function(){
	if($("#interval").val() == "年份" || $("#interval").val() == "周" || $("#interval").val() == "自定义"){
		document.getElementById("hb").style.display="none";
	}else{
		document.getElementById("hb").style.display="";
	}
	if($("#interval").val() == "周" || $("#interval").val() == "自定义"){
		document.getElementById("tb").style.display="none";
	}else{
		document.getElementById("tb").style.display="";
	}
})
$("#query").click(function (){
	document.getElementById("res").style.display="none";
    startTime=$("#startTime").val();
    endTime=$("#endTime").val();
    getSteady(startTime,endTime,lineIndex);
})

$("#tb").click(function (){
	document.getElementById("res").style.display="";
	var legend1,legend2;
	var interval = $("#interval").val();
	endTime=$("#endTime").val();
	startTime=$("#startTime").val();

	var year = parseInt(startTime.substring(0, 4));
	var month = parseInt(startTime.substring(5, 7));

	var syear=year - 1;
	var laststartTime=syear + '-' + month + '-01';

	var emonth = parseInt(endTime.substring(5, 7));
	var eday=new Date(syear, emonth, 0).getDate();
	var lastendTime=syear + '-' + emonth + '-' + eday;

	if(month==emonth){
		legend1 = year+'年'+month+'月';
		legend2 = syear+'年'+month+'月';
	}else{
		legend1 = year+'年'+month+'-'+emonth+'月';
		legend2 = syear+'年'+month+'-'+emonth+'月';
	}

    getSteadyTB(startTime,endTime,laststartTime,lastendTime,lineIndex,legend1,legend2,"同比");
})

$("#hb").click(function (){
	document.getElementById("res").style.display="";
	var legend1,legend2;
	var interval = $("#interval").val();
	endTime=$("#endTime").val();
	startTime=$("#startTime").val();

	if(interval == "月份"){
		var year = parseInt(startTime.substring(0, 4));
		var month = parseInt(startTime.substring(5, 7));
		if (month == 1) {
			var lastyear = year-1;
			var laststartTime=lastyear  + "-12-01";

			var lastendTime=lastyear  + "-12-31";
			legend1 =year+'年'+ month+'月';
			legend2 = lastyear+'年12月';
		}else if (month <= 10) {
			var smonth=month-1;
			var laststartTime=year + '-0' + smonth + '-01';

			var eday=new Date(year, smonth, 0).getDate();
			var lastendTime=year + '-0' + smonth + '-' + eday;
			legend1 =year+'年'+ month+'月';
			legend2 = year+'年'+ smonth+'月';
		}else{
			var smonth=month-1;
			var laststartTime=year + '-' + smonth + '-01';

			var eday=new Date(year, smonth, 0).getDate();
			var lastendTime=year + '-' + smonth + '-' + eday;
			legend1 = year+'年'+ month+'月';
			legend2 = year+'年'+ smonth+'月';
		}
	    getSteadyTB(startTime,endTime,laststartTime,lastendTime,lineIndex,legend1,legend2,"环比");
	}else if(interval == "季度"){
		var year = parseInt(startTime.substring(0, 4));
		var month = parseInt(startTime.substring(5, 7));
		if (month == 1) {
			var lastyear = year-1;
			var laststartTime=year  + "-10-01";

			var lastendTime=year  + "-12-31";
			legend1 = year+'年1-3月';
			legend2 = lastyear+'年10-12月';
		}else{
			var month1=month+2;
			var smonth=month-3;
			var laststartTime=year + '-' + smonth + '-01';

			var emonth=smonth+2;
			var eday=new Date(year, emonth, 0).getDate();
			var lastendTime=year + '-' + emonth + '-' + eday;
			legend1 = year+'年'+ month+'-'+month1+'月';
			legend2 = year+'年'+ smonth+'-'+emonth+'月';
		}
	    getSteadyTB(startTime,endTime,laststartTime,lastendTime,lineIndex,legend1,legend2,"环比");
	}
})

$("#res").click(function (){
	document.getElementById("res").style.display="none";
    startTime=$("#startTime").val();
    endTime=$("#endTime").val();
    getSteady(startTime,endTime,lineIndex);
})

function getSteady(startTime,endTime,lineIndex){
    var i;
	$.ajax({
        url:'/pqs9000/device/qualityAssess',
        data:{
            startTime:startTime,
            endTime:endTime,
            lineIndex:lineIndex
        },
        type:'post',
        dataType:'json',
        beforeSend: function () {
            i = ityzl_SHOW_LOAD_LAYER();
        },
        success:function (data) {
        	if (data.code===500|data.body===null){
        		initZlpg(null);
            }else{
//            	var vuDevs = data.body.vuDevs[0];
//            	var dataPlt = data.body.dataPlt[0];
//            	var freqDev = data.body.freqDev[0];
//            	var vThdCp95 = data.body.vThdCp95[0];
//            	var vunbalanceCp95 = data.body.vunbalanceCp95[0];

            	var syn={};var synitem={};
            	var vuDevs={};var vuDevsitem={};
            	var dataPlt={};var dataPltitem={};
            	var freqDev={};var freqDevitem={};
            	var vThdCp95={};var vThdCp95item={};
            	var vunbalanceCp95={};var vunbalanceCp95item={};
            	if(data.body.syn[0].data===3.14159){
            		syn.value=0.151;
                	document.getElementById("data0").innerText = "(暂无数据)";
            	}else{
            		syn.value=data.body.syn[0].data;
                	document.getElementById("data0").innerText = data.body.syn[0].data;
            	}
            	if(data.body.vuDevs[0].data===3.14159){
            		vuDevs.value=0.151;
                	document.getElementById("data1").innerText = "(暂无数据)";
            	}else{
            		vuDevs.value=data.body.vuDevs[0].data;
                	document.getElementById("data1").innerText = data.body.vuDevs[0].data;
            	}
            	if(data.body.dataPlt[0].data===3.14159){
            		dataPlt.value=0.151;
                	document.getElementById("data2").innerText = "(暂无数据)";
            	}else{
                	dataPlt.value=data.body.dataPlt[0].data;
                	document.getElementById("data2").innerText = data.body.dataPlt[0].data;
            	}
            	if(data.body.freqDev[0].data===3.14159){
            		freqDev.value=0.151;
                	document.getElementById("data3").innerText = "(暂无数据)";
            	}else{
                	freqDev.value=data.body.freqDev[0].data;
                	document.getElementById("data3").innerText = data.body.freqDev[0].data;
            	}
            	if(data.body.vThdCp95[0].data===3.14159){
            		vThdCp95.value=0.151;
                	document.getElementById("data4").innerText = "(暂无数据)";
            	}else{
                	vThdCp95.value=data.body.vThdCp95[0].data;
                	document.getElementById("data4").innerText = data.body.vThdCp95[0].data;
            	}
            	if(data.body.vunbalanceCp95[0].data===3.14159){
            		vunbalanceCp95.value=0.151;
                	document.getElementById("data5").innerText = "(暂无数据)";
            	}else{
                	vunbalanceCp95.value=data.body.vunbalanceCp95[0].data;
                	document.getElementById("data5").innerText = data.body.vunbalanceCp95[0].data;
            	}
            	var level0 = data.body.syn[0].level;
            	var level1 = data.body.vuDevs[0].level;
            	var level2 = data.body.dataPlt[0].level;
            	var level3 = data.body.freqDev[0].level;
            	var level4 = data.body.vThdCp95[0].level;
            	var level5 = data.body.vunbalanceCp95[0].level;
            	if(level0=="优质"){
            		synitem.color="#2E8B56";
                }else if(level0=="良好"){
                	synitem.color="#919B38";
                }else if(level0=="合格"){
                	synitem.color="#C1A128";
                }else if(level0=="较差"){
                	synitem.color="#C37024";
                }else if(level0=="极差"){
                	synitem.color="#A52A2A";
                }else{
                	synitem.color=noData;
                }
            	syn.itemStyle=synitem;
            	if(level1=="特质"){
            		vuDevsitem.color="#2E8B56";
                }else if(level1=="优质"){
                	vuDevsitem.color="#5E9346";
                }else if(level1=="优良"){
                	vuDevsitem.color="#919B38";
                }else if(level1=="良好"){
                	vuDevsitem.color="#C1A128";
                }else if(level1=="轻度污染"){
                	vuDevsitem.color="#D39320";
                }else if(level1=="中度污染"){
                	vuDevsitem.color="#C37024";
                }else if(level1=="重度污染"){
                	vuDevsitem.color="#B54C26";
                }else if(level1=="极度污染"){
                	vuDevsitem.color="#A52A2A";
                }else{
                	vuDevsitem.color=noData;
                }
            	vuDevs.itemStyle=vuDevsitem;

            	if(level2=="特质"){
            		dataPltitem.color="#2E8B56";
                }else if(level2=="优质"){
                	dataPltitem.color="#5E9346";
                }else if(level2=="优良"){
                	dataPltitem.color="#919B38";
                }else if(level2=="良好"){
                	dataPltitem.color="#C1A128";
                }else if(level2=="轻度污染"){
                	dataPltitem.color="#D39320";
                }else if(level2=="中度污染"){
                	dataPltitem.color="#C37024";
                }else if(level2=="重度污染"){
                	dataPltitem.color="#B54C26";
                }else if(level2=="极度污染"){
                	dataPltitem.color="#A52A2A";
                }else{
                	dataPltitem.color=noData;
                }
            	dataPlt.itemStyle=dataPltitem;

            	if(level3=="特质"){
            		freqDevitem.color="#2E8B56";
                }else if(level3=="优质"){
                	freqDevitem.color="#5E9346";
                }else if(level3=="优良"){
                	freqDevitem.color="#919B38";
                }else if(level3=="良好"){
                	freqDevitem.color="#C1A128";
                }else if(level3=="轻度污染"){
                	freqDevitem.color="#D39320";
                }else if(level3=="中度污染"){
                	freqDevitem.color="#C37024";
                }else if(level3=="重度污染"){
                	freqDevitem.color="#B54C26";
                }else if(level3=="极度污染"){
                	freqDevitem.color="#A52A2A";
                }else{
                	freqDevitem.color=noData;
                }
            	freqDev.itemStyle=freqDevitem;

            	if(level4=="特质"){
            		vThdCp95item.color="#2E8B56";
                }else if(level4=="优质"){
                	vThdCp95item.color="#5E9346";
                }else if(level4=="优良"){
                	vThdCp95item.color="#919B38";
                }else if(level4=="良好"){
                	vThdCp95item.color="#C1A128";
                }else if(level4=="轻度污染"){
                	vThdCp95item.color="#D39320";
                }else if(level4=="中度污染"){
                	vThdCp95item.color="#C37024";
                }else if(level4=="重度污染"){
                	vThdCp95item.color="#B54C26";
                }else if(level4=="极度污染"){
                	vThdCp95item.color="#A52A2A";
                }else{
                	vThdCp95item.color=noData;
                }
            	vThdCp95.itemStyle=vThdCp95item;

            	if(level5=="特质"){
            		vunbalanceCp95item.color="#2E8B56";
                }else if(level5=="优质"){
                	vunbalanceCp95item.color="#5E9346";
                }else if(level5=="优良"){
                	vunbalanceCp95item.color="#919B38";
                }else if(level5=="良好"){
                	vunbalanceCp95item.color="#C1A128";
                }else if(level5=="轻度污染"){
                	vunbalanceCp95item.color="#D39320";
                }else if(level5=="中度污染"){
                	vunbalanceCp95item.color="#C37024";
                }else if(level5=="重度污染"){
                	vunbalanceCp95item.color="#B54C26";
                }else if(level5=="极度污染"){
                	vunbalanceCp95item.color="#A52A2A";
                }else{
                	vunbalanceCp95item.color=noData;
                }
            	vunbalanceCp95.itemStyle=vunbalanceCp95item;
            	initZlpg(syn,vuDevs,dataPlt,freqDev,vThdCp95,vunbalanceCp95);

            	document.getElementById("level0").innerText = data.body.syn[0].level;
            	document.getElementById("level1").innerText = data.body.vuDevs[0].level;
            	document.getElementById("level2").innerText = data.body.dataPlt[0].level;
            	document.getElementById("level3").innerText = data.body.freqDev[0].level;
            	document.getElementById("level4").innerText = data.body.vThdCp95[0].level;
            	document.getElementById("level5").innerText = data.body.vunbalanceCp95[0].level;
            }
        	//***********关闭loading
            ityzl_CLOSE_LOAD_LAYER(i);
        }
    })
}

function initZlpg(syn,vuDevs,dataPlt,freqDev,vThdCp95,vunbalanceCp95) {
    $("#zlpg").css("height",picHeight);
    echarts.dispose($("#zlpg")[0]);
    var zlpgOption = echarts.init($("#zlpg")[0]);
	var labels = ['综合评估','电压偏差(%)', '电压闪变','频率偏差(Hz)','谐波含量(%)',  '三相电压不平衡度(%)'];
	var max;
	if(vuDevs!=null && vuDevs.value==0.151 && syn!=null && syn.value==0.151
			 && dataPlt!=null && dataPlt.value==0.151  && freqDev!=null && freqDev.value==0.151
			 && vThdCp95!=null && vThdCp95.value==0.151 && vunbalanceCp95!=null && vunbalanceCp95.value==0.151){
		max=5;
	}else{
		max=null;
	}
	var option = {
	        backgroundColor: canvasBG,//背景色,
	        title: {
	            text: '电能质量评估',
	            x: 'center'
	        },
	        grid:{
	        	left:'4%',
	        	right:'2%',
	        	bottom:'10%'
	        },
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'shadow'
                },
                formatter: function (params) {
                    var color=params[0].color;
                    var tips="";
                    if(color===noData){
                        tips+='(暂无数据)';
                    }else{
                        tips+=params[0].value;
                    }
                    return tips;
                }
            },
	        toolbox: {
	            show : true,
	            feature : {
	                saveAsImage : {show: true}
	            },
	            right:'2%'
	        },
	        legend: {
	            data: ['特质','优质','优良','良好','轻度污染','中度污染','重度污染','极度污染'],
	            selectedMode: false,
	            width:'360px',
	            x: 'left'
	        },
	        xAxis: [{
	            type: 'category',
	            data: labels,
	            splitLine: {
	                show: false
	            }
	        }],
	        yAxis: [{
	            type: 'value',
	            max:max
	        }],
	        series: [{
	            name: '特质',
	            type: 'bar',
	            data: [],
	            barMaxWidth: barMax
	        },{
	            name: '优质',
	            type: 'bar',
	            data: [],
	            barMaxWidth: barMax
	        },{
	            name: '优良',
	            type: 'bar',
	            data: [],
	            barMaxWidth: barMax
	        },{
	            name: '良好',
	            type: 'bar',
	            data: [syn,vuDevs,dataPlt,freqDev,vThdCp95,vunbalanceCp95],
                barWidth: barMax
	        },{
	            name: '轻度污染',
	            type: 'bar',
	            data: [],
	            barMaxWidth: barMax
	        },{
	            name: '中度污染',
	            type: 'bar',
	            data: [],
	            barMaxWidth: barMax
	        },{
	            name: '重度污染',
	            type: 'bar',
	            data: [],
	            barMaxWidth: barMax
	        },{
	            name: '极度污染',
	            type: 'bar',
	            data: [],
	            barMaxWidth: barMax
	        }],
			color:["#2E8B56","#5E9346","#919B38","#C1A128","#D39320","#C37024","#B54C26","#A52A2A"]
	    };
	zlpgOption.setOption(option);
}

function getSteadyTB(startTime,endTime,laststartTime,lastendTime,lineIndex,legend1,legend2,title){
    var i;
	$.ajax({
        url:'/pqs9000/device/qualityAssessTB',
        data:{
            startTime:startTime,
            endTime:endTime,
            laststartTime:laststartTime,
            lastendTime:lastendTime,
            lineIndex:lineIndex
        },
        type:'post',
        dataType:'json',
        beforeSend: function () {
            i = ityzl_SHOW_LOAD_LAYER();
        },
        success:function (data) {
        	if (data.code===500|data.body===null){
        		initZlpg(null);
            }else{
            	var thisTime=[];
            	if(data.body.syn[0].data==3.14159){
            		thisTime.push(0.151);
            	}else{
	            	thisTime.push(data.body.syn[0].data);
            	}
            	if(data.body.vuDevs[0].data==3.14159){
            		thisTime.push(0.151);
            	}else{
	            	thisTime.push(data.body.vuDevs[0].data);
            	}
            	if(data.body.dataPlt[0].data==3.14159){
            		thisTime.push(0.151);
            	}else{
	            	thisTime.push(data.body.dataPlt[0].data);
            	}
            	if(data.body.freqDev[0].data==3.14159){
            		thisTime.push(0.151);
            	}else{
	            	thisTime.push(data.body.freqDev[0].data);
            	}
            	if(data.body.vThdCp95[0].data==3.14159){
            		thisTime.push(0.151);
            	}else{
	            	thisTime.push(data.body.vThdCp95[0].data);
            	}
            	if(data.body.vunbalanceCp95[0].data==3.14159){
            		thisTime.push(0.151);
            	}else{
	            	thisTime.push(data.body.vunbalanceCp95[0].data);
            	}

            	var lastTime=[];
            	if(data.body.syn[1].data==3.14159){
            		lastTime.push(0.151);
            	}else{
	            	lastTime.push(data.body.syn[1].data);
            	}
            	if(data.body.vuDevs[1].data==3.14159){
            		lastTime.push(0.151);
            	}else{
	            	lastTime.push(data.body.vuDevs[1].data);
            	}
            	if(data.body.dataPlt[1].data==3.14159){
            		lastTime.push(0.151);
            	}else{
	            	lastTime.push(data.body.dataPlt[1].data);
            	}
            	if(data.body.freqDev[1].data==3.14159){
            		lastTime.push(0.151);
            	}else{
	            	lastTime.push(data.body.freqDev[1].data);
            	}
            	if(data.body.vThdCp95[1].data==3.14159){
            		lastTime.push(0.151);
            	}else{
	            	lastTime.push(data.body.vThdCp95[1].data);
            	}
            	if(data.body.vunbalanceCp95[1].data==3.14159){
            		lastTime.push(0.151);
            	}else{
	            	lastTime.push(data.body.vunbalanceCp95[1].data);
            	}

            	initZlpgTB(thisTime,lastTime,legend1,legend2,title);

            	var thisvalue0,thisvalue1,thisvalue2,thisvalue3,thisvalue4,thisvalue5;
            	var lastvalue0,lastvalue1,lastvalue2,lastvalue3,lastvalue4,lastvalue5;
            	if(data.body.vuDevs[0].data==3.14159){
            		thisvalue5="(暂无数据)";
            	}else{
            		thisvalue5=data.body.syn[0].data;
            	}
            	if(data.body.vuDevs[0].data==3.14159){
            		thisvalue0="(暂无数据)";
            	}else{
            		thisvalue0=data.body.vuDevs[0].data;
            	}
            	if(data.body.dataPlt[0].data==3.14159){
            		thisvalue1="(暂无数据)";
            	}else{
            		thisvalue1=data.body.dataPlt[0].data;
            	}if(data.body.freqDev[0].data==3.14159){
            		thisvalue2="(暂无数据)";
            	}else{
            		thisvalue2=data.body.freqDev[0].data;
            	}if(data.body.vThdCp95[0].data==3.14159){
            		thisvalue3="(暂无数据)";
            	}else{
            		thisvalue3=data.body.vThdCp95[0].data;
            	}if(data.body.vunbalanceCp95[0].data==3.14159){
            		thisvalue4="(暂无数据)";
            	}else{
            		thisvalue4=data.body.vunbalanceCp95[0].data;
            	}

            	if(data.body.vuDevs[1].data==3.14159){
            		lastvalue5="(暂无数据)";
            	}else{
            		lastvalue5=data.body.syn[1].data;
            	}
            	if(data.body.vuDevs[1].data==3.14159){
            		lastvalue0="(暂无数据)";
            	}else{
            		lastvalue0=data.body.vuDevs[1].data;
            	}
            	if(data.body.dataPlt[1].data==3.14159){
            		lastvalue1="(暂无数据)";
            	}else{
            		lastvalue1=data.body.dataPlt[1].data;
            	}
            	if(data.body.freqDev[1].data==3.14159){
            		lastvalue2="(暂无数据)";
            	}else{
            		lastvalue2=data.body.freqDev[1].data;
            	}
            	if(data.body.vThdCp95[1].data==3.14159){
            		lastvalue3="(暂无数据)";
            	}else{
            		lastvalue3=data.body.vThdCp95[1].data;
            	}
            	if(data.body.vunbalanceCp95[1].data==3.14159){
            		lastvalue4="(暂无数据)";
            	}else{
            		lastvalue4=data.body.vunbalanceCp95[1].data;
            	}

            	document.getElementById("data0").innerText = thisvalue5+"/"+lastvalue5;
            	document.getElementById("level0").innerText = data.body.syn[0].level+"/"+data.body.syn[1].level;
            	document.getElementById("data1").innerText = thisvalue0+"/"+lastvalue0;
            	document.getElementById("level1").innerText = data.body.vuDevs[0].level+"/"+data.body.vuDevs[1].level;
            	document.getElementById("data2").innerText = thisvalue1+"/"+lastvalue1;
            	document.getElementById("level2").innerText = data.body.dataPlt[0].level+"/"+data.body.dataPlt[1].level;
            	document.getElementById("data3").innerText = thisvalue2+"/"+lastvalue2;
            	document.getElementById("level3").innerText = data.body.freqDev[0].level+"/"+data.body.freqDev[1].level;
            	document.getElementById("data4").innerText = thisvalue3+"/"+lastvalue3;
            	document.getElementById("level4").innerText = data.body.vThdCp95[0].level+"/"+data.body.vThdCp95[1].level;
            	document.getElementById("data5").innerText = thisvalue4+"/"+lastvalue4;
            	document.getElementById("level5").innerText = data.body.vunbalanceCp95[0].level+"/"+data.body.vunbalanceCp95[1].level;
            }
        	//***********关闭loading
            ityzl_CLOSE_LOAD_LAYER(i);
        }
    })
}

function initZlpgTB(thisTime,lastTime,legend1,legend2,select) {
    $("#zlpg").css("height",picHeight);
    echarts.dispose($("#zlpg")[0]);
    var zlpgOption = echarts.init($("#zlpg")[0]);
    var max;
	if(thisTime.length>0 && lastTime.length>0 && thisTime[0]==0.151 &&lastTime[0]==0.151 && thisTime[1]==0.151 &&lastTime[1]==0.151
			 && thisTime[2]==0.151 &&lastTime[2]==0.151 && thisTime[3]==0.151 &&lastTime[3]==0.151 && thisTime[4]==0.151 &&lastTime[4]==0.151
			 && thisTime[5]==0.151 &&lastTime[5]==0.151){
		max=5;
	}else{
		max=null;
	}
	var labels = ['综合评估','电压偏差(%)', '频率偏差(Hz)', '谐波含量(%)', '电压闪变', '三相电压不平衡度(%)'];
	var option = {
	        backgroundColor: canvasBG,//背景色,
	        title: {
	            text: '电能质量评估('+select+')',
	            x: 'center'
	        },
	        grid:{
	        	left:'4%',
	        	right:'2%',
	        	bottom:'10%'
	        },
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'shadow'
                },
                formatter: function (params) {
                    var value0=params[0].value;
                    var value1=params[1].value;
                    var tips="";
                    if(value0===0.151){
                        tips+=legend1+':'+'暂无数据'+'<br/>';
                    }else{
                        tips+=legend1+':'+value0+'<br/>';
                    }
                    if(value1===0.151){
                        tips+=legend2+':'+'暂无数据';
                    }else{
                        tips+=legend2+':'+value1;
                    }
                    return tips;
                }
            },
	        toolbox: {
	            show : true,
	            feature : {
	                saveAsImage : {show: true}
	            },
	            right:'2%'
	        },
	        legend: {
	            data: [legend1,legend2],
	            selectedMode: false,
	            x: 'left'
	        },
	        xAxis: [{
	            type: 'category',
	            data: labels,
	            splitLine: {
	                show: false
	            }
	        }],
	        yAxis: [{
	            type: 'value',
	            max:max
	        }],
	        series: [{
	            name: legend1,
	            type: 'bar',
	            data: thisTime,
                barMaxWidth: barMax,
	        },{
	            name: legend2,
	            type: 'bar',
	            data: lastTime,
                barMaxWidth: barMax,
	        }],
			color:[yellow,blue]
	    };

	zlpgOption.setOption(option);
}

function zlpgMouseOver(){
	var divinfo= document.getElementById("zlpgbz");
	divinfo.style.display = "";
}

function zlpgMouseOut(){
	var divinfo= document.getElementById("zlpgbz");
	divinfo.style.display = "none";
}
