aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2003-02-25 07:37:50 +0000
committergerv%gerv.net <>2003-02-25 07:37:50 +0000
commit2c3828a77f6e3bb616f9103ac51af683567ba20c (patch)
tree9f0484fe05c5f01efd799300c909769b9a252cfe
parentc0266d1fcdc15f5ccfb5890492a42f4ea598437b (diff)
downloadbugs-2c3828a77f6e3bb616f9103ac51af683567ba20c.tar
bugs-2c3828a77f6e3bb616f9103ac51af683567ba20c.tar.gz
bugs-2c3828a77f6e3bb616f9103ac51af683567ba20c.tar.bz2
bugs-2c3828a77f6e3bb616f9103ac51af683567ba20c.tar.xz
bugs-2c3828a77f6e3bb616f9103ac51af683567ba20c.zip
Bug 183017 - Only numbers displayed when bar chart contains too many products. Patch by gerv; r=joel, a=justdave.
-rwxr-xr-xreport.cgi13
1 files changed, 13 insertions, 0 deletions
diff --git a/report.cgi b/report.cgi
index 99566d67c..9978e2002 100755
--- a/report.cgi
+++ b/report.cgi
@@ -206,6 +206,19 @@ $vars->{'col_names'} = \@col_names;
$vars->{'row_names'} = \@row_names;
$vars->{'tbl_names'} = \@tbl_names;
+# Below a certain width, we don't see any bars, so there needs to be a minimum.
+if ($cgi->param('format') eq "bar") {
+ my $min_width = (scalar(@col_names) || 1) * 10;
+
+ if (!$cgi->param('cumulate')) {
+ $min_width *= (scalar(@row_names) || 1);
+ }
+
+ if ($width < $min_width) {
+ $width = $min_width;
+ }
+}
+
$vars->{'width'} = $width if $width;
$vars->{'height'} = $height if $height;