Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable tooltip in google geo chart?

I need disable tooltip in google geo chart. I tried tooltip.trigger: 'none' and other tries, but I can´t disable tooltip.

How to disable tooltip in google geo charts?

Thank You

like image 276
Vanama Avatar asked Nov 04 '22 22:11

Vanama


2 Answers

Had a look around and tried a few things but it seems that this particular bit of functionality is not part of Geo charts. With other charts, you can do the following and have tooltips disabled:

var options = {
    tooltip {
       trigger: 'none'
    }
};

A workaround I came across is to create a div that just sits on top of the map and that disables the interactivity of the map. Not the best solution but a work around until it's made available. You can see it working on jsfiddle.

like image 104
cchana Avatar answered Nov 09 '22 11:11

cchana


Depending on what browsers your site/app need to support a simple CSS one-liner will disable interactivity.

#map {
  pointer-events: none;
}

This will cause the map to appear as a static image with no interactivity. But again, it's not supported in all browsers.

like image 23
Brett DeWoody Avatar answered Nov 09 '22 09:11

Brett DeWoody