Base class for chart elements
The base class for chart elements. 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.
Important chart elements for example are:
Each chart element may be configured with options similar to CSS, used with HTML to define the general style of the repsective element:
Source for this file: /Graph/src/interfaces/element.php
ezcBaseOptions | --ezcGraphChartElement
Version: | //autogentag// |
Child Class | Description |
---|---|
ezcGraphChartElementBackground | Chart element representing the background. |
ezcGraphChartElementLegend | Class to represent a legend as a chart element |
ezcGraphChartElementAxis | Class to represent an axis as a chart element |
ezcGraphChartElementText | Chart element to display texts in a chart |
ezcGraphColor | read/write |
$background
Background color of chart element. |
ezcGraphColor | read/write |
$border
Border color of chart element. |
int | read/write |
$borderWidth
Border width. |
ezcGraphBoundings | read |
$boundings
Boundings of this elements. |
ezcGraphFontOptions | read/write |
$font
Font used for this element. |
bool | read |
$fontCloned
Indicates if font configuration was already cloned for this specific element. |
float | read/write |
$landscapeTitleSize
Percentage of boundings which are used for the title with position top or bottom. |
int | read/write |
$margin
Distance between outer boundings and border of an element. |
int | read/write |
$maxTitleHeight
Maximum size of the title. |
int | read/write |
$padding
Distance between border and content of element. |
float | read/write |
$portraitTitleSize
Percentage of boundings which are used for the title with position left, right or center. |
int | read/write |
$position
Integer defining the elements position in the chart. |
string | read/write |
$title
Title of chart element. |
From ezcBaseOptions | |
---|---|
protected |
ezcBaseOptions::$properties
|
protected ezcGraphBoundings |
getTitleSize(
$boundings
, [ $direction
= ezcGraph::HORIZONTAL] )
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 |
render(
$renderer
, $boundings
)
Renders this chart element |
public void |
setFromPalette(
$palette
)
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. |
Returns calculated boundings based on available percentual space of given bounding box specified in the elements options and direction of the box.
Name | Type | Description |
---|---|---|
$boundings |
ezcGraphBoundings | |
$direction |
int |
Renders this chart element
This method receives and returns a part of the canvas where it can be rendered on.
Name | Type | Description |
---|---|---|
$renderer |
ezcGraphRenderer | |
$boundings |
ezcGraphBoundings |
Method | Description |
---|---|
ezcGraphChartElementBackground::render() |
Render the background |
ezcGraphChartElementLegend::render() |
Render a legend |
ezcGraphChartElementAxis::render() |
Render the axis |
ezcGraphChartElementText::render() |
Render the text |
Set colors and border fro this element
Name | Type | Description |
---|---|---|
$palette |
ezcGraphPalette | Palette |
Method | Description |
---|---|
ezcGraphChartElementBackground::setFromPalette() |
Set colors and border for this element |
ezcGraphChartElementAxis::setFromPalette() |
Set colors and border fro this element |