]> git.mjollnir.org Git - moodle.git/commitdiff
Graphs now contain proper labels down the left hand side.
authormartin <martin>
Fri, 12 Apr 2002 13:58:57 +0000 (13:58 +0000)
committermartin <martin>
Fri, 12 Apr 2002 13:58:57 +0000 (13:58 +0000)
mod/survey/graph.php

index 74cadf7cffad2616e320b2a1d9227a60b169e76e..52eb2ed5a8a9cc785d97ad3735dcaaf283d751f8 100644 (file)
        $graph->parameter['legend_border'] = 'black';
        $graph->parameter['legend_offset'] = 4;
 
+       $graph->y_tick_labels[0] = "No answer";
+       foreach ($options as $key => $option) {
+         $graph->y_tick_labels[$key+1] = $option;
+       }
+
        if (($maxbuckets1 > 0.0) && ($maxbuckets2 > 0.0)) {
            $graph->y_order = array('answers1', 'answers2');
        } else if ($maxbuckets1 > 0.0) {
        $graph->parameter['legend_border'] = 'black';
        $graph->parameter['legend_offset'] = 4;
 
+       $graph->y_tick_labels[0] = "No answer";
+       foreach ($options as $key => $option) {
+         $graph->y_tick_labels[$key+1] = $option;
+       }
+
        if (($maxbuckets1 > 0.0) && ($maxbuckets2 > 0.0)) {
               $graph->y_order = array('stdev1', 'answers1', 'stdev2', 'answers2');
        } else if ($maxbuckets1 > 0.0) {
        $graph->parameter['legend_border'] = 'black';
        $graph->parameter['legend_offset'] = 4;
 
+       $graph->y_tick_labels[0] = "No answer";
+       foreach ($options as $key => $option) {
+         $graph->y_tick_labels[$key+1] = $option;
+       }
+
        if (($maxbuckets1 > 0.0) && ($maxbuckets2 > 0.0)) {
               $graph->y_order = array('stdev1', 'answers1', 'stdev2', 'answers2');
        } else if ($maxbuckets1 > 0.0) {
        $graph->offset_relation['stdev1'] = 'answers1';
        $graph->offset_relation['stdev2'] = 'answers2';
 
+       $graph->y_tick_labels[0] = "No answer";
+       foreach ($options as $key => $option) {
+         $graph->y_tick_labels[$key+1] = $option;
+       }
+
        $graph->parameter['bar_size']    = 0.15;
 
        $graph->parameter['legend']        = 'outside-top';
        $graph->parameter['legend_border'] = 'black';
        $graph->parameter['legend_offset'] = 4;
 
+       $graph->y_tick_labels[0] = "No answer";
+       foreach ($options as $key => $option) {
+         $graph->y_tick_labels[$key+1] = $option;
+       }
+
        if (($maxbuckets1 > 0.0) && ($maxbuckets2 > 0.0)) {
               $graph->y_order = array('stdev1', 'stdev2', 'answers1', 'answers2', 'studanswers1', 'studanswers2');
        } else if ($maxbuckets1 > 0.0) {