Graphing Module

The following Graphs are all PHP based utilising the GD Graphics Libraries and are distributed under the GNU Genreal Public License. You will need to have downloaded and installed these Libraries on your system for any of the following graphs to work. The GD Graphics Library is a free download to use. As are the graphs available on this page.

Other than these files you'll need a True Type Font (TTF) to reference for the text to look correct. The TTF will need to be placed in a specific directory on your server and referenced directly from the script (for example " /home/www/somewhere/fonts/arial.ttf"). The scripts currently contain a bogus file reference so this will need to be changed for text to appear. After changing this if no text appears, it's more likely that the font has not been found than no text being displayed (on the occasion that some items are not passed such as title, a default title will be used.so almost always some text will be viewable on the graph, with no font found it can't render the text at all).

These files were created as I needed a slightly faster way of producing graphs than other options available on the web. Other PHP scripts using the GD Libraries seem to be so complicated they take too long to draw and display on a poor performance machine.

Downloads:

chartfiles.zip (18KB)

Usage:

Each of the above downloads is to be referenced as an image in the PHP script, for example, the graphs below are referenced with:

<img src="barchart.php" width="400" height="300">
<img src="linechart.php" width="400" height="300">
<img src="linechart3d.php" width="400" height="300">
Graphs: