From: terry%netscape.com <> Date: Tue, 2 Feb 1999 23:03:52 +0000 (+0000) Subject: Don't draw any more than 20 date ticks. X-Git-Tag: bugzilla-2.2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b3090ec9f02f5b8eaaa22c99f105266d0f2441;p=thirdparty%2Fbugzilla.git Don't draw any more than 20 date ticks. --- diff --git a/reports.cgi b/reports.cgi index 410abc105c..f78fd643fc 100755 --- a/reports.cgi +++ b/reports.cgi @@ -452,12 +452,19 @@ FIN push @data, \@assigned; push @data, \@reopened; + my $MAXTICKS = 20; # Try not to show any more x ticks than this. + my $skip = 1; + if (@dates > $MAXTICKS) { + $skip = int((@dates + $MAXTICKS - 1) / $MAXTICKS); + } + my %settings = ( "title" => "Bug Charts for $::FORM{'product'}", "x_label" => "Dates", "y_label" => "Bug Count", "legend_labels" => \@labels, + "skip_x_ticks" => $skip, ); $img->set (%settings);