|
Written by Datagod
|
|
Saturday, 21 April 2007 |
 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. I 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.
|
|
Last Updated ( Monday, 23 April 2007 )
|