Contact author at: hermanV@mindless.com\r
*/\r
\r
+/* This file contains modifications by Martin Dougiamas\r
+ * as part of Moodle (http://moodle.com). Modified lines\r
+ * are marked with "Moodle".\r
+ */\r
+\r
\r
class graph {\r
var $image;\r
// init all text - title, labels, and axis text.\r
function init() {\r
global $CFG;\r
- $this->parameter['path_to_fonts'] = $CFG->dirroot."/lib/fonts/"; // Added for Moodle\r
+ $this->parameter['path_to_fonts'] = $CFG->dirroot."/lib/fonts/"; // Moodle\r
\r
$this->calculated['outer_border'] = $this->calculated['boundary_box'];\r
\r
//print "$thisX, $thisY <BR>";\r
\r
if (($bar!='none') && (string)$thisY != 'none') {\r
- // Moodle addition - next 5 lines and last parameter yoffset\r
- if ($relatedset = $this->offset_relation[$set]) {\r
- $yoffset = $this->calculated['y_plot'][$relatedset][$index];\r
- } else {\r
- $yoffset = 0;\r
- }\r
- $this->bar($thisX, $thisY, $bar, $barSize, $colour, $offset, $set, $yoffset);\r
+ if ($relatedset = $this->offset_relation[$set]) { // Moodle\r
+ $yoffset = $this->calculated['y_plot'][$relatedset][$index]; // Moodle\r
+ } else { // Moodle\r
+ $yoffset = 0; // Moodle\r
+ } // Moodle\r
+ //$this->bar($thisX, $thisY, $bar, $barSize, $colour, $offset, $set); // Moodle\r
+ $this->bar($thisX, $thisY, $bar, $barSize, $colour, $offset, $set, $yoffset); // Moodle\r
}\r
\r
if (($area!='none') && (((string)$lastY != 'none') && ((string)$thisY != 'none')))\r
$v = $this->calculated['boundary_box']['bottom'] - $y + $offset;\r
\r
// Moodle addition, plus the function parameter yoffset\r
- if ($yoffset) {\r
- $yoffset = $yoffset - round(($bottom - $v) / 2.0);\r
- $bottom -= $yoffset;\r
- $v -= $yoffset;\r
- }\r
+ if ($yoffset) { // Moodle\r
+ $yoffset = $yoffset - round(($bottom - $v) / 2.0); // Moodle\r
+ $bottom -= $yoffset; // Moodle\r
+ $v -= $yoffset; // Moodle\r
+ } // Moodle\r
\r
switch ($type) {\r
case 'open':\r