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

Source for file Line.php

Documentation is available at Line.php

  1. <?php
  2.  
  3. /**
  4.  * Line class
  5.  *
  6.  * Description: Line Series
  7.  *
  8.  * @author
  9.  * @copyright (c) 1995-2010 by Steema Software SL. All Rights Reserved. <info@steema.com>
  10.  * @version 1.0
  11.  * @package TeeChartPHP
  12.  * @subpackage styles
  13.  * @link http://www.steema.com
  14.  */
  15.  
  16. class Line extends Custom
  17. {
  18.  
  19.    // Interceptors
  20.    function __get$property {
  21.      $method ="get{$property}";
  22.      if method_exists$this$method ) ) {
  23.        return $this->$method();
  24.      }
  25.    }
  26.  
  27.    function __set $property,$value {
  28.      $method ="set{$property}";
  29.      if method_exists$this$method ) ) {
  30.        return $this->$method($value);
  31.      }
  32.    }
  33.  
  34.    /**
  35.    * The class constructor.
  36.    */
  37.    public function Line($c null)
  38.    {
  39.       parent::Custom($c);
  40.  
  41.       $this->drawLine = true;
  42.       $this->getPointer()->setDefaultVisible(false);
  43.       $this->allowSinglePoint = false;
  44.    }
  45.  
  46.    /**
  47.    * Gets descriptive text.
  48.    *
  49.    * @return String 
  50.    */
  51.    public function getDescription()
  52.    {
  53.       return $this->Language->getString("GalleryLine");
  54.    }
  55.  
  56.  
  57.    /**
  58.    * Determines the Line Gradient.
  59.    *
  60.    * @return Gradient 
  61.    */
  62.    public function getGradient()
  63.    {
  64.       return $this->bBrush->getGradient();
  65.    }
  66.  
  67.    protected function prepareLegendCanvas($g$valueIndex$backColor$aBrush)
  68.    {
  69.       $g->setPen($this->getLinePen());
  70.       $g->setBrush($aBrush);
  71.    }
  72.  
  73.    public function createSubGallery($addSubChart)
  74.    {
  75.       parent::createSubGallery($addSubChart);
  76.       $addSubChart->createSubChart(Language::getString("Stairs"));
  77.       $addSubChart->createSubChart(Language::getString("Points"));
  78.       $addSubChart->createSubChart(Language::getString("Height"));
  79.       $addSubChart->createSubChart(Language::getString("Hollow"));
  80.       $addSubChart->createSubChart(Language::getString("Colors"));
  81.       $addSubChart->createSubChart(Language::getString("Marks"));
  82.       $addSubChart->createSubChart(Language::getString("NoBorder"));
  83.    }
  84.  
  85.    public function setSubGallery($index)
  86.    {
  87.       switch($index)
  88.       {
  89.          case 1:
  90.             $this->setStairs(true);
  91.             break;
  92.          case 2:
  93.             $this->getPointer()->setVisible(true);
  94.             break;
  95.          case 3:
  96.             $this->setLineHeight(5);
  97.             break;
  98.          case 4:
  99.             $this->getBrush()->setVisible(false);
  100.             break;
  101.          case 5:
  102.             $this->setColorEach(true);
  103.             break;
  104.          case 6:
  105.             $this->getMarks()->setVisible(true);
  106.             break;
  107.          case 7:
  108.             $this->getLinePen()->setVisible(false);
  109.             break;
  110.       }
  111.    }
  112. }
  113.  
  114. ?>

Documentation generated on Wed, 16 Jun 2010 12:06:52 +0200 by phpDocumentor 1.4.1