Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Chart-Clicker CPAN distribution.

Report information
The Basics
Id: 48238
Status: resolved
Priority: 0/
Queue: Chart-Clicker

People
Owner: Nobody in particular
Requestors: ac0v [...] sys-network.de
Cc:
AdminCc:

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



Hi, Chart Clicker doesn't show the Axis on strawberry-perl@Win32 After some tests I've found a quick fix: --- Axis.pm~ 2009-07-12 06:18:58.000000000 +0200 +++ Axis.pm 2009-07-27 15:55:27.218750000 +0200 @@ -196,7 +196,7 @@ $tlabel->prepare($driver); - $tlabel->width($lay->width); + $tlabel->width(3 + $lay->width); $tlabel->height($lay->height); $bwidth = $tlabel->width if($tlabel->width > $bwidth); Can you tell me how to fix the described issue correctly? I've attached two charts (broken, quick_fix) and the perl script I've used to create both charts. Regards, Andreas 'ac0v' Specht
Subject: broken.png
Download broken.png
image/png 24.5k
broken.png
Subject: chart_sample.pl
#!/usr/bin/perl use strict; use Chart::Clicker; use Chart::Clicker::Context; use Chart::Clicker::Data::DataSet; use Chart::Clicker::Data::Marker; use Chart::Clicker::Data::Series; use Chart::Clicker::Renderer::Area; use Geometry::Primitive::Rectangle; use Graphics::Color::RGB; my $cc = Chart::Clicker->new(width => 500, height => 250); my @hours = qw( 1 2 3 4 5 6 7 8 9 10 11 12 ); my @bw1 = qw( 5.8 5.0 4.9 4.8 4.5 4.25 3.5 2.9 2.5 1.8 .9 .8 ); my @bw2 = qw( .7 1.1 1.7 2.5 3.0 4.5 5.0 4.9 4.7 4.8 4.2 4.4 ); my @bw3 = qw( .3 1.4 1.2 1.5 4.0 3.5 2.0 1.9 2.7 4.2 3.2 1.1 ); my $series1 = Chart::Clicker::Data::Series->new( keys => \@hours, values => \@bw1, ); my $series2 = Chart::Clicker::Data::Series->new( keys => \@hours, values => \@bw2, ); my $series3 = Chart::Clicker::Data::Series->new( keys => \@hours, values => \@bw3, ); my $ds = Chart::Clicker::Data::DataSet->new(series => [ $series1, $series2, $series3 ]); $cc->add_to_datasets($ds); my $def = $cc->get_context('default'); my $area = Chart::Clicker::Renderer::Area->new(opacity => .6); $area->brush->width(3); $def->renderer($area); $def->range_axis->tick_values([qw(1 3 5)]); $def->range_axis->format('%d'); $def->range_axis->width(3000); $def->domain_axis->width(3000); $def->domain_axis->tick_values([qw(2 4 6 8 10)]); $def->domain_axis->format('%d'); $def->domain_axis->label_font()->family('Arial'); $def->domain_axis->label_font()->size(600); $cc->prepare; $cc->draw; $cc->write('foo.png');
Subject: quick_fix.png
Download quick_fix.png
image/png 26k
quick_fix.png
Closing due to fixes in recent versions, please reopen if you are still having a problem.