mchacks Report post Posted July 17, 2012 I have an ajax call to update the chart. The call works fine and returns XMLDocument. But when checking through IE F12, the script Fusionchart.js seems to throw the following.. SCRIPT438: Object doesn't support property or method 'toString' FusionCharts.js, line 135 character 73 I recently downloaded the trial version. Just to clarify.. Here is my chart render code.. fusionChart.Text = FusionCharts.RenderChart("../_layouts/FCharts/Pie3d.swf", "", xmlStr.ToString(), "myTasks", "400", "300", false, true); Here is my Ajax call.. $.ajax({ type: 'POST', url: strURL, data: "{}", datatype: "xml", contentType: "application/xml; charset=utf-8", success: function (data) { var chartObj = getChartFromId("myTasks"); chartObj.setDataXML(data); } }); Can someone tell me what needs to be done to fix this? Share this post Link to post Share on other sites
Guest Sumedh Report post Posted July 17, 2012 Hi, Can you paste your sample code here? Share this post Link to post Share on other sites
mchacks Report post Posted July 17, 2012 Hi, Can you paste your sample code here? Other than what I have shared above, the other relevant things are here.. The WebMethod in asmx [WebMethod, ScriptMethod(ResponseFormat=ResponseFormat.Xml)] public XmlDocument GetFusionChartData() { try { WebPartModel wpm = new WebPartModel(); XmlTextReader xtr = new XmlTextReader(new StringReader(wpm.GetFusionChartData().ToString())); XmlDocument sendXML = new XmlDocument(); sendXML.Load(xtr); return sendXML; } catch (Exception ex) { Logger logger = new Logger(); logger.WriteException(ex, "GetFusionChartData", SPContext.Current.Web.CurrentUser); throw ex; } } And it returns <?xml version="1.0" encoding="utf-8"?> <chart caption="My Task Status" showBorder="1" baseFont="Arial" baseFontSize="10" outCnvBaseFontSize="12" bgColor="FFFFFF" paletteColors="47985E,F1AB65,8FB61B" pieRadius="100" enableSmartLabels="0"> <set label="This week" value="1" /> <set label="Overdue" value="0" /> <set label="Today" value="0" /> <styles> <definition> <style name="myValues" type="font" size="10" borderColor="000000" bgcolor="FFFFFF" leftMargin="10" letterSpacing="1" /> <style name="myCaption" type="font" font="Futura" size="12" bold="0" align="left" /> </definition> <application> <apply toObject="DataLabels" styles="myValues" /> <apply toObject="Caption" styles="myCaption" /> </application> </styles> </chart> Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted July 20, 2012 Hi, Could you please confirm the followings? 1. Whether you have included the "FusionCharts.js" file in your *.aspx page 2. Included the InfoSoftGlobal namespace provided in FusionCharts.dll which provides FusionCharts class (FusionCharts class provides static methods to create charts) and added reference of FusionCharts.dll in your project Awaiting your response ! Share this post Link to post Share on other sites
mchacks Report post Posted August 9, 2012 (edited) Hi, Could you please confirm the followings? 1. Whether you have included the "FusionCharts.js" file in your *.aspx page 2. Included the InfoSoftGlobal namespace provided in FusionCharts.dll which provides FusionCharts class (FusionCharts class provides static methods to create charts) and added reference of FusionCharts.dll in your project Awaiting your response ! Yes.. All of the above are included.(Its actually an ascx file) Edited August 9, 2012 by mchacks Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted August 10, 2012 Hi, Could you please try by using "FusionCharts()" instead of "getChartFromId()" and "setXMLData()" instead of "setDataXML" as these are the deprecated methods? Share this post Link to post Share on other sites
mchacks Report post Posted August 10, 2012 Hi, Could you please try by using "FusionCharts()" instead of "getChartFromId()" and "setXMLData()" instead of "setDataXML" as these are the deprecated methods? Tried.. Same error. Share this post Link to post Share on other sites
Guest Sumedh Report post Posted August 27, 2012 Hi, Could you please paste your entire JavaScript code here? Share this post Link to post Share on other sites
mchacks Report post Posted August 28, 2012 We have gone through several iteration of code sharing and it has not reached anywhere. So instead of me sharing code, could you guys give me a working code of how to reload fusion chart based on an Ajax call (similar to code that I have shared earlier). Hi, Could you please paste your entire JavaScript code here? Share this post Link to post Share on other sites
Guest Sumedh Report post Posted September 10, 2012 Hi, We are not able to replicate any issue with the ASP.NET C# and Ajax call. Please find the attached illustration and screen-shots for your reference. FCXT_Ajax.zip Share this post Link to post Share on other sites