FusionCharts in Android?

淺唱寂寞╮ 提交于 2019-12-01 01:23:31

FusionCharts Flash version loads fine on devices supporting Flash (Glaxy Tab, etc.)

For JavaScript version, the story is slightly different. I am copying a section of my notes here:


  1. FusionCharts uses an enhanced version of HighCharts in order to render JavaScript based charts.

  2. HighCharts uses 'SVG' as a technology to render the visualizations. Though considered part of HTML5, certain mobile platforms (like Android) does not support SVG as of yet.

  3. As of now, Android supports "canvas" as a drawing technology for HTML5. Gingerbread is expected to fully support SVG.

If you refer to the history of HighCharts, you would see that HighCharts version 1.x supported canvas, but since 2.x they have shifted to SVG anticipating the inclusion of SVG support on major mobile platforms.

We, at FusionCharts, use HighCharts 2.x as a base to render FusionCharts. Consequently, they do not run on Android.

However, there is a workaround, if you replace the highcharts.js (2.x) supplied with FusionCharts by older highcharts.js, you would notice that it works fine on Android platforms. But that would mean limited functionality as a lot of enhancements done to HighCharts would be lost.

I hope I had been clear on my points. If you need further clarification, I can definitely provide you with more information. I can also assist you in implementing the older highcharts.js by particularly detecting Android based browsers and doing selective loading of older HighCharts JS files.

There is also a small extension of FusionCharts that gracefully handles this replacement of older HighCharts for devices that does not support SVG or VML but supports canvas.

You can see it in action at: http://www.fusioncharts.com/labs/peek/canvasmodulefallback/

Download the files from: http://www.fusioncharts.com/labs/peek/canvasmodulefallback/sample-canvasmodulefallback.zip

NikhilKesari

Yes, I am able to load fusion charts on my device I am using an HTC Desire HD (2.2) using webkit 3.1. There are a lot of issues related to Adobe Flash and the way Android WebView renders it. You could read through the link Flash-WebView

Zero when the data will be mobile devices crash.

    var chartObj1 = new FusionCharts({
        swfUrl:'Charts/Column2D.swf',

        renderer: 'javascript',
        renderAt: 'chartspan',

        dataSource: {
            "chart": {
                "caption" : "Sales Summary",
                "subcaption": "Summary of Sales"
            },
            "data": [
                {"value":"0"},
                {"value":"0"},
                {"value":"0"},
                {"value":"0"}
            ]
        },
        dataFormat: FusionChartsDataFormats.JSON
    }).render();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!