Graph: ezcGraphRadarChart
[ ]
[ Gallery ]
[ ]
[ ]
[ ]
[ ]
Class: ezcGraphRadarChart
|
Class for radar charts. [
source]
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
Axis:
- Numeric axis
- radar axis label renderer
1. // Create a new radar chart
2. $chart = new ezcGraphRadarChart();
3.
4. // Add data to line chart
5. $chart->data['sample dataset'] = new ezcGraphArrayDataSet(
6. array(
7. '100' => 1.2,
8. '200' => 43.2,
9. '300' => -34.14,
10. '350' => 65,
11. '400' => 123,
12. )
13. );
14.
15. // Render chart with default 2d renderer and default SVG driver
16. $chart->render( 500, 200, 'radar_chart.svg' );
Each chart consists of several chart elements which represents logical parts of the chart and can be formatted independently. The line chart consists of:
The type of the axis may be changed and all elements can be configured by accessing them as properties of the chart:
1. $chart->legend->position = ezcGraph::RIGHT;
Parents
ezcGraphChart
|
--ezcGraphRadarChart
Properties
Member Variables
Inherited Member Variables
From
ezcGraphChart:
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 :
Methods
drawRotatedAxis
Draws a single rotated axis
Sets the axis label position depending on the axis rotation.
Parameters
getDefaultDisplayType
int getDefaultDisplayType(
)
Returns the default display type of the current chart type.
Redefinition of
render
void render(
int
$width, int
$height, [string
$file = null] )
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
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
void renderElements(
int
$width, int
$height )
Renders the basic elements of this chart type
Parameters
| Name |
Type |
Description |
$width |
int |
|
$height |
int |
|
renderToOutput
void renderToOutput(
int
$width, int
$height )
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
setFromPalette
Set colors and border fro this element
Parameters
Redefinition of
Last updated: Tue, 23 Mar 2010