option2 = {
title: {
text: '折线图堆叠'
},
tooltip: {
trigger: 'axis',
formatter: function (params) {
if (GetFindSelect(WxOmarkPoints, params[0].name) != undefined) {
return "推送时间:" + params[0].name;
}
else {
return '消费日期:' + params[0].name + '<br /> 消费次数:' + params[0].value;
}
}
},
legend: {
data: ['用户消费次数', '维系用户消费次数']
},
dataZoom: {
show: true,
realtime: true,
start: 50,
end: 100,
y: '420px'
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisTick: { onGap: false },
splitLine: { show: false },
data: TDate
},
yAxis: {
type: 'value'
},
series: [
{
name: '用户消费次数',
type: 'line',
data: WxOMyConDate,
showSymbol: true,
markPoint: {
symbol: 'circle',
symbolSize: 20,
itemStyle: {
normal: {
// color:'red'
borderType: "solid"
}
},
data: WxOmarkPoints
}
},
{
name: '维系用户消费次数',
type: 'line',
data: WxTMyConDate,
showSymbol: true,
markPoint: {
symbol: 'circle',
symbolSize: 20,
itemStyle: {
normal: {
// color:'red'
borderType: "solid"
}
},
data: WxTmarkPoints
}
}
]
};![](https://img2018.cnblogs.com/q/1162501/201903/1162501-20190312184902949-1690194160.png)