Path

ez components / documentation / api reference / trunk / graph


eZ Components trunk

Graph: ezcGraphChart

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

Class: ezcGraphChart

Class to represent a complete chart. [source]

Descendents

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

Properties

ezcGraphDriver read/write  $driver
Output driver used for chart
ezcGraphPalette read/write  $palette
Palette used for colorization of chart
mixed read  $renderedFile
Contains the filename of the rendered file, if rendered.
ezcGraphRenderer read/write  $renderer
Renderer used to render chart

Member Variables

protected ezcGraphChartDataContainer $data
Contains the data of the chart
protected array(ezcGraphChartElement) $elements = array()
Contains subelelemnts of the chart like legend and axes
protected ezcGraphChartConfig $options
Contains all general chart options
protected array $properties
Array containing chart properties
protected array $renderElement
Contains the status wheather an element should be rendered

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 mixed getRenderedFile( )
Return filename of rendered file, and false if no file was yet rendered.
public abstract void render( $width, $height, [$file = null] )
Renders this chart
public abstract void renderToOutput( $width, $height )
Renders this chart to direct output
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
ezcGraphOdometerChart::getDefaultDisplayType() Returns the default display type of the current chart type.
ezcGraphPieChart::getDefaultDisplayType() Returns the default display type of the current chart type.
ezcGraphRadarChart::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.

getRenderedFile

mixed getRenderedFile( )
Return filename of rendered file, and false if no file was yet rendered.

render

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

Parameters

Name Type Description
$width int  
$height int  
$file string  

Redefined in descendants as

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

renderToOutput

void renderToOutput( int $width, int $height )
Renders this chart to direct output
Does the same as ezcGraphChart::render(), but renders directly to output and not into a file.

Parameters

Name Type Description
$width int  
$height int  

Redefined in descendants as

Method Description
ezcGraphOdometerChart::renderToOutput() Renders this chart to direct output
ezcGraphPieChart::renderToOutput() Renders this chart to direct output
ezcGraphRadarChart::renderToOutput() Renders this chart to direct output
ezcGraphLineChart::renderToOutput() Renders this chart to direct output

setFromPalette

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

Parameters

Name Type Description
$palette ezcGraphPalette Palette

Redefined in descendants as

Method Description
ezcGraphRadarChart::setFromPalette() Set colors and border fro this element
ezcGraphLineChart::setFromPalette() Set colors and border for this element

Last updated: Mon, 21 Dec 2009