Set grid steps or grid intervals in scatter chart

2,017 views
Skip to first unread message

gh

unread,
Jul 7, 2011, 12:52:52 AM7/7/11
to Google Visualization API
I"d like to be able to set the locations of grid lines on a scatter
chart. For example, I have a scatter chart with an x-axis that goes
from 0 to 100. GV automatically places the grid lines at 0, 25, 50,
75, and 100. I'd like them to occur at intervals of 10. Is this
possible? Thanks.

MC Get Vizzy

unread,
Jul 7, 2011, 9:51:36 AM7/7/11
to google-visua...@googlegroups.com
Sorry, this is not currently supported.


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


Kuba Franusek

unread,
Mar 18, 2013, 11:08:35 AM3/18/13
to google-visua...@googlegroups.com, getv...@google.com
So is this supported now? thanks

asgallant

unread,
Mar 18, 2013, 11:32:51 AM3/18/13
to google-visua...@googlegroups.com, getv...@google.com
You can set a count of gridlines (via the hAxis.gridlines.count and vAxis.gridlines.count options).  To get an interval of a certain width, set the count to [((max - min) / interval) + 1].  As an example, if your axis goes from 0-100 and you want an interval of 10, you would set the gridline count to 11 [((100 - 0) / 10) + 1].

raju k

unread,
Jan 20, 2014, 8:21:13 AM1/20/14
to google-visua...@googlegroups.com, getv...@google.com
How can we Implement  for above requirement 

Sergey Grabkovsky

unread,
Jan 20, 2014, 11:00:41 AM1/20/14
to google-visua...@googlegroups.com, getv...@google.com
Hi, unfortunately we do not support gridline intervals (though it's a very sensible thing to support). Instead we take a gridline count and calculate where they go automatically. You could, however, calculate all the ticks yourself and use the explicit ticks feature to tell the chart where to place the ticks. Here is an example: http://jsfiddle.net/j4UtE/

- Sergey


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages