How to make scales "fixed" with Column Chart API

70 views
Skip to first unread message

GoogleNewBie

unread,
Sep 21, 2011, 11:55:11 AM9/21/11
to Google Visualization API
Hello,
I am trying to use the google.visualization.ColumnChart API
for a simple column chart but the scales keeps changing as the data
changes. I can't find a property to make the scales fixed to a range
of numbers like the minimum and maximum values on chart.
I need to make the scales fixed to two numbers. Can anyone tell me if
that is possible? If not, can I request a new feature to be added to
the column chart? Is there any other Google visusalization API that
allows fixed scales(other than the Timeline chart as I can 't use
Timeline chart for my purpose.)

Thanks in advance.

asgallant

unread,
Sep 21, 2011, 1:33:04 PM9/21/11
to google-visua...@googlegroups.com
Set the vAxis.maxValue and vAxis.minValue parameters.  Assuming maxValue is greater than the largest value in the chart and minValue is less than the smallest value in the chart, the API will use these numbers to determine the maximum and minimum axis values.  The API does not, however, use these values explicitly, it interpolates its own values (ie, max is always >= the larger of maxValue or the maximum value).

If you need specific axis values that the API does not choose, you can use the vAxis.viewWindow.max and vAxis.viewWindow.min options.  These are more like zoom settings than axis settings, though, so they may not work perfectly for your needs.

GoogleNewBie

unread,
Sep 21, 2011, 2:37:22 PM9/21/11
to google-visua...@googlegroups.com
Thank you very much for your help Asgallant !!
your reply is very helpful!!  I really appreciate your help!
Reply all
Reply to author
Forward
0 new messages