Create cool flash graphs by just plugging in the data

Posted in » Flash, Scripts - by Ades on August 22nd, 2007

New to this blog? See our Popular Posts section to get started, we have tons of great articles that can benefit you. Don't miss the upcoming interesting articles, subscribe to our RSS.

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.

www.maani.us/charts/index.php


Related Posts





5 Responses to “Create cool flash graphs by just plugging in the data”

  1. By Saikat on Aug 22, 2007

    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. By Wallace on Aug 22, 2007

    check out my popular post,
    http://cssjuice.com/22-code-snippets-for-creating-decent-charts/

  3. By Saikat on Aug 22, 2007

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

  4. By igpltcd on Aug 22, 2007

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

  5. By Rebecca on Sep 13, 2007

    this is neat

FREE eBook: "Blog Profits Blueprint" by Yaro Starak. download here.

Post a Comment