5 Most Recent (5)
    Text Editor (1)
    File System (2)
    List Box (5)
    Color Palette (1)
    Combo Box (8)
    Custom (3)
    Scroll Bar (1)
    Radio (1)
    Tree (1)
    Bar Chart (2)
    Ticker (2)
    Pie Chart (1)
Pie Chart
 A simple Pie Chart with an XML data source.
Data Format: XML
Date Added: 2002-06-23

Publisher:  Macromedia Component Set 2
Implemented By:  flash-db http://www.flash-db.com/Components/
A simple Pie Chart with an XML data source.
The simplest possible example of using a Pie Chart with an external XML data source. This is a bare bones example meant to be easy to follow.
<?php
// This array would normally be coming from a database
// We just simplified it by putting it in an Array for now.
$NameArr = array("PHP""ASP""Perl""Other");
$DataArr = array("35""30""20""15");
$numReturn count($NameArr);
$i 0;

// Prints out the necessary XML
print "<dataSet>";
    while (
$i $numReturn) {
        print 
"<data>";
        print 
"<name>".$NameArr[$i]."</name>";
        print 
"<dataRow>".$DataArr[$i]."</dataRow>";        
        print 
"</data>";
        
$i++;
    }
print 
"</dataSet>";
?>
   download component source files (zip)


Area Map: Home | About | Extend | Links | Commercial | Submit Component    
< / form > < !-- Google analitycs -->