The column of the selected item tells you what data series it comes from.

Incidentally, your selector code is prone to breaking: if the user 
deselects a point, the #getSelection method will return an empty array, and 
element 0 of an empty array doesn't exist.  This is the safe way to handle 
selections:

function selectHandler () {
    var selection = chart.getSelection();
    if (selection.length) {
        var selectedItem = selection[0];
        // do something with selected item
    }
}

On Thursday, January 9, 2014 4:30:49 AM UTC-5, Sandesh Kanade wrote:
>
> Is there any way i can get which series selected in combo chart.
> Depending on that my SelectHandler will change its parameters.
>  function selectHandler() {
>             var selectedItem = chart.getSelection()[0];
>
> if (selectedItem) {
>   var series = data.getValue(0, selectedItem.column); // likewise series
>   alert('User selected ' + series );
>   }
>
> }
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to