Getting started with XML/SWF Charts

February 11th, 2009

Requirement

  • web browser with Flash Player 9 or later
  • XML/SWF Charts

Installation

  1. Download XML/SWF Charts, extract the download package, and put somewhere on your web server. I put mine into folder charts.
  2. Open your browser, and go to http://localhost/charts/sample.html

That’s it. You’ll see a charts in your browser.

If you want to feed data to the chart  or you want to visualize your data with with XML/SWF Charts. Open sample.xml and write your XML. Just say you want to put this data into XML/SWF Charts.

2001 2002 2003
Company A 100000 200000 150000
Company B 98000 100000 160000
Company C 200000 210000 180000

So here your sample.xml should look like :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0"?>
<chart>
    <chart_data>
        <row>
	        <null/>
	        <string>2001</string>
	        <string>2002</string>
	        <string>2003</string>
        </row>
 
        <row>
	        <string>A</string>
	        <number>100000</number>
	        <number>200000</number>
	        <number>150000</number>
        </row>
        <row>
 
	        <string>B</string>
	        <number>98000</number>
	        <number>100000</number>
	        <number>160000</number>
        </row>
        <row>
	        <string>C</string>
	        <number>200000</number>
	        <number>210000</number>
	        <number>180000</number>
        </row>
    </chart_data>
</chart>

That’s it. You can fire up your browser again, and see the result at http://localhost/charts/

Related posts:

  1. CakePHP Tutorial:Installing CakePHP on Ubuntu
  2. Showing the weather with PHP and Google Weather API
  3. How to Force Browser to Download PDF File
  4. CodeIgniter Tutorials to Help You Get Started
  5. Codeigniter tutorial – To do list application

Tags: