(Defined in: jpgraph_pie.php : 1210)
Class usage and Overview
The canvas for use with PiePlots. You add pie plots by calling the Add() method.
You can add several PiePlots by adjusting their size and positioning each PiePlot so it doesn't overlap eachother.
See also related classes:
PiePlot and PiePlot3D
Class Methods
Add object to the pie graph
Argument | Default | Description |
$aObj
| | Object to add |
Description:
Add a pieplots or text object to the pie graph. You can specify either a single object or an array. If you specify an array all object in the array must be of the same type.
$piegraph = new PieGraph(300,400);
$pieplot = new PiePlot($ydata);
$piegraph->Add($pieplot);
Enable/disable anti-alias for Pie Graphs
Argument | Default | Description |
$aFlg
|
true
| true=enable anti-aliasing |
Description:
Enable/disable anti-alias for Pie Graphs. This makes for much nicer looking PieGraphs. Please note that enabling anti-alias imposes some restrictions:
- Enabling anti-alias will severely impact performance. As a rule of thumb you can expect drawing to take 5-8 times longer !
- You can't use background images or gradient backgrounds together with anti-alias
$piegraph->SetAntiAlias();
Set the background color. Synonym to SetMarginColor()
Argument | Default | Description |
$c
| | Color |
Description:
Set the background color. Synonym to SetMarginColor()
See also:
$piegraph->SetColor('gray');
// Method description
Argument | Default | Description |
$aStrokeFileName
|
""
| Filename |
Description:
Stroke the piegraph to the browser or to a specified file if specified. Works exactly the same as Graph::Stroke()
...
$piegraph->Stroke()
//---------------// CONSTRUCTOR
Argument | Default | Description |
$width
|
300
| Width of graph |
$height
|
200
| Height of graph |
$cachedName
|
""
| Cache file name |
$timeout
|
0
| Cache timeout in s |
$inline
|
1
| Should the image be inline. |
Description:
See Graph::Graph()
See also:
$piegraph = new PieGraph(300,400);