Sign in to follow this  
Monky

"Error in loading data" on my wordpress website

Recommended Posts

Hi !!

I would like to load fusioncharts on pages of my wordpress website but I have an error and I don't know why...

My code seems to be correct, as we can see here :

<script type="text/javascript">
 var chart = new FusionCharts("http://www.geopopulation.com/charts/Charts/Bar2D.swf", "ChartId", "300", "350", "0", "0");
 chart.setDataURL("http://www.geopopulation.com/charts/Gallery/Data/Bar2D.xml");	 
 chart.render("chartdiv");
 </script>

I hope somebody have already met this mistake and own a solution or a patch, a plugin because fusioncharts is really awesome (for me there is no equivalent)

Sorry for my language, I know I make lot of spelling mistakes when I write in English but I'm French, I'm learning English.. so sorry !!

Thanking you in advance,

Share this post


Link to post
Share on other sites

Hi,

 

 

 

The issue here is that FusionCharts doesn't accept absolute data URLs (to block XSS). As such, place the SWF and XML file in the same domain as your wordpress installation.

Share this post


Link to post
Share on other sites

The issue here is that FusionCharts doesn't accept absolute data URLs (to block XSS). As such, place the SWF and XML file in the same domain as your wordpress installation.

 

BTW, the fact that FusionCharts files need to be in the root directory of a WordPress installation is a serious tip that needs to be explicitly stated in your documentation. Keep in mind that there are more than 20 million self-hosted WordPress blogs. I spent hours being frustrated, experimenting with a myriad of WordPress examples to try to display my charts, until I found the above statement.

Share this post


Link to post
Share on other sites
Guest Sumedh

 

BTW, the fact that FusionCharts files need to be in the root directory of a WordPress installation is a serious tip that needs to be explicitly stated in your documentation. Keep in mind that there are more than 20 million self-hosted WordPress blogs. I spent hours being frustrated, experimenting with a myriad of WordPress examples to try to display my charts, until I found the above statement.

 

Hi,

 

It is not explicitly mentioned that using absolute path is a wrong practice. But, specifying relative path for the file is a recommended way to render charts.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this