Javascript error while drilling down a column twice

28 views
Skip to first unread message

Raji

unread,
Jan 17, 2013, 7:04:25 PM1/17/13
to google-visua...@googlegroups.com
Here is my chart - http://jsfiddle.net/asgallant/x5Eth/

It gives a javascript error if the same column is clicked twice consecutively or if the user double clicked on it.
Could you tell me how to get rid of this error?

thank you in advance!

asgallant

unread,
Jan 17, 2013, 7:18:27 PM1/17/13
to google-visua...@googlegroups.com
D'oh!  That's my mistake there.  The simple way to handle the problem is to clear the selection in the main chart after someone clicks on it (see this: http://jsfiddle.net/asgallant/x5Eth/4/).  In doing so, you lose the visual indication of which column was selected in the main chart.  If that doesn't matter to you, then you're good to go.  If you want to keep the visual indication in the main chart, then you have to decide what should happen when someone clicks a column a second time (the second click clears the selection, which is why the script throws an error when you try to access information about the selected element).  This simplest case here is to do nothing (see this: http://jsfiddle.net/asgallant/x5Eth/5/).

Raji

unread,
Jan 17, 2013, 7:27:22 PM1/17/13
to google-visua...@googlegroups.com
That was super quick!!! Thank you so much! 
Reply all
Reply to author
Forward
0 new messages