我对 fusioncharts 有问题,我使用 PHP 和 JavaScript。这里是代码:
<div id="chartdiv_krpb" class="chartdiv_krpb"></div>
<script type="text/javascript">
var myChart;
myChart = new FusionCharts("swf/Pie2D.swf", "myChart_krpb", "100%", "240", "0", "1");
myChart.setDataURL("data/krpb.php?thnang=<? echo $thnang; ?>");
myChart.render("chartdiv_krpb");
</script>
krpb.php
$sql = mysql_query("SELECT acronym AS 'KODE', SUM(RPHREAL) AS RPHREAL FROM t_sai LEFT JOIN rosi_chat.t_perk2 ON kdperk2 = LEFT(PERKSAI, 2) WHERE THNANG = '$thnang' AND RPHREAL > 0 AND t_perk2.kdtrn = '3' AND kdkem = '0' AND kdperk2 IN ('51','52', '53', '57') GROUP BY kdperk2") or die(mysql_error());
$strXML = "<chart pieRadius='90' showPercentageValues='1' showValues='1' numberScaleValue='1000,1000,1000,1000' numberScaleUnit=' K, J, M, T' formatNumberScale='1' animation='0' numdivlines='3' baseFontSize='9' baseFontColor='000000' showBorder='0' caption='Realization' bgColor='7A864E' bgAlpha='50,75' bgRatio='75' bgAngle='270' canvasBgColor='A7AB50' canvasBgAlpha='50,75' canvasBgRatio='75' canvasBgAngle='270' canvasBorderThickness='0'>";
while ($record = mysql_fetch_array($sql)) {
$strData .= "<set label='" . $record['CODE'] . "' value='" . $record['RPHREAL'] . "' />";
}
$strXML .= $strData . "</chart>";
echo $strXML;
问题是 iOS、Android 等移动设备上的 fusioncharts 无法加载图表?