在Android应用程序集成FusionChart? [英] Integrate FusionChart in android application?

查看:164
本文介绍了在Android应用程序集成FusionChart?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要fusionchart在Android原生应用程序中集成(不PhoneGap的)。我有写code为它下面

I want to integrate fusionchart in android native application (not phonegap).I have write code for it as below

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView webview =(WebView) findViewById(R.id.web);
String summary = 
"<html>"+
"<head>        "+
" <title>My First chart using FusionCharts XT - Using JavaScript</title>      "+
"<script type=\"text/javascript\" src=\"FusionCharts/FusionCharts.js\"></script>"+
"</head> "+  
"<body>"+     
" <div id=\"chartContainer\">FusionCharts XT will load here!</div>"+          
"<script type=\"text/javascript\">"+
" var myChart = new FusionCharts( \"FusionCharts/Column3D.swf\",\"myChartId\", \"400\",\"300\", \"0\", \"1\" );"+
"myChart.setXMLUrl(\"Data.xml\");"+
"myChart.render(\"chartContainer\");"+      
"</script>"+      
"</body>"+ 
 "</html>";
webview.loadDataWithBaseURL(null, summary, "text/html", "utf8", null);
}

请任何人告诉我什么是问题。我不知道如何给出确切的FusionCharts / FusionCharts.js路径,并没有关于Column3D.swf文件的想法。

please anybody tell me what is problem. I dont know how to give exact FusionCharts/FusionCharts.js path and no idea about Column3D.swf file.

我在哪里可以得到这些文件。

Where can i get those files.

甚至这个网站code在我的电脑的浏览器不工作。

even this html code not working in my pc browser.

和我想只用fusionchart使条形图中的Andr​​oid应用程序!

and I want to make bar chart in android application using only fusionchart !!!

推荐答案

您将需要下载的FusionCharts XT下载包,以获得必要的JavaScript和SWF文件,在下载包的图表文件夹中提供,这将让你呈现FusionCharts的。您可以下载从 rel=\"nofollow\">。

You would need to download the FusionCharts XT Download Package in order to receive the necessary JavaScript and SWF files, provided in the "Charts" folder of the Download Package, that would let you render FusionCharts. You may download the evaluation package from here.

另外,请检查 这里 的详细过程在浏览器上创建第一个图表。

Also, please check here for the detailed process to create your first chart on the browser.

FusionCharts的预期在原生Android应用程序很好地工作,提供了所有提到的 这里 渲染JavaScript的图表(Android 3.0的以上)和Flash图表得到满足。

FusionCharts is expected to work perfectly on the native Android apps, provided all the other criteria mentioned here to render the JavaScript charts (Android 3.0 and above) and Flash charts are fulfilled.

FusionCharts的没有任何原生API来呈现在Android应用排行榜。因此,你需要使用像,的PhoneGap,一个UIWebView等一些第三方移动开发框架和它们所提供的API控制,来实现相同的。

FusionCharts does not have any native API to render the charts in Android apps. Hence, you would need to use some 3rd party mobile development framework like, PhoneGap, UIWebView, etc. and the API controls they provide, to achieve the same.

有是在原生Android应用呈现FusionCharts的没有样品,但是,还有iOS版类似的实现应用在使用UIWebView的控制,可以用这个<一个帮助被称为href=\"http://blog.fusioncharts.com/2012/02/create-charts-for-iphone-and-ipad-apps-using-fusioncharts-xt/\"相对=nofollow> 博客文章
[注:这纯粹是作为参考,不能直接在Android实现]

There is no sample for rendering FusionCharts in native Android apps, however, there is a similar implementation for iOS apps using UIWebView Control, which can be referred to with the help of this Blog post. [NOTE: This is purely as a reference and is not directly an Android implementation.]

这篇关于在Android应用程序集成FusionChart?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