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: 53528
Status: new
Priority: 0/
Queue: Chart-Clicker

People
Owner: Nobody in particular
Requestors: john [...] wakenet.ca
Cc:
AdminCc:

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



Subject: Problem with tick labels, spaces & angles
Date: Fri, 08 Jan 2010 17:45:49 -0500
To: bug-Chart-Clicker [...] rt.cpan.org
From: John Kingsley <john [...] wakenet.ca>
Hi, When I use a tick label format with a space in it and also use a non-zero tick_label_angle then the layout is messed up. Below is a sample program. If I change format => "%d %H", to format => "%d_%H", then it everything is fine. Or if I change tick_label_angle to 0 then all is fine. John =================== cut here =================== #!/usr/bin/perl -w use strict; use Chart::Clicker; use Chart::Clicker::Context; use Chart::Clicker::Data::DataSet; use Chart::Clicker::Data::Series; use Chart::Clicker::Axis::DateTime; use Math::Trig; my $cc = Chart::Clicker->new(width => 500, height => 250); my $t = time(); my @keys = map {$t + 3600*$_ + 100*rand} (1..10); my @values = map {rand()*10} (1..10); my $series1 = Chart::Clicker::Data::Series->new( keys => \@keys, values => \@values, ); my $ds = Chart::Clicker::Data::DataSet->new( series => [ $series1 ] ); $cc->add_to_datasets($ds); my $defctx = $cc->get_context('default'); $defctx->domain_axis(Chart::Clicker::Axis::DateTime->new( position => 'bottom', orientation => 'horizontal', time_zone => 'America/Montreal', format => "%d %H", tick_label_angle => deg2rad(-90), )); $cc->draw(); $cc->write("bug1.png");