I have looked at other post and they say to use an array, but don't quite understand where the code is inserted. Below is a simple 3D Bar Chart I have created can you tell me where the array code would go and provide an example. Also the Chart will grow in time with additional Bar's , do you have to keep adding to the array?
include("../Includes/FusionCharts.php");
include("../Includes/DBConn.php");
?>
PBX-In-A-Box Cisco XMLServices Connections
//You need to include the following JS file, if you intend to embed the chart using JavaScript.
//Embedding using JavaScripts avoids the "Click to Activate..." issue in Internet Explorer
//When you make your own charts, make sure that the path to this JS file is correct. Else, you would
get JavaScript errors.
?>
PBX-In-A-Box - Cisco IP Phone XMLServices
// Connect to the DB
$link = connectToDB();
//$strXML will be used to store the entire XML document generated
//Generate the graph element
$strXML = "
showNames='1' formatNumberScale='0' numberSuffix='' decimalPrecision='0'>";
$strQuery = "SELECT Model, COUNT(Model) FROM stats GROUP BY Model";
$result2 = mysql_query($strQuery) or die(mysql_error());
while($ors2=mysql_fetch_array($result2))
//$ors2 = mysql_fetch_array($result2);/>
//Generate
$strXML .= "
//free the resultset
mysql_free_result($result2);
mysql_close($link);
//Finally, close
$strXML .= "
//Create the chart - Pie 3D Chart with data from $strXML
echo renderChart("../../FusionCharts/FCF_Column3D.swf", "", $strXML, "Model", 650, 450);
?>

Back to top
MultiQuote