配置项如下
option = {
title: {
text: '堆叠区域图'
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['邮件营销','test_lines']
},
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis : [
{
boundaryGap : false,
data : [1,2,3,4,5,6,7]
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'邮件营销',
type:'line',
data:[120, 132, 101, 134, 90, 230, 210]
},
{
name: 'test lines',
type: 'lines',
coordinateSystem:'cartesian2d',
effect: {
show: true,
period: 6,
trailLength: 0,
symbol: 'circle',
symbolSize: 15
},
lineStyle: {
normal: {
color: '#a6c84c',
width: 2,
curveness: 0.2
}
},
data: {
coords: [
[1, 1], // 起点
[7, 3] // 终点
]
}
}
]
};