From 25dd457db3ffe344350d0a4f7361c2239142ae1a Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Mon, 13 Jun 2011 21:25:15 +0200 Subject: [PATCH] bacula-web: New function SetYTitle() in BGraph class --- gui/bacula-web/includes/graph/bgraph.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) 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' ) { -- 2.39.5