Zeta Components Manual :: Docs For Class ezcGraphRadarChart
Graph::ezcGraphRadarChart
Class ezcGraphRadarChart
Class for radar charts.
Can make use of an unlimited amount of datasets and will display them as lines by default. Rotation axis:
- Labeled axis
- Centered axis label renderer
- Numeric axis
- radar axis label renderer
- // Create a new radar chart
- // Add data to line chart
- array(
- '100' => 1.2,
- '200' => 43.2,
- '300' => -34.14,
- '350' => 65,
- '400' => 123,
- )
- );
- // Render chart with default 2d renderer and default SVG driver
Each chart consists of several chart elements which represents logical parts of the chart and can be formatted independently. The line chart consists of:
- title ( ezcGraphChartElementText )
- legend ( ezcGraphChartElementLegend )
- background ( ezcGraphChartElementBackground )
- axis ( ezcGraphChartElementNumericAxis )
- ratation axis ( ezcGraphChartElementLabeledAxis )
The chart itself also offers several options to configure the appearance. The extended configure options are available in ezcGraphRadarChartOptions extending the ezcGraphChartOptions.
Source for this file: /Graph/src/charts/radar.php
ezcGraphChart | --ezcGraphRadarChart
Version: | //autogentag// |
Properties
ezcGraphRadarChartOptions | read/write |
$options
Chart options class |
Member Variables
protected ezcGraphColor |
$childAxisColor
Store major grid color for child axis. |
Inherited Member Variables
From ezcGraphChart | |
---|---|
protected |
ezcGraphChart::$data
|
protected |
ezcGraphChart::$elements
|
protected |
ezcGraphChart::$options
|
protected |
ezcGraphChart::$properties
|
protected |
ezcGraphChart::$renderElement
|
Method Summary
protected void |
drawRotatedAxis(
$axis
, $boundings
, $center
, $position
, [ $lastPosition
= null] )
Draws a single rotated axis |
public int |
getDefaultDisplayType(
)
Returns the default display type of the current chart type. |
public void |
render(
$width
, $height
, [ $file
= null] )
Render the line chart |
protected void |
renderData(
$renderer
, $boundings
)
Render the assigned data |
protected void |
renderElements(
$width
, $height
)
Renders the basic elements of this chart type |
public void |
renderToOutput(
$width
, $height
)
Renders this chart to direct output |
public void |
setFromPalette(
$palette
)
Set colors and border fro this element |
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 mixed |
ezcGraphChart::getRenderedFile()
Return filename of rendered file, and false if no file was yet rendered. |
public abstract void |
ezcGraphChart::render()
Renders this chart |
public abstract void |
ezcGraphChart::renderToOutput()
Renders this chart to direct output |
public void |
ezcGraphChart::setFromPalette()
Set colors and border fro this element |
Methods
drawRotatedAxis
Draws a single rotated axis
Sets the axis label position depending on the axis rotation.
Parameters:
Name | Type | Description |
---|---|---|
$axis |
ezcGraphChartElementAxis | |
$boundings |
ezcGraphBoundings | |
$center |
ezcGraphCoordinate | |
$position |
float | |
$lastPosition |
float |
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
Render the line 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
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 |
renderElements
Renders the basic elements of this chart type
Parameters:
Name | Type | Description |
---|---|---|
$width |
int | |
$height |
int |
renderToOutput
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 |
Redefinition of:
Method | Description |
---|---|
ezcGraphChart::renderToOutput() |
Renders this chart to direct output |
setFromPalette
Set colors and border fro this element
Parameters:
Name | Type | Description |
---|---|---|
$palette |
ezcGraphPalette | Palette |
Redefinition of:
Method | Description |
---|---|
ezcGraphChart::setFromPalette() |
Set colors and border fro this element |