Create a NumberFormatter and format the column in the "group" DataTable:
var formatter = new google.visualization.NumberFormat({pattern: '#.##'});
formatter.format(group, 1);
On Sunday, January 20, 2013 12:30:56 PM UTC-5, Yoram wrote:
>
> Hi all
>
> I'm using a group to group data and display the average.
> here's the code:
> var group = google.visualization.data.group(view, [0], [{
> column: 1,
> type: 'number',
> aggregation: google.visualization.data.avg
> }]);
>
> The problem is that I get a nasty result (e.g 4.3917849887239784) and it's
> 'hard on the eye' when the result is shown in a tooltip when hovering on
> the column chart data.
> How can I truncate the grouped column to display only 2 digits after the
> point (e.g. 4.39)??
>
> Thanks,
> Yoram
>
>
--
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/-/ILHppbPdposJ.
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.