Path

ez components / documentation / api reference / 2006.2 / graph


eZ Components 2006.2

Graph: ezcGraphChart

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcGraphChart

Class to represent a complete chart. [source]

Descendents

Child Class Description
ezcGraphPieChart Class for pie charts. Can only use one dataset which will be dispalyed as a pie chart.
ezcGraphLineChart Class for line charts. Can make use of an unlimited amount of datasets and will display them as lines by default.

Member Variables

protected ezcGraphChartDataContainer $data
Contains the data of the chart
protected ezcGraphDriver $driver
Driver for the chart
protected array( $elements = array()
Contains subelelemnts of the chart like legend and axes
protected ezcGraphChartConfig $options
Contains all general chart options
protected ezcGraphPalette $palette
Palette for default colorization
protected array $renderElement
Contains the status wheather an element should be rendered
protected ezcGraphRenderer $renderer
Renderer for the chart

Method Summary

protected void addElement( $name, $element )
Add element to chart
public abstract int getDefaultDisplayType( )
Returns the default display type of the current chart type.
public abstract void render( $widht, $height, [$file = null] )
Renders this chart
public void setFromPalette( $palette )
Set colors and border fro this element

Methods

addElement

void addElement( string $name, ezcGraphChartElement $element )
Add element to chart
Add a chart element to the chart and perform the required configuration tasks for the chart element.

Parameters

Name Type Description
$name string Element name
$element ezcGraphChartElement Chart element

getDefaultDisplayType

int getDefaultDisplayType( )
Returns the default display type of the current chart type.

Redefined in descendants as

Method Description
ezcGraphPieChart::getDefaultDisplayType() Returns the default display type of the current chart type.
ezcGraphLineChart::getDefaultDisplayType() Returns the default display type of the current chart type.
ezcGraphBarChart::getDefaultDisplayType() Returns the default display type of the current chart type.

render

void render( $widht, $height, [ $file = null] )
Renders this chart
Creates basic visual chart elements from the chart to be processed by the renderer.

Parameters

Name Type Description
$widht  
$height  
$file  

Redefined in descendants as

Method Description
ezcGraphPieChart::render() Render the pie chart
ezcGraphLineChart::render() Render the line chart

setFromPalette

void setFromPalette( ezcGraphPalette $palette )
Set colors and border fro this element

Parameters

Name Type Description
$palette ezcGraphPalette Palette

Last updated: Thu, 01 Nov 2007