ChartsJazz Report post Posted January 6, 2010 FusionCharts v.3 Enterprise, Classic ASP with JavaScript .asp includes FusionCharts.asp and FusionCharts.js Chart is rendered in the .asp with Call renderChartHTML("FusionCharts/Charts/COLUMN3D.swf", "", strXML, "myChart", intChartWidth, intChartHeight, false) This works. Now when I try to update the chart from a JS function using setDataXML: function updateChart(DOMId){ var myChart = getChartFromId("myChart"); alert(myChart.id); myChart.setDataXML("<chart><set label='B' value='12' /><set label='C' value='10' /><set label='D' value='18' /><set label='E' value='21' /></chart>"); } alert(myChart.id); returns "myChart" which is correct even though the chart is inside <form></form> tags. I hard-coded the strXML data for testing to eliminate other possible problems. (I used the value from one of the FusionCharts doc pages.) The last line of the function, starting with "myChart.setDataXML," returns a JS error: "Object does not support this property or method." What am I doing wrong? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 6, 2010 Hello, If you've your chart objects inside <FORM> elements, you CANNOT use getChartFromId() method to get a reference to the chart, as the DOM Hierarchy of the chart object has changed. You'll get a JavaScript "<<ChartId>> is undefined" error. In these cases, you'll manually need to get a reference to the chart object. Or, you can opt to place the chart object outside <FORM> element. Share this post Link to post Share on other sites
ChartsJazz Report post Posted January 7, 2010 As I explained, I do not get the "<<ChartId>> is undefined" error. The statement that gets the ID does not fail. The alert returns the chart object ID. The problem is not in getting the chart object ID. The problem is with the setDataXML method, which returns "Object does not support this property or method." Share this post Link to post Share on other sites
ChartsJazz Report post Posted January 7, 2010 Can the client-side JavaScript method setDataXML be used to update the chart when the chart was originally rendered with the server-side VBScript statement Call renderChartHTMLor does the chart have to have been originally rendered with client-side JavaScript for the setDataXML method to work? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 7, 2010 Hello, You can update the chart at client-side using getChartFromId("myId").setDataXML() even after the chart was originally rendered using serverside methods. Note: That RegisterWithJS parameter must be set to true. Share this post Link to post Share on other sites
ChartsJazz Report post Posted January 8, 2010 The RegisterWithJS parameter is not valid on the server when the chart is created with Call renderChartHTML. How do I set that parameter in the client-side JavaScript without creating a new chart with JavaScript? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 11, 2010 Hello, RegisterWithJS parameter is valid on server. Please consider setting it to 1 when you are rendering it client-side. ref. - RenderChartHTML("chartSWF", "strURL", "strXML", "myFirst", "600", "300", debugMode,registerWithJS); Share this post Link to post Share on other sites
ChartsJazz Report post Posted January 12, 2010 renderChartHTML only accepts 7 parameters. When I try to add an 8th param, whether I set it to 1 or "1" or true or "true" the browser displays: Microsoft VBScript runtime (0x800A01C2) Wrong number of arguments or invalid property assignment: 'renderChartHTML' Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 12, 2010 Hello, Could you please try it using the latest version of FusionCharts.dll? I am attaching it. FusionCharts.zip Share this post Link to post Share on other sites
ChartsJazz Report post Posted January 13, 2010 This is disturbing that FusionCharts now has a .dll. One reason I advised the company I work for to buy FusionCharts is that it had no .dll and all I needed to copy to the web server was FusionCharts.asp, FusionCharts.js, and the .swf files for the chart types I wanted to use. The contract I work on does not allow us to install .dlls on the web server. We are developing in Classic ASP, which does not get compiled and does not use any .dlls. Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 13, 2010 Hello, The FusionCharts.dll file is used ASP.NET. When using classic ASP you do not require to use it. In classic ASP the registerWithJS parameter is not included. However, you can include it in the following manner: RenderChartHTML("chartSWF?registerWithJS=1", "strURL", "strXML", "myFirst", "600", "300", debugMode); Share this post Link to post Share on other sites
ChartsJazz Report post Posted January 13, 2010 That worked! Thank you. By the way, I stated in my first post on this topic that I was using Classic ASP. Thread closed. Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 13, 2010 Hello, I am extremely apologetic for the inconvenience. But glad that your issue has been resolved. Happy FusionCharting. Share this post Link to post Share on other sites