Path

ez components / documentation / api reference / 2006.2 / graph


eZ Components 2006.2

Graph: ezcGraphPieChart

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

Class: ezcGraphPieChart

Class for pie charts. Can only use one dataset which will be dispalyed as a pie chart. [source]
 1.   // Create a new line chart
 2.     $chart new ezcGraphLineChart();
 3.  
 4.   // Add data to line chart
 5.     $chart->data['sample dataset'new ezcGraphArrayDataSet(
 6.       array(
 7.           'one' => 1.2,
 8.           'two' => 43.2,
 9.           'three' => -34.14,
10.           'four' => 65,
11.           'five' => 123,
12.       )
13.   );
14.  
15.   // Render chart with default 2d renderer and default SVG driver
16.     $chart->render500200'line_chart.svg' );

Parents

ezcGraphChart
   |
   --ezcGraphPieChart

Inherited Member Variables

From ezcGraphChart:
protected  ezcGraphChart::$data
protected  ezcGraphChart::$driver
protected  ezcGraphChart::$elements
protected  ezcGraphChart::$options
protected  ezcGraphChart::$palette
protected  ezcGraphChart::$renderElement
protected  ezcGraphChart::$renderer

Method Summary

protected void applyThreshold( )
Apply tresh hold
public int getDefaultDisplayType( )
Returns the default display type of the current chart type.
public void render( $width, $height, [$file = null] )
Render the pie chart
protected void renderData( $renderer, $boundings )
Render the assigned data

Inherited Methods

From ezcGraphChart :
protected void ezcGraphChart::addElement()
Add element to chart
public abstract int ezcGraphChart::getDefaultDisplayType()
Returns the default display type of the current chart type.
public abstract void ezcGraphChart::render()
Renders this chart
public void ezcGraphChart::setFromPalette()
Set colors and border fro this element

Methods

applyThreshold

void applyThreshold( )
Apply tresh hold
Iterates over the dataset and applies the configured tresh hold to the datasets data.

getDefaultDisplayType

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

Redefinition of

Method Description
ezcGraphChart::getDefaultDisplayType() Returns the default display type of the current chart type.

render

void render( int $width, int $height, [string $file = null] )
Render the pie chart
Renders the chart into a file or stream. The width and height are needed to specify the dimensions of the resulting image. For direct output use 'php://stdout' as output file.

Parameters

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

Redefinition of

Method Description
ezcGraphChart::render() Renders this chart

renderData

void renderData( ezcGraphRenderer $renderer, $boundings )
Render the assigned data
Will renderer all charts data in the remaining boundings after drawing all other chart elements. The data will be rendered depending on the settings in the dataset.

Parameters

Name Type Description
$renderer ezcGraphRenderer Renderer
$boundings ezcGraphBoundings Remaining boundings

Last updated: Thu, 01 Nov 2007