Diff for /loncom/cgi/graph.png between versions 1.31 and 1.33

version 1.31, 2003/10/29 15:18:09 version 1.33, 2004/01/08 15:50:17
Line 172  if ($PlotType eq 'bar') { Line 172  if ($PlotType eq 'bar') {
     $GraphSettings{'zero_axis'}     = 1;      $GraphSettings{'zero_axis'}     = 1;
     if (&get_env('two_axes',0)) {      if (&get_env('two_axes',0)) {
         $GraphSettings{'two_axes'}     = 1;          $GraphSettings{'two_axes'}     = 1;
           $GraphSettings{'y1_label'}     = &get_env('y1_label',
                                                     $GraphSettings{'y_label'});
           $GraphSettings{'y2_label'}     = &get_env('y2_label','');
         $GraphSettings{'y1_max_value'} = &get_env('y1_max_value',0);          $GraphSettings{'y1_max_value'} = &get_env('y1_max_value',0);
         $GraphSettings{'y1_min_value'} = &get_env('y1_min_value',1);          $GraphSettings{'y1_min_value'} = &get_env('y1_min_value',1);
         $GraphSettings{'y2_max_value'} = &get_env('y2_max_value',1);          $GraphSettings{'y2_max_value'} = &get_env('y2_max_value',1);
Line 195  if (! defined($MyGraph)) { Line 198  if (! defined($MyGraph)) {
 ##  ##
 ## Build the @Data array  ## Build the @Data array
 my $NumSets = &get_env('NumSets');  my $NumSets = &get_env('NumSets');
 my @Data;  # stores the data for the graph  my @Data;        # stores the data for the graph
   my @Legend;      # one entry per data set
 my @xlabels  = split(',',&get_env('labels'));  my @xlabels  = split(',',&get_env('labels'));
 push(@Data,\@xlabels);  push(@Data,\@xlabels);
 for (my $i=1;$i<=$NumSets;$i++) {  for (my $i=1;$i<=$NumSets;$i++) {
     push(@Data,[split(',',&get_env('data.'.$i))]);      push(@Data,[split(',',&get_env('data.'.$i))]);
       push(@Legend,&get_env('data.'.$i.'.label',undef));
 }  }
   
 my $error = '';  my $error = '';
Line 208  if (! $MyGraph->set(%GraphSettings)) { Line 213  if (! $MyGraph->set(%GraphSettings)) {
     return;      return;
 }  }
   
   if (join('',@Legend) ne '') {
       $MyGraph->set_legend(@Legend);
   }
   
   
 my $plot = $MyGraph->plot(\@Data);  my $plot = $MyGraph->plot(\@Data);
 if (! defined($plot)) {  if (! defined($plot)) {
     my $error = 'Unable to plot the data provided.';      my $error = 'Unable to plot the data provided.';

Removed from v.1.31  
changed lines
  Added in v.1.33


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>