简体   繁体   English

有什么方法可以根据节点颜色禁用在 highcharts 网络图中的某些节点上的悬停动作。?

[英]Is there any way to disable hover action on particularly some nodes in networkchart of highcharts based on the node color.?

Is there any way to disable hover action on particularly some nodes in networkchart of highcharts based on the node color.?有什么方法可以根据节点颜色禁用在 highcharts 网络图中的某些节点上的悬停动作。?

We implemented search for nodes of network graph and made the nodes which are not matched to gray color.我们实现了对网络图节点的搜索,并将不匹配的节点设为灰色。 Now we need to disable the hover effect to the nodes which are in gray color.现在我们需要禁用对灰色节点的悬停效果。 Any Inputs are Welcome欢迎任何输入

You can add the below small plugin to prevent all hover effects on a point depending on a color.您可以添加以下小插件以防止根据颜色对点的所有悬停效果。

(function(H) {
    H.wrap(H.Point.prototype, 'onMouseOver', function(proceed) {
        if (this.color !== 'red') {
            proceed.apply(this, Array.prototype.slice.call(arguments, 1));
        }
    });
}(Highcharts));

Live demo: https://jsfiddle.net/BlackLabel/1h83ek4u/现场演示: https : //jsfiddle.net/BlackLabel/1h83ek4u/

Docs: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts文档: https : //www.highcharts.com/docs/extending-highcharts/extending-highcharts

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

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