What you are missing is that you have to get the selection from the chart.
The getSelection() method is not documented on the WordTree page, but it is
similar to how it works for other charts.  Here is an example showing how
it works with the WordTree chart:  https://jsfiddle.net/3L0parwx/

On Tue, Oct 20, 2015 at 9:33 PM, bosox2004_williams via Google
Visualization API <[email protected]> wrote:

> given the following code snippet ...
>
> What is the syntax to bring back the property values when doing an
> addlistener to the select event..  For what its worth the code I have
> renders the WordTree and I get to the first alert below but the second
> alert never prints the value of "word" .
> I've tried data.word, wordtree.word and a whole sleu of options that i'd
> rather not post :-)
>
> Any help would be greatly appreciated ...
>
> wordtree.draw(data, options);
>
> google.visualization.events.addListener(wordtree, 'select', function() {
>   alert('A table row was selected');
>   var xyz = *data.word* ;
>   alert( xyz );
> });
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/8552ebf8-3aad-45eb-9c91-809e23539862%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/8552ebf8-3aad-45eb-9c91-809e23539862%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton MA

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMADYcnyXUybPtb84r7FKUW4GGDMqZj7LtTQe9ZKgJ0SQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
  • [visualization-api] WordTr... bosox2004_williams via Google Visualization API
    • Re: [visualization-ap... 'Daniel LaLiberte' via Google Visualization API

Reply via email to