Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcGraphChart

Graph::ezcGraphChart

Class ezcGraphChart

Class to represent a complete chart.

Source for this file: /Graph/src/interfaces/chart.php

Version:   //autogentag//

Descendants

Child Class Description
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.
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.

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
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. 
ezcGraphOdometerChart::getDefaultDisplayType() Returns the default display type of the current chart type. 
ezcGraphPieChart::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
ezcGraphRadarChart::render() Render the line chart 
ezcGraphLineChart::render() Render the line chart 
ezcGraphOdometerChart::render() Render the pie chart 
ezcGraphPieChart::render() Render the pie 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
ezcGraphRadarChart::renderToOutput() Renders this chart to direct output 
ezcGraphLineChart::renderToOutput() Renders this chart to direct output 
ezcGraphOdometerChart::renderToOutput() Renders this chart to direct output 
ezcGraphPieChart::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 
Documentation generated by phpDocumentor 1.4.3