is vaxis min value is still supported ?

1,305 views
Skip to first unread message

jc

unread,
Jul 24, 2016, 4:13:03 AM7/24/16
to Google Visualization API
Hi,
What is the best way to indicate min and max value  for vertical axis in  a line chart ?

In the attached doc, gChart generate vaxis from -50 to 150    does'nt make sense.
thanks
test.html

Daniel LaLiberte

unread,
Jul 25, 2016, 9:31:22 AM7/25/16
to Google Visualization API
You should use viewWindow min and max to limit the range of the axis.

 vAxis: {
            viewWindow: { min: 0, max: 150}
          }

The minValue and maxValue options actually only ensure those values are included, and don't restrict the axis.

The reason the chart is expanding to -50 by default is that the rounded curve dips below 0.  It probably should either not dip below 0, or allow a small dip without expanding the axis.


--
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/c6f68cf2-b66f-4efb-b1da-8714ed3f28fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

jc

unread,
Jul 25, 2016, 11:49:27 AM7/25/16
to Google Visualization API

Thank you Daniel :)   It's fine now.

However, I don't find these options in the documentation. Should be there : https://developers.google.com/chart/interactive/docs/customizing_axes ?



Le lundi 25 juillet 2016 15:31:22 UTC+2, Daniel LaLiberte a écrit :
You should use viewWindow min and max to limit the range of the axis.

 vAxis: {
            viewWindow: { min: 0, max: 150}
          }

The minValue and maxValue options actually only ensure those values are included, and don't restrict the axis.

The reason the chart is expanding to -50 by default is that the rounded curve dips below 0.  It probably should either not dip below 0, or allow a small dip without expanding the axis.


On Sun, Jul 24, 2016 at 4:13 AM, jc <jcap...@gmail.com> wrote:
Hi,
What is the best way to indicate min and max value  for vertical axis in  a line chart ?

In the attached doc, gChart generate vaxis from -50 to 150    does'nt make sense.
thanks

--




--

Daniel LaLiberte

unread,
Jul 25, 2016, 12:54:29 PM7/25/16
to Google Visualization API
That page on customizing axes would be a good place to include documentation on the viewWindow options, and more.  Currently, the viewWindow options only appear in the list of options for each type of chart where they apply.

--
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.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages