From: Davide Franco Date: Mon, 13 Jun 2011 19:25:15 +0000 (+0200) Subject: bacula-web: New function SetYTitle() in BGraph class X-Git-Tag: Release-5.2.1~313 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=25dd457db3ffe344350d0a4f7361c2239142ae1a;p=bacula%2Fbacula bacula-web: New function SetYTitle() in BGraph class --- diff --git a/gui/bacula-web/includes/graph/bgraph.class.php b/gui/bacula-web/includes/graph/bgraph.class.php index 349eff7058..1c110fd491 100644 --- a/gui/bacula-web/includes/graph/bgraph.class.php +++ b/gui/bacula-web/includes/graph/bgraph.class.php @@ -17,6 +17,7 @@ class BGraph{ private $title; + private $ytitle; private $data; private $data_type; @@ -57,6 +58,14 @@ class BGraph{ die( "Please provide a non empty title for the graph" ); } + public function SetYTitle( $ytitle ) + { + if( !empty($ytitle) ) + $this->ytitle = $ytitle; + else + die( "Please provide a non empty title for the Y axis" ); + } + public function SetColors( $colors ) { if( is_array( $colors ) ) @@ -110,6 +119,7 @@ class BGraph{ // Graph title $this->plot->SetTitle( $this->title ); + $this->plot->SetYTitle( $this->ytitle ); // Setting up legends if( $this->type != 'bars' ) {