views:

519

answers:

8

I'm about to start working on a PHP application that allows a user to track their progress on a day to day basis.

I'm looking for a good graphing library, preferably PHP and or Javascript (JQuery would be good) which will allow me to name each bar on a bar graph with a date (10 Feb, 11 Feb, 12 Feb, etc.) probably on it's side or at a 45 degree angle, or something that will have the day number at the bottom of each bar with the month under the 1st of each month) The time span for each graph will be range from 1 - 3 months, but if there is something that can handle larger time frames that would be good too.

I'm assuming this is a common problem, and that there is a common best practice way to do this. I'd prefer to use bar charts rather than an line graph (like stack over flows reputation tracker)

Any ideas? I've looked at JpGraph and Graphpite and neither of them look very nice. I don't mind one that is flash integrated, so long as I can feed it data from my php script.

A: 

This question is specifically about ASP.NET, so may not be relevant, but there might be something useful in there:

http://stackoverflow.com/questions/82345/charting-in-web-based-applications/82386

Also, I used ChartDirector in PHP and loved it. It's not free, but it's incredibly full-featured and has awesome support.

Ben
+6  A: 

Look at Google Charts. Easy to use and readily available.

http://code.google.com/apis/chart/

cdonner
+1  A: 

We use JPGraph, which does all sorts of graphs and charts and spits out JPG images.

Jeremy DeGroot
A: 

http://code.google.com/apis/chart/

vartec
+1  A: 

If you're looking for something a little fancy then take a look at PHP/SWF charts. I've used it on a couple of "financial" sites and it works quite well and is fairly easy to implement.

http://www.maani.us/charts/index.php

cOle2
+1  A: 

http://pchart.sourceforge.net/

Barrett Conrad
+1  A: 

I've used both flot (for jquery) and flotr (for prototype). Both are pure js graphing libraries. I've personally never used them for bar charts, but they both have examples of how to use their APIs to generate bar charts, so I think you should be able to use either one to accomplish what you need.

nstehr
+1  A: 

I'd second the recommendation for ChartDirector, fantastic product that is really flexible. Sometimes it isn't always that obvious how to achieve what you want but the forums on their site are manned by the excellent Peter Kwan who has always been able to point me in the right direction.

As mentioned it isn't free but is pretty cheap.

I've only used the .net version but my understanding is that all versions are functionally identical.

DaveEHS