将我的 amcharts flash 升级到 amcharts javascript
我现在正在使用 amcharts flash。请参阅此处:http://www.myinvestmentdecision.com.au/Sample-Results
我想要更改为使用 javascript 图表,以便它可以在苹果设备上工作,并且可以在现代浏览器中很好地打印(其中大多数浏览器根本无法打印 flash,或者打印它看起来非常笨重)
我的问题是这样的 - 我使用 XML 来生成 Flash 图表。数据位于各种 xml 提要中。有没有办法让我在 javascript 图表中也使用它?从我在这里看到的示例:http://blog.amcharts。 com/2011/05/getting-started-part-2.html 他们显示的代码有一个大的数据数组,
var chartData = [
{country: "USA", litres: "19544"},
{country: "Japan", litres: "5455"},
{country: "France", litres: "2313"},
{country: "Germany", litres: "2208"},
{country: "UK", litres: "2057"},
{country: "India", litres: "1771"},
{country: "Russia", litres: "1495"},
{country: "South Korea", litres: "1281"},
];
这对我来说将是一个额外的处理步骤,我并不完全热衷于这一步骤。 如果必须这样做,那么好吧,我的问题变成了,我该怎么做?
I'm using amcharts flash at the moment. see here: http://www.myinvestmentdecision.com.au/Sample-Results
I want to change that to use the javascript charts instead so that It will work on apple devices, and so that it will print nicely in modern browsers (most of which can't print flash at all, or print it looking very clunky)
My question is this - I use XML to produce the flash graphs. The data is in a variety of xml feeds. Is there a way for me to use this in the javascript charts as well? From the example I saw here: http://blog.amcharts.com/2011/05/getting-started-part-2.html
They show code that has a big array for the data
var chartData = [
{country: "USA", litres: "19544"},
{country: "Japan", litres: "5455"},
{country: "France", litres: "2313"},
{country: "Germany", litres: "2208"},
{country: "UK", litres: "2057"},
{country: "India", litres: "1771"},
{country: "Russia", litres: "1495"},
{country: "South Korea", litres: "1281"},
];
That would be an extra processing step for me, one which I'm not totally keen on.
If it has to be done then okay, my question changes to, how do i do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 xml for javascript 的方式完全相同,我使用 javascript 图表,从 postgresql 获取数据,然后使用 php 生成 xml,并使用 xml 在 amcharts 中收取数据。
我很抱歉我的英语不太好。 :)
Is exactly the same way using xml for javascript, i use javascript charts and i take data from postgresql then generate a xml with php and use the xml to charge data in a amcharts.
My apologies for my english, is not so good. :)