Charts and Graphs
Written by Datagod   
Saturday, 21 April 2007
Image

I spent the past two weeks tinkering with PHP/SWF Charts which allows you to build some very impressive graphs, charts, etc.  I followed the examples given on the website and in no time at all I was retrieving data from mysql and charting it. 

At first I found the examples on the website helpful, but they really were not flexible enough for my needs.  I want the chart configuration to be data driven and not have to rely on hard coded values.  For example, I created a report that shows the traffic history for a domain over the last 24 hours.  The domain name is dynamic, as well as the date range.  I can change the 24 hours to 12 hours with an input parameter.  The chart object gets all the data it needs from the MySQL result set, not from hard coded values. ImageI then took some time to built a bit of a reporting architecture.  I now have generic blocks of PHP that I use to execute a MySQL query and pass the info along to the PHP/SWF module.  I spent hours and hours on figuring out what I wanted and trying to build the PHP scripts to be as flexible as possible.  

The result was that in under 30 minutes I was able to put together a basic dashboard that consists of 3 graphic charts and one tabular report.

Now I can spend some time on the prettiness factor. 

Hits: 2849
Comments (2)add comment

Snooky said:

Hey man, what chart software do you use? I was looking at tinystats. Very nifty.
 
report abuse
vote down
vote up
August 03, 2007
Votes: +0

gogi100 said:

Hi, can you tell me how connect PHP/SWF Charts with mysql database and form three charts make one chart like result - sum of three chart? can you send me code for this or some link?
 
report abuse
vote down
vote up
February 27, 2008
Votes: +0

Write comment

busy
Last Updated ( Monday, 23 April 2007 )