]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Don't draw any more than 20 date ticks.
authorterry%netscape.com <>
Tue, 2 Feb 1999 23:03:52 +0000 (23:03 +0000)
committerterry%netscape.com <>
Tue, 2 Feb 1999 23:03:52 +0000 (23:03 +0000)
reports.cgi

index 410abc105c233c149c5d7c4c76765b5ad4572522..f78fd643fcea5d9316e29fc0e099a9cd928cd832 100755 (executable)
@@ -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);