Carlos Moreira
unread,Jun 5, 2013, 9:30:09 AM6/5/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-visua...@googlegroups.com
Hello all
My data is in this format:
data.addRows([[{v:'AU-NSW',f:'New South Wales'},0,'Click to visit Wikipedia']]);
How can I get 'New South Wales' on a string to use it after a user selects that region?
Let's say, for example, I want to have it on an alert box? I tried a couple of thing with no sucess. Is it possible to do it?
google.visualization.events.addListener(chart, 'select', function() {
var selection = chart.getSelection();
if (selection.length == 1) {
var selectedRow = selection[0].row;
var selectedRegion = data.getValue(selectedRow, 0);
var selectedRegionrow = data.getValue(selectedRow, 1);
var selectedRegiontooltip = data.getValue(selectedRow, 2);
var selectedRegionformated = ?????;
alert(selectedRegionformated);
}
});
Thank you for your help!
Greetings
Carlos