Class PiePlot3D Extends PiePlot
(Defined in: jpgraph_pie3d.php : 17)

PiePlot3D | PiePlot
Add3DSliceToCSIM() SetAngle() SetCSIMTargets() SetEdge() SetHeight() SetLabelMargin() SetLabels() SetLegends() SetSliceColors() SetStartAngle() __construct() | Explode() ExplodeAll() ExplodeSlice() SetCenter() SetColor() SetCSIMTargets() SetGuideLines() SetGuideLinesAdjust() SetLabelPos() SetLabels() SetLabelType() SetLegends() SetShadow() SetSize() SetSliceColors() SetStartAngle() SetTheme() SetValueType() ShowBorder() __construct()

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

PiePlot3D ::
Add3DSliceToCSIM($i, $xc, $yc, $height, $width, $thick, $sa, $ea)
//("PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees.");

Argument | Default | Description
--- | --- | ---
$i |  | No description available
$xc |  | No description available
$yc |  | No description available
$height |  | No description available
$width |  | No description available
$thick |  | No description available
$sa |  | No description available
$ea |  | No description available

Description:
No description available.

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

Argument | Default | Description
--- | --- | ---
$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);

PiePlot3D ::
SetCSIMTargets($aTargets, $aAlts, $aWinTargets)
Specify URL for each slice for the image map

Argument | Default | Description
--- | --- | ---
$aTargets |  | No description available
$aAlts | '' | No description available
$aWinTargets | '' | No description available

Description:
Specify URL for each slice for the image map

Example:

$targets = array('nextimage.php?1', 'nextimage.php?2', 'nextimage.php?3');
// Show the actual value in the alt text when user hovers the
// cursor over the slice
$alts = array('More details..(%.1f)', 'More details..(%.1f)', 'More details..(%.1f)' );
$pie->SetCSIMTargets($targets,$alts);

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

Argument | Default | Description
--- | --- | ---
$aColor | 'black' | 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);

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

Argument | Default | Description
--- | --- | ---
$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);

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

Argument | Default | Description
--- | --- | ---
$m |  | Margin in pixels

Description:
Specify the distance from the pie to the labels

Example:

$pieplot3d->SetLabelMargin(20);

PiePlot3D ::
SetLabels($aLabels, $aLblPosAdj)
Specify slice labels for 3D pies

Argument | Default | Description
--- | --- | ---
$aLabels |  | Label arrays
$aLblPosAdj | "auto" | Label position [0.2- 1]

Description:
Specify slice labels for 3D pies. Positoin specify the fraction of the radius wher the labels should be positoined. A values of 1 will position the labels outside the pie.

The labels may include an optional sprintf() formatting string. Before stroking the label to the graph it will be formatted with the actual value (absolute or percentage) depending on what has been specified with the SetLabelType() method.

See also:

- PiePlot::SetLabelType()

Example:

// Specify explicit labels and position them outside the pie
$p1->SetLabels(array("Jan\n%.1f%%","Feb\n%.1f%%","Mar\n%.1f%%","Apr\n%.1f%%"),1);

PiePlot3D ::
SetLegends($aLegend)
Set legends for slices

Argument | Default | Description
--- | --- | ---
$aLegend |  | Array of legends

Description:
Set legends for slices

Example:

$plot->SetLegends(array('Jan','Feb','Mar','Apr');

PiePlot3D ::
SetSliceColors($aColors)
Specify color of the individual slices

Argument | Default | Description
--- | --- | ---
$aColors |  | Array of colors

Description:
Specify color of the individual slices. If there are more slices than colors then the colors will wrap around.

Example:

$pieplot->SetSliceColors(array('red','blue','green','navy','orange'));

PiePlot3D ::
SetStartAngle($aStart)
Specify start angle for first slice in the Pie

Argument | Default | Description
--- | --- | ---
$aStart |  | Start angle (in degrees)

Description:
Specify the start angle in degrees for the first slice in the Pie. Angles are counted counter-clockwise starting at "3'clock".

Example:

$pieplot->SetStartAngle(45);

PiePlot3D ::
__construct($data)
//---------------// CONSTRUCTOR

Argument | Default | Description
--- | --- | ---
$data |  | No description available

Description:
No description available.