RE: [PHP-DB] Use php to plot graph.

2001-12-03 Thread matt stewart

yes, it is possible - read up on the .PNG image format, as it is possible to
create graphs ind images dynamically to suit the data and figures youve
extracted from the database

-Original Message-
From: Denny Ow [mailto:[EMAIL PROTECTED]]
Sent: 03 December 2001 16:14
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Use php to plot graph.


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]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.303 / Virus Database: 164 - Release Date: 24/11/01
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.303 / Virus Database: 164 - Release Date: 24/11/01
 

-- 
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]




RE: [PHP-DB] Use php to plot graph.

2001-12-03 Thread Leotta, Natalie (NCI/IMS)

I'm working on a project right now where we call PHP from within an HTML
page, send it vars using a POST method, and then use that to draw a graph.
We're drawing bar graphs now but one of my coworkers did a line graph.  You
call the PHP as an img src tag and have PHP return a .png.  We used the
SAMS Teach Yourself PHP4 in 24 Hours book - it's Hour 14 where you do all
sorts of stuff with images.

It's not easy - you draw each line based on the endpoints and you can fill
rectangles and stuff, but the end result can be pretty impressive.

I'd send you my graph but it's on a development website that's password
protected.  If you're really interested I could save the image and download
it to you.

-Natalie

 -Original Message-
 From: Denny Ow [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, December 03, 2001 11:14 AM
 To:   [EMAIL PROTECTED]
 Subject:  [PHP-DB] Use php to plot graph.
 
 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]

-- 
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]




Re: [PHP-DB] Use php to plot graph.

2001-12-03 Thread Daniel Barton

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]




Re: [PHP-DB] Use php to plot graph.

2001-12-03 Thread Jason Wong

On Tuesday 04 December 2001 00:14, 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?

Check out the graphics section of http://www.phpclasses.upperdesign.com/. 
It's got some neat classes for creating graphs.

regards
-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Under deadline pressure for the next week.  If you want something, it can 
wait.
Unless it's blind screaming paroxysmally hedonistic...
*/

-- 
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]