我做了一个给我这两个错误的fusionchart?我如何删除这些错误?我做了一个给我这两个错误的fusionchart?我如何删除这些错误?
<?php
include("DBConn.php");
include("FusionCharts.php");
$link = connectToDB();
$strQuery="select Distinct DATE_FORMAT(transactions.transaction_date,'%c-%d-%Y') as transaction_date,sum(amount)as Amount from transactions group by DATE_FORMAT(transactions.transaction_date,'%c-%d-%Y')";
$result = mysql_query($strQuery) or die(mysql_error());
if ($result) {
$strXML = "<chart caption='Reports' showValues='0' useRoundEdges='1' palette='3'>";
while($ors = mysql_fetch_array($result)){
//Generate <set label='..' value='..' />
$strXML .= "<set label='" .$ors['transaction_date'] ."' value='" . $ors['Amount'] ."' />";
}
}
//free the result set
mysql_free_result($result);
mysql_close($link);
//Finally, close <chart> element
$strXML .= "</chart>";
//date_default_timezone_set($_SESSION['timezone']);
?>
<script type="text/javascript" src="Charts/FusionCharts.js"></script>
<div id="chartContainer">
<?php
FC_SetRenderer('javascript');
echo renderChart('Charts/Column2D.swf', // Path to chart type
'', // Empty string when using Data String Method
$strXML, // Variable that contains XML string
'Tracking', // Unique chart ID
'660', '400', // Width and height in pixels
false, // Disable debug mode
true// Enable 'Register with JavaScript' (Recommended)
);
?>
</div>
这是错误:
ReferenceError:
Prototype is not defined
if(Prototype.Browser.IE)
和
ReferenceError:
FusionCharts is not defined
...Charts("Tracking") && FusionCharts("Tracking").dispose ) FusionCharts("Tracking"...
这是我的xml
<chart caption='Reports' showValues='0' useRoundEdges='1' palette='3'>
<set label='1-06-2014' value='50' />
<set label='1-07-2014' value='151.1500015258789' />
<set label='1-08-2014' value='45' />
<set label='1-09-2014' value='0' />
<set label='1-10-2014' value='0' />
<set label='1-13-2014' value='0' />
<set label='1-14-2014' value='0' />
</chart>
如何删除这些错误?