简体   繁体   English

highchart图例标签不会发生鼠标事件

[英]highchart legend lables does not take mouse events

Sorry to not include a fiddle as the highchart chart is tied tight to my application. 抱歉,由于海图图表与我的应用程序紧密相关,因此请不要包括小提琴。 Earlier the mouse events were getting tracked over the legends as well as the legend labels . 较早之前,鼠标事件已通过图例以及图例标签进行了跟踪。 For some reason these labels does not take the events anymore, rather it goes to the container holding the charts. 由于某些原因,这些标签不再处理事件,而是转到保存图表的容器。 在此处输入图片说明

Any inputs? 有输入吗?

Also when i try to inspect the above highlighted legend label, the parent container is highlighted instead of the label itself. 另外,当我尝试检查上面突出显示的图例标签时,父容器将突出显示而不是标签本身。 The above problem is seen for other labels out of the plot area as well. 对于其他超出绘图区域的标签,也可以看到上述问题。

You can use custom-events extension which allows to catch this event on legend item. 您可以使用自定义事件扩展名,该扩展名允许在图例项上捕获此事件。

legend: {
        itemEvents: {
            mouseover:function(){
                console.log(this);
            }
        }
    },

Example: http://jsfiddle.net/Utx8g/413/ 示例: http//jsfiddle.net/Utx8g/413/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM