Jump to content

PHP and MySQL Graphing options? Recommendations....


mdemetri2

Recommended Posts

Hi, I have tried a few times to look into something that will allow me to pull data from mysql database to produce charts on a site that is currently coded in PHP, but quickly loose the plot when I come across the need to install library's on the server running the site - which I have access to but would need step by step instructions on what to do. Also, I have looked into some dreamweaver plugins but not quite done what I needed. 

 

So, can anyone recommend something that is fairly straightforward to implement and then configure to create the charts??

 

Many thanks

Demetri 

You can use the GD library to create images however you want. There are a few libraries out there that provide graphing functions; Here is one:

http://pchart.sourceforge.net/

 

Or, you could generate the graph in HTML and have the client render it. Here is a tutorial on graphing using the canvas tag:

http://www.html5canvastutorials.com/labs/html5-canvas-graphing-an-equation/

hmmm, ok taken a look at these. I think I'm leaning towards potentially using baaChart....but I have no clue how to configure it....so if I have a set data from a query (recordset in dreamweaver) how do I implement this being plotted? sorry, fairly new to all this I don't quite get the use of classes......

You need the baaChart php file on you server so you can include it.

 

As with any dynamic image file the code needs to be in its own file (say mychart.php) and you place it on the page with an image tag

 

<img src="mychart.php" />

 

There is a tutorial in the user guide. If you get stuck PM me

A completely different approach would be to use Flotr - it's a JavaScript library for graphing. It's one of the prettiest I've seen :)

 

http://www.solutoire.com/experiments/flotr/examples/basic-axis.html

 

 

You could very easily use PHP to generate the JS, or better yet JSON to send to Flotr.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.