bug in 1.1 beta

62 views
Skip to first unread message

tkapler

unread,
Feb 17, 2011, 10:24:54 AM2/17/11
to Google Visualization API
one bug (if not strange "feature") with 1.1

linechart - when i set vAxis maxValue to 100, it uses 120 instead. On
version 1.0 it works as expected. Actually it starts to show 120 when
i have maxValue over 90.

The same with e.g. maxValue 60 - it shows 80 (but 59 shows 60).

See http://mediacentrum.cz/bug.htm and compare it with
http://mediacentrum.cz/not-bug.htm (the only difference is that
version 1.1 versus 1)

I guess that you are trying to round it on "nice" numbers (5 / 10)
sooner (so e.g. with 30 it is 0, 8, 15, 23, 30 with v.1, but 0, 10,
20, 30, 40 with version 1.1), but IMHO you should accept rounding to 5
for higher numbers - e.g. that 100 is very common max value for vAxis
for showing percentages).

And of course the best would be to use always the maxValue when it is
set and do not try to increase it - when i do not want default
maxValue calculated from data, i probably know why i do not want that
default value. And if i would need some inteligence over it, i could
very easily calculate from my data and put it to maxValue. The same
for minValue.

P.S.: when you will repair it, you can put there that grid granularity
variable ;-) (i guess that there would be somewhere in the code number
5 for splitting in 5 section, so replacing it with variable with
default=5 would not take long ;-)

Tomas

visigoth

unread,
Feb 20, 2011, 6:38:26 AM2/20/11
to Google Visualization API
Tomas,

Your observation is correct, and indeed the fixes to version 1.1 come
to solve cases like the 0, 8, 15, 23, 30 you mentioned.
Our algorithm prefers 0,30,60,90,120 over 0,25,50,75,100 because it
does not give multiples of 5 enough emphasis. We might address that in
a future release.
BTW, the first option (0-120) is actually preferable in some cases, so
it could be that adding user control over tick values is inevitable
(also to specify a rigid max value above which the range cannot be
extended).

Your notes will be taken into account when we revise our tick choosing
mechanism.
Thank you,
visigoth

On Feb 17, 5:24 pm, tkapler <kap...@mediacentrum.cz> wrote:
> one bug (if not strange "feature") with 1.1
>
> linechart - when i set vAxis maxValue to 100, it uses 120 instead. On
> version 1.0 it works as expected. Actually it starts to show 120 when
> i have maxValue over 90.
>
> The same with e.g. maxValue 60 - it shows 80 (but 59 shows 60).
>
> Seehttp://mediacentrum.cz/bug.htmand compare it withhttp://mediacentrum.cz/not-bug.htm(the only difference is that

Remo

unread,
Feb 25, 2011, 9:22:57 AM2/25/11
to Google Visualization API
This behaviour is really bad for charts showing percentages. Check out
the following uptime chart for example:

function drawVisualization() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Datum');
data.addColumn('number', 'Uptime');
data.addRows([['25.01.2011', 91.23],
['26.01.2011', 71.23],
['27.01.2011', 100.0],
['28.01.2011', 100.0],
['29.01.2011', 81.23],
['30.01.2011', 100.0]]);

var ac = new
google.visualization.AreaChart(document.getElementById('visualization'));
ac.draw(data, {
title : 'Uptime Chart',
width: 600,
height: 400,
vAxis: {title: "Uptime (%)", minValue: 0, maxValue: 100}
});
}

If you run this code in the playground (http://code.google.com/apis/
ajax/playground/?type=visualization#area_chart) you will see, that the
specified maxValue=100 is ignored even all values are <= 100 and that
the chart uses 120 as maxValue of vAxis which makes absolutely no
sense in case of a percentage chart.

And we are using version 1, not 1.1 (where this problem also exists).
This used to work as expected until last week or so.

Cheers Remo


On Feb 20, 12:38 pm, visigoth <visig...@google.com> wrote:
> Tomas,
>
> Your observation is correct, and indeed the fixes to version 1.1 come
> to solve cases like the 0, 8, 15, 23, 30 you mentioned.
> Our algorithm prefers 0,30,60,90,120 over 0,25,50,75,100 because it
> does not give multiples of 5 enough emphasis. We might address that in
> a future release.
> BTW, the first option (0-120) is actually preferable in some cases, so
> it could be that adding user control over tick values is inevitable
> (also to specify a rigid max value above which the range cannot be
> extended).
>
> Your notes will be taken into account when we revise our tick choosing
> mechanism.
> Thank you,
> visigoth
>
> On Feb 17, 5:24 pm, tkapler <kap...@mediacentrum.cz> wrote:
>
>
>
>
>
>
>
> > one bug (if not strange "feature") with 1.1
>
> > linechart - when i set vAxismaxValueto 100, it uses 120 instead. On
> > version 1.0 it works as expected. Actually it starts to show 120 when
> > i havemaxValueover 90.
>
> > The same with e.g.maxValue60 - it shows 80 (but 59 shows 60).
>
> > Seehttp://mediacentrum.cz/bug.htmandcompare it withhttp://mediacentrum.cz/not-bug.htm(theonly difference is that
> > version 1.1 versus 1)
>
> > I guess that you are trying to round it on "nice" numbers (5 / 10)
> > sooner (so e.g. with 30 it is 0, 8, 15, 23, 30 with v.1, but 0, 10,
> > 20, 30, 40 with version 1.1), but IMHO you should accept rounding to 5
> > for higher numbers - e.g. that 100 is very common max value for vAxis
> > for showing percentages).
>
> > And of course the best would be to use always themaxValuewhen it is
> > set and do not try to increase it - when i do not want default
> >maxValuecalculated from data, i probably know why i do not want that
> > default value. And if i would need some inteligence over it, i could
> > very easily calculate from my data and put it tomaxValue. The same

Viz Kid

unread,
Feb 28, 2011, 6:50:53 AM2/28/11
to google-visua...@googlegroups.com

Hi

Indeed this behavior was changed in the last release.
We will hopefully address this in the upcoming release (which are now more frequent than before).

Sorry for any inconvenience,
  Viz Kid

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


dimzi

unread,
Feb 28, 2011, 7:43:11 AM2/28/11
to Google Visualization API
This is really annoying. We're using GV in production and the last
update broke all our uptime charts.

Check this: http://status.mozilla.com/11627/141897/mozilla.com

Do you have an ETA for the next release??

Thanks,

Dimitris

On Feb 28, 1:50 pm, Viz Kid <viz...@google.com> wrote:
> Hi
>
> Indeed this behavior was changed in the last release.
> We will hopefully address this in the upcoming release (which are now more
> frequent than before).
>
> Sorry for any inconvenience,
>   Viz Kid
>

dimzi

unread,
Feb 28, 2011, 7:47:38 AM2/28/11
to Google Visualization API
And btw,

I would really like to choose whether I want to upgrade or not.
Is there any way to stick with a GV version?


Cheerz,

Dimi

On Feb 28, 1:50 pm, Viz Kid <viz...@google.com> wrote:
> Hi
>
> Indeed this behavior was changed in the last release.
> We will hopefully address this in the upcoming release (which are now more
> frequent than before).
>
> Sorry for any inconvenience,
>   Viz Kid
>

asgallant

unread,
Mar 1, 2011, 8:06:23 AM3/1/11
to Google Visualization API
I second that. Some option to either automatically use the most
current version or specify which version we would like to use would be
nice. I consider myself lucky that this bug cropped up while my
project is still in the development stage - if it had gone live and
then had the bug pop up, I'd be getting crucified, especially if all I
could tell my boss is that the only thing I can do is wait for a bug
fix.

Joe

unread,
Mar 1, 2011, 9:02:19 AM3/1/11
to google-visua...@googlegroups.com
I am using version '1' of the API and I'm getting this problem.

I created a column chart with stacked columns. Each column adds up to 100, however my vaxis continues to 120. I have set the vaxis.maxvalue to 100. This is amnnoying as it worked a few weeks ago and I haven't changed the version in my code. I have made the total for each stacked column add up to slightly less than 100 and this problem still occurs.

As was said before, this behaviour is not ideal for showing percentages (which I'm sure many people, including myself, would like to do). A fix soon would be good as until then I'm stuck.

Thanks

dimzi

unread,
Mar 1, 2011, 9:02:15 AM3/1/11
to Google Visualization API
Hi,

To anyone interested, I managed to find a work around for percentage
charts.
Setting the minValue to value in this set [20,40,60,80] and maxValue
to 100, then it works okay (this is if the actual minimum value is not
bellow 20).

Not very nice, but works.

Can't wait for a permanent solution.

Dimi

asgallant

unread,
Mar 3, 2011, 10:38:50 AM3/3/11
to Google Visualization API
I found another workaround that exploits part of the bug to work
around the bug: play around with different values for maxValue, and
you might find one that rounds up to the maxValue you are looking
for. A few that I have tested (with minValue: 0):

50 rounds to 60
60 rounds to 80
80 stays at 80
85 rounds to 100 <----useful for % charts
90 rounds to 120

The logic behind the behavior baffles me, but at least I have a
temporary solution to work with.

asgallant

unread,
Mar 3, 2011, 12:13:43 PM3/3/11
to Google Visualization API
Note: this doesn't work if any of your chart values goes over the
maxValue that you specify (ie. a chart that has a bar with a value of
90, maxValue: 85, renders as a maxValue 120).

Remo

unread,
Mar 23, 2011, 10:06:45 AM3/23/11
to Google Visualization API
Seems like this issue has been solved!
Thanks to everyone!
> > > Seehttp://mediacentrum.cz/bug.htmandcompareit withhttp://mediacentrum.cz/not-bug.htm(theonlydifference is that
Reply all
Reply to author
Forward
0 new messages