由于折线较多客户要求折线图的每个折线名字随滑动显示,找不到办法用的markpoint
param = {
name: legend[i],
type: 'line',
data: calculateMA(i, data),
smooth: true,
lineStyle: {
normal: {
color:rgb[i],
opacity: 0.9
}
},
markPoint: {
label: {
normal: {
formatter: function (param) {
return param.seriesName=="标准"?null:param.seriesName;
}
}
},
data: [
{
name: 'highest value',
type: 'max',
itemStyle: {
normal: {color: 'rgb(41,60,85)'}
}
}
]
}
};
}