Commit 2c3828a7 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 183017 - Only numbers displayed when bar chart contains too many products.…

Bug 183017 - Only numbers displayed when bar chart contains too many products. Patch by gerv; r=joel, a=justdave.
parent c0266d1f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment