CLASS PieGraph EXTENDS Graph
(Defined in: jpgraph_pie.php : 1117)
 PieGraph  Graph 
 Add() 
 PieGraph() 
 SetAntiAliasing() 
 SetColor() 
 Stroke() 
Add() 
 AddBand() 
 AddLine() 
 AddText() 
 AddY() 
 AddY2() 
 AdjBackgroundImage() 
 AdjImage() 
 CheckCSIMCache() 
 GetHTMLImageMap() 
 Graph() 
 Set3DPerspective() 
 Set90AndMargin() 
 SetAlphaBlending() 
 SetAngle() 
 SetAxisLabelBackground() 
 SetAxisStyle() 
 SetBackgroundCFlag() 
 SetBackgroundCountryFlag() 
 SetBackgroundGradient() 
 SetBackgroundImage() 
 SetBackgroundImageMix() 
 SetBox() 
 SetClipping() 
SetColor() 
 SetFrame() 
 SetFrameBevel() 
 SetGridDepth() 
 SetIconDepth() 
 SetImgFormat() 
 SetMargin() 
 SetMarginColor() 
 SetScale() 
 SetShadow() 
 SetTextScaleAbsCenterOff() 
 SetTickDensity() 
 SetTitleBackground() 
 SetTitleBackgroundFillStyle() 
 SetY2OrderBack() 
 SetY2Scale() 
 SetYDeltaDist() 
 SetYScale() 
Stroke() 
 StrokeCSIM() 
 StrokeFrameBackground() 
 

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

 

 

function Add($aObj)
Add object to the pie graph

ArgumentDefaultDescription
$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.  

Example

$piegraph = new PieGraph(300,400);
$pieplot = new PiePlot($ydata);
$piegraph->Add($pieplot);

 

 

function PieGraph($width,$height,$cachedName,$timeout,$inline)
//---------------// CONSTRUCTOR

ArgumentDefaultDescription
$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
Graph::Graph

Example

$piegraph = new PieGraph(300,400);

 

 

function SetAntiAliasing($aFlg)
Enable/disable anti-alias for Pie Graphs

ArgumentDefaultDescription
$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:  

Example

$piegraph->SetAntiAlias();

 

 

function SetColor($c)
Set the background color. Synonym to SetMarginColor()

ArgumentDefaultDescription
$c  Color

Description
Set the background color. Synonym to SetMarginColor() 
 
See also
Graph::Graph

Example

$piegraph->SetColor('gray');

 

 

function Stroke($aStrokeFileName)
// Method description

ArgumentDefaultDescription
$aStrokeFileName "" Filename

Description
Stroke the piegraph to the browser or to a specified file if specified. Works exactly the same as Graph::Stroke()  

Example

...
$piegraph->Stroke()