想在富文本标签中实现鼠标悬停高亮,当鼠标滑动到文字时高亮,但是无法使用emphasis,怎么才能实现呢
配置项如下
option = {
series: [
{
type: 'scatter',
data: [[0,0]],
symbolSize: 1,
label: {
normal: {
show: true,
formatter: [
'#.第一段描述',
'#.第二段描述',
'#.第三段描述',
].join('\n'),
backgroundColor: 'rgb(0,43,92)',
borderWidth: 2,
borderRadius: 5,
padding: 10,
color: '#fff',
fontSize: 14,
shadowBlur: 3,
shadowColor: '#fff',
shadowOffsetX: 0,
shadowOffsetY: 3,
lineHeight: 34,
rich: {
term: {
fontWeight: 'bold',
fontSize: 25,
color: 'rgb(199,86,85)'
},
term1: {
fontWeight: 'bold',
fontSize: 20,
color: 'yellow'
},
fregment1: {
backgroundColor: '#000',
color: 'yellow',
padding: 5
},
fregment2: {
backgroundColor: '#339911',
color: '#fff',
borderRadius: 15,
padding: 5
}
}
}
}
}
],
xAxis: {
axisLabel: {show: false},
axisLine: {show: false},
splitLine: {show: false},
axisTick: {show: false},
min: -1,
max: 1
},
yAxis: {
axisLabel: {show: false},
axisLine: {show: false},
splitLine: {show: false},
axisTick: {show: false},
min: -1,
max: 1
}
};