## Apache Zeta Components Manual :: Docs For Class ezcGraphDataSet

### Graph::ezcGraphDataSet

### Class ezcGraphDataSet

Basic class to contain the charts data

Source for this file: /Graph/src/datasets/base.php

### Implements interfaces:

- ArrayAccess (internal interface)
- Iterator (internal interface)
- Countable (internal interface)

Version: | //autogentag//

### Descendants

Child Class | Description
--- | ---
ezcGraphArrayDataSet | Dataset class which receives arrays and use them as a base for datasets.
ezcGraphNumericDataSet | Dataset for numeric data.
ezcGraphDataSetAveragePolynom | Extension of basic dataset to represent averation.
ezcGraphDatabaseDataSet | Class to transform PDO results into ezcGraphDataSets

### Properties

ezcGraphColor | read/write | `$color` Colors for datapoint elements
int | read/write | `$displayType` Display type of chart data
bool | read/write | `$highlight` Status if datapoint element is hilighted
string | read/write | `$highlightValue` Displayed string if a data point is highlighted
string | read/write | `$label` Labels for datapoint and datapoint elements
int | read/write | `$symbol` Symbols for datapoint elements
string | read/write | `$url` URL associated with datapoint
ezcGraphChartElementAxis | read/write | `$xAxis` Associate dataset with a different X axis then the default one
ezcGraphChartElementAxis | read/write | `$yAxis` Associate dataset with a different Y axis then the default one

### Member Variables

protected mixed | `$current` Current datapoint element needed for iteration over datapoint with ArrayAccess
protected array | `$data` Array which contains the data of the datapoint
protected array | `$keys` Array keys
protected ezcGraphPalette | `$pallet` Color palette used for datapoint colorization
protected array | `$properties` Property array

### Method Summary

public string | `current( )` Returns the currently selected datapoint.
public string | `key( )` Returns the key of the currently selected datapoint.
public float | `next( )` Returns the next datapoint and selects it or false on the last datapoint.
public bool | `offsetExists( $key )` Returns true if the given datapoint exists Allows isset() using ArrayAccess.
public float | `offsetGet( $key )` Returns the value for the given datapoint Get an datapoint value by ArrayAccess.
public void | `offsetSet( $key , $value )` Sets the value for a datapoint.
public void | `offsetUnset( $key )` Unset an option.
public float | `rewind( )` Selects the very first datapoint and returns it.
public bool | `valid( )` Returns if the current datapoint is valid.
public mixed | `__get( $propertyName )` Property get access.

### Methods

#### current

string current( )

Returns the currently selected datapoint.

This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).

##### Implementation of:

Method | Description
--- | ---
`Iterator::current` |

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::current()` | Returns the currently selected datapoint.
`ezcGraphDataSetAveragePolynom::current()` | Returns the currently selected datapoint.

#### key

string key( )

Returns the key of the currently selected datapoint.

This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).

##### Implementation of:

Method | Description
--- | ---
`Iterator::key` |

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::key()` | Returns the key of the currently selected datapoint.
`ezcGraphDataSetAveragePolynom::key()` | Returns the key of the currently selected datapoint.

#### next

float next( )

Returns the next datapoint and selects it or false on the last datapoint.

This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).

##### Implementation of:

Method | Description
--- | ---
`Iterator::next` |

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::next()` | Returns the next datapoint and selects it or false on the last datapoint.
`ezcGraphDataSetAveragePolynom::next()` | Returns the next datapoint and selects it or false on the last datapoint.

#### offsetExists

bool offsetExists( string $key )

Returns true if the given datapoint exists Allows isset() using ArrayAccess.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$key` | string | The key of the datapoint to get.

##### Implementation of:

Method | Description
--- | ---
`ArrayAccess::offsetExists` |

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::offsetExists()` | Returns true if the given datapoint exists Allows isset() using ArrayAccess.
`ezcGraphDataSetAveragePolynom::offsetExists()` | Returns true if the given datapoint exists Allows isset() using ArrayAccess.

#### offsetGet

float offsetGet( string $key )

Returns the value for the given datapoint Get an datapoint value by ArrayAccess.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$key` | string | The key of the datapoint to get.

##### Implementation of:

Method | Description
--- | ---
`ArrayAccess::offsetGet` |

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::offsetGet()` | Returns the value for the given datapoint Get an datapoint value by ArrayAccess.
`ezcGraphDataSetAveragePolynom::offsetGet()` | Returns the value for the given datapoint Get an datapoint value by ArrayAccess.

#### offsetSet

void offsetSet( string $key , float $value )

Sets the value for a datapoint.

Sets an datapoint using ArrayAccess.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$key` | string | The kex of a datapoint to set.
`$value` | float | The value for the datapoint.

##### Implementation of:

Method | Description
--- | ---
`ArrayAccess::offsetSet` |

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::offsetSet()` | Throws a ezcBasePropertyPermissionException because single datapoints cannot be set in average datasets.
`ezcGraphDataSetAveragePolynom::offsetSet()` | Throws a ezcBasePropertyPermissionException because single datapoints cannot be set in average datasets.

#### offsetUnset

void offsetUnset( string $key )

Unset an option.

Unsets an option using ArrayAccess.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$key` | string | The options to unset.

##### Exceptions:

Type | Description
--- | ---
`ezcBaseValueException` | If a the value for a property is out of range.
`ezcBasePropertyNotFoundException` | If a the value for the property options is not an instance of

##### Implementation of:

Method | Description
--- | ---
`ArrayAccess::offsetUnset` |

#### rewind

float rewind( )

Selects the very first datapoint and returns it.

This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).

##### Implementation of:

Method | Description
--- | ---
`Iterator::rewind` |

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::rewind()` | Selects the very first datapoint and returns it.
`ezcGraphDataSetAveragePolynom::rewind()` | Selects the very first datapoint and returns it.

#### valid

bool valid( )

Returns if the current datapoint is valid.

This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).

##### Implementation of:

Method | Description
--- | ---
`Iterator::valid` |

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::valid()` | Returns if the current datapoint is valid.
`ezcGraphDataSetAveragePolynom::valid()` | Returns if the current datapoint is valid.

#### __get

mixed __get( string $propertyName )

Property get access.

Simply returns a given option.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$propertyName` | string | The name of the option to get.

##### Exceptions:

Type | Description
--- | ---
`ezcBasePropertyNotFoundException` | If a the value for the property options is not an instance of

##### Redefined in descendants as:

Method | Description
--- | ---
`ezcGraphNumericDataSet::__get()` | Property get access.
`ezcGraphDataSetAveragePolynom::__get()` | Property get access.

Documentation generated by phpDocumentor 1.4.3