From b321d421309869b7486b7d43734e4efa40621e41 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 12 Apr 2002 13:58:57 +0000 Subject: [PATCH] Graphs now contain proper labels down the left hand side. --- mod/survey/graph.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/mod/survey/graph.php b/mod/survey/graph.php index 74cadf7cff..52eb2ed5a8 100644 --- a/mod/survey/graph.php +++ b/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) { -- 2.39.5