//echart图
drawchart(date){
let myChart1 = this.$echarts.init(document.getElementById("myChart1"));
let myChart2 = this.$echarts.init(document.getElementById("myChart2"));
let params={
communityId:this.user.communityId,
start:date.start,
end:date.end,
}
getChartsData(params).then(Pesponse=>{
let data0=Pesponse.rows[0];
let data1=Pesponse.rows[2];
var arrData0 = [],arrDate0=[];
var arrData1 = [],arrDate1=[];
for (let i in data0) {
arrData0.push(data0[i]);
arrDate0.push(i);
}
for (let i in data1) {
arrData1.push(data1[i]);
arrDate1.push(i);
}
let obj0={
title:'进出人数',
y:arrData0,
x:arrDate0,
bar_color:['#49DCDE',"#2EC2CA"]
},obj1={
title:'异常人数',
y:arrData1,
x:arrDate1,
bar_color:['#FE9977',"#EF7447"]
};
myChart1.setOption(histogramChart(obj0))
myChart2.setOption(histogramChart(obj1))
})
window.onresize =()=>{
myChart1.resize();
myChart2.resize();
}
},