打开 Flash 图表不起作用
我想在我的网站中实现 Open Flash Chart,但它不起作用。图表刚开始加载一秒钟,加载器动画就消失了,什么也没有发生(只有一个空白的 swf 区域)。我已经下载了最新版本 2,这是我的文件夹方案:
// ROOT //
● JS
● open-flash-chart
● php-ofc-library
- open-flash-chart.swf
- mydata.php
- mypage.html
这是 mydata.php
内容:
{"elements":[{"type":"bar","values":[1,2,3,4,5,6,7,8,9]}],"title":{"text":"Wed Apr 21 2010"}}
这是 mypage.html
内容:
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("open-flash-chart.swf", "my_chart", "550", "200","9.0.0", "expressInstall.swf", {"data-file":"mydata.php"} );
</script>
<div id="my_chart"></div>
JS
文件夹包含 swfobject,open-flash-chart
文件夹包含图表的操作脚本类
我有什么错误吗?
谢谢
I want to implement Open Flash Chart in my website but it doesn't work. The chart just start loading for a second and the loader animation disappear and nothing happening (Only a blank swf area). i've downloaded the latest version which is 2 and here is my folders scheme:
// ROOT //
● JS
● open-flash-chart
● php-ofc-library
- open-flash-chart.swf
- mydata.php
- mypage.html
This is mydata.php
content:
{"elements":[{"type":"bar","values":[1,2,3,4,5,6,7,8,9]}],"title":{"text":"Wed Apr 21 2010"}}
This is mypage.html
content:
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("open-flash-chart.swf", "my_chart", "550", "200","9.0.0", "expressInstall.swf", {"data-file":"mydata.php"} );
</script>
<div id="my_chart"></div>
The JS
folder contain swfobject and the open-flash-chart
folder contain the action script classes of the chart
Is there any mistake i did?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您确定您使用的是 OFC 版本 2 吗?您可以从 http://sourceforge.net/projects/openflashchart/files/ 获取它。
其次,您应该在创建后调用 embedSWF。
假设您正在执行#1 并更改#2,这将解决它。
First, are you sure you're using OFC version 2? You can grab it from http://sourceforge.net/projects/openflashchart/files/.
Second, you should be calling the embedSWF after the has been created.
Assuming you're doing #1 and you change #2, this will fix it.