MicroCommunityWeb/public/bigScreen/js/box3.js
2020-08-08 18:45:10 +08:00

62 lines
1.3 KiB
JavaScript

var dom = document.getElementById("box3_right");
var myChart = echarts.init(dom);
var app = {};
option = null;
option = {
tooltip : {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
textStyle:{//图例文字的样式
color:'#fff',
fontSize:12
},
data:['门禁开门次数']
},
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
textStyle:{//图例文字的样式
color:'#fff',
fontSize:12
},
xAxis : [
{
type : 'category',
boundaryGap : false,
data : ['周一','周二','周三','周四','周五','周六','周日']
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'门禁开门次数',
type:'line',
stack: '总量',
areaStyle: {},
data:[120, 132, 101, 134, 90, 230, 210]
}
]
};
;
if (option && typeof option === "object") {
myChart.setOption(option, true);
}