From 98809a144752e20e3a829e2889b69bae70148581 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 28 Aug 2014 16:37:21 +0200 Subject: [PATCH] Do not use width and height as width and height percentages in the outer SVG element Height and width are solely used to define the SVGs ratio and should not cause side effects on the SVGs size in the site context. --- library/Icinga/Chart/SVGRenderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Chart/SVGRenderer.php b/library/Icinga/Chart/SVGRenderer.php index 69a3ce285..da6015ceb 100644 --- a/library/Icinga/Chart/SVGRenderer.php +++ b/library/Icinga/Chart/SVGRenderer.php @@ -127,8 +127,8 @@ class SVGRenderer $svg = $this->document->createElement('svg'); $svg->setAttribute('xmlns', 'http://www.w3.org/2000/svg'); $svg->setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - $svg->setAttribute('width', $this->width . '%'); - $svg->setAttribute('height', $this->height . '%'); + $svg->setAttribute('width', '100%'); + $svg->setAttribute('height', '100%'); $svg->setAttribute( 'viewBox', sprintf(