--- loncom/cgi/graph.png 2002/02/01 11:47:34 1.9 +++ loncom/cgi/graph.png 2002/02/02 11:06:00 1.10 @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $Id: graph.png,v 1.9 2002/02/01 11:47:34 minaeibi Exp $ +# $Id: graph.png,v 1.10 2002/02/02 11:06:00 minaeibi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,8 +54,11 @@ my $Range; if ( $PNo > 10 ) {$Range = 30*$PNo;} else { $Range = 400+30*$PNo; } -$Max += (10 - $Max % 10); -$Max = int($Max); +if ( $Max > 1 ) { + $Max += (10 - $Max % 10); + $Max = int($Max); +} +else { $Max = 1; } my $MyGraph = GD::Graph::bars->new($Range, 400);