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

Source for file OperaTheme.php

Documentation is available at OperaTheme.php

  1. <?php
  2.  
  3. /**
  4.  * <p>Title: Opera Theme class</p>
  5.  *
  6.  * <p>Description: TeeChart for Java</p>
  7.  *
  8.  * <p>Copyright (c) 2004-2008 by Steema Software SL. All Rights Reserved.</p>
  9.  *
  10.  * <p>Company: Steema Software SL</p>
  11.  *
  12.  */
  13.  
  14.  class OperaTheme extends DefaultTheme {
  15.  
  16.     /**
  17.      * Description of Classic theme
  18.      *
  19.      * @param IBaseChart
  20.      */
  21.     public function OperaTheme($c{
  22.         parent::DefaultTheme($c);    
  23.     }
  24.  
  25.     public function toString({
  26.         return Language::getString("OperaTheme");
  27.     }
  28.  
  29.     public function apply({
  30.         parent::apply();
  31.  
  32.         $this->chart->getPanel()->getGradient()->setVisible(true);        
  33.         $this->chart->getPanel()->getGradient()->setEndColor(new Color(220,220,220));
  34.         //$this->chart->getPanel()->getGradient()->setMiddleColor(Utils::rgbhex(255,234,234);        
  35.         $this->chart->getPanel()->getGradient()->setStartColor(new Color(255,255,255));
  36.  
  37.         //$this->chart->getLegend()->getFont()->setName("Verdana");
  38.         $this->chart->getLegend()->getSymbol()->getPen()->setVisible(true);
  39.  
  40.         $this->chart->getWalls()->getBack()->setTransparent(true);
  41.         $this->chart->getWalls()->getBack()->getGradient()->setDirection(GradientDirection::$VERTICAL);
  42.         $this->chart->getWalls()->getBack()->getGradient()->setEndColor(Utils::hex2rgb('FFFFFFFF'));
  43.       //$this->chart->getWalls()->getBack()->getGradient()->setMiddleColor(Color::EMPTYCOLOR());             
  44.         $this->chart->getWalls()->getBack()->getGradient()->setStartColor(Utils::hex2rgb('FFEAEAEA'));    
  45.         $this->chart->getWalls()->getBack()->getGradient()->setVisible(true);               
  46.         
  47.         $this->chart->getWalls()->getRight()->setColor(Utils::hex2rgb('FFC0C0C0'));
  48.         
  49.         for ($t 0$t $this->chart->getAxes()->getCount()++$t{
  50.             $this->doChangeAxis($this->chart->getAxes()->getAxis($t));
  51.         }
  52.  
  53.         for ($t 0$t $this->chart->getSeriesCount()++$t{
  54.             $this->doChangeSeries($this->chart->getSeries($t));
  55.         }
  56.         
  57.         //$this->chart->getHeader()->getFont()->setName("Verdana");
  58.         $this->chart->getHeader()->getFont()->setColor(Utils::hex2rgb('FF000080'));
  59.         $this->chart->getHeader()->getPen()->setVisible(true);        
  60.         
  61.         $this->chart->getAspect()->setSmoothingMode(true);  
  62.  
  63.         // Sets Opera Palette Colors        
  64.         ColorPalettes::applyPalette($this->chart1);    
  65.     }
  66.  
  67.     private function doChangeAxis($axis{
  68.         $axis->getAxisPen()->setColor(Utils::hex2rgb('FFA9A9A9'));
  69.         
  70.         $axis->getGrid()->setColor(Utils::hex2rgb('FF404040'));
  71.         $axis->getGrid()->setStyle(DashStyle::$DASH);
  72.         
  73.         //$axis->getLabels()->getFont()->setName("Verdana");
  74.         
  75.         $axis->getTicksInner()->setColor(Utils::hex2rgb('FFA9A9A9'));        
  76.         $axis->getTicks()->setLength(4);
  77.  
  78.         //$axis->getTitle()->getFont()->setName("Verdana");
  79.     }
  80.  
  81.     private function doChangeSeries($series{
  82.         //$series->getMarks()->getFont()->setName("Verdana");
  83.     }
  84. }
  85.  
  86. ?>

Documentation generated on Wed, 16 Jun 2010 12:07:10 +0200 by phpDocumentor 1.4.1