Source for file Count.php
Documentation is available at Count.php
* Description: Count Function
* $countFunction = new Count();
* $countFunction->setChart($myChart->getChart());
* $countFunction->setPeriod(0); //all points
* $lineSeries->setDataSource($barSeries);
* $lineSeries->setFunction($countFunction);
* @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
* @link http://www.steema.com
function __get( $property ) {
$method = "get{$property}";
function __set ( $property,$value ) {
$method = "set{$property}";
return $this->$method($value);
* Performs function operation on SourceSeries series.<br>
* First and Last parameters are ValueIndex of first and last point used
* You can override Calculate function to perform customized calculation
* on one SourceSeries. <br>
* @param sourceSeries Series
public function calculate($sourceSeries, $firstIndex, $lastIndex)
return($firstIndex == - 1) ? $this->valueList($sourceSeries)->count :
$lastIndex - $firstIndex + 1;
* Performs function operation on list of series (SourceSeriesList).<br>
* The ValueIndex parameter defines ValueIndex of point in each Series in
* list. You can override CalculateMany function to perform customized
* calculation on list of SourceSeries. <br>
* @param sourceSeriesList ArrayList
for($t = 0; $t < sizeof($sourceSeriesList); $t++ )
if($this->valueList($sourceSeriesList->get($t))->count > $valueIndex)
|