[LON-CAPA-cvs] cvs: loncom /cgi graph.png
minaeibi
lon-capa-cvs@mail.lon-capa.org
Mon, 13 Jan 2003 17:41:45 -0000
minaeibi Mon Jan 13 12:41:45 2003 EDT
Modified files:
/loncom/cgi graph.png
Log:
To fix bug #1152 the foloowing is done:
If the number of problems is more than or wqual to 100 then ther x-range would be 100, otherwise the range would be the number of problems.
Index: loncom/cgi/graph.png
diff -u loncom/cgi/graph.png:1.19 loncom/cgi/graph.png:1.20
--- loncom/cgi/graph.png:1.19 Sun Jan 12 19:07:51 2003
+++ loncom/cgi/graph.png Mon Jan 13 12:41:45 2003
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $Id: graph.png,v 1.19 2003/01/13 00:07:51 minaeibi Exp $
+# $Id: graph.png,v 1.20 2003/01/13 17:41:45 minaeibi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,7 +31,7 @@
# YEAR=2002
# 2/1/, 5/13, 5/15
# YEAR=2003
-# 1/7/
+# 1/7/, 1/13
# A CGI script that dynamically outputs a graphical chart for lonstatistics.
#
####
@@ -68,17 +68,14 @@
my @data =(\@xlabels,\@data11,\@data12);
my $Range1;
-my $Range2;
+my $Range2 = 200;
if ($xlab=~/^Concepts$/){
$Range1=270;
- $Range2=200;
} elsif ($xlab=~/^Problem_number$/){
$Range1=450;
- $Range2=200;
} else {
- $Range1=800;#*$PNo;
- $Range2=200;
+ $Range1=($PNo==100) ? 800 : (120+$PNo*10);
$skip_x=5;
$bar_space=1;
}