Thanks!
On Friday, May 18, 2012 6:39:30 AM UTC-7, asgallant wrote:
>
> You can set up a 'select' event handler for the GeoChart and then draw the
> ColumnChart based on what the user clicks on.
>
> google.visualization.events.addListener(geoChart, 'select', function () {
> var selection = geoChart.getSelection();
> // selection contains an array of objects {row, column}
> // representing each selected element in the DataTable
> // most visualizations allow only 1 selection, so it's
> // usually safe to access just selection[0]
>
> var value = data.getValue(selection[0].row, selection[0].column);
> // do something with value
>
> // note: selecting the same element twice in a row deselects
> // the element unless you clear the selection in the event handler
> geoChart.setSelection(null);
> });
>
> On Thursday, May 17, 2012 3:15:13 PM UTC-4, Alex Stone wrote:
>>
>> I'm wondering if it's possible to use a GeoChart to select and show data
>> from a columnchart.
>>
>> I'm pretty new to Google Viz and code in general, but I created this
>> column chart using a dependent control thanks to the great examples:
>> http://jsbin.com/okekil/2/edit#javascript,html
>>
>> Is it possible to also render a GeoChart in which a user could click on a
>> U.S. state and the relevant data would display?
>>
>> Thanks in advance
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/FzuE8cwAC8QJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.