diff options
author | terry%netscape.com <> | 1999-02-03 00:03:52 +0100 |
---|---|---|
committer | terry%netscape.com <> | 1999-02-03 00:03:52 +0100 |
commit | f5b3090ec9f02f5b8eaaa22c99f105266d0f2441 (patch) | |
tree | f6767854289f57f48ae65d395409eac6e24f1d2f /reports.cgi | |
parent | 91e9353ac2728e9246cac843fc9ee0f2b2d16f21 (diff) | |
download | bugzilla-f5b3090ec9f02f5b8eaaa22c99f105266d0f2441.tar.gz bugzilla-f5b3090ec9f02f5b8eaaa22c99f105266d0f2441.tar.xz |
Don't draw any more than 20 date ticks.
Diffstat (limited to 'reports.cgi')
-rwxr-xr-x | reports.cgi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/reports.cgi b/reports.cgi index 410abc105..f78fd643f 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); |