daade Report post Posted May 30, 2011 Hi All; I have a problem with rendering the chart. When I work on localhost, there is no problem with the charts, it works fine. But after publishing the application to my IIS, my charts doesnt seem.. and gives a message titled "Error in loading data".. Before giving the error message, it says "retreiving data, please wait", it retreieves the data but does not show.. Please help.. Share this post Link to post Share on other sites
Guest Angshu Report post Posted May 30, 2011 Hi, Thanks for your post. 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: 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. 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. 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 becomesData%2Easp%3Fid%3D43%26subId%3D454. Only then FusionCharts 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. Hope this helps. Share this post Link to post Share on other sites
daade Report post Posted May 30, 2011 (edited) my function is written below protected string CreatePieChart(int il) { string ilinAdi = tr_ilAdGetir(il); string path = "http://192.168.100.11:8081/Data/" + ilinAdi + "Pie.xml"; string path2 = FusionCharts.EncodeDataURL(path,true); return FusionCharts.RenderChartHTML("FusionCharts/Pie3D.swf",path2, "", ilinAdi+"Pie", "548", "305", false); } is there anything that I'm missing? Edited May 30, 2011 by daade Share this post Link to post Share on other sites
FusionCharts Support Report post Posted May 31, 2011 Please do not load XML from another domain or do not give absolute URL of data. Please try once giving relative URL of the data. Share this post Link to post Share on other sites