Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

simple graphs in php

pie chart



10:10 pm on Mar 9, 2007 (gmt 0)

5+ Year Member

any info on plotting simple pie charts or other graphs in php?

is there a keyword search incase i want to narrow topics down to some that may pertain to my question(the site search took me to google etc.. so i wsnt sure)


10:17 pm on Mar 9, 2007 (gmt 0)

10+ Year Member

Have you had a look at JpGraph? Maybe a bit much for what you need. Hotscripts also has quite a few "Graphs and Charts" scripts.


10:24 pm on Mar 9, 2007 (gmt 0)

5+ Year Member

Ty. Yes I've looked at jdgraph and your right.. it's abit complex for me right now... i have however just looked at your other suggestion and i think i'll play with hotscripts for now...
thanks alot!


12:19 am on Mar 10, 2007 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

i use a package called GD:Graph in perl.
you might look to see if there is php implementation or something similar.


10:02 pm on Mar 14, 2007 (gmt 0)

5+ Year Member

Hi again.. I'm really having a hard time creating a simple graph..unfortunately i'm restricted to jpgraph because that's what's on my work pc(the code is really high level for me as I'm just starting to learn php)... i simply need to create a bar or pie chart of a table similar to this below:

lobcod towns
rain 92
shine 5
thunder 131



10:20 pm on Mar 14, 2007 (gmt 0)

10+ Year Member

If youve had a google with the following key words "create graph php" you may have spotted this page:


This relies on the gd extension which should be available with php 4.3 upwards but no always enabled, run phpinfo() to see your settings or check the php.ini (look for extension extension=php_gd2.dll - or similar) file if you have access to it, which ever is easiest.

Altho pay heavy attention to the line which reads:

Watch the CPU load
You need to be aware of one important consideration when you create these graphics server-side: They're CPU intensive. If you place too many of these dynamic images on your Web site, you may find that you will incur a performance hit.

Think ill try put the above page to some use.

[edited by: PSWorx at 10:21 pm (utc) on Mar. 14, 2007]


12:34 am on Mar 15, 2007 (gmt 0)

10+ Year Member

Just remembered you said pie chart, google "pie chart php" theres quite a few solutions out there only you can decide which will be best, if you cant install additional modules/extensions for php and have to rely on gd/gd2 just bare in mind system load when running the scripts that produce the pie charts.


3:26 am on Mar 15, 2007 (gmt 0)

5+ Year Member

Thanks alot... will be back w more questions if i get stuck again..

Featured Threads

Hot Threads This Week

Hot Threads This Month