• Welcome to Computer Association of SIUE - Forums.
 

PHP/HTML and Circle Graphs

Started by Michael Kennedy, 2002-09-01T17:31:30-05:00 (Sunday)

Previous topic - Next topic

Michael Kennedy

I have a question for those of you familari with PHP/HTML.  I'm working on a set of pages for work and one thing I'd ike to be able to do is create a circle graph to compare what departments order the most, etc.  Does anyone have an idea how to begin generating a circle graph for this type of thing?  I can do bar graphs just fine (put white 20x20 jpegs down until I work my way down to real data).  I'm having trouble coming up with a forula to do the same with a cicle graph.  I'm not opposed to laying down individual 1x1 jpegs to generate it either.

Any suggestions are welcome.  I scanned php.net and couldn't find any easy methods, but that doesn't mean I missed something.

Thanks.
"If it ain't busted, don't fix it" is a very sound principal and remains so despite the fact that I have slavishly ignored it all my life. --Douglas Adams, "Salmon of Doubt"

Jim Sodam

I'm sure there are PHP functions already written for drawing different type of graphs.  Quick search on google should give some.  If not php has built in image generation functions.

Michael Kennedy

I was hoping to make my own system from scratch, but after examining my time frame on the whole project I'm going to use someone else's GPL'ed code for now and try it later.  So, I kinda jumped the gun posting here.  

Also, even if PHP has image henerating functions it was still going to take quite a bit of Trig to decide what pixels get what color- that was going to be the majority of the problem for me.  Getting the equations into PHP was the simple part.  

Thanks for the reply.
"If it ain't busted, don't fix it" is a very sound principal and remains so despite the fact that I have slavishly ignored it all my life. --Douglas Adams, "Salmon of Doubt"

Peter Motyka

I recall the Orielly "Programming PHP" having a nice section on generating graphics with PHP.  I didnt get into it much, but I did give it a skim.  Perhaps you could graze at border's for an evening and see if the book has what you need.

Peter
SIUE CS Alumni 2002
Grad Student, Regis University
Senior Engineer, Ping Identity
http://motyka.org