Using Google Visualization API, how to turn off to

2019-09-15 12:33发布

问题:

According to this reference http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html , tooltip.trigger = 'none' turns off tooltips on a chart.

How do you use this? data.tooltips.trigger = 'none'?

And, how do you turn off tooltips for a single column?

回答1:

When you draw the chart pass it as a param:

chart.draw(data, {trigger:'none'});


回答2:

Disabling tooltips for a single columns isn't possible. But you can get a similar effect by adding enableInteractivity: false to the series.

See this answer for an example.