Hide tooltip onmouseover for Google Visualization API
Is there any way to 开发者_如何转开发hide the popup when a pie slice is moused-over in the Google Visualization API using Pie Charts? Thanks
To remove the tooltips you have to do it this way:
chart.draw(data, {tooltip: {trigger:'none'}});
You can also remove all interactivity if you don't want your graph to react to any user actions:
chart.draw(data, {enableInteractivity: false});
I would try to set trigger to 'none
chart.draw(data, {trigger:'none'});
There is no option to turn on/off the tooltip currently. But following could do the trick:
tooltip_iframe = window.frames[document.getElementById('your chart id').firstChild.name];
tooltip_dom = tooltip_iframe.document.getElementById('chart').firstChild.nextSibling.nextSibling;
tooltip_dom.style.display = 'none';
This one works for me
var options = {
tooltip: {trigger:'none'}
};
chart.draw(data, options);
精彩评论