Somehow that did not work for me.
So i have an array of charts:-
google.visualization.events.addListener(baselinechart[classname], 
'select',function(){
  selectHandler(baselinechart[classname].getSelection());
});

The above resulted in an empty array being passed to the function.

What am i missing?


On Friday, December 7, 2012 12:41:30 AM UTC+5:30, asgallant wrote:
>
> The events don't pass any information about which chart fired the event, 
> so there is nothing in the API that can do this, but there is a way around 
> it:
>
> function selectHandler (chart) {
>     var selection = chart.getSelection();
> }
> google.visualization.events.addListener(myChart, 'select', function () {
>     selectHandler(myChart);
> });
> google.visualization.events.addListener(myOtherChart, 'select', function (
> ) {
>     selectHandler(myOtherChart);
> });
>
> On Thursday, December 6, 2012 5:44:42 AM UTC-5, Shivs wrote:
>>
>> Hey
>>
>> Wanted to know if it is possible to have same select event handler for 
>> multiple charts.
>> If so, how can one determine which chart was clicked (for calling 
>> function getSelection())?
>>
>> Thanks
>>
>

-- 
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/-/KfnlnKvhflcJ.
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.

Reply via email to