Sign in to follow this  
STEW_ERI

Gantt Charts In Asp.net - Error Loading Data

Recommended Posts

Hello,

 

I have been using FusionCharts for some time and have used some other components of FusionWidgets without any problems, although recently I attempted to setup a Gantt chart on the page, which would show the current progress of a project. I have added it to the page using the dataURL method and it will not load the chart, it just states "Error in Loading Data".

 

The asp.net page which its located in is called "IT" and it has a sub-folder called "projects" where I want to store the xml files. For the purpose of getting it setup I downloaded the XML file used on the FusionWidgets documentation under Sample Charts > Gantt Chart > Development Lifecycle. I have even given full access to the folder in the hope that it was just a permissions issue and this has left me with the same problem. I have also tried going to the URL in Internet Explorer and it loads the XML data on the screen so not sure whats happening here, hopefully you can help?

 

Head Section of Page:

<script language="JavaScript" type="text/javascript" src="../Charts/FusionCharts.js"></script>

 

In the Body of the Page:

                  <div id="chartdiv" align="left">FusionGadgets</div>

                   <script type="text/javascript">
                       var myChart = new FusionCharts("../FusionWidgets/Gantt.swf", "iNet_Project", "700", "400", "0", "0");
                       myChart.setDataURL("projects/gantt3.xml");
                       myChart.render("chartdiv");
                   </script>

 

Thanks

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello,

 

I have been using FusionCharts for some time and have used some other components of FusionWidgets without any problems, although recently I attempted to setup a Gantt chart on the page, which would show the current progress of a project. I have added it to the page using the dataURL method and it will not load the chart, it just states "Error in Loading Data".

 

The asp.net page which its located in is called "IT" and it has a sub-folder called "projects" where I want to store the xml files. For the purpose of getting it setup I downloaded the XML file used on the FusionWidgets documentation under Sample Charts > Gantt Chart > Development Lifecycle. I have even given full access to the folder in the hope that it was just a permissions issue and this has left me with the same problem. I have also tried going to the URL in Internet Explorer and it loads the XML data on the screen so not sure whats happening here, hopefully you can help?

 

Head Section of Page:

<script language="JavaScript" type="text/javascript" src="../Charts/FusionCharts.js"></script>

 

In the Body of the Page:

              	<div id="chartdiv" align="left">FusionGadgets</div>

                   <script type="text/javascript">
                       var myChart = new FusionCharts("../FusionWidgets/Gantt.swf", "iNet_Project", "700", "400", "0", "0");
                       myChart.setDataURL("projects/gantt3.xml");
                       myChart.render("chartdiv");
                   </script>

 

Thanks

 

Hey Stew,

 

The "Error in Loading Data" message in your chart is generated when FusionWidgets could not find the XML data at the specified URL.

 

With regard to your query here, could you please try using the recommended check-point for this error as below:

 

  • 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 clean XML only - not even HTML <head> or <body> tags.
  • If you've to pass parameters to your dataURL data provider page from FusionWidgets, 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 FusionWidgets will invoke the URL with proper parameters appended to it.
  • 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.

These basic troubleshooting concerns and their remedies are listed at:

Basic Troubleshooting - FusionWidgets

 

I hope this helps.

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