line graph

2D/3D Horizontal Bar Graph for PHP

[ Graph Home ] [ Set-Up ] [ Tutorials ] [ Documentation ] [ Buy Now ] [ Support ]

2D/3D Horizontal Bar Graph 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: ,
backgroundcolor Color definition (see Colors»)
general background color of the graph image
backgroundcolor: white
outline True or False
determines whether bars should be outlined or not
outline: true
gradientfill True or False
turns the gradient fill effect on or off
gradientfill: true
barwidth integer value
width in pixels of each bar
barwidth: 30
barspacing integer value
space in pixels between each bar
barspacing: 0
displaybarvalues True or False
specifies whether actual values should be displayed at the top of each bar
displaybarvalues: false
bgimage URL to an Image file
specifies an image to used as the background
bgimage: brimage.gif



«back to top

Grid Properties
Parameter Name Range of Values Example
grid True or False
specifies whether to draw grid lines or not
grid: true
axis True or False
specifies whether to draw axis lines or not
axis:
nrows integer value
number of grid rows
nrows: 10
hspace integer value
space in pixels of each grid row
vspace: 30
gridstyle

valid values are:-

solid
dashed
dotted
long dashed
dotted dashed

specifies the line style of the grid lines

gridstyle: dotted
gridcolor Color definition (see Colors»)
Grid line color
gridcolor: #888888
axiscolor Color definition (see Colors»)
Axis line color
axiscolor: #000000
floorcolor Color definition (see Colors»)
If 3D is on then this specifies the color of the x-axis floor
floorcolor: #555599
gridbgimage URL to an Image file
specified an image to used as the grid background
gridbgimage: brimage.gif
gridbgcolor Color definition (see Colors»)
the background color of the grid area
gridbgcolor: light grey
gridposition an x,y, position
specifies the position of the bottom left of the grid
gridposition: 30,275
gridlineh True or False
specifies whether to draw horizontal grid lines or not
gridlineh: false
gridlinev True or False
specifies whether to draw vertical grid lines or not
gridlinev: false
gridbgcolor2 Color definition (see Colors»)
specifies a second background color of the grid area. If this parameter is specified then grid rows are colored alternating between this color and gridbgcolor
gridbgcolor2: grey

 

«back to top

Scale Properties

AutoScale function.
If any of the following scale parameters are not supplied the the graphing software will automatically calculate the scale from the data supplied. Therefore if you would like the scale to be calculated automatically then simply ommit the following parameters from the configuration.

Parameter Name Range of Values Example
chartscale Numeric Value
specifies the value the each grid row is to represent on the bottom x-axis
chartscale: 1000
chartstarty Numeric Value
specifies the starting value of the bottom x-axis
chartstarty: 0
chartscale2 Numeric Value
specifies the value the each grid row is to represent on the top x-axis
chartscale2: 20
chartstarty2 Numeric Value
specifies the starting value fot the top x-axis
chartstarty2: 500

 

«back to top

3D Properties
Parameter Name Range of Values Example
3d True or False
determines whether the graph should be 3D or 2D
3d: true
depth3d Integer Value
specifies the depth in pixels of the 3D effect
depth3d: 20

 


«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

Y-Axis Labels
Parameter Name Range of Values Example
yfont

Font Definition :-

small
medium
medium bold
large
large bold

 

yfont: medium bold
ylabelcolor Color definition (see Colors»)
y-axis label text color
ylabelcolor: blue
ylabels List of labels seperated by | character. ylabels: Jan|Feb|Mar|Apr|May|



«back to top

X-Axis Labels
Parameter Name Range of Values Example
xlables True or False
determines whether x-axis labels should be drawn or not
xlables: true
xfont

Font Definition :-

small
medium
medium bold
large
large bold

