From: Patrick Michaud <pmichaud@u.washington.edu>
authorpmichaud <pmichaud@pobox.com>
Tue, 21 Apr 2009 09:43:21 +0000 (09:43 +0000)
committerTony Cook <tony@develop-help.com>
Tue, 21 Apr 2009 09:43:21 +0000 (09:43 +0000)
One more diff for you - I noticed that without a title, my y-tics were
partly off screen.  This addresses that, in an admittedly somewhat crude
way:  http://vegitron.eplt.washington.edu/tmp/y_tops.diff

lib/Imager/Graph/Vertical.pm

index 867d8fe..e987e25 100644 (file)
@@ -824,6 +824,11 @@ sub _remove_tics_from_chart_box {
 
   $self->_remove_box($chart_box, \@y_tic_box);
   $self->_remove_box($chart_box, \@x_tic_box);
+
+  # If there's no title, the y-tics will be part off-screen.  Half of the x-tic height should be more than sufficient.
+  my @y_tic_tops = ($chart_box->[0], $chart_box->[1], $chart_box->[2], $chart_box->[1] + int($tic_height / 2));
+  $self->_remove_box($chart_box, \@y_tic_tops);
+
 }
 
 sub _get_y_tic_width{