option = {
title: {
text: '堆叠区域图'
},
tooltip : {
trigger: 'axis',
axisPointer: {
type: 'cross',
z: 1,//竖线在圆圈后面
label: {
backgroundColor: 'rgba(0,0,0,0)',
color: 'red'
},
},
confine: true,//浮窗不超出屏幕范围
},
legend: {
type: 'plain',
icon: 'circle',
data:['邮件营销','联盟广告']
},
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
show: true,
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
borderWidth: 1,
borderColor: 'blue',
backgroundColor: '#fff',
},
xAxis : [
{
type : 'category',
boundaryGap : false,
data : ['周一','周二','周三','周四','周五','周六','周日'],
axisLine: {
lineStyle: {
width: 0,//x轴不显示轴线
}
},
axisTick: {
show: false,//不显示刻度
},
splitLine: {
show: true,//显示纵向网格线
},
axisLabel: {
interval: 0,
showMaxLabel: true,//显示最大刻度值
}
}
],
yAxis : [
{
type : 'value',
splitLine: {
show: false,//不显示横向网格线
}
}
],
series : [
{
name:'邮件营销',
type:'line',
stack: '总量',
areaStyle: {},
data:[120, 132, 101, 134, 90, 230, 210],
symbol: 'circle',
},
{
name:'联盟广告',
type:'line',
stack: '总量',
areaStyle: {},
data:[220, 182, 191, 234, 290, 330, 310],
symbol: 'circle',
},
]
};