xfont: medium
xlabelcolor Color definition (see Colors»)
left hand y-axis label text color
xlabelcolor: black
x2labelcolor Color definition (see Colors»)
top x-axis label text color
x2labelcolor: red
xlabelpre Character or Text
leading character or text for each bottom axis label
xlabelpre: $
xlabelpost Character or Text
trailing character or text for each bottom axis label
xlabelpost: kph
x2labelpre Character or Text
leading character or text for each top axis label
x2labelpre: £
x2labelpost Character or Text
trailing character or text for each top axis label
x2labelpost: Kg



«back to top

Graph Titles

 

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
 
xtitletext Text
x-axis title
xtitletext: X Title
xtitlefont

Font Definition :-

small
medium
medium bold
large
large bold

xtitlefont: medium bold
xtitlecolor Color definition (see Colors»)
text color
xtitlecolor: blue
xtitleposition X,Y Position
position of the bottom x-axis title
xtitleposition: 150,350
 
ytitletext Text
y-axis title
ytitletext: Left Y Title
ytitlefont

Font Definition :-

small
medium
medium bold
large
large bold

ytitlefont: medium bold
ytitlecolor Color definition (see Colors»)
text color
ytitlecolor: dark green
ytitleposition X,Y Position
position of the y-axis title
ytitleposition: 10,150
 
x2titletext Text
top x-axis title
x2titletext: Right Y Title
x2titlefont

Font Definition :-

small
medium
medium bold
large
large bold

x2titlefont: medium bold
x2titlecolor Color definition (see Colors»)
text color
x2titlecolor: red
x2titleposition X,Y Position
position of the top x-axis title
x2titleposition: 300,150

 

«back to top

Series Specifications

Three parameters may be supplied for each series of data. These are:-

Bar Color
Legend Text
Y-axis scale (top or bottom)

The format of the series parameter is:-

seriesN: color | text | scale |

where N represents the series number

For example if there are 2 series of data with the first using the bottom scale and the second using the top scale, the series parameter would be:-

 

series1: pink|Series One|bottom|
series2: blue|Series Two|top|

For more further information on the color element please see Colors»

 

«back to top

Target Lines

Any number of horizontal target line may be added to the chart with the parameter "target".

The target parameter is made up of 6 elements:-

value
color
text
font
line style
x-axis scale (top or bottom)

The format of the target line parameter is:-

target: value | color | text | font | line Style | scale|

For more on color defintions see Colors»

The font defintion can be one of:-

small
medium
medium bold
large
large bold

The line style can be one of:-

solid
dashed
dotted
long dashed
dotted dashed

For example to set a target line at a value of 1000 on the chart,

target: 1000|green|Break Even|medium|dashed|bottom|

 

«back to top

Trend Lines

Any number of trend lines may be added to the chart with the parameter "trend".

The trend parameter is made up of 9 elements:-

start value
start column
end value
end column

color
text
font
line style
x-axis scale (top or bottom)

The format of the target line parameter is:-

trend: start value|start column|end value|end column|color|text|font|line Style|scale|

For more on color defintions see Colors»

The font defintion can be one of:-

small
medium
medium bold
large
large bold

The line style can be one of:-

solid
dashed
dotted
long dashed
dotted dashed

For example to set a trend line starting at a value of 1000 in column 2 and ending at a value of 1550 in column 6,

trend: 1000|2|1550|6|green|Up Trend|medium|dashed|bottom|

 

«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:-

image: logo.png|5,5|

 

«back to top

« back to Getting Started
[ Graph Home ] [ Set-Up ] [ Tutorials ] [ Documentation ] [ Buy Now ] [ Support ]

How it Works »

How the graphing software works.

Quick Set-Up and Install »

step-by- step guide to add graphing for your site.

Tutorials »

Introducing many powerful features.

Licensing and Purchase Options »

Click the 'Buy & Download' button to review options.

buy and download horizontal bar graph for php

Documentation »

Full documentation

Help and Support »

If at any stage you require help or advice then please feel free to ask.

Contact us here »