Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed shadows overlapping when in cumulative mode. #4

Merged
merged 1 commit into from
Dec 27, 2015
Merged

Conversation

Tordek
Copy link

@Tordek Tordek commented Jan 3, 2015

Split drawing in two steps: First draw shadows, then draw datasets.

Split drawing in two steps: First draw shadows, then draw datasets.
@Tordek
Copy link
Author

Tordek commented Jan 3, 2015

Hi!

This PR was brought to you by the CPAN Pull Request Challenge!

I'm new to Perl, and I tried to make the simplest thing that worked; please do not hesitate to mention anything that can be improved, if need be.

@ruz
Copy link
Owner

ruz commented Mar 11, 2015

Sorry for delay. I'm maintainer of the module so a demo would be cool, may be update to samples if there is apropriate place exists for the sample. If this work is based on a bug report then please mention it here. I just released 1.49 with a few clean ups and fixes and abolutely don't mind to release 1.50 with this fixes in place after I get more context to simplify code review.

@Tordek
Copy link
Author

Tordek commented Jun 14, 2015

Hi, sorry for the extreme delay, I had college to attend to.

I just verified that the bug is present in 1.49.

This patch should fix the first bug in BUGS, "Subject: Bug in shadow handling with cumulative bar charts", which is (erroneously?) marked as fixed in the changelog for 12 Jun 2002 - 21 Jun 2002.

The BUGS file contains an example:

#!/usr/bin/perl 
use strict;
use warnings; 
use GD::Graph::bars (); 

my @data = (
    [qw(ASP Perl Ruby CFML Java)],
    [qw(4 9 7 2 5)],
    [qw(2 6 7 2 5)]
); my
$graph = GD::Graph::bars->new(400, 300);
$graph->set(
    x_label => 'Language',
    y_label => 'Coolness',
    y_max_value=> 20,
    title=> 'How cool is your language?',
    bar_spacing=> 1,
    transparent=> 0,
    shadow_depth=> -4,
    cumulate => 1
); 
my $gd = $graph->plot(\@data);
my $png = $gd->png;

open FOO, ">cumbug.png" or die $!;
binmode FOO;
print FOO $png;

Should I put this in the samples directory?

@ruz
Copy link
Owner

ruz commented Jun 15, 2015

Ty for your reply. Ping me by replying in a few weeks if I don't get back
to this.

On Sun, Jun 14, 2015 at 11:08 AM, Guillermo O. Freschi <
notifications@github.com> wrote:

Hi, sorry for the extreme delay, I had college to attend to.

This patch should fix the first bug in BUGS, "Subject: Bug in shadow
handling with cumulative bar charts", which is (erroneously?) marked as
fixed in the changelog for 12 Jun 2002 - 21 Jun 2002.

The BUGS file contains an example:

#!/usr/bin/perl
use strict;
use warnings;
use GD::Graph::bars ();

my @DaTa = (
[qw(ASP Perl Ruby CFML Java)],
[qw(4 9 7 2 5)],
[qw(2 6 7 2 5)]
); my
$graph = GD::Graph::bars->new(400, 300);
$graph->set(
x_label => 'Language',
y_label => 'Coolness',
y_max_value=> 20,
title=> 'How cool is your language?',
bar_spacing=> 1,
transparent=> 0,
shadow_depth=> -4,
cumulate => 1
);
my $gd = $graph->plot(@DaTa);
my $png = $gd->png;

open FOO, ">cumbug.png" or die $!;
binmode FOO;
print FOO $png;

Should I put this in the samples directory?


Reply to this email directly or view it on GitHub
#4 (comment).

Best regards, Ruslan.

@Tordek
Copy link
Author

Tordek commented Jul 21, 2015

Hi! Just pinging as requested!

ruz added a commit that referenced this pull request Dec 27, 2015
Fixed shadows overlapping when in cumulative mode.
@ruz ruz merged commit b751c8a into ruz:master Dec 27, 2015
@ruz
Copy link
Owner

ruz commented Dec 27, 2015

thank you

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Aug 13, 2016
Upstream changes:
1.53 08 Jul 2016

- Fix 'Illegal division by zero' when x_min_value and x_max_value
  are defined and x_tick_number set to 'auto' RT#73185
  Thanks to Bob Rogers, ruz/GDGraph#12

1.52 28 Jan 2016

- y1_min_range and y2_min_range instead of min_range_1 and min_range_2,
  niether were documented before.
- Update documentation in regards to all *_min_range options available.

1.51 27 Dec 2015

- fix shadows rendering on cumulative bar charts
  thanks to https://github.com/Tordek
  see ruz/GDGraph#4

1.50 27 Dec 2015

- run samples as part of test suite to make sure no sample crashes
  thanks to https://github.com/tynovsky
- properly define test requirements using newer MakeMaker

1.49 11 Mar 2015

- fix to Z-axis color filling in 3D pie charts (Debian Bug #489184)
- bump ExtUtils::MakeMaker dependency
- tiny improvement in the code of the samples
mtremer pushed a commit to ipfire/ipfire-2.x that referenced this pull request Oct 22, 2021
- Update from 1.4308 (2006) to 1.54 (2016 - latest version)
- Update of rootfile not required
- Changelog
   1.54 21 Nov 2016
     - Disable two Y axes alignment when any y[12]_{min,max}_value is defined
       RT#62665
   1.53 08 Jul 2016
     - Fix 'Illegal division by zero' when x_min_value and x_max_value
       are defined and x_tick_number set to 'auto' RT#73185
       Thanks to Bob Rogers, ruz/GDGraph#12
   1.52 28 Jan 2016
     - y1_min_range and y2_min_range instead of min_range_1 and min_range_2,
       niether were documented before.
     - Update documentation in regards to all *_min_range options available.
   1.51 27 Dec 2015
     - fix shadows rendering on cumulative bar charts
       thanks to https://github.com/Tordek
       see ruz/GDGraph#4
   1.50 27 Dec 2015
     - run samples as part of test suite to make sure no sample crashes
       thanks to https://github.com/tynovsky
     - properly define test requirements using newer MakeMaker
   1.49 11 Mar 2015
     - fix to Z-axis color filling in 3D pie charts (Debian Bug #489184)
     - bump ExtUtils::MakeMaker dependency
     - tiny improvement in the code of the samples
   1.48 02 Aug 2013
     - no code changes, just release enginering cleanup
     - adjust MANIFEST.SKIP file so MANIFEST can be generated
       once again
     - ship sample58.pl file, so `make samples` stop failing
     - mention the current and past maintainers in META files
       as authors
     - use newer CPAN::Meta and ExtUtils::MakeMaker, older
       versions generated META files without runtime prerequisites
   1.47 28 Jun 2013
     - experimental hide_overlapping_values option for bar graphs
   1.46 26 Jun 2013
     - This release is based on old work by Martien that was sitting
       in his repo
     - x_last_label_skip option
     - new samples and tweaks to old
   1.45 21 Jun 2013
     - read DISTRIBUTION STATUS in perldoc GD::Graph
     - no code changes since 1.44
   1.44 25 Apr 2007
     - Patched bugs 21610, 20792, 20802, 23755 and 22932
     - Updated POD to clarify current maintenance status, and encourage
       bug reporting via RT (and to point out some external help resources)

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants