Hi
I cant get data from dataset in while loop
$strXML = "<chart caption='" . ucf(translate('bodyweight')) . "' subCaption='" . ucf(translate('for')) . " " . getNameFromId($USER_PROFILE->getId()) . "' showBorder='1' formatNumberScale='0' numberSuffix='". $w_metric ."' baseFont='Arial' exportEnabled='1' exportAtClient='0' exportHandler='Charts/ExportHandlers/PHP/FCExporter.php' exportAction='download' exportTargetWindow='_blank' exportFileName='" . ucf(translate('bodyweight')) . "'>";
if($i <= $num)
{
$strXML .= "<categories>";
while($row = mysql_fetch_array($result))
{
if($w_metric == "kg")
{
$strXML .= "<category label='" . formatDate($row['date'], $dateformat) . "' />";
}
else
{
$strXML .= "<category label='" . formatDate($row['date'], $dateformat) . "' />";
}
}
$strXML .= "</categories>";
$strXML .= "<dataset seriesName='Bw'>";
while($row2 = mysql_fetch_array($result))
{
if($w_metric == "kg")
{
$strXML .= "<set value='" . $row['bodyweight'] . "' />";
}
else
{
$strXML .= "<set value='" . r_nr(calcFromKg($row['bodyweight'])) . "' />";
}
}
$strXML .= "</dataset></chart>";
echo renderChart("Charts/ZoomLine.swf", "", $strXML, "".ucf(translate('bodyweight'))."", 900, 400, 1, 1);
The FusionChart debug shows this:
Info: Chart loaded and initialized.
Initial Width: 900
Initial Height: 400
Scale Mode: noScale
Debug Mode: Yes
Application Message Language: EN
Version: 3.2.1
Chart Type: Zoom Line Chart
Chart Objects:
BACKGROUND
CANVAS
CAPTION
SUBCAPTION
YAXISNAME
XAXISNAME
DIVLINES
YAXISVALUES
DATALABELS
DATAVALUES
TRENDLINES
TRENDVALUES
DATAPLOT
ANCHORS
TOOLTIP
LEGEND
SCROLLBAR
OVERLAYLABEL
ENABLEDBUTTON
DISABLEDBUTTON
DATATOOLTIP
VTRENDLINES
VTRENDVALUES
INFO: Chart registered with external script. DOM Id of chart is Kroppsvekt
INFO: XML Data provided using dataXML method.
XML Data: <chart caption="Kroppsvekt" subCaption="For Stian Walgermo" showBorder="1" formatNumberScale="0" numberSuffix="lbs" baseFont="Arial" exportEnabled="1" exportAtClient="0" exportHandler="Charts/ExportHandlers/PHP/FCExporter.php" exportAction="download" exportTargetWindow="_blank" exportFileName="Kroppsvekt"><categories><category label="14.09.2010" /><category label="14.10.2010" /><category label="01.01.2011" /><category label="01.01.2011" /><category label="08.01.2011" /><category label="08.01.2011" /><category label="08.01.2011" /><category label="14.01.2011" /><category label="15.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="22.01.2011" /><category label="28.01.2011" /><category label="28.01.2011" /><category label="28.01.2011" /><category label="28.01.2011" /><category label="28.01.2011" /><category label="31.01.2011" /><category label="31.01.2011" /><category label="31.01.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="04.02.2011" /><category label="08.02.2011" /><category label="08.02.2011" /><category label="08.02.2011" /><category label="08.02.2011" /><category label="08.02.2011" /><category label="09.02.2011" /><category label="09.02.2011" /><category label="09.02.2011" /><category label="09.02.2011" /><category label="09.02.2011" /><category label="09.02.2011" /><category label="10.02.2011" /><category label="10.02.2011" /><category label="10.02.2011" /><category label="10.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="11.02.2011" /><category label="12.02.2011" /><category label="12.02.2011" /><category label="12.02.2011" /><category label="12.02.2011" /><category label="12.02.2011" /><category label="12.02.2011" /><category label="13.02.2011" /><category label="13.02.2011" /><category label="13.02.2011" /><category label="13.02.2011" /><category label="13.02.2011" /><category label="13.02.2011" /><category label="14.02.2011" /><category label="15.02.2011" /><category label="15.02.2011" /><category label="15.02.2011" /><category label="15.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /><category label="21.02.2011" /></categories><dataset seriesName="Bw" /></chart>
It doesnt get any from the second while loop.. why?