I don't understand what you mean by "variables".  You can do
data.addRows([['January',2000000]]),
but you'd lose the formatting, and you'd have to call
data.setFormattedValue(0, 1, '$20M')

It would help if you could elaborate on your question.

thanks,

MC Get Vizzy

On Tue, Dec 28, 2010 at 5:23 PM, aknbad <[email protected]> wrote:

> How do I put variables instead of (v:20, f:'$20M") etc???????
>
>
>
> function drawVisualization(idTarget) {
>        // Create and populate the data table.
>        var data = new google.visualization.DataTable();
>        data.addColumn('string', 'Month');
>        data.addColumn('number', 'Sales');
>        data.addRows([
>          ['January',{v:20, f:'$20M'}],
>          ['February',{v:31, f:'$31M'}],
>          ['March',{v:61, f:'$61M'}],
>          ['April',{v:26, f:'$26M'}],
>          ['May',{v:10, f:'$10M'}]
>        ]);
>
>        // Create and draw the visualization.
>        new google.visualization.PieChart(
>          document.getElementById(idTarget)).
>            draw(data, {is3D:true});
>
>
>      }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-visualization-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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.

Reply via email to