If you want a given level of precision (ie, 3 decimal places), use the 
Number Format (
http://code.google.com/apis/chart/interactive/docs/reference.html#numberformatter)
 
on columns to set your precision for the tooltips, and use the 
h/vaxis.format option to set the precision for the axes (ex, for bar 
charts: 
http://code.google.com/apis/chart/interactive/docs/gallery/barchart.html#Configuration_Options
).

If you always want to display the same number of digits, regardless of the 
precision of the digits (ie, 3 digits in any place: .123, 3.45, 67.8), then 
you can write a function that takes your data as an input and creates a 
formatted string version of each value with the appropriate number of 
digits.  Pass the formatted value back to the dataTable object with the 
#setFormattedValue (
http://code.google.com/apis/chart/interactive/docs/reference.html#DataTable) 
method 
(or process your data before creating the dataTable object and build the 
dataTable by passing the {v: value, f: 'formatted value'} object to each 
cell).  The axis values are auto-calculated and aside from using the axis 
format option there is nothing you can do to control the precision.

-- 
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/-/Nww-eqX68KwJ.
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