开发者

Hide tooltip onmouseover for Google Visualization API

开发者 https://www.devze.com 2023-03-04 10:00 出处:网络
Is there any way to 开发者_如何转开发hide the popup when a pie slice is moused-over in the Google Visualization API using Pie Charts? ThanksTo remove the tooltips you have to do it this way:

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消