tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "line" // 默认为直线,可选为:'line' | 'shadow'
},
formatter: function(params) {
var texts = "";
for (var i = 0; i < params.length; i++) {
if (i == 0) {
texts += params[i].name + "<br>";
}
texts +=
params[i].seriesName + ": " + params[i].value + "<br>";
}
return texts;
}
}