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

Source for file Divide.php

Documentation is available at Divide.php

  1. <?php
  2.  
  3. /**
  4.  * Divide class
  5.  *
  6.  * Description: Divide Function
  7.  *
  8.  * Example:
  9.  * $divideFunction = new Divide();
  10.  * $divideFunction->setChart($myChart->getChart());
  11.  * $divideFunction->setPeriod(0); //all points
  12.  *
  13.  * $tmpArray = Array();
  14.  * $tmpArray->add($barSeries1);
  15.  * $tmpArray->add($barSeries2);
  16.  * $lineSeries->setDataSource($tmpArray);
  17.  * $lineSeries->setFunction($divideFunction);
  18.  *
  19.  * @author
  20.  * @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
  21.  * @version 1.0
  22.  * @package TeeChartPHP
  23.  * @subpackage functions
  24.  * @link http://www.steema.com
  25.  */
  26.  
  27. class Divide extends ManySeries
  28. {
  29.  
  30.     // Interceptors
  31.     function __get$property {
  32.       $method ="get{$property}";
  33.       if method_exists$this$method ) ) {
  34.         return $this->$method();
  35.       }
  36.     }
  37.  
  38.     function __set $property,$value {
  39.       $method ="set{$property}";
  40.       if method_exists$this$method ) ) {
  41.         return $this->$method($value);
  42.       }
  43.     }
  44.  
  45.    protected function calculateValue($result$value)
  46.    {
  47.       return($value == 0$result $result $value;
  48.    }
  49.  
  50.    /**
  51.    * Gets descriptive text.
  52.    *
  53.    * @return String 
  54.    */
  55.    public function getDescription()
  56.    {
  57.       return Language::getString("FunctionDivide");
  58.    }
  59. }
  60. ?>

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