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

Source for file BlueSkyTheme.php

Documentation is available at BlueSkyTheme.php

  1. <?php
  2.  
  3. /**
  4.  *
  5.  * <p>Title: BlueSkyTheme class</p>
  6.  *
  7.  * <p>Description: Summary description for BlueSkyTheme.</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 BlueSkyTheme extends DefaultTheme {
  16.  
  17.     public function BlueSkyTheme($c{
  18.         parent::DefaultTheme($c);  
  19.     }
  20.  
  21.     public function apply({
  22.         $this->chart->getLegend()->getShadow()->setVisible(true);
  23.         //$this->chart->getPanel()->getShadow()->setColor(Color::BLACK());        
  24.         
  25.         $this->chart->getPanel()->getBevel()->setInner(BevelStyle::$LOWERED);        
  26.         $this->chart->getPanel()->getBevel()->setOuter(BevelStyle::$NONE);        
  27.         $this->chart->getPanel()->getBevel()->setWidth(2);        
  28.         
  29.         $this->chart->getWalls()->getBack()->setVisible(true);
  30.         $this->chart->getWalls()->getBack()->setTransparent(false);
  31.         
  32.  
  33.         $this->changeWall($this->chart->getWalls()->getBack(),Utils::hex2rgb('FCECCF'));
  34.         $this->changeWall($this->chart->getWalls()->getBottom(),Utils::hex2rgb('038CFC'));        
  35.         $this->changeWall($this->chart->getWalls()->getLeft()Utils::hex2rgb('8080FF'));
  36.         $this->chart->getWalls()->getBack()->setSize(2);     
  37.         
  38.         $this->resetGradient($this->chart->getPanel()->getGradient());
  39.         
  40.         $this->chart->getLegend()->getDividingLines()->setColor(Color::SILVER());
  41.         $this->chart->getLegend()->getDividingLines()->setVisible(true);
  42.         $this->chart->getLegend()->getFont()->setColor(Utils::hex2rgb('000064'));
  43. // TODO         $this->chart->getLegend()->getGradient()->setDirection(GradientDirection.HORIZONTAL);
  44.         //$this->chart->getLegend()->getGradient()->setDirection('horizontal');
  45.         //$this->chart->getLegend()->getGradient()->setEndColor(Utils::hex2rgb('FFFFDBCE'));
  46.         //$this->chart->getLegend()->getGradient()->setMiddleColor(Utils::hex2rgb('0xFFE9E6E0'));
  47.         //$this->chart->getLegend()->getGradient()->setStartColor(Utils::hex2rgb('FFEAF3FF'));
  48.         //$this->chart->getLegend()->getGradient()->setVisible(true);
  49.         $this->chart->getLegend()->getShadow()->setHeight(5);
  50.         $this->chart->getLegend()->getShadow()->setWidth(4);
  51.         $this->chart->getLegend()->getShadow()->setTransparency(50);
  52.         $this->chart->getLegend()->getSymbol()->setSquared(true);
  53.         
  54.         $this->chart->getHeader()->setColor(Color::BLACK());
  55.         $this->chart->getHeader()->setTransparency(70);
  56.         $this->chart->getHeader()->getFont()->setColor(Color::SILVER());
  57.         $this->chart->getHeader()->getFont()->setSize(12);
  58.         $this->chart->getHeader()->getPen()->setVisible(true);
  59.         $this->chart->getHeader()->getPen()->setWidth(2);
  60.         $this->chart->getHeader()->getPen()->setColor(Utils::hex2rgb('FBDD99'));
  61.         //$this->chart->getHeader()->getGradient()->setEndColor(Color::BLACK());
  62.         //$this->chart->getHeader()->getGradient()->setMiddleColor(Utils::hex2rgb('0xFF400080'));
  63.         //$this->chart->getHeader()->getGradient()->setStartColor(Color::WHITE());
  64.         //$this->chart->getHeader()->getGradient()->setVisible(true);
  65.         $this->chart->getHeader()->getShadow()->setSize(4);
  66.         $this->chart->getHeader()->getShadow()->setTransparency(70);
  67.  
  68.         for ($t 0$t $this->chart->getAxes()->getCount()++$t{
  69.             $this->changeAxis($this->chart->getAxes()->getAxis($t));
  70.         }       
  71.  
  72.     }
  73.  
  74.     /**
  75.      * Gets descriptive text.
  76.      *
  77.      * @return String 
  78.      */
  79.     public function getDescription({
  80.         return "Blues";
  81.     }
  82.  
  83.     public function resetGradient($chartGradient{
  84.         $chartGradient->setVisible(true);
  85.         $chartGradient->setStartColor(Utils::hex2rgb('2003A5'));
  86.         $chartGradient->setEndColor(Color::WHITE());
  87.         //$chartGradient->setMiddleColor(Utils::hex2rgb('0xFF80FFFF'));
  88.     }
  89.  
  90.     public function changeWall($chartWall$aColor{
  91.         $chartWall->getPen()->setVisible(false);
  92.         $chartWall->setColor($aColor);
  93.         $chartWall->setApplyDark(true);
  94.         $chartWall->setSize(1);
  95.     }   
  96.  
  97.     public function changeAxis($chartAxis{
  98.         $chartAxis->getAxisPen()->setWidth(1);
  99.         $chartAxis->getAxisPen()->setColor(Color::NAVY());
  100.         
  101.         $chartAxis->getGrid()->setColor(Utils::hex2rgb('B9B9FF'));
  102.         $chartAxis->getGrid()->setStyle(DashStyle::$DOT);
  103.         
  104.         $chartAxis->getLabels()->getFont()->setColor(Color::NAVY());
  105.         //$f->setName("Tahoma");
  106.         //$f->setBold(true);
  107.         //$f->setColor(Color::NAVY());
  108.         
  109.         $chartAxis->getMinorGrid()->setVisible(false);
  110.         $chartAxis->getMinorGrid()->setColor(Utils::hex2rgb('E5E5E5'));        
  111.         $chartAxis->setMinorTickCount(7);
  112.         
  113.         $chartAxis->getTicks()->setLength(5);
  114.         
  115.         $chartAxis->getGrid()->setColor(Color::BLUE());
  116.         $chartAxis->getGrid()->setStyle(DashStyle::$DOT);
  117.     }
  118. }
  119.  
  120. ?>

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