Create cool flash graphs by just plugging in the data

PHP/SWF Charts is a simple, yet powerful PHP tool to create attractive web charts and graphs from dynamic data. Graphs that are similar to those of Google Analytics.

To create your own graphs with your own data, all you need to do is, download PHP/SWF Charts and place charts.swf, charts.php, and charts_library anywhere on your web server.

You need to describe your data in the table form in your php file. For example table like this:

  2001 2002 2003 2004
Region A 5 10 30 63
Region B 100 20 65 55
Region C 56 21 5 90

should be described in your php file like this:

< ?php
include "charts.php";

//the chart's data
$chart [ 'chart_data' ] = array ( array ( "", "2001", "2002", "2003", "2004" ),
array ( "Region A", 5, 10, 30, 63 ),
array ( "Region B", 100, 20, 65, 55 ),
array ( "Region C", 56, 21, 5, 90 )
);

//send the new data to charts.swf
SendChartData ( $chart );

?>

which will create a graph like this:

You can also create other types of graphs, such as:

Line, Column, Stacked Column, Floating Column, 3D Column, Stacked 3D Column, Parallel 3D, Column, Pie, 3D Pie, Bar, Stacked Bar, Floating Bar, Area, Stacked Area, Candlestick, Scatter, and Polar. You can see samples for all of these at the PHP/SWF Charts Gallery page.

http://www.maani.us/charts/index.php



5 Comments on "Create cool flash graphs by just plugging in the data"

  1. Saikat says:

    Charting could really be useful to visualize data. Moreover, it adds interactivity to websites and applications; as such, the boring data tables appear to be exciting!

  2. Saikat says:

    Does it support plotting data from database programmatically or is it possible to create real-time charts, graphs, gauges?

  3. igpltcd says:

    This Gadget provides a WYSIWYG editor where bloggers can create charts for their blogs and personalized home pages.
    http://www.fusioncharts.com/GG/

  4. Rebecca says:

    this is neat

Got something to say? Go for it!