What you want to use is the DataTable's #getValue method. To get Germany's
value from 2008 in that example, you would use:
// 2008 is row 5, Germany is column 6
var textdata = "In 2008 Germany's Coffee Consumption was" + data.getValue(5
, 6);
document.getElementById('txt').innerHTML = textdata;
On Tuesday, June 12, 2012 5:12:46 PM UTC-4, sanj wrote:
>
> Hi All,
>
> I am trying to display a line of text with a particular member in a the
> DataTable that is used to draw a visualization.
>
> For Example:
> In the column chart example, (
> http://code.google.com/apis/ajax/playground/?type=visualization#column_chart
> )
> I want to display a string at the bottom of the chart that says:
>
> In 2008 Germany's Coffee Consumption was 19830493
>
> This is how far I got with the extra code needed to do this, but I am
> having difficulty passing this data through the DOM.
> ........
> var textdata = 'In 2008 Germany's Coffee Consumption was' data.[
> 5,5];
> document.getElementById('txt') = textdata;
> ........
>
> <body style="font-family: Arial;border: 0 none;">
> <div id="visualization" style="width: 600px; height: 400px;"></div>
> <div id="txt"> </div>
>
> </body>
>
> Any help in this issue is very much appreciated.
>
> Thank you,
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/bxeJUVTwKWoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.