When trying to make a chart using FusionCharts XT,
if you get any errors (or if the chart does not render), there could be a
lot of reasons behind it. Here, we will try and cover them up. We have divided
the entire debugging process into three sections:
Let us cover basic trouble shooting first. While creating your chart,
if for some reason you do not see your chart like it should, check for
the following actions: |
If you see an endless loading progress bar in your browser, or if the right click menu (right click at the place where the chart is supposed to be) shows "Movie not loaded", check the following:
- Have you pasted the chart SWF and JavaScript files (FusionCharts.js, FusionCharts.HC.js, FusionCharts.HC.Charts.js and jquery.min.js) in the required folder?
- Have you provided the name and path of the chart properly in your code?
|
|
|
- Whether you've provided proper path to the XML/JSON data in your code.
- Paste the Data URL in your browser to check if it's returning a valid XML/JSON. Make sure, there are no scripting or time-out errors and a valid XML/JSON is returned. Also, make sure that the XML/JSON isn't intermingled with HTML content. The data provider page should return a clean XML/JSON only - not even HTML <head> or <body> tags.
- Whether your XML/JSON file is named properly and not having a .txt extension (as many basic text editors append .txt after the file name).
- If you're using an operating system that uses case-sensitive naming for file system (like mac, linux etc.), check for the names of your XML/JSON and chart file.
- Whether your chart files (SWF and JavaScript) and XML/JSON data are on the same domain or same sub-domain. Cross domain data loading is not allowed.
|
|
|
|
|
|
|
|
If your chart shows a "No data to display"
message, it could be the following scenarios:
- Your XML data doesn't contain any data that could be plotted by FusionCharts XT. In this case, your XML just contains the <chart> or <dataset> tags without any data between them.
- You might be using a single-series chart SWF and providing data in multi-series format or vice-versa. In this case too, you'll get a "No data to display" message.
- In some Dual Y Combination charts, you need to provide at least one dataset for both the axis. Otherwise, you'll get a "No data to display" message.
|
|
|
- Make sure that you're not calling the JavaScript method before the chart has loaded and rendered. You need to use FC_Rendered function or define event listener for Rendered event of chart to track the loading of chart as explained in the FusionCharts XT and JavaScript section.
- Make sure that you're NOT running the chart from local file system (C:\ , D:\). Instead, run the chart from behind a server (localhost - IIS, Apache etc.). This is because the Flash Player security settings do not allow the chart to interact with JavaScript on local file system by default, unless otherwise specifically set. Still if you want to run the chart from local file system, you need to set up the Flash Player Global Security settings. To know more on how to set up click here.
|