配置项如下
option = {
title: {
text: '拜耳6月份项目检查6-9日'
},
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
data: ['门店总量','覆盖总数','已完成覆盖','已完成配额','已完成数量'],
align: 'right',
right: 10
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [{
type: 'category',
data: ['销售代表','必查店','档期店','城市覆盖']
}],
yAxis: [{
type: 'value',
name: '总量(个数)',
axisLabel: {
formatter: '{value}'
}
}],
series: [{
name: '门店总量',
type: 'bar',
data: [3397,2348,2347,3397]
}, {
name: '覆盖总数',
type: 'bar',
data: [703,580,580,119]
}, {
name: '已完成覆盖',
type: 'bar',
data: [447,342,352,77]
}, {
name: '已完成配额',
type: 'bar',
data: [247,204,211,20]
},{
name: '已完成数量',
type: 'bar',
data: [1886,1250,1275,1886]
}]
};