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

Conversation

Projects
None yet
2 participants
@Tordek

Tordek commented Jan 3, 2015

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

Fixed shadows overlapping when in cumulative mode.
Split drawing in two steps: First draw shadows, then draw datasets.
@Tordek

This comment has been minimized.

Show comment
Hide comment
@Tordek

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

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

This comment has been minimized.

Show comment
Hide comment
@ruz

ruz Mar 11, 2015

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@Tordek

Tordek 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?

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

This comment has been minimized.

Show comment
Hide comment
@ruz

ruz Jun 15, 2015

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@Tordek

Tordek Jul 21, 2015

Hi! Just pinging as requested!

Tordek commented Jul 21, 2015

Hi! Just pinging as requested!

ruz added a commit that referenced this pull request Dec 27, 2015

Merge pull request #4 from Tordek/master
Fixed shadows overlapping when in cumulative mode.

@ruz ruz merged commit b751c8a into ruz:master Dec 27, 2015

@ruz

This comment has been minimized.

Show comment
Hide comment
@ruz

ruz Dec 27, 2015

Owner

thank you

Owner

ruz commented Dec 27, 2015

thank you

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Aug 13, 2016

wen
Update to 1.53
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment