Subject: | Bug with values on stacked bars chart |
Date: | Thu, 11 Jun 2009 16:17:56 -0600 |
To: | bug-GDGraph [...] rt.cpan.org |
From: | Cody Cannon <p.cody.cannon [...] gmail.com> |
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
If you use 'show_values =>1' and 'cumulate =>1' on a bars chart. 'Zero'
values write over the top of the value for the other data set. (See
broken.png.)
I made a simple fix to not print 'Zero' values if cumulate was set.
bars.pm:323:
my $value = $display[$i];
+ next if (($self->get("cumulate")) && ($value == 0 )) ;
It then shows as in fixed.png.
Looking at other graphing packages, it appears that stacked bar charts
typically have their numbers inside the bars themselves. I've seen that
request, and second it, but it was outside the scope of this fix.
Cody