Problems with Stepped Area Chart

24 views
Skip to first unread message

Vlad Yermakov

unread,
Apr 15, 2016, 1:41:38 AM4/15/16
to Google Visualization API
Hello, community.
Why first point in Stepped Are Chart connects with 0 and how I can disconnect it?

Daniel LaLiberte

unread,
Apr 15, 2016, 9:57:33 AM4/15/16
to Google Visualization API
With continuous values for the domain axis, the axis tick values are evenly spaced by default, and each of the step values change relative to the preceding value.  So 0 is the default preceding value before the first value, but this can be changed to a different value.  You can also specify explicit ticks at any values, as you can see in this example:  https://jsfiddle.net/dlaliberte/25xtvjn4/2/

I suspect you might prefer to just convert your numeric domain values to strings, so then each of the discrete values are used as labels for one step regardless of the preceding values.  
There is actually a short-cut to get the same effect: add a type: 'category' option under the hAxis.  You can see that here:   https://jsfiddle.net/dlaliberte/25xtvjn4/

On Fri, Apr 15, 2016 at 1:41 AM, Vlad Yermakov <yermak...@gmail.com> wrote:
Hello, community.
Why first point in Stepped Are Chart connects with 0 and how I can disconnect it?

--
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.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/3fdddb4f-1d3e-4840-920f-a4f0ae22d2c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages