From 04a8134ad359a4a4f782aafe57f49927bbedd952 Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Sat, 15 Dec 2001 22:46:07 +0000 Subject: [PATCH] Add support for size=X, X=.5, 1, etc. scales the graph size --- webtools/graph/graph.cgi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/webtools/graph/graph.cgi b/webtools/graph/graph.cgi index 23ec518b0780..54866617d1c7 100755 --- a/webtools/graph/graph.cgi +++ b/webtools/graph/graph.cgi @@ -10,6 +10,7 @@ my $TESTNAME = lc($req->param('testname')); my $UNITS = lc($req->param('units')); my $TBOX = lc($req->param('tbox')); my $AUTOSCALE = lc($req->param('autoscale')); +my $SIZE = lc($req->param('size')); my $DAYS = lc($req->param('days')); my $LTYPE = lc($req->param('ltype')); my $POINTS = lc($req->param('points')); @@ -129,6 +130,14 @@ sub show_graph { } + # Set graph size. Default is (1.0, 1.0). + my $graph_size; + if($SIZE) { + $graph_size = "set size $SIZE, $SIZE"; + } else { + $graph_size = ""; + } + # Set units. Assume ms unless otherwise specified. unless($UNITS) { $UNITS = "ms"; @@ -154,6 +163,7 @@ sub show_graph { # ls 2 = larger blue points my $cmds = qq{ reset + $graph_size set term png color set output "$PNGFILE" set title "$TBOX $TESTNAME"