PDA

View Full Version : What is best way to create simple graphs using php?



allene222
1st October 2007, 03:11 AM
I want to create a web application to graph some stock data (multiple up to 1000 point line graph). I have installed Image_Graph and GD. After much struggle, they are both working at least on simple examples. I don't see Image-Graph doing much over raw GD. GD looks simple but not very powerful. Image_Graph looks complex and not very powerful -- at least for the simple thing I want. Am I missing something?

That said, what is the best tool to use for a graphic application in php?

btw. I use my own data because nobody plots it correctly on the web. Nobody corrects for dividend distributions which just makes their graphs junk for some stocks and most mutual funds.

Thanks in advance,

Allen

bytesniper
1st October 2007, 04:15 AM
when i build a site that need graphs/charts i use php/swf charts. its incredible really. its got a free version that is missing a couple of options but nothing you can't work around. the learning curve for it is pretty high but one you understand it you can do some very impressive stuff. its actually a php library (class) that, based on the variables/values its fed, generates flash swf content for your graphs. i use it a lot and highly recommend it. (http://www.maani.us/charts/index.php)

if your looking for simple bar graphs using just css: http://www.terrill.ca/design/vertical_bar_graphs/

if thats not what your looking for let me know i got a couple others ive used in the past that are good, but ill have to look for them.

joseph

allene222
7th October 2007, 02:47 AM
Thanks for the reply. I wanted to close the loop here for the benefit of others who may have a similar question. I decided I needed something more than css bar charts and less than the variety of complex packages. I didn't want a flash chart but rather a simple way to make a graph of lots of data. My finished site has 5 lines of 1000 points. Anyway, I just used GD as it is without any other program. There were some good tutorials that got me started by drawing a grid and I just expanded that code and have my application. I have complete control of my graph space and it does what I want. It is dead simple to understand because all I am doing is drawing lines and printing text.

So, I am no expert but I would say nobody should be afraid of just using GD to do a simple graphing job.

Allen



when i build a site that need graphs/charts i use php/swf charts. its incredible really. its got a free version that is missing a couple of options but nothing you can't work around. the learning curve for it is pretty high but one you understand it you can do some very impressive stuff. its actually a php library (class) that, based on the variables/values its fed, generates flash swf content for your graphs. i use it a lot and highly recommend it. (http://www.maani.us/charts/index.php)

if your looking for simple bar graphs using just css: http://www.terrill.ca/design/vertical_bar_graphs/

if thats not what your looking for let me know i got a couple others ive used in the past that are good, but ill have to look for them.

joseph