Easy diagrams on your website
I keep this link in my bookmarks for a long time without needed it. But then, I need it so I try, and it's very useful.

PHP/SWF charts (or XML/SWF charts) is a couple Flash + PHP (or +XML) which allow to generate easily graphics from tables in PHP (or XML). In short you get your data from a database for example, you stock it in a table that you send in parameter. The table can be very simple, SWF Charts will find how to use them in the graphic.
If the 1st element is a text, it becomes the legend of this drawing.
For example, here are some numbers for 2 places for diffrent years:
$chart[ 'chart_data' ] = array (
array ( "", "2004", "2005", "2006", "2007" ),
array ( "Place 1", 48, 55, 80, 100 ),
array ( "Place 2", -12, 10, 55, 65 ) );
It's simple: we put in a table an axis for years, and 2 other tables for the 2 places.
There are a lot of optionnal parameters to choose colors, legends, size, fonts... and the most funny: how graphics will appear. There are several transition effects like progressive coming, falling, growing, turning...
I invite you to have a look in the galery to see some effects (and there are more).

Visual options seem a bit complicated on fisrt look, but start from an existing example and make some trys to see the goal of each option.
The documentation is easy to understand, but I think it's better to start from a existing graphic from the galery close to what you want, and modify it.
Everything is on Maani.us...






Tuesday 26 August 2008 at 0:54
Saturday 30 August 2008 at 23:00