我有fusioncharts問題,我使用PHP和JavaScript。 下面是代碼:Fusioncharts不會在移動設備上顯示
<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的不能加載圖表?
看來你使用的是基於閃存的圖表? – datasage
「正在載入圖表,請稍後」,謝謝回覆 – Pathic
移動設備不再支持Flash。你應該強制JavaScript渲染器來確保它不會嘗試加載Flash。您可以使用safari或chrome在移動設備上對訪問開發人員工具進行排序。可能需要一些設置。 – datasage