diff options
Diffstat (limited to 'plugins/ImageGraph/StaticGraph/HorizontalBar.php')
-rw-r--r-- | plugins/ImageGraph/StaticGraph/HorizontalBar.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/ImageGraph/StaticGraph/HorizontalBar.php b/plugins/ImageGraph/StaticGraph/HorizontalBar.php index 2f6f4b8ca5..c8ae7345ee 100644 --- a/plugins/ImageGraph/StaticGraph/HorizontalBar.php +++ b/plugins/ImageGraph/StaticGraph/HorizontalBar.php @@ -24,14 +24,16 @@ class HorizontalBar extends GridGraph { $verticalLegend = false; - // determine the maximum logo width & height - list($maxLogoWidth, $maxLogoHeight) = self::getMaxLogoSize($this->abscissaLogos); - - foreach ($this->abscissaLogos as $logoPath) { + // create resized copies of logo to match maximum width / height + foreach ($this->abscissaLogos as &$logoPath) { + $logoPath = $this->createResizedImageCopyIfNeeded($logoPath); list($logoWidth, $logoHeight) = self::getLogoSize($logoPath); $logoPathToHeight[$logoPath] = $logoHeight; } + // determine the maximum logo width & height + list($maxLogoWidth, $maxLogoHeight) = self::getMaxLogoSize($this->abscissaLogos); + // truncate report $graphHeight = $this->getGraphBottom($horizontalGraph = true) - $this->getGridTopMargin($horizontalGraph = true, $verticalLegend); |