Computer Association of SIUE - Forums

CAOS Forums => Technical Knowledge => Topic started by: Michael Kennedy on 2002-09-01T17:31:30-05:00 (Sunday)

Title: PHP/HTML and Circle Graphs
Post by: Michael Kennedy on 2002-09-01T17:31:30-05:00 (Sunday)
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.
Title: Re:
Post by: Jim Sodam on 2002-09-01T19:01:25-05:00 (Sunday)
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.
Title: Re:
Post by: Michael Kennedy on 2002-09-02T01:51:07-05:00 (Monday)
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.
Title: Re: PHP/HTML and Circle Graphs
Post by: Peter Motyka on 2002-09-02T02:51:29-05:00 (Monday)
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