]> 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)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:12 +0000 (14:49 +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' ) {