our $Begin = param ('begin');
our $End = param ('end');
our $GraphWidth = param ('width');
+our $GraphHeight = param ('height');
our $Index = param ('index') || 0;
our $OutputFormat = 'PNG';
our $ContentType = 'image/png';
$GraphWidth = gc_get_scalar ('GraphWidth', 400);
}
+if ($GraphHeight)
+{
+ $GraphHeight =~ s/\D//g;
+}
+
+if (!$GraphHeight)
+{
+ $GraphHeight = gc_get_scalar ('GraphHeight', 100);
+}
+
{ # Sanitize begin and end times
$End ||= 0;
$Begin ||= 0;
}
$| = 1;
- RRDs::graph ('-', '-a', $OutputFormat, '--width', $GraphWidth, @timesel, @$args);
+ RRDs::graph ('-', '-a', $OutputFormat, '--width', $GraphWidth, '--height', $GraphHeight, @timesel, @$args);
if (my $err = RRDs::error ())
{
print STDERR "RRDs::graph failed: $err\n";