]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 183017 - Only numbers displayed when bar chart contains too many products. Patch...
authorgerv%gerv.net <>
Tue, 25 Feb 2003 07:37:50 +0000 (07:37 +0000)
committergerv%gerv.net <>
Tue, 25 Feb 2003 07:37:50 +0000 (07:37 +0000)
report.cgi

index 99566d67cad1531aa3104ca36fd261189ddded20..9978e2002f460f6683ac1e2f7900e4a8f95b1bf6 100755 (executable)
@@ -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;