liberio

[Bug] Linkedcharts Using Jquery Prettyphoto

Recommended Posts

Hi,

 

First of all I want to thank you for what you have done, it is a great piece of work!

 

I encountered an issue last week. The code sample named 'LinkedCharts using jQuery PrettyPhoto' does not work with both IE and Firefox.

The error message is the following :

Error in loading data

This concerns the official code too : http://www.fusioncharts.com/Code/JavaScript/Basics/UsingLinkedCharts/jqprettyphoto.html

 

Do you have any idea about this minor bug ?

 

Let me know if you need more details, like steps to reproduce.

 

Thanks in advance for your help.

Edited by liberio

Share this post


Link to post
Share on other sites

Hi,

 

If you get a "Error in Loading Data" message in your chart, it means that FusionCharts could not find XML data at the specified URL. In that case, check the following:

 

1. Check if you've actually provided dataURL or dataXML. If you do not provide either, FusionCharts looks for a default Data.xml file in the same path. Now, if that is also not found, it shows the "Error in Loading Data" error.

If you're using dataURL method, paste this URL in your browser to check if it's returning a valid XML. Make sure, there are no scripting or time-out errors and a valid XML is being returned. Also make sure that the XML isn't intermingled with HTML content. The data provider page should return a clean XML only - not even HTML <head> or <body> tags.

2. Make sure you're passing relative URLs for dataURL, and not absolute URLs. To restrict cross site security attacks, FusionCharts doesn't allow colons in dataURL (starting v3.0.5). So you cannot specify dataURL as http://.../path/file.ext any more.

3. If you have to pass parameters to your dataURL data provider page from FusionCharts, make sure they're URLEncoded in the dataURL, when providing to FusionCharts. e.g., if your dataURL needs to be Data.asp?id=43&subId=454, you'll need to Url Encode it so that it becomes Data%2Easp%3Fid%3D43%26subId%3D454. Only then FusionCharts will invoke the URL with proper parameters appended to it.

4. When using dataURL method, make sure that the SWF File and data provider page are on the same sub-domain. Due to Flash's sandbox security model, it cannot access data from external domains, unless otherwise configured.

 

Also, while using Linked charts, please make sure the Flash Player Global security settings is enabled, if you are running the application from local file system (C:\ or D:\) and not from web server (local or live).

 

Flash Player's Global Security setting blocks invoking/calling JavaScript from SWF (Flash Movie) by default. So you need to reset your setting into Global Security Setting panel and enable it.

 

Please refer to the following page for further details on the Flash Player Global Security settings:

http://www.fusioncharts.com/Tools/FlashPlayerSecuritySetup/HowToSetup.html

 

Furthermore, the "RegisterWithJS" (the last) parameter in the HTML code should be enabled.

Ref.- var chart = new FusionCharts("MSColumn2D.swf", "ChartId", "600", "350", "0", "1");

 

 

I hope this helps. Looking forward to your feedback.

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