i try fussionchart to display data from my database, i use single series chart and data can display correctly. When i use multiseries chart, that chart does't appear and just give display " chart. ". i try to retrieve data from 2 table in database.
Does anyone can help me to fix where are the wrong in my code?
here it,s the code :
#
<?php
#
$strXML = "<graph caption=' Data beban Tertinggi Unit 1' subcaption='7 Hari terakhir' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='1' decimalPrecision='1' showvalues='0' numdivlines='3' numVdivlines='0' yaxisminvalue='0' yaxismaxvalue='65' rotateNames='1'>";
#
#
$strQuery = "SELECT * FROM tparamu1 ORDER BY u1tgl_data LIMIT 7";
#
$result = mysql_query($strQuery,$koneksi) or die(mysql_error());
#
#
if ($result)
#
{
#
while($ors = mysql_fetch_array($result))
#
{
#
// set category
#
$strXML = "<categories>";
#
$strXML .= "<category name='" . tgl_eng_to_ind($ors['u1tgl_data']) . "'/>";
#
$strXML .= "</categories>";
#
// set series 1
#
$strXML = "<dataset seriesName='unit 1' color='c4e3f7' anchorBorderColor='c4e3f7' anchorBgColor='c4e3f7'>";
#
$strXML .= "<set value='" . $ors['u1beban_hh'] . "' />";
#
$strXML .= "</dataset>";
#
}
#
}
#
#
$strQuery2 = "SELECT * FROM tparamu2 ORDER BY u1tgl_data LIMIT 7";
#
$result2 = mysql_query($strQuery2,$koneksi) or die(mysql_error());
#
if ($result2)
#
{
#
while($ors2 = mysql_fetch_array($result2))
#
{
#
// set series 2
#
$strXML = "<dataset seriesName='unit 2' color='F1683C' anchorBorderColor='F1683C' anchorBgColor='F1683C'>";
#
$strXML .= "<set value='" . $ors2['u1beban_hh'] . "' />";
#
$strXML .= "</dataset>";
#
}
#
}
#
//Finally, close <graph> element
#
$strXML .= "</graph>";
#
#
//Create the chart
#
echo renderChart("FusionCharts/FCF_MSLine.swf", "", $strXML, "Beban tertinggi", 500, 300);
#
?>
thanks for advance