Hi,
I've been trying to retreive the Datatable row of a selected word in a
WordTree Chart and failing miserably at it.
Considering the explicit case:
var nodeListData = new google.visualization.DataTable();
nodeListData.addColumn('number', 'id');
nodeListData.addColumn('string', 'childLabel');
nodeListData.addColumn('number', 'parent');
nodeListData.addColumn('number', 'size');
nodeListData.addColumn('number', 'color');
nodeListData.addRow([0, 'Life', -1, 1, 0]);
nodeListData.addRow([1, 'Archaea', 0, 1, 0]);
nodeListData.addRow([2, 'Eukarya', 0, 5, 0]);
var options = {wordtree: {format: 'explicit'}};
var mywordtree = new
google.visualization.WordTree(document.getElementById('wordtree_explicit'));
google.visualization.events.addListener(mywordtree, 'select', myClickHandler);
mywordtree.draw(nodeListData, options);
function myClickHandler(){
//this just has 3 properties (word, weight and color)
var selectedItem = mywordtree.getSelection();
//trying with any method of the Datatable gives no results probably due to the
fact that it is not the object drawn on the page
.....
}
I would be very grateful if someone could help in this regard.
The purpose behind this effort is being able to uniquely identify a
user-selected word of the charted wordtree.
Thank you in advance.
Felipe.
--
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/d/optout.