Browse files

Graphs now contain proper labels down the left hand side.

  • Loading branch information...
1 parent daa52da commit b321d421309869b7486b7d43734e4efa40621e41 martin committed Apr 12, 2002
Showing with 25 additions and 0 deletions.
  1. +25 −0 mod/survey/graph.php
View
25 mod/survey/graph.php
@@ -71,6 +71,11 @@
$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) {
@@ -184,6 +189,11 @@
$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) {
@@ -306,6 +316,11 @@
$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) {
@@ -445,6 +460,11 @@
$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';
@@ -589,6 +609,11 @@
$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) {

0 comments on commit b321d42

Please sign in to comment.