Add New Listener, for DoubleClick

345 views
Skip to first unread message

Swati

unread,
Jul 2, 2009, 1:46:21 PM7/2/09
to Google Visualization API
I am displaying a chart using Google Visualization, however, one of
our requirement is that when the user doubleclicks on the chart then
take the user to the next page.

I am currently using select event to display report information for
the section selected. However, we need to capture doubleclick so that
we can display some other related information.

Any help is appreciated
Thanks

Swati

ChartMan

unread,
Jul 5, 2009, 7:31:52 AM7/5/09
to google-visua...@googlegroups.com
Are you looking for double clicks on particular chart elements (like bars etc.) or any double click on the chart?

Swati

unread,
Jul 6, 2009, 11:12:48 AM7/6/09
to Google Visualization API
doubleclick on the whole chart. Since on a specific chart element, I
am using the select event to get display report for that specific bar
on the chart (like a drilldown)

Thanks

Swati
> > Swati- Hide quoted text -
>
> - Show quoted text -

ChartMan

unread,
Jul 7, 2009, 6:22:16 AM7/7/09
to google-visua...@googlegroups.com
So in general you can do something like the following
<div id="visualization" ondblclick="alert(1)"></div>
This will work in image based charts, table, map and a few others.
As far as I know it won't work for the interactive charts as they are iframed.
Moreover, as the interactive charts funcitonality does not include interaction with a user double-click I am not sure we intend to expose this event in the future.




This should work and will alert 1 on every double click your visualization gets.

Swati Chandna

unread,
Jul 7, 2009, 9:15:43 AM7/7/09
to google-visua...@googlegroups.com
Thanks for the reply.

I am using Google Visualization API, is this what is called 'interactive charts'. The reason why we didn't pick Image Based Charts, since Image Based Charts do not let you drill down on a specific element/section of the chart (Correct me if I am wrong)

I'll try your solution again on my chart. However, I think I had tried something similar before and it did not work.

Again, I really appreciate your help.

Swati

ChartMan

unread,
Jul 7, 2009, 9:48:47 AM7/7/09
to google-visua...@googlegroups.com
The interactive charts are the linechart, barchart etc in which you can select/highlight a bar/line. The image charts are similar but there are just images with no interaction capabilities.
The problem is that only the imagecharts can be used to listen to double clicks.

Let me know if you are able to find a reasonable solution. 
Reply all
Reply to author
Forward
0 new messages