Skip Menu |

This queue is for tickets about the GDGraph CPAN distribution.

Maintainer(s)' notes

There are plenty of good ideas of what people can do published here on the queue. Turning a patch from the tracker into a pull request is not one of them. In order to get maintainers' attention way more quickier, PR should have at least a sample included. We know it's hard to test images generating software, but it doesn't mean we can not test numbers produced by intermediate algorithms used to generate these images, so either a test or a sample.

Report information
The Basics
Id: 46863
Status: open
Priority: 0/
Queue: GDGraph

People
Owner: Nobody in particular
Requestors: p.cody.cannon [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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>
Download fixed.png
image/png 2.1k

Message body is not shown because sender requested not to inline it.

Download broken.png
image/png 2.2k

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
From: justincase [...] yopmail.com
If you want to suppress the display of 0 values, simply go through the data and change all the 0s to undef, and then they won't be displayed: @data = map [map {$_ eq 0 ? undef : $_} @$_], @data; But 0 values are not the only ones to have an overlapping problem. If you have a very big vertical scale, and one of your stacked components is 1, so that it is very thin, then the overlapping will still occur. As for showing the value inside the bar, simply set the "values_space" option to a sufficiently negative number (depending on the size of your font): $graph->set(values_space => -15); On Thu Jun 11 18:18:23 2009, p.cody.cannon@gmail.com wrote: Show quoted text
> 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
Subject: New GD::Graph co-maintainer and new release on CPAN
Hello, You recieved this message as you filed a bug report or feature request against GD::Graph module on CPAN. My name is Ruslan and I'm new co-maintainer of the module. I've updated the module to 1.45 with doc changes and released it to CPAN. See distribution status [1]. I have TODO list for several releases, so if your ticket was a patch then turning it into a nice pull request may expedite inclusion :) [1] http://search.cpan.org/~ruz/GDGraph-1.45/Graph.pm#DISTRIBUTION_STATUS -- Best regards, Ruslan.