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

Source for file WebTheme.php

Documentation is available at WebTheme.php

  1. <?php
  2.  
  3. /**
  4.  * <p>Title: Web 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 WebTheme extends DefaultTheme {
  15.  
  16.     /**
  17.      * Description of Classic theme
  18.      *
  19.      * @param IBaseChart
  20.      */
  21.     public function WebTheme($c{
  22.         parent::DefaultTheme($c);    
  23.     }
  24.  
  25.     public function toString({
  26.         return Language::getString("WebTheme");
  27.     }
  28.         
  29.     public function apply({
  30.         parent::apply();
  31.         
  32.         $this->chart->getPanel()->getBevel()->setOuter(BevelStyle::$NONE);
  33.         $this->chart->getPanel()->getPen()->setVisible(true);        
  34.         $this->chart->getPanel()->setColor(Color::fromRgb(196196196));
  35.         
  36.         $this->chart->getLegend()->getShadow()->setColor(Color::DARK_GRAY());
  37.         //$this->chart->getLegend()->getFont()->setName("Lucida Console");
  38.         $this->chart->getLegend()->getFont()->setSize(9);
  39.         $this->chart->getLegend()->setTransparent(true);
  40.  
  41.         $this->doChangeWall($this->chart->getWalls()->getLeft());
  42.         $this->doChangeWall($this->chart->getWalls()->getRight());
  43.         $this->doChangeWall($this->chart->getWalls()->getBack());
  44.         $this->doChangeWall($this->chart->getWalls()->getBottom());
  45.  
  46.         $this->chart->getWalls()->getBack()->setTransparent(false);
  47.  
  48.         for ($t 0$t $this->chart->getAxes()->getCount()++$t{
  49.             $this->doChangeAxis($this->chart->getAxes()->getAxis($t));
  50.         }
  51.  
  52.         for ($t 0$t $this->chart->getSeriesCount()++$t{
  53.             $this->doChangeSeries($this->chart->getSeries($t));
  54.         }
  55.  
  56.         //chart->getHeader()->getFont()->setName("Lucida Console");
  57.         $this->chart->getHeader()->getFont()->setSize(10);
  58.         $this->chart->getHeader()->getFont()->setColor(Color::BLACK());
  59.         $this->chart->getHeader()->getFont()->setBold(true);
  60.  
  61.         ColorPalettes::_applyPalette($this->chartTheme::getWebPalette());
  62.     }
  63.  
  64.     private function doChangeWall($wall{
  65.         $wall->getPen()->setColor(Color::WHITE());
  66.     }
  67.  
  68.     private function doChangeAxis($axis{                
  69.         $axis->getGrid()->setVisible(true);
  70.         $axis->getGrid()->setColor(Color::fromRgb(196196196));
  71.         $axis->getGrid()->setStyle(DashStyle::$SOLID);
  72.  
  73.         $axis->getTicks()->setColor(Color::BLACK());
  74.  
  75.         $axis->getMinorTicks()->setLength(-3);
  76.         $axis->getTicks()->setLength(0);
  77.         $axis->getTicksInner()->setLength(6);
  78.  
  79.         //$axis->getLabels()->getFont()->setName("Lucida Console");
  80.         $axis->getLabels()->getFont()->setSize(10);
  81.         
  82.     }
  83.  
  84.     private function doChangeSeries($series{
  85.         //$series->getMarks()->getGradient()->setVisible(true);
  86.         //$series->getMarks()->getGradient()->setStartColor(Color::SILVER());
  87.         //$series->getMarks()->getFont()->setName("Lucida Console");
  88.     }
  89. }
  90. ?>

Documentation generated on Wed, 16 Jun 2010 12:09:21 +0200 by phpDocumentor 1.4.1