From: Davide Franco Date: Tue, 25 Jan 2011 17:49:39 +0000 (+0100) Subject: bacula-web: Internal code inprovment in bgraph classe X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f5ba2efab523f507da8abcdfd196aa37fa108175;p=bacula%2Fbacula bacula-web: Internal code inprovment in bgraph classe - Inproved BGraph class constructor - Changed some options in graph construction --- diff --git a/gui/bacula-web/bgraph.inc.php b/gui/bacula-web/bgraph.inc.php index 6c8d98039c..7d77de5e4e 100644 --- a/gui/bacula-web/bgraph.inc.php +++ b/gui/bacula-web/bgraph.inc.php @@ -18,10 +18,7 @@ class BGraph{ function __construct( $filename = "graph.png" ) { - if( !empty($filename) ) - $this->output_file = 'templates_c/' . $filename; - else - $this->output_file = 'templates_c/graph.png'; + $this->output_file = 'templates_c/' . $filename; } public function SetData( $data_in, $type, $data_type, $shading = 5 ) @@ -65,8 +62,10 @@ class BGraph{ $this->plot = new PHPlot( $this->width, $this->height ); // Render to file instead of screen - $this->plot->SetIsInline( true ); $this->plot->SetOutputFile( $this->output_file ); + $this->plot->SetFileFormat("png"); + $this->plot->SetIsInline( true ); + $this->plot->SetImageBorderType('plain'); @@ -114,7 +113,8 @@ class BGraph{ $this->plot->DrawGraph(); } // end function Render() -} +} // end BGraph classe + /* class BGraph {