You have to set the format pattern and format your data:
var formatter = new google.visualization.NumberFormat({
pattern: '#,###',
groupingSymbol: ','
});
// format column 1 of the DataTable
formatter.format(data, 1);
On Monday, March 31, 2014 2:18:51 PM UTC-4, Captain Gordon Freeman wrote:
>
> Like the title says I have a column chart that shows the values of each
> column on the column itself. I would like to add commas to it if possible.
> I have looked at this page here:
> https://developers.google.com/chart/interactive/docs/reference?hl=de-DE#numberformatterbut
> I think I'm missing something because it doesn't quite work. Here's my
> code so far:
>
> var chart = new
> google.visualization.ColumnChart(document.getElementById('homescreenDetailChart'));
>
> var formatter = new google.visualization.NumberFormat({
> groupingSymbol: ','
> });
>
> chart.draw(view, options);
>
> What'd I miss?
>
--
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.