Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcGraphChartElementText

Graph::ezcGraphChartElementText

Class ezcGraphChartElementText

Chart element to display texts in a chart

Chart elements can be understood as widgets or layout container inside the chart. The actual transformation to images happens inside the renderers. They represent all elements inside the chart and contain mostly general formatting options, while the renderer itself might define additional formatting options for some chart elments. You can find more about the general formatting options for chart elements in the base class ezcGraphChartElement.

The text element can only be placed at the top or the bottom of the chart. Beside the common options it has only one additional option defining the maximum height used for the text box. The actaully required height is calculated based on the assigned text size.

  1.   $chart = new ezcGraphPieChart();
  2.   $chart->data['example'] = new ezcGraphArrayDataSet( array(
  3.       'Foo' => 23,
  4.       'Bar' => 42,
  5.   ) );
  6.  
  7.   $chart->title = 'Some pie chart';
  8.  
  9.   // Use at maximum 5% of the chart height for the title.
  10.   $chart->title->maxHeight = .05;
  11.  
  12.   $graph->render( 400, 250, 'title.svg' );

Source for this file: /Graph/src/element/text.php

ezcBaseOptions
   |
   --ezcGraphChartElement
      |
      --ezcGraphChartElementText
Version:   //autogentag//

Properties

float read/write $maxHeight
Maximum percent of bounding used to display the text.

Inherited Member Variables

From ezcBaseOptions
protected ezcBaseOptions::$properties

Method Summary

public ezcGraphBoundings render( $renderer , $boundings )
Render the text
public void __set( $propertyName , $propertyValue )
__set

Inherited Methods

From ezcGraphChartElement
protected ezcGraphBoundings ezcGraphChartElement::getTitleSize()
Returns calculated boundings based on available percentual space of given bounding box specified in the elements options and direction of the box.
public abstract ezcGraphBoundings ezcGraphChartElement::render()
Renders this chart element
public void ezcGraphChartElement::setFromPalette()
Set colors and border fro this element
From ezcBaseOptions
public ezcBaseOptions ezcBaseOptions::__construct()
Construct a new options object.
public void ezcBaseOptions::merge()
Merge an array into the actual options object.
public bool ezcBaseOptions::offsetExists()
Returns if an option exists.
public mixed ezcBaseOptions::offsetGet()
Returns an option value.
public void ezcBaseOptions::offsetSet()
Set an option.
public void ezcBaseOptions::offsetUnset()
Unset an option.

Methods

render

ezcGraphBoundings render( ezcGraphRenderer $renderer , $boundings )

Render the text

Parameters:
Name Type Description
$renderer ezcGraphRenderer Renderer
$boundings ezcGraphBoundings Boundings for the axis
Redefinition of:
Method Description
ezcGraphChartElement::render() Renders this chart element

__set

void __set( mixed $propertyName , mixed $propertyValue )

__set

Parameters:
Name Type Description
$propertyName mixed
$propertyValue mixed
Exceptions:
Type Description
ezcBasePropertyNotFoundException If a the value for the property options is not an instance of
ezcBaseValueException If a submitted parameter was out of range or type.
Documentation generated by phpDocumentor 1.4.3