Javascript Highcharts-仅向某些动态添加的系列添加工具提示

Javascript Highcharts-仅向某些动态添加的系列添加工具提示,javascript,highcharts,Javascript,Highcharts,使用highcharts,我将多个系列添加到现有图表中。添加系列时,我需要能够根据添加的系列设置工具提示的打开或关闭 以下是我的位置: 试试这个。 内部图表选项。 tooltip: { formatter: function() { var text = false; if(this.series.name == "GOOG") { // just an example of serie name // you can u

使用highcharts,我将多个系列添加到现有图表中。添加系列时,我需要能够根据添加的系列设置工具提示的打开或关闭

以下是我的位置:


试试这个。

内部
图表
选项。

tooltip: {
    formatter: function() {
        var text = false;
        if(this.series.name == "GOOG") {
        // just an example of serie name
        // you can use index or other data too
            text = 'test';
        }

        return text;
    }
}

它不会像预期的那样将工具提示添加到该系列中
tooltip: {
    formatter: function() {
        var text = false;
        if(this.series.name == "GOOG") {
        // just an example of serie name
        // you can use index or other data too
            text = 'test';
        }

        return text;
    }
}