You can use data.getFormattedValue(selectedRow, selectedColumn) to get the
formatted value from a DataTable. You may find the documentation for this
method 
here<https://developers.google.com/chart/interactive/docs/reference#DataTable_getFormattedValue>
.

Happy coding!

- Sergey


On Wed, Jun 5, 2013 at 9:30 AM, Carlos Moreira <[email protected]>wrote:

> 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
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to