findchris
findchris

Reputation: 1854

Highcharts: How to disable piechart tooltip in combination chart example

I have something similar to the highcharts combination chart example, with a pie chart embedded into another chart.

However, what seems like the obvious way to remove a tooltip (tooltip:{enabled:false}) fails to do the job.

My attempt is reflected in this jsfiddle: http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/combo/

Thanks!

Upvotes: 0

Views: 3957

Answers (2)

Sebastian Bochan
Sebastian Bochan

Reputation: 37578

You can check type of chart,

var s;
                    if (this.series.options.type === 'pie') { // the pie chart
                        return false;
                    } else {
                        s = ''+
                            this.x  +': '+ this.y;
                    }
                    return s;

http://jsfiddle.net/QgsNK/1/

Upvotes: 1

Ricardo Lohmann
Ricardo Lohmann

Reputation: 26320

You can simple return false into the tooltip formatter.

http://jsfiddle.net/QgsNK/

Upvotes: 2

Related Questions