|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 11/24/2007 4:04:22 PM
Posts: 7,
Visits: 15
|
|
| It just displays: no data to display
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: Yesterday @ 8:20:12 AM
Posts: 2,194,
Visits: 521
|
|
Hi,
Can you make sure that your XML has some data elements?
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 11/24/2007 4:04:22 PM
Posts: 7,
Visits: 15
|
|
Here is the code, still the same result, no data to display...
//We've included ../Includes/DBConn.php, which contains functions
//to help us easily connect to a database.
include("../Includes/DBConn.php");
//This page generates the XML data for the Pie Chart contained in
//Default.php.
//For the sake of ease, we've used an MySQL databases containing two
//tables..
//Connect to the DB
$link = connectToDB();
//$strXML will be used to store the entire XML document generated
//Generate the graph element
$strXML = "<graph caption='Factory Output report' subCaption='By Quantity' decimalPrecision='0' showNames='1' numberSuffix=' Units' decimalPrecision='0'
pieSliceDepth='30'>";
// Fetch all factory records
$strQuery = "select Distinct Year(newsdate) as Years from visits";
$result = mysql_query($strQuery) or die(mysql_error());
//Iterate through each factory
if ($result) {
while($ors = mysql_fetch_array($result)) {
//Now create a second query to get details for this factory
$strQuery = "select Year(newsdate) as SYear, count(newsdate) as TotOutput from visits where Year(newsdate)<=" . $ors['Years'];
$result2 = mysql_query($strQuery) or die(mysql_error());
$ors2 = mysql_fetch_array($result2);
//Generate
$strXML .= "<set name='" . $ors2['SYear'] . "' value='" . $ors2['TotOutput'] . "' />";
//free the resultset
mysql_free_result($result2);
}
}
mysql_close($link);
//Finally, close element
$strXML .= "";
//Set Proper output content-type
header('Content-type: text/xml');
//Just write out the XML data
//NOTE THAT THIS PAGE DOESN'T CONTAIN ANY HTML TAG, WHATSOEVER
echo $strXML;
?>
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: Today @ 5:38:52 AM
Posts: 884,
Visits: 1,420
|
|
| can you get the proper XML output...try opeing this dataURL file separately in browser from localhost/server (wahtever) and see if the XML is generated ok...if yes then try setting the debugging mode ON and see whats the problem.... make sure you are passing this URL not as dataXML but as dataURL
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|