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

Source for file GridPen.php

Documentation is available at GridPen.php

  1. <?php
  2.  
  3.  /**
  4.  * GridPen class
  5.  *
  6.  * Description: Determines the kind of pen used to draw the Grid lines at
  7.  * every Axis Label position
  8.  *
  9.  * @author
  10.  * @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
  11.  * @version 1.0
  12.  * @package TeeChartPHP
  13.  * @subpackage axis
  14.  * @link http://www.steema.com
  15.  */
  16.  
  17. class GridPen extends ChartPen
  18. {
  19.  
  20.    /**
  21.    * When centered is true, grid is displayed in between axis labels.
  22.    * When false, grid lines are drawn at axis labels positions.
  23.    */
  24.    protected $centered;
  25.    private $zPosition;
  26.  
  27.     // Interceptors
  28.     function __get$property {
  29.       $method ="get{$property}";
  30.       if method_exists$this$method ) ) {
  31.         return $this->$method();
  32.       }
  33.     }
  34.  
  35.     function __set $property,$value {
  36.       $method ="set{$property}";
  37.       if method_exists$this$method ) ) {
  38.         return $this->$method($value);
  39.       }
  40.     }
  41.  
  42.    /**
  43.    * Creates a new Grid pen.
  44.    *
  45.    * @param chart IBaseChart
  46.    */
  47.    public function GridPen($chart)
  48.    {
  49.       $tmpColor new Color(220220220);// GRAY
  50.       parent::ChartPen($chart$tmpColortrue DashStyle::$DOT);
  51.    }
  52.  
  53.    /**
  54.    * Determines the style of the axis grid lines.<br>
  55.    * It sets both vertical and horizontal lines independently. <br>
  56.    * DefaultValue: DashStyle::$DOT
  57.    *
  58.    * @return DashStyle 
  59.    */
  60.    public function getStyle()
  61.    {
  62.       return parent::getStyle();
  63.    }
  64.  
  65.    /**
  66.    * Aligns the Grid to the centre. <br>
  67.    * DefaultValue: false
  68.    *
  69.    * @return boolean 
  70.    */
  71.    public function getCentered()
  72.    {
  73.       return $this->centered;
  74.    }
  75.  
  76.    /**
  77.    * Sets grid lines to display between axis labels or at label positions.
  78.    *
  79.    * @param value boolean
  80.    */
  81.    public function setCentered($value)
  82.    {
  83.       $this->centered = $this->setBooleanProperty($this->centered$value);
  84.    }
  85.  
  86.    /**
  87.    * Returns the Z position of the Grid lines, in percent of total chart
  88.    * depth.
  89.    *
  90.    * @return double 
  91.    */
  92.    public function getZPosition()
  93.    {
  94.       return $this->zPosition;
  95.    }
  96.  
  97.    /**
  98.    * Sets the Z position of Grid lines in percentage of total chart depth.
  99.    *
  100.    * @param value double
  101.    */
  102.    public function setZPosition($value)
  103.    {
  104.       if($this->zPosition != $value)
  105.       {
  106.          $this->zPosition $value;
  107.          $this->invalidate();
  108.       }
  109.    }
  110. }
  111.  
  112. ?>

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