鼠标经过没有数据点的位置时 依然出现tootip且标识线未吸附在对应时间点的竖线上;
期望鼠标经过无数据位置,无tooltip,且标识线位置正确;
前提 tooltip的trigger根据业务需要必须使用axis
配置项如下
let seriesData = [
["2020-07-01 03:10:00", 100],
["2020-07-01 04:20:00", 97.83],
["2020-07-01 06:40:00", 100],
["2020-07-01 10:00:00", 130]
];
option = {
title: {
text: 'Awesome Chart'
},
tooltip: {
trigger: "axis",
axisPointer: {
lineStyle: {
color: "red",
type: "dotted"
}
}
},
xAxis: {
type: "time",
min: "2020-07-01 00:00:00",
max: "2020-07-01 23:59:59",
axisTick: {
show: false
}
},
yAxis: {},
series: [{
type: 'line',
data: seriesData
}]
};