douqianbiao4216 2013-06-30 21:39
浏览 74
已采纳

Fusioncharts不会在移动设备上显示

I have problem with fusioncharts, I use PHP and JavaScript. Here are code:

<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;

Problem is fusioncharts on iOS, Android and other mobile devices can't load chart?

  • 写回答

1条回答 默认 最新

  • dongpo2002 2013-07-01 21:14
    关注

    The code seems to be perfect and your problem can be because of one of the following-

    1) Some of the .js files are missing or not in the same folder.

    http://docs.fusioncharts.com/charts/contents/Introduction/DownloadC.html

    2) The path provided is wrong.

    3) iPhone, iPad, iTouch, Android(>Honeycomb) etc. use flash- check out the documentation for explicit rendering in JavaScript mode.

    http://www.fusioncharts.com/dev/usage-guide/getting-started/your-first-charts/building-your-first-chart.html can be used for reference.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 传人记程序做的plc 485从机程序该如何写
  • ¥15 已知手指抓握过程中掌指关节、手指各关节和指尖每一帧的坐标,用贝塞尔曲线可以拟合手指抓握的运动轨迹吗?
  • ¥50 libwebsockets 如何添加其他socket事件回调
  • ¥50 实现画布拖拽算子排布,通过flink实现算子编排计算,请提供思路
  • ¥15 esium自定义材质拉伸问题
  • ¥15 cmake+mingw使用<mysqlx/xdevapi.h>报错
  • ¥15 eNSP中防火墙的使用
  • ¥15 关于#mlnet#的问题:mlnet相关请求(语言-c#)
  • ¥15 lvgl7.11怎么做出文字被选中的效果
  • ¥50 如何快速查看手机目标app的主要服务器ip
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部