CLASS RadarPlot (Defined in: jpgraph_radar.php : 314)

RadarPlot

RadarPlot()
SetColor()
SetFill()
SetFillColor()
SetLegend()
SetLineStyle()
SetLineWeight()

Class usage and Overview
Create a new spider plot. A spider plot can only be added to a SpiderGraph

See also related classes:
SpiderGraph

Class Methods

function RadarPlot($data)
Create a new Radar plot

Argument | Default | Description
--- | --- | ---
$data |  | Data array

Description
Creates a new radar plot

Example

$radar = new RadarPlot($data);

function SetColor($aColor,$aFillColor)
Specify color for the plot

Argument | Default | Description
--- | --- | ---
$aColor |  | Color for line
$aFillColor | false | Fill color

Description
Set the color for the plot. Note that you can also use the method SetFillColor() to specify the fill color. This non-orthogonality is in place to make the API be more flexible.
See also
RadarPlot::SetFillColor

Example

$spideplot->SetColor('darkred','lightblue');

function SetFill($f)
Deprecated. Turn filling on and off

Argument | Default | Description
--- | --- | ---
$f | true | True=Use fill color and fill plot

Description
Deprecated. Turn filling on and off. When the fill color is pecified with either SetFillColor() or SetColor() this will tuen on the filling of the plot. This method might be useful if you programatically have set the colro and later need to disable the fill.

Example

$spiderplot->SetFillColor('lightblue');
// ... some code
// Turn off the fill
if( $doNotFillSpiderPlot )
$spiderplot->SetFill(false);

function SetFillColor($aColor)
Specify fill color for plot

Argument | Default | Description
--- | --- | ---
$aColor |  | Color

Description
Specify fill color for plot. Note. You can also use SetColor() to specify both fill and line color.
See also
RadarPlot::SetColor

Example

$spiderplot->SetFillColor('lightblue');

function SetLegend($legend)
Specify legend text for this plot

Argument | Default | Description
--- | --- | ---
$legend |  | Legend string

Description
Specify legend text for this plot.

Example

$spiderplot->SetLegend('Stress level');

function SetLineStyle($aStyle)
Specify line style for the plot lines

Argument | Default | Description
--- | --- | ---
$aStyle |  | Line style

Description
The line style can be one of

- "solid"
- "dashed"
- "longdashed"
- "dotted"

Example

$radarplot->SetLineStyle('dotted');

function SetLineWeight($w)
Set line weight

Argument | Default | Description
--- | --- | ---
$w |  | Line weight in pixels

Description
Set line weight.

Example

$spiderplot->SetLineWeight(2);