Graph: ezcGraphChartElementText
[ ]
[ Gallery ]
[ ]
[ ]
[ ]
[ ]
Class: ezcGraphChartElementText
|
Chart element to display texts in a chart [
source]
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' );
Parents
ezcBaseOptions
|
--ezcGraphChartElement
|
--ezcGraphChartElementText
Properties
|
float |
read/write
|
$maxHeight
Maximum percent of bounding used to display the text. |
Inherited Member Variables
From
ezcBaseOptions:
Method Summary
|
public ezcGraphBoundings |
render(
$renderer, $boundings )
Render the text |
|
public void |
__set(
$propertyName, $propertyValue )
__set |
Inherited Methods
From
ezcGraphChartElement :
From
ezcBaseOptions :
Methods
render
Render the text
Parameters
| Name |
Type |
Description |
$renderer |
ezcGraphRenderer |
Renderer |
$boundings |
ezcGraphBoundings |
Boundings for the axis |
Redefinition of
__set
void __set(
mixed
$propertyName, mixed
$propertyValue )
__set
Parameters
| Name |
Type |
Description |
$propertyName |
mixed |
|
$propertyValue |
mixed |
|
Throws
| Class | Description |
ezcBaseValueException |
If a submitted parameter was out of range or type. |
ezcBasePropertyNotFoundException |
If a the value for the property options is not an instance of |
Last updated: Mon, 30 Mar 2009