Small layout fixed in report graphics.
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Thu, 22 Nov 2012 17:37:08 +0000 (18:37 +0100)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Thu, 22 Nov 2012 17:37:08 +0000 (18:37 +0100)
reporting/includes/class.graphic.inc

index fc41be8f4084f3f89171f916f12e58f725c392e4..31f0105fdb7276d4f40722d72e7270d57b65d0d2 100644 (file)
@@ -607,7 +607,7 @@ class graph
                 $this->graphic_area_width = ($this->space_between_dots * $this->total_parameters) - 10;
                 $this->graphic_area_x1   += $this->string_width(($this->higher_value_str), $this->size);
                 $this->width += $this->graphic_area_x1 + 20;
-                $this->width += ($this->legend_exists == true) ? 40 : ((7 * strlen($this->axis_x)) + 10);
+                $this->width += ($this->legend_exists == true) ? 40 : ((7 * strlen($this->axis_x)) + 30);
                 break;
 
             // Lines
@@ -616,7 +616,7 @@ class graph
                 $this->graphic_area_width = ($this->space_between_dots * $this->total_parameters) - 10;
                 $this->graphic_area_x1   += $this->string_width(($this->higher_value_str), $this->size);
                 $this->width += $this->graphic_area_x1 + 20;
-                $this->width += ($this->legend_exists == true) ? 40 : ((7 * strlen($this->axis_x)) + 10);
+                $this->width += ($this->legend_exists == true) ? 40 : ((7 * strlen($this->axis_x)) + 30);
                 break;
 
             // Pie
@@ -634,6 +634,7 @@ class graph
                 break;
         }
 
+        $this->graphic_area_width = max($this->graphic_area_width, $this->string_width($this->title, $this->size));
         $this->width += $this->graphic_area_width;
         $this->width += $this->legend_box_width;