我有一个Highcharts折线图,我启用了工具提示,但是,我想在x = 0的某些情况下禁用工具提示.有办法做到这一点吗?我到目前为止最接近的是:
tooltip: {
formatter: function() {
if (this.x > 0) {
return this.x;
}
else return null;
}
}
Run Code Online (Sandbox Code Playgroud)
这只是创建一个空的工具提示,但仍然有一个弹出窗口.
All*_*Liu 36
好的......只是想通了.我只需要返回false而不是null.
tooltip: {
formatter: function() {
if (this.x > 0) {
return this.x;
}
else return false;
}
}
Run Code Online (Sandbox Code Playgroud)