version 1.5, 2001/12/25 23:37:43
|
version 1.10, 2002/02/02 11:06:00
|
Line 27
|
Line 27
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# Behrouz Minaei |
# Behrouz Minaei |
# YEAR=2001 |
# YEAR=2001 |
# 9/13/2001, 9/25/2001, 10/6/2001, 10/9/2001, 12/25/2001 |
# 9/13/01, 9/25/01, 10/6/01, 10/9/01, 12/25/01 |
# |
# YEAR=2002 |
|
# 2/1/02 |
# A CGI script that dynamically outputs a graphical chart for lonstatistics. |
# A CGI script that dynamically outputs a graphical chart for lonstatistics. |
# |
# |
#### |
#### |
|
|
use strict; |
use strict; |
use GD::Graph::bars3d; |
use GD::Graph::bars; |
use GD::Graph::colour; |
use GD::Graph::colour; |
use GD::Graph::Data; |
use GD::Graph::Data; |
|
|
Line 51 my @data =(\@xlabels,\@data1);
|
Line 52 my @data =(\@xlabels,\@data1);
|
|
|
my $Range; |
my $Range; |
if ( $PNo > 10 ) {$Range = 30*$PNo;} |
if ( $PNo > 10 ) {$Range = 30*$PNo;} |
else { $Range = 300+30*$PNo; } |
else { $Range = 400+30*$PNo; } |
|
|
if ( $Max <= 1 ) { $Max = 1; } |
if ( $Max > 1 ) { |
elsif ( $Max <= 10 ) { $Max = 10; } |
$Max += (10 - $Max % 10); |
elsif ( $Max >= 60 ) { $Max = 100; } |
$Max = int($Max); |
|
} |
|
else { $Max = 1; } |
|
|
my $MyGraph = GD::Graph::bars3d->new($Range, 400); |
my $MyGraph = GD::Graph::bars->new($Range, 400); |
|
|
$MyGraph->set( |
$MyGraph->set( |
x_label => 'Problems #', |
x_label => 'Problems #', |