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: 27658
Status: open
Priority: 0/
Queue: GDGraph

People
Owner: bwarfield [...] cpan.org
Requestors: merijnb [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.23
  • 1.24
  • 1.30
  • 1.31
  • 1.32
  • 1.33
  • 1.34
  • 1.35
  • 1.36
  • 1.37
  • 1.38
  • 1.39
  • 1.40
  • 1.41
  • 1.42
  • 1.43
  • 1.4305
  • 1.4306
  • 1.4307
  • 1.4308
  • 1.44
Fixed in: (no value)



Subject: Cumulative numbers do not stack up properly, patch included
Using the following program shows a bug in the cumulative numbers shown on the axis when showing cumulative areas: use GD::Graph::area; my @data = ( [ 'a', 'b', 'c' ], [ 7, 9, 17 ], [ 10, 14, 8 ], [ 13, 9, 19 ], ); my $graph = new GD::Graph::area(580, 300); $graph->set( title => "Example chart", cumulate => 1, show_values => \@data, ) or die $graph->error; my $gd = $graph->plot(\@data) or die $graph->error; open(IMG, '>', "graph$$.gif") or die $!; binmode IMG; print IMG $gd->gif; print "Written graph$$.gif\n"; close IMG; The two attached graphs show the generated graph before (10371) and after (10512) the following patch, applied against 1.44: diff -r -u /tmp/GDGraph-1.44/Graph/axestype.pm GDGraph-1.44/Graph/axestype.pm --- /tmp/GDGraph-1.44/Graph/axestype.pm 2007-04-26 04:16:09.000000000 +0100 +++ GDGraph-1.44/Graph/axestype.pm 2007-06-20 14:06:55.942938829 +0100 @@ -1414,6 +1414,8 @@ @others = 1 .. $self->{_data}->num_sets; } + my @cumulated; + foreach my $dsn ( @others ) { my @values = $self->{_data}->y_values($dsn) or @@ -1425,14 +1427,24 @@ { next unless defined $display[$i]; my ($xp, $yp); + + my $value = $values[$i]; + if ($self->{cumulate}) + { + if (defined $cumulated[$i]) { + $value += $cumulated[$i]; + } + $cumulated[$i] = $value; + } + if (defined($self->{x_min_value}) && defined($self->{x_max_value})) { ($xp, $yp) = $self->val_to_pixel( - $self->{_data}->get_x($i), $values[$i], $dsn); + $self->{_data}->get_x($i), $value, $dsn); } else { - ($xp, $yp) = $self->val_to_pixel($i+1, $values[$i], $dsn); + ($xp, $yp) = $self->val_to_pixel($i+1, $value, $dsn); } $yp -= $self->{values_space};
Subject: graph10512.gif
Download graph10512.gif
image/gif 3.4k
graph10512.gif
Subject: graph10371.gif
Download graph10371.gif
image/gif 3.4k
graph10371.gif
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.