]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: New function SetYTitle() in BGraph class
authorDavide Franco <bacula-dev@dflc.ch>
Mon, 13 Jun 2011 19:25:15 +0000 (21:25 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 2 Aug 2011 09:56:16 +0000 (11:56 +0200)
gui/bacula-web/includes/graph/bgraph.class.php

index 349eff705867f10bd3c846a6eacf6361c7c79b3e..1c110fd4911ca3082b7236a2126302b4c701ed2b 100644 (file)
@@ -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' ) {