CLASS PiePlot3D EXTENDS PiePlot
(Defined in: jpgraph_pie3d.php : 25)
 PiePlot3D  PiePlot 
 PiePlot3d() 
 SetAngle() 
 SetEdge() 
 SetHeight() 
 SetLabelMargin() 
 Explode() 
 ExplodeAll() 
 ExplodeSlice() 
 PiePlot() 
 SetCenter() 
 SetColor() 
 SetCSIMTargets() 
 SetFont() 
 SetFontColor() 
 SetLabelPos() 
 SetLabels() 
 SetLabelType() 
 SetLegends() 
 SetShadow() 
 SetSize() 
 SetSliceColors() 
 SetStartAngle() 
 SetTheme() 
 SetValueType() 
 ShowBorder() 
 

Class usage and Overview
A 3D pie plot is much like a normal pie plot but in a 3D setting. You can control the apperance by specifying the angle of attack for the pie. A small angle show a very "flat" pie while a large angle shows almost a 2D pie. Please note that a 3D pie is much more CPU intensive to draw then the normal pie. To reduce the time you might want to keep the height of the pie as small as you think looks good. The height has a direct linear impact on how long it takes to draw a 3D pie. (See SetHeight()). To view a 3D pieplot you start by constructing a PieGraph() and then adding a numerb of constructed PiePlot3D to this graph.

 

See also related classes:
PieGraph and PiePlot

 


Class Methods

 

 

function PiePlot3d(&$data)
Construct a new 3D pie plot

ArgumentDefaultDescription
&$data  Data array for slices

Description
This creates a new pie plot using the data supplied. This plot can then be added to the pie graph. 

Returns
Object. Pie 3D plot

Example

$pieplot3d = new PiePlot3d($ydata);

$piegraph->Add($pieplot3d);

 

 

function SetAngle($a)
Specify projection angle for 3D in degrees.

ArgumentDefaultDescription
$a  Projection angle in degrees

Description
Specify projection angle for 3D in degrees. Must be between 10 and 80 degrees. A small angle will make the pie very flat and a large angle will make it present much more of pie circle. 

Example

$pieplot->SetAngle(45);

 

 

function SetEdge($aColor,$aWeight)
Add a line around pie slices

ArgumentDefaultDescription
$aColor  Color for line
$aWeight 1 Width of line

Description
Specify if the slices should be separated by a line? If color is specified as "" no line will be used to separate pie slices. Default is to not show any lines. 

Example

$pieplot3d->SetEdge('blue',1);

 

 

function SetHeight($aHeight)
Specify thickness of the 3D pie plot

ArgumentDefaultDescription
$aHeight  Height in pixels

Description
Specify thickness of 3D pie plot. To minimize CPU usuage you should try to keep the thickness to the visual accepatble minimum. 

Example

$pieplot->SetHeight(20);

 

 

function SetLabelMargin($m)
Specify the distance from the pie to the labels

ArgumentDefaultDescription
$m  Margin in pixels

Description
Specify the distance from the pie to the labels 

Example

$pieplot3d->SetLabelMargin(20);