本文介绍了在Highcharts中的某些点上禁用工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一张Highcharts折线图,我启用了工具提示,但是,我希望禁用x = 0的特定情况下的工具提示。有没有办法做到这一点?我到目前为止最接近的是:
工具提示:{
formatter:function(){
if(this.x> 0){
return this.x;
}
else else null;
$ b $ p
$ b 这只是创建一个空的工具提示,但仍然存在弹出。
解决方案好的...只是想通了。我必须返回 false
而不是 null
。
tooltip:{
formatter:function(){
if(this.x> 0){
return this.x;
}
else返回false;
}
}
I have a Highcharts line chart going and I have tooltips enabled, however, I would like to disable tooltips for the certain case where x=0. Is there a way of doing this? The closest that I have come so far is this:
tooltip: {
formatter: function() {
if (this.x > 0) {
return this.x;
}
else return null;
}
}
This just creates an empty tooltip but there is still a popup.
解决方案 Ok...just figured it out. I just have to return false
instead of null
.
tooltip: {
formatter: function() {
if (this.x > 0) {
return this.x;
}
else return false;
}
}
这篇关于在Highcharts中的某些点上禁用工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!