Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programatically hide a tooltip in highcharts?

I am trying to implement highcharts in a mobile application, everything works fine but there is one issue in which on changing orientation from potrait to landscape the tooltip shown for any point selected does not hide on orientation change.

Please suggest me how to hide a tooltip programatically in highcharts ..

I tried the below code:

$('#tankActualUsagechart').highcharts().tooltip.hide();

but this does not hide the marker which i am displaying ...

If there is a way to hide the marker i am fine with that also ..

Please help me on this issue

like image 914
yrkapil Avatar asked Jul 12 '13 10:07

yrkapil


3 Answers

I use chart.pointer.reset() for removing marker and tooltip during legendItemClick and it works like a charm

jsfiddle sample

like image 193
Karine Avatar answered Nov 15 '22 20:11

Karine


Please have a look at http://jsfiddle.net/St84H/

You can hide tool tip by

tooltip: {
            enabled: false
        }
like image 26
vinothini Avatar answered Nov 15 '22 22:11

vinothini


As long as you have a reference to the Highcharts Chart object, you can hide the tooltip like so:

// create chart
var myChart = new Highcharts.Chart({ /* snip */ });

// hide tooltip
myChart.tooltip.hide();
like image 30
RoccoC5 Avatar answered Nov 15 '22 20:11

RoccoC5