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

Class: Average

Source Location: /functions/Average.php

Class Overview

TeeBase
   |
   --Functions
      |
      --Average

Average class


Author(s):

Version:

  • 1.0

Copyright:

  • (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>

Methods


Inherited Variables

Inherited Methods

Class: Functions

Functions::Functions()
Functions::addFunctionXY()
Functions::addPoints()
Gets all points from Source series, performs a function operation and stores results in ParentSeries.
Functions::calculate()
Performs function operation on SourceSeries series.
Functions::calculateAllPoints()
Functions::calculateByPeriod()
Functions::calculateMany()
Performs function operation on list of series (SourceSeriesList).
Functions::calculatePeriod()
Functions::clear()
Functions::doCalculation()
Functions::getDescription()
Gets descriptive text.
Functions::getPeriod()
Controls how many points or X range will trigger a new point
Functions::getPeriodAlign()
Controls where to place function calculations inside the full period
Functions::getPeriodStyle()
Controls how the Period property is interpreted.
Functions::getSeries()
Returns the Series parent of Function.
Run-time and read only.
The Series property returns the Series parent of this Function.
TChart uses Series to do the actual drawing.
Functions::newInstance()
Functions::readResolve()
Functions::recalculate()
Performs a checkDataSource method call on parent Series.
Functions::setPeriod()
Functions::setPeriodAlign()
Functions::setPeriodStyle()
Functions::setSeries()
Functions::valueList()
Functions::__get()
Functions::__set()

Class: TeeBase

TeeBase::__construct()
TeeBase::getChart()
Chart associated with this object.
TeeBase::invalidate()
Use invalidate when the entire canvas needs to be repainted.
TeeBase::setBooleanProperty()
TeeBase::setChart()
Chart associated with this object.
TeeBase::setColorProperty()
TeeBase::setDoubleProperty()
TeeBase::setIntegerProperty()
TeeBase::setStringProperty()
TeeBase::_setColorProperty()
TeeBase::__get()
TeeBase::__set()

Class Details

[line 25]
Average class

Description: Average (mean) Function

Example: $avgFunction = new Average(); $avgFunction->setChart($myChart->getChart()); $avgFunction->setPeriod(0); //all points $avgFunction->setIncludeNulls(false);

$lineSeries->setDataSource($barSeries); $lineSeries->setFunction($avgFunction);




Tags:

author:  
version:  1.0
copyright:  (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
link:  http://www.steema.com


[ Top ]


Class Methods


constructor Average [line 50]

Average Average( [useNulls $useNulls = true])

If UseNulls is true, null values will be treated as zero in average calculation.



Tags:

access:  public


Parameters:

useNulls   $useNulls   boolean

[ Top ]

method calculate [line 90]

double calculate( sourceSeries $sourceSeries, firstIndex $firstIndex, lastIndex $lastIndex)

Performs function operation on SourceSeries series.


First and Last parameters are ValueIndex of first and last point used in calculation.
You can override Calculate function to perform customized calculation on one SourceSeries.




Tags:

access:  public


Overrides Functions::calculate() (Performs function operation on SourceSeries series.
)

Parameters:

sourceSeries   $sourceSeries   Series
firstIndex   $firstIndex   int
lastIndex   $lastIndex   int

[ Top ]

method calculateMany [line 126]

double calculateMany( sourceSeriesList $sourceSeriesList, valueIndex $valueIndex)

Performs function operation on list of series (SourceSeriesList).


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.




Tags:

access:  public


Overrides Functions::calculateMany() (Performs function operation on list of series (SourceSeriesList).
)

Parameters:

sourceSeriesList   $sourceSeriesList   ArrayList
valueIndex   $valueIndex   int

[ Top ]

method getDescription [line 150]

String getDescription( )

Gets descriptive text.



Tags:

access:  public


Overrides Functions::getDescription() (Gets descriptive text.)

[ Top ]

method getIncludeNulls [line 61]

boolean getIncludeNulls( )

Calculates the average using only the non-null points of a series, or not.



Tags:

access:  public


[ Top ]

method setIncludeNulls [line 71]

void setIncludeNulls( value $value)

Calculates the average using only the non-null points of a series, or not.



Tags:

access:  public


Parameters:

value   $value   boolean

[ Top ]

method __get [line 30]

void __get( $property)



Overrides Functions::__get() (parent method not documented)

Parameters:

   $property  

[ Top ]

method __set [line 37]

void __set( $property, $value)



Overrides Functions::__set() (parent method not documented)

Parameters:

   $property  
   $value  

[ Top ]


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