What you do here depends on what the actual cause of the decimals appearing 
is.  The first is caused by gridlines falling on non-integer values (ie, if 
your axis goes from 0-10, you get values of 0, 2.5, 5, 7.5, and 10 on the 
axis); the second is having an unwanted significant digit on the axis 
values (ie, 0, 10.0, 20.0, 30.0, 40.0).

To fix the first, use some combination of the three vAxis suboptions: 
minValue, maxValue, and gridlines.count.  If minValue and maxValue are 
integers, and (maxValue - MinValue) / (gridlines.count - 1) is an integer, 
then there will be no decimals.  By default, the API sets minValue and 
maxValue automatically, and gridlines.count is 5.

To fix the second, set vAxis.format to "#" (or any other ICU decimal 
pattern with no decimal digits).

The second solution can be applied in the first case, but your axis values 
won't be accurate (ie, a line drawn at 7.5 will be labeled as 8).

On Monday, September 24, 2012 10:21:16 AM UTC-4, Patrike wrote:
>
> My LineChart are showing some decimals... but I have only integers to 
> show...do I have an option to do not show decimals, instead of show only 
> integers?
>
> Thanks.
>

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