/*
期望设置snap为false后,鼠标在图上移动,指示线是跟随鼠标的,不是吸附在数据点上的
*/
option = {
tooltip:{
show: true,
trigger: 'axis',
axisPointer:{
snap: true,
axis: 'x'
}
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line'
}]
};