vAxis values are not incrementing in intervals while using columnchart with corechart package

33 views
Skip to first unread message

Ramakrishna Muvvala

unread,
May 18, 2017, 1:59:03 AM5/18/17
to Google Visualization API

Dear All,

I want to make 10 gridlines in the chart and want to show the no of files on vAxis. When no of files are 6 the chart is showing as in attachment.
Also the bar ended not at 6.
vAxis values are not growing in sequence. Used API : https://www.google.com/jsapi

Script file is also attached.

Can anyone help asap.


Thanks,
Ramakrishna
ColumnChart.png
chartScript.txt

Ramakrishna Muvvala

unread,
May 22, 2017, 10:54:33 AM5/22/17
to Google Visualization API
Dear All,

Can anyone help? I need to fix this issue urgent.

Thanks,
Ramakrishna

Daniel LaLiberte

unread,
May 22, 2017, 11:03:16 AM5/22/17
to Google Visualization API
Since you specify a format for your vAxis, you are not seeing the full precision of the values.
Specifying the number of gridlines is not a guarantee that you will get that number.  The heuristics weight higher that the tick values should be nicer numbers, but they don't consider the format, unfortunately.  

If you want to constrain the range of the vAxis, you should use the vAxis.viewWindow.min and .max values, or possibly the vAxis.minValue and .maxValue.   

Another thing you could do is specify the vAxis.ticks option, with the exact values you want to use for the ticks.

Ramakrishna Muvvala

unread,
Jun 1, 2017, 6:36:44 AM6/1/17
to Google Visualization API
Hi Daniel,

Used the vAxis.viewWindow.min and .max values and applied some logic as per requirement and it resolved.
Thank you soooo much Daniel.

Thanks and Regards,
Ramakrishna
Reply all
Reply to author
Forward
0 new messages