1

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

4

1 回答 1

0

首先,您确定您使用的是 OFC 版本 2?您可以从http://sourceforge.net/projects/openflashchart/files/获取它。

其次,您应该在创建后调用 embedSWF。

假设您正在执行 #1 并且您更改了 #2,这将解决它。

于 2010-04-22T21:16:25.817 回答