Re: how to disable tooltip for 'select' event on column chart ?

1,204 views
Skip to first unread message

asgallant

unread,
Oct 16, 2012, 2:24:43 PM10/16/12
to google-visua...@googlegroups.com
Setting the tooltip.trigger option to 'none' should work.

Changing bar color on select is a bit trickier to do, and requires some hackery to make it work.  I have example code here that you can use.

On Tuesday, October 16, 2012 1:31:28 PM UTC-4, Ravi Kumar wrote:
 HI,

i am searching in google to resolve the below mention problems but i dint find useful info anywhere

i have build small google elevation chart example using google column chart. i have written handler for select event. so the problem is when i click on the chart it showing the tooltip box.

How can i disable the tooltip on select event?(actually how to disable the tooltip for any event?). i tried options {tooltip:{trigger:'none'}} but its not working.

another requirement is how to change the color of the selected bar on chart?

Anyone please help me in resolving these issues

Thank you very much in advance

Regards,
Ravi Kumar

asgallant

unread,
Oct 16, 2012, 2:25:08 PM10/16/12
to google-visua...@googlegroups.com

Ravi Kumar

unread,
Oct 17, 2012, 2:35:38 AM10/17/12
to google-visua...@googlegroups.com
Hello asgallant, 

Thank you soooooooo Much for quick reply. but tooltip.trigger option is not working.

could you please check the attached example and let me know where i am doing wrong in the code

i will try to implement the color changing of the bar with the given example

once again thank you so much for the reply


Thanks & Regards,
Ravi Kumar
google_column_chart.html

asgallant

unread,
Oct 17, 2012, 10:43:34 AM10/17/12
to google-visua...@googlegroups.com
You need to load the "corechart" package, not the "columnchart" package.  This:

google.load("visualization", "1",{packages:["columnchart"],"callback" : initialize});

should be this:

google.load("visualization", "1",{packages:["corechart"],"callback" : initialize});

Ravi Kumar

unread,
Oct 17, 2012, 11:03:33 AM10/17/12
to google-visua...@googlegroups.com
If i use 'corechart' google elevation service is not showing properly

please see the attached file for full details. 

with the example provided to change the bar colors on 'selection' it is automatically converting to the corechart from columnchart. 

please suggest me a way to resolve the issues.

Thank you for your response
corechart_vs_columnchart.png

asgallant

unread,
Oct 17, 2012, 12:07:39 PM10/17/12
to google-visua...@googlegroups.com
You can change the axis range by setting the vAxis.minValue and vAxis.maxValue options.  The API can (and often times does) override those values to make the axis "neater", so if you end up with values that you don't want, then you can set the vAxis.viewWindow.min and vAxis.viewWindow.max options, which lock the minimum and maximum axis values to exactly what you specify, regardless of the values of your data.
Reply all
Reply to author
Forward
0 new messages