"Robert L. Yelvington" <[EMAIL PROTECTED]> writes:

> on 7/5/01 10:15 AM, Arcady Genkin at [EMAIL PROTECTED] wrote:
> > While taking a university course I needed to ``squash the competition'' by
> > hacking together quick bar-charts with PHP.  These are not very
> > sophisticated, but I liked my approach because they generate very
> > little graphics (read: fast downloads), and when you roll a mouse over
> > a bar, you get numeric value for it.  Have a look at:
> > http://www.thpoon.com/408/barchart.php
> > Input is taken from a text file.  If anyone is interested in the
> > source code, let me know and I'll release it.  The code is rather
> > trivial, though.
> They look very nice and usable...just the way i like 'em.
> I'd be interested in seeing the source code...you can reply directly to my
> email account if you like!  are you using a graphic package like GD? or are
> you using the 'poor mans bar graph' method using tables and percentage
> widths?

Each individual bar is generated with GD, and arranged in a table.
The images are stored in subdirectory "bars" (should be writeable to
Apache).  Each bar is given a name like bar_NNN.png, where NNN is its
height in pixels.  If a bar of a given name already exists, it is not

I never intended to release the code, so it has some stuff hard-coded,
like the number of columns and the colors, and not commented.
Shouldn't be hard to change, though.  Ideally the whole thing would be
organised in a class.

If anyone takes the time to rearrange the code, or improve it
otherwise, I'd like to see the results (although you don't really have

All functions are in a file "barchart.inc":
Example of using the functions are in this file:
Example input file is here:

Have fun,
Arcady Genkin
i=1; while 1, hilb(i); i=i+1; end

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to