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

Source for file Y2009.php

Documentation is available at Y2009.php

  1. <?php
  2.  
  3. /**
  4.  * Y2009 class
  5.  *
  6.  * Description: Summary description for Y2009Theme
  7.  *
  8.  * @author
  9.  * @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
  10.  * @version 1.0
  11.  * @package TeeChartPHP
  12.  * @subpackage themes
  13.  * @link http://www.steema.com
  14.  */
  15.  
  16.  class Y2009 extends DefaultTheme {
  17.  
  18.     public function Y2009($c{
  19.         parent::DefaultTheme($c);
  20.     }
  21.  
  22.     public function apply({
  23.         $header $this->getChart()->getHeader();
  24.         $header->getFont()->setSize(12);
  25.  
  26.         $aspect $this->getChart()->getAspect();
  27. //        $aspect->setChart3DPercent(30);
  28.  
  29.         // Legend
  30.         $legend $this->getChart()->getLegend();
  31.         $legend->getShadow()->getBrush()->setColor(new Color(120,120,120));
  32.         $legend->getPen()->setVisible(false);
  33.  
  34.         /*        $legend->getFont()->setSize(10);
  35.         $legend->setTransparent(true);
  36.       */
  37.  
  38.         $panel $this->getChart()->getPanel();
  39.         $panel->getBevel()->setInner(BevelStyle::$NONE);
  40.         $panel->getBevel()->setOuter(BevelStyle::$NONE);
  41.         //$panel->getBevel()->setWidth(1);
  42.         $panel->getPen()->setVisible(true);
  43.         $panel->getPen()->setColor(Color::GRAY());
  44.         $panel->getPen()->setWidth(1);
  45.         //$panel->getBorderPen()->setWidth(5);
  46.         //$panel->getBorderPen()->setVisible(true);
  47. //        $panel->getBorderPen()->setColor(new Color(255,255,0));
  48.         //$panel->setBorderRound(0);
  49.  
  50.         $panel->getShadow()->setSize(0);
  51.         $panel->setColor(Color::getSilver());
  52.  
  53.         $this->resetGradient($panel->getGradient());
  54.  
  55.         $tmpColor1 new Color(226,226,226);
  56.         $this->changeWall($this->chart->getWalls()->getLeft(),$tmpColor1);
  57.         $this->changeWall($this->chart->getWalls()->getRight(),$tmpColor1);
  58.         $this->changeWall($this->chart->getWalls()->getBottom(),$tmpColor1);
  59.         $this->changeWall($this->chart->getWalls()->getBack(),$tmpColor1);
  60.  
  61.         for $t 0$t $this->chart->getAxes()->getCount()++$t{
  62.             $this->changeAxis($this->chart->getAxes()->getAxis($t));
  63.         }
  64.  
  65. /*        for ( $t = 0; $t < $this->chart->getSeriesCount(); ++$t) {
  66.             $this->changeSeries($this->chart->getSeries($t));
  67.         }*/
  68.  
  69.         ColorPalettes::applyPalette($this->chart17);
  70.     }
  71.  
  72.     /**
  73.       * Gets descriptive text.
  74.       *
  75.       * @return String 
  76.       */
  77.     public function getDescription({
  78.         return " default";
  79.     }
  80.  
  81.     public function resetGradient($chartGradient{
  82.          $chartGradient->setVisible(true);
  83.          $chartGradient->setStartColor(Color::getWhite());
  84.          $chartGradient->setDirection(GradientDirection::$VERTICAL);
  85.          $chartGradient->setEndColor(new Color(220,220,220));
  86. //        $chartGradient->setMiddleColor( Color::getEmpty());
  87.     }
  88.  
  89.     public function changeWall($wall$aColor{
  90.         $wall->getPen()->setVisible(false);
  91.         //$wall->setSize(3);
  92.         $wall->getPen()->setVisible(false);
  93.         $wall->getBrush()->setColor($aColor);
  94.     }
  95.  
  96.     public function changeSeries($chartSeries{
  97.         $chartSeries->getMarks()->setTransparent(false);
  98.         $chartSeries->getMarks()->getGradient()->setVisible(false);
  99.         $baseDir dirname(__FILE__"/../";
  100.         $chartSeries->getMarks()->getFont()->setName(ChartFont::$DEFAULTFAMILY);
  101.         $chartSeries->getMarks()->getFont()->setSize(8);
  102.         $chartSeries->getMarks()->getArrow()->setColor(Color::getWhite());
  103.     }
  104.  
  105.     public function changeAxis($axes{
  106.         $tmpColor2 new Color(0,0,0);
  107.         $axes->getAxisPen()->setVisible(true);
  108.         $axes->getAxisPen()->setWidth(1);
  109.         $axes->getAxisPen()->setColor(new Color(100,100,100));
  110.  
  111.         $axes->getMinorTicks()->setVisible(false);
  112.         $axes->getTicks()->setColor($tmpColor2);
  113.         $axes->getTicks()->setLength(3);
  114.  
  115.         $f=$axes->getLabels()->getFont();
  116.         $baseDir dirname(__FILE__"/../";
  117.         $f->setName(ChartFont::$DEFAULTFAMILY);
  118.         $f->setSize(8);
  119.         $f->setColor($tmpColor2);
  120.         $axes->getTitle()->getFont()->setName(ChartFont::$DEFAULTFAMILY);
  121.         $axes->getTitle()->getFont()->setColor($tmpColor2);
  122.     }
  123. }
  124. ?>

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