How to set min interval for vAxis in Google line chart?

19 views
Skip to first unread message

VSO

unread,
Feb 21, 2017, 6:23:12 AM2/21/17
to Google Visualization API

I have a google line chart which works fine if there is some data. But sometimes there is no data to show. In this case the vAxis automatically decides to show only 3 values: 0.0, 0.5 and 1.0. In my case it makes sense to show only integer numbers. So I tried to use


vAxis: { viewWindow: { min: 0 }, format: 0 }


But then it only rounds up and shows: 0, 1, 1. I'd rather need a min interval of 1 to see the values: 0, 1, 2 and so on.


How can I achieve this?


Please feel free to play around with this fiddle: click here.

Reply all
Reply to author
Forward
0 new messages