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

People
Owner: Nobody in particular
Requestors: rod.taylor [...] gmail.com
Cc:
AdminCc:

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



Subject: Aliagned Axis
There are times when generating a number of charts for a webpage or report that I would like the tick labels to be aligned consistently. I've attached a patch which add tick_minimum_width, which modifies $big to be a minimum size. This allows it to be hardcoded. An alternative would be to allow passing in ghost or hidden labels which would be considered in the calculation, but we probably don't want a really big label several charts down to make all charts look odd.
From: rod.taylor [...] gmail.com
Actually attached this time. No documentation. Is this kind of thing okay though?
Subject: Chart_Clicker_Axis.patch
*** ./lib/Chart/Clicker/Axis.pm.orig 2010-08-11 22:00:04.000000000 -0400 --- ./lib/Chart/Clicker/Axis.pm 2010-08-11 22:02:01.000000000 -0400 *************** *** 109,114 **** --- 109,115 ---- } ); has 'ticks' => ( is => 'rw', isa => 'Int', default => 5 ); + has 'tick_minimum_width' => (is => 'rw', isa => 'Int', default => 0); sub BUILD { my ($self) = @_; *************** *** 209,214 **** --- 210,216 ---- my $big = $bheight; if($self->is_vertical) { $big = $bwidth; + $big = $self->tick_minimum_width if ($self->tick_minimum_width > $big); } my $label_width = 0;
Sorry for the horrid response lag, I never noticed this. The correct way to fix this is to set a minimum_width on the Axis, like this: $def->range_axis->minimum_width(100); This has the same effect, but requires only setting it in one place and fix the existing system for this in Graphics::Primitive. Version 2.70 of Chart::Clicker will honor this properly.