echarts legend事件监听问题

qaxu7uf2  于 2个月前  发布在  Echarts
关注(0)|答案(7)|浏览(33)

What problem does this feature solve?

legend中有mousemover事件 但 .on 却没有可以监听该事件的函数 , 只有一个legendselectchanged是监听click的 ,希望能给legend一个监听mousemover的函数谢谢。我是用的饼图有这个问题,其它应该也有。

What does the proposed API look like?

。。。

cbeh67ev

cbeh67ev1#

@A-Yang-Git It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED

TITLE

Legend event monitoring problem

BODY

What problem does this feature solve?

There is a mousemover event in the legend, but .on has no function that can listen to the event, only a legendselectchanged is listening to click, I hope to give legend a function to listen to mousemover, thank you. The pie chart I use has this problem, and everything else should have this problem as well.

What does the proposed API look like?

。。。

cedebl8k

cedebl8k2#

命名上应该叫 legendmouseover ,建议自己支持一下,参考 #17849

q3qa4bjr

q3qa4bjr3#

This issue is labeled with difficulty: easy .
@A-Yang-Git Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.

Please have a look at How to debug ECharts if you'd like to give a try. 🤓

tvokkenx

tvokkenx4#

命名上应该叫 legendmouseover ,建议自己支持一下,参考 #17849
并不可以呀this.chart.on("legendmouseover",params=>{
console.log(params);
})
不生效

ddhy6vgd

ddhy6vgd5#

现在没有支持,我的意思是说如果你要新增的话,命名应该叫这个

ojsjcaue

ojsjcaue6#

现在没有支持,我的意思是说如果你要新增的话,命名应该叫这个
嗯嗯,好的好的,没事了,你是说我自己改源码提交是吧,哈哈,我现在用dispatchAction 里的highlight和downplay然后自己定义div 添加 @click@mouseOver @mouseleave 完成效果的,

yv5phkfx

yv5phkfx7#

现在没有支持,我的意思是说如果你要新增的话,命名应该叫这个

哈哈其实mouseover应该对应mouseout

相关问题