总客户量','美团新客','饿了么新客','美团老客','饿了么老客
配置项如下
app.title = '堆叠柱状图';
option = {
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
data:['总客户量','美团新客','饿了么新客','美团老客','饿了么老客']
},
grid: {
top:60,
left:50,
bottom:60,
right:60
},
xAxis : [
{
type : 'category',
data : ['2020/08/15', '2020/08/16', '2020/08/17', '2020/08/18', '2020/08/19', '2020/08/20', '2020/08/21','2020/08/22','2020/08/23','2020/08/24','2020/08/25','2020/08/26']
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'总客户量',
type:'bar',
data:[862, 1018, 964, 1026, 1679, 1600, 1570,862, 1018, 964, 1026, 1679,],
markLine : {
lineStyle: {
normal: {
type: 'dashed'
}
}
}
},
{
name:'美团新客',
type:'bar',
stack: '新客',
data:[620, 732, 701, 734, 1090, 1130, 1120,120, 132, 101, 134, 290]
},
{
name:'饿了么新客',
type:'bar',
stack: '新客',
data:[120, 132, 101, 134, 290, 230, 220,620, 732, 701, 734, 1090]
},
{
name:'美团老客',
type:'bar',
stack: '老客',
data:[60, 72, 71, 74, 190, 130, 110,62, 82, 91, 84, 109]
},
{
name:'饿了么老客',
type:'bar',
stack: '老客',
data:[62, 82, 91, 84, 109, 110, 120,60, 72, 71, 74, 190]
}
]
};