You are viewing documentation for an older version. For current documentation - click here.

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 do not see any chart at all

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?
 
If you get a "Error in Loading Data." message, check the following:
 
  • 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 you get an "Invalid Data." message, it means that the XML/JSON data is malformed. Check it again for common errors like:
 
  • Presence of duplicate attributes in the XML/JSON.
  • Difference in case of tags. <chart> should end with </chart> and not </Chart> or </CHART>
  • Missing opening/closing quotation marks for any attributes. e.g., <chart numberSuffix=%' should be <chart numberSuffix='%'.
  • Missing closing tag for any element.
  • If you've double quotes as part of your data,Encode them to &quot; Example: <set label='John says &quot;Hi&quot; to all.' />
  • If you've single quotes as part of your data, Encode them to &apos; Example: <set label='John&apos; house' />
  • While using HTML embedding and Data String method, if you're using any special characters in your data, make sure they're properly encoded. Like, % needs to be encoded as %25 & as %26. In Data URL method, you can provide most of the characters directly, without the need to encode.
  • While using HTML embedding and Data String method, check for conflict of ' (XML Attribute Character) and " (HTML Parameter Character). For example, if you're using " for HTML parameters, then you need to make sure that all your XML attributes use ' as containers.

    Example:

    <param name="FlashVars" value="<chart showLabels='1' showValues='1'>...</chart>" />
 
If you get a screen showing "The chart will appear within this DIV..." or "Chart." or "FusionCharts XT will load here", check if:
 
  • You've copied FusionCharts.js, jquery.min.js, FusionCharts.HC.js and FusionCharts.HC.Charts.js in the right folder.
  • You've included and provided the correct path of FusionCharts.js in your HTML code.
  • There are any JavaScript syntax or runtime errors that might have halted the execution of FusionCharts APIs.
  • Unique names are used for the chart's JavaScript variable, chart's ID and the HMTL DIV's ID?

    To provide cross-browser compatibility, we recommend you not to start the ID with a numerical value, nor use space as part of the ID.
 
"No data to display" message

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.
 
If you get a "... is not a function of ..." error when using any JavaScript API of the chart, make sure that:
 
  • 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.