TeeChartPHP
[ class tree: TeeChartPHP ] [ index: TeeChartPHP ] [ all elements ]

Source for file BlackIsBackTheme.php

Documentation is available at BlackIsBackTheme.php

  1. <?php
  2.  
  3. /**
  4.  *
  5.  * <p>Title: BlackIsBack Theme class</p>
  6.  *
  7.  * <p>Description: Summary description for BlackIsBackTheme.</p>
  8.  *
  9.  * <p>Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.</p>
  10.  *
  11.  * <p>Company: Steema Software SL</p>
  12.  *
  13.  */
  14.  
  15. class BlackIsBackTheme extends OperaTheme {
  16.  
  17.     public function BlackIsBackTheme($c{
  18.         parent::OperaTheme($c);    
  19.     }
  20.  
  21.     public function apply({       
  22.         parent::apply()
  23.         $this->resetGradient($this->chart->getPanel()->getGradient());
  24.         
  25.         //$this->chart->getPanel()->getGradient()->setEndColor(Utils::hex2rgb('0xFF464646'));
  26.                 
  27.         $this->changeWall($this->chart->getWalls()->getBack());
  28.         $this->changeWall($this->chart->getWalls()->getBottom());        
  29.         $this->changeWall($this->chart->getWalls()->getLeft());                
  30.  
  31.         $this->chart->getLegend()->getFont()->setColor(Color::WHITE());       
  32.         $this->resetGradient($this->chart->getLegend()->getGradient());                
  33.         $this->chart->getLegend()->getShadow()->setWidth(0);                
  34.         $this->chart->getLegend()->getPen()->setVisible(false);
  35.         $this->chart->getHeader()->getFont()->setColor(Color::WHITE());                
  36.  
  37.         for ($t 0$t $this->chart->getAxes()->getCount()++$t{
  38.             $this->changeAxis($this->chart->getAxes()->getAxis($t));
  39.         }      
  40.         
  41.         for ($t 0$t $this->chart->getSeriesCount()++$t{
  42.             $this->doChangeSeries($this->chart->getSeries($t));
  43.         }
  44.  
  45.     }
  46.  
  47.     /**
  48.      * Gets descriptive text.
  49.      *
  50.      * @return String 
  51.      */
  52.     public function getDescription({
  53.         return "BlackIsBack";
  54.     }
  55.  
  56.     public function resetGradient($chartGradient{
  57.         $chartGradient->setVisible(true);
  58.         $chartGradient->setStartColor(new Color(70,70,70));
  59.         $chartGradient->setEndColor(new Color(70,70,70));
  60.         //$chartGradient->setMiddleColor(Utils::hex2rgb('0x00000000'));
  61.     }
  62.  
  63.     public function changeWall($chartWall{
  64.         $chartWall->getPen()->setVisible(false);        
  65.         //$this->resetGradient($chartWall->getGradient());
  66.     }   
  67.  
  68.     public function changeAxis($chartAxis{
  69.         $chartAxis->getAxisPen()->setColor(Utils::hex2rgb('0xFF828282'));
  70.         
  71.         $chartAxis->getGrid()->setColor(Utils::hex2rgb('0xFF828282'));
  72.         $chartAxis->getGrid()->setStyle(DashStyle::$SOLID);
  73.         
  74.         $chartAxis->getLabels()->getFont()->setColor(Color::WHITE());
  75.                 
  76.         $chartAxis->getTicks()->setColor(Utils::hex2rgb('0xFF828282'));    
  77.         $chartAxis->getMinorTicks()->setVisible(false);
  78.     }
  79.     
  80.     private function doChangeSeries($series{
  81.         $series->getMarks()->getFont()->setColor(Color::WHITE());
  82.         $series->getMarks()->setTransparent(true);
  83.     }    
  84. }
  85. ?>

Documentation generated on Wed, 16 Jun 2010 12:03:31 +0200 by phpDocumentor 1.4.1