Reputation: 181
Is there any way to show/hide (open/close) google chart tooltip programatically? My tooltip is html enabled, trigger by 'selection'. I am trying to add a close icon to the tooltip.
Upvotes: 7
Views: 6202
Reputation: 11258
You can show it using setSelection()
method, for example:
var options = {
....
tooltip: { trigger: 'selection' }
...
}
chart.setSelection([{row:0, column:1}]);
See example at jsbin.
And hide it using empty object:
chart.setSelection([{}]);
See example at jsbin.
Upvotes: 12