[
Chart Home ] [ Set-Up
] [ Tutorials ] [
Documentation
] [
Buy Now ] [
Support ] |
2D/3D
Pie Chart for PHP
Documentation
- Full Parameter Reference
|
 |
|
There are many configurable options
for the graphing software. This section describes
each parameter and it's effect in detail.
With the exception of 2 parameters,
all of the following are optional and if not supplied
the graph will automatically calculate the values.
The only 2
parameters which must be supplied in all cases
are width and height.
|
General Graph
Properties |
Parameter Name |
Range of Values |
Example |
width |
integer value
Specifies the width in pixels |
width: 300 |
height |
integer value
Specifies the height in pixels |
height: 400 |
ndecplaces |
integer value
Specifies the number of decimal places to use when displaying values |
ndecplaces: 2 |
thousandseparator |
Any character symbol. |
thousandseparator: , |
pecentndecplaces |
integer value
Specifies the number of decimal places to use when displaying percentage values |
percentndecplaces: 0 |
backgroundcolor |
Color definition (see Colors»)
general background color of the graph image |
backgroundcolor: white |
displayvalues |
True or False
specifies whether actual values should be displayed at the top of each point |
displayvalues:
false |
quality |
Valid values are:-
low
medium
high
very high
The specifies how much image processing is to be applied in order to 'smooth-out' the pie segments.
( only available if the PHP environment is running with GD 2 or higher)
more info»
|
quality: medium |
bgimage |
URL to an Image file
specifies an image to used as the background |
bgimage: brimage.gif |
«back to top
|
|
Segment Label Properties |
Parameter Name |
Range of Values |
Example |
segmentlabels |
True or False
specifies whether to segment labels or not |
segmentlabels: true |
segmentlabelfont |
Font Definition :-
small
medium
medium bold
large
large bold
|
segmentlabelfont: medium |
segmentlabelcolor |
Color definition (see Colors»)
label text color |
segmentlabelcolor: blue |
displaypercentages |
True or False
specifies whether to add percentage figures to the segment labels or not |
displaypercentages: true |
labellines |
True or False
specifies whether to draw a line from the segment to the label or not |
labellines: true |
valuepresym |
Character or Text
leading character or text for each segment label
|
valuepresym: $ |
valuepostsym |
Character or Text
trailing character or text for each segment label |
valuepostsym: Kg |
«back to top
|
|
Pie Properties |
Three parameters may be supplied for each pie on the chart. These are:
Center Position - x,y pixel co-ordinate of the pie center
Pie Size -diameter in pixels of the pie
Segment Seperation - if an exploded pie is required then this value represents the seperation in pixels
of the segments.
The format of the pie parameter is:-
pieN: position | size | seperation | |
where N represents the pie / series number
For example if there are 2 series of data (ie 2 pies) the pie parameters would be:-
pie1: 100,100|100|0|
pie2: 300,100|75|20|| |
«back to top
|
|
Segment Properties |
Two parameters may be supplied for each pie segment. These are:
Segment Color - x,y pixel co-ordinate of the pie center
Legend Label -diameter in pixels of the pie
Segment definitions are common to all pies on the chart.
The format of the segment parameter is:-
segmentM: color | legend label | |
where M represents the segment number
For example if there are 5 segements on each pie (ie 5 data values in each series) the segment parameters would
be:-
segment1: red|label 1|
segment2: red|label 2|
segment3: red|label 3|
segment4: red|label 4|
segment5: red|label 5| |
«back to top
|
|
3D Properties |
Parameter Name |
Range of Values |
Example |
3d |
True or False
determines whether 2D or 3D pies should be drawn. |
3d: true |
depth3d |
Integer Value
specifies the depth in pixels of the 3D effect |
depth3d: 20 |
3dangle |
Integer value between 0 and 90
Specifies the angle (in degrees) in the z-plane of the 3d effect. A value of 40 generally produces good
results. |
3dangle: 40 |
«back to top
|
|
Legend Properties |
Parameter
Name |
Range
of Values |
Example |
legend |
True or False
determines whether the graph legend
should be drawn or not |
legend:
true |
legendstyle |
horizontal or vertical
specifies whether the legend should
be horizontal or vertical |
legendstyle:
horizontal |
legendbgcolor |
Color definition
(see
Colors»)
background color of the legend
area |
legendbgcolor:
white |
legendbordercolor |
Color definition
(see
Colors»)
border color of the legend |
legendbordercolor:
light blue |
legendtextcolor |
Color definition
(see
Colors»)
text color of the legend |
legendtextcolor:
black |
legendtitle |
Text
legend title. leave blank if no
title required. |
legendtitle:
The Legned |
legendposition |
X,Y position
position of the legend. |
legendposition:
50,50 |
legendfont |
Font Definition :-
small
medium
medium bold
large
large bold
|
legendfont:
medium |
«back to top
|
|
Graph Title |
Parameter Name |
Range of Values |
Example |
titletext |
Text
Main graph title |
titletext: Graph Title |
titlefont |
Font Definition :-
small
medium
medium bold
large
large bold
|
titlefont: large bold |
titlecolor |
Color definition (see Colors»)
text color |
titlecolor: purple |
titleposition |
X,Y Position
position of the title |
titleposition: 100,20 |
Additional Text may be added to the graph image using the "Free Form Text"
parameters.
«back to top
|
|
Free Form
Text |
In addition to the standard titles,
any number of lines of text may be
added to the graph using the "text"
parameter.
The text parameter is consists of
4 elements:-
text
font
color
position
The format of the text parameter
is:-
text:
text | font | color | position
| |
For more on color defintions see
Colors»
The font defintion can be one of:-
small
medium
medium bold
large
large bold
For example if 3 lines of text were
to be added the following parameters
would be included in the configuration:-
text:
line one of text|medium|#000000|50,50|
text: line two of text|medium|#000000|50,65|
text: line three of text|medium|#000000|50,80|
|
«back to top
|
|
Free Form
Images |
Any number of images may be added
to the graph using the "image"
parameter.
The image parameter is consists of
2 elements:-
URL or Filename
of an image file
position
The format of the image parameter
is:-
image:
URL or filename | position | |
For example if an image "logo.png"
was to be drawn on the graph image
then the following parameter would
be included in the configuration:-
«back to top
|
|
|
|
|
[
Chart Home ] [ Set-Up
] [ Tutorials ] [
Documentation
] [
Buy Now ] [
Support ] |
|
|