From d3e2dfaf75d44934180e4feb205eb68e47a9ca88 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Mon, 18 Jan 2010 15:24:19 +0000 Subject: [PATCH] graphlib MDL-21371: Legend layout issue when different legend texts had different heights. --- lib/graphlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/graphlib.php b/lib/graphlib.php index 10e78549322..ec677dee5d3 100644 --- a/lib/graphlib.php +++ b/lib/graphlib.php @@ -943,7 +943,7 @@ function init_legend() { $textWidth = $this->calculated['legend']['boundary_box_max']['width']; // width of largest legend item. $textHeight = $this->calculated['legend']['boundary_box_max']['height']; // use height as size to use for colour square in legend. $width = $padding * 2 + $textWidth + $textHeight * 2; // left and right padding + maximum text width + space for square - $height = $padding * ($numSets + 1) + $sumTextHeight; // top and bottom padding + padding between text + text. + $height = ($padding + $textHeight) * $numSets + $padding; // top and bottom padding + padding between text + text. $this->calculated['legend']['boundary_box_all'] = array('width' => $width,