图表2-》柱状图

 

 

mounted(){
const chartDom = document.getElementById('today-users-chart');
const chart = this.$echarts.init(chartDom);
chart.setOption({
// 修改颜色
color:['#3398DB'],
series: [{
// 柱状图
type:'bar',
data:[410,82,200,334,390,330,220,150,82,200,134,290,330,150],
// 修改柱状图宽度
barWidth:'60%'
}],
xAxis:{
type:"category",
data:['00:00','01:00','02:00','03:00','04:00','05:00','06:00','07:00','08:00','09:00','10:00','11:00'],
show:false
},
yAxis:{
show:false
},
grid:{
top:0,
left:0,
right:0,
bottom:0
}
})
}

posted @ 2021-03-28 20:40  13522679763-任国强  阅读(48)  评论(0)    收藏  举报