Fusion Charts (PHP – FLASH)
To show the graph/charts on the bases of some values can be done with Fusion Chart. Basically this charts are made using Adobe Flex Tool. Where we generate XLM string with predefined nodes as per the library. And then we just need to pass it to the function. And that will generate the flash based dynamic chart for you.
For all this we just need to include two files and in the end we need to pass XML string and the name of SWF file i.e. chart.
Sample code is as given below:
<html>
<head>
<SCRIPT LANGUAGE=”Javascript” SRC=”../javascript/FusionCharts.js”></SCRIPT>
</head>
<body>
<?php
include(”FusionCharts.php”);
$strXML = “<graph yAxisName=’Qunatity’ decimalPrecision=’0′ formatNumberScale=’1′>”;
$j == 0;
while($row = mysql_fetch_array($rs))
{
$j++;
$strXML .= “<set name=’”.$row['Comapny_Name'].”-”.$row['Pipe_Type'].”-”.$row['Pipe_Size'].”‘ value=’”.$row['Stock'].”‘ color=’”.$color[$j].”‘ />”;
}
$strXML .= “</graph>”;
echo renderChart(”FCF_Bar2D.swf”, “”, $strXML, “myNext”, 600, $num*30 , false, false);
?>
</body>
</html>
and the link to the web site is
…