linechart set top barrier

60 views
Skip to first unread message

jusin

unread,
Jun 10, 2012, 4:26:35 PM6/10/12
to Google Visualization API
I'm trying to crop the linechart at MAX. Ideally, the chart would cut
off at MAX regardless of what values I gave it.

I thought that could get this effect through vAxis.maxValue. After
noticing that this setting takes on the greater of the number given to
it and the max of the values in the dataset, I then constrained the
dataset values to be at most MAX. This didn't have the effect I
wanted. What happens instead is that the data is cropped at MAX but
the chart extends a little bit so that the graph looks awkward. I
noticed that this doesn't happen on the other side if I want to set
the MIN, e.g. 0.

So I then tried playing with the vAxis.viewWindowMode and setting that
to maximized. That didn't do it. Also tried vAxis.viewWindowMode =
'explicit' and vAxis.viewWindowMode.max = MAX,
vAxis.viewWindowMode.min = MIN, but that also has the same effect.

How do I actually get this to work?

visigoth

unread,
Jun 11, 2012, 5:28:53 AM6/11/12
to google-visua...@googlegroups.com
Hi,

The correct way to do it is indeed using the view window options.
Please attach your code so I could look into it.

Thanks,
Visigoth

visigoth

unread,
Aug 26, 2012, 3:34:17 AM8/26/12
to google-visua...@googlegroups.com
Yes, the way to do this is to use the vAxis.viewWindow option.
If this does not yield the desired effect please attach your code for us to examine.

Visigoth

On Thursday, August 23, 2012 10:21:48 AM UTC+3, funkdified wrote:
Hi I am having the same issue. Is there any way to force the window to a certain value range like 0-100?
Reply all
Reply to author
Forward
0 new messages