打开 Flash 图表不起作用

发布于 2024-08-29 13:31:27 字数 876 浏览 1 评论 0原文

我想在我的网站中实现 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

穿越时光隧道 2024-09-05 13:31:27

首先,您确定您使用的是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文