creating graph in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
zplits
Forum Contributor
Posts: 158
Joined: Sun Aug 03, 2008 8:59 pm

creating graph in PHP

Post by zplits »

Hi everyone, good day. Does anyone know how to create a graph or chart in php?
please help me
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: creating graph in PHP

Post by onion2k »

zplits wrote:Hi everyone, good day. Does anyone know how to create a graph or chart in php?
I can think of lots of ways of going it...

Create an image using GD ... JPGraph is a good library for that.
Create an image using Flash ... Something like http://teethgrinder.co.uk/open-flash-chart-2/ is a pretty good option.
Create an Canvas chart with Javascript ... http://code.google.com/p/flot/ is a good option if you use jQuery.
Create a graph using CSS or tables ... very easy but there aren't many libraries around.

It really depends on your data and what sort of graph you need to create.
User avatar
zplits
Forum Contributor
Posts: 158
Joined: Sun Aug 03, 2008 8:59 pm

Re: creating graph in PHP

Post by zplits »

Thanks sir onion2k, what will be the easiest way to create graphs?
It really depends on your data and what sort of graph you need to create.
the graph that i'll be creating would be, bar, pie and line graphs. And the data that i want to be displayed in the graph are "Total Sales" and "Total Expense".

Thanks for helping me.
Post Reply