include('textgraph.class');
Next, the class must be initialised :
$textgraph = New TextGraph;
The height (in lines of text) can be set at any time before the graph is displayed :
The values of the columns (as integers) must be set before the column names are. This saves having to manually set how many columns the graph will have :
Now the column names must be set after the column values are :
Finally we draw the graph :
The results of the above code can be seen below :
include('textgraph.class');
$textgraph = New TextGraph;
$textgraph->SetHeight(10);
$textgraph->SetColValues(array('123','244','223','114','50'));
$textgraph->SetColNames(array('one','two','three','four','five'));
$textgraph->Draw();
?>
To see a live version of the graph you can check out a horribly tacky stats page I have done for my website at http://wwww.atari.co.uk/newstats.html
Have fun !
All scripts and web pages (c) Tom Buck 1999.
$textgraph->SetHeight(10);
$textgraph->SetColValues(array('123','244','223','114','50'));
$textgraph->SetColNames(array('one','two','three','four','five'));
$textgraph->Draw();
License
This little script comes under the terms of the my license which consists of this :
This script is copyright (c) Tom Buck 1999.
It may be distributed freely as long as no fees are exchanged and this documentation is included.
The script may not be sold commercially, but may be freely used.
You may alter this script as you see fit but any derivatives of it must be referenced to me and may not be sold.