The easy way to do that is to use a NumberFormatter 
<https://google-developers.appspot.com/chart/interactive/docs/reference#numberformatter>
:

var formatter = new google.visualization.NumberFormat({pattern: '$#.00'});
// format column 1 of DataTable data
formatter.format(data, 1);

Specifying the formatted value of cells when constructing the DataTable is 
described in the DataTable JSON structure 
<https://google-developers.appspot.com/chart/interactive/docs/reference#dataparam>.
 
 The object specification ({v: value, f: formattedValue}) also happens to 
work with the arrayToDataTable function, but I do not believe it is 
documented anywhere.

On Sunday, September 28, 2014 6:12:42 PM UTC-4, Bevan wrote:
>
> Is there documentation somewhere about this formatting stuff? I now want 
> to have it format as a dollar figure.
>
> On Wednesday, March 19, 2014 8:42:29 AM UTC+13, asgallant wrote:
>>
>> Set the formatted value of your data to an empty string:
>>
>> var data = google.visualization.arrayToDataTable([
>>      ['Label', 'Value'],
>>      ['', {v: @conv, f: ''}],
>> ]);
>>
>> On Tuesday, March 18, 2014 1:35:32 AM UTC-4, Bevan wrote:
>>>
>>> Attached: an image of the current, messy, result.
>>>
>>

-- 
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.

Reply via email to