There are a few ways to go about this:

You could:

1) Use little image blocks to dynamically build bar graphs. It's not too
hard with PHP. Make some little square (or round or whatever) gifs (with
transparent edges), and then position them on a background JPEG or gif using
DIV tags. Make an object in PHP and feed your query results into it?

2) Use the gd library and graphics commands added in PHP 4 (you're gonna
want to read up on this one...) to create images dynamically. This is much
more server-intensive than option #1. and takes more programming, but can be
really slick. Then you can draw all sorts of graphs - not just bar graphs or
scatterplots. Wheee.

3) Combining Java and PHP and MySQL to draw images is also totally possible.
I avoided this approach because it's all client-side. There is also an
example of this in the JDK from Sun, and it works pretty well, but is a
little buggy. Maybe it was my code, maybe it's Java, but it seemed
incomplatible across platforms. Make an object in PHP that creates the
necessary JavaScript, and feed your query results into it.

4) Program some really slick ascii graphs. No joke, I did this a while ago.
Nice output. Really fast. You can do line graphs, too.

Cheers,
db

Denny Ow wrote:

> Hi,
>
> Jus wanna to ask if it is possible to use php to plot graph using data
> retrieve from mysql. If yes, how should i go about?
>
> Thanks,
> Denny
>
> --
> PHP Database 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]

--
----------
Dan Barton
Terrestrial Program Biologist
Asst. Data Manager
Point Reyes Bird Observatory
http://www.prbo.org
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-- 
PHP Database 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