MatB Report post Posted March 31, 2011 I've read through the examples showing how it is possible to update the data source URL using JavaScript, but it's not working for me. Instead, I get the following error in Firebug: this.setAttribute is not a function I have created the initial Gantt chart using the registerWithJS option and setting debugMode show that the correct chart is registered with external script. The initial chart loads perfectly. The JavaScript I'm using is very simple at this stage. This is in the <HEAD> function renderChart() { var chartObj = FusionCharts("Gantt1"); chartObj.setDataURL("gantt_data.php?d=Civils"); } This is in the body: var Gantt = new FusionCharts("../lib/FusionWidgets/Charts/Gantt.swf", "Gantt1", "1000", "800", "1", "1"); Gantt.setDataURL("gantt_data.php?d=Rail"); Gantt.render("GanttDiv"); Currently, the renderChart function is called by clicking a button. Any ideas why this isn't working? Thanks Share this post Link to post Share on other sites
Ayan Pal Report post Posted April 1, 2011 Hi MatB, Thank you for your post. late us replicate the issue from our end ten we will get back to you. Share this post Link to post Share on other sites
Ayan Pal Report post Posted April 4, 2011 Hi MatB, We are unable to replicate the issue. Please see the attached sample which is working fine. If the issue still exist then check the Flash Player Global Security Settings, for that you may refer to below link http://www.fusioncharts.com/powercharts/docs/Tools/FlashPlayerSecuritySetup/HowToSetup.html gantt.zip Share this post Link to post Share on other sites
MatB Report post Posted April 4, 2011 Hi. Thanks for your help. I've now managed to get this working. The problems was due to me using the FusionCharts.js that is supplied with the FusionWidgets package, rather than the FusionCharts.debug.js supplied with FusionCharts. Are these supposed to be different? Regards, Mat Share this post Link to post Share on other sites
FusionCharts Support Report post Posted April 5, 2011 Hi, FusionCharts.js/FusionCharts.debug.js which is present in FusionCharts.v3.2.x or PowerCharts v3.2.1 pack is a newly built JavaScript class to load and add various functionality to charts in FusionCharts and PowerCharts 3.2.x packs. However, since, FusionWidgets pack is not yet 3.2, it retains the old FusionCharts.js which was taken from FusionCharts v3.1.1. Hence, the difference. However, FusionWidgets can be loaded using the latest js provided in FusionCharts/PowerCharts v3.2.1 without any issue. But, so far the use of JavaScript API is concerned, you need to stick to the API of FusionWidgets. Could you please confirm, if the solution provided by Ayan has helped? Share this post Link to post Share on other sites
MatB Report post Posted April 5, 2011 Hi. Yes, using the updated FusionCharts.debug.js has fixed the problem. Thank you. Share this post Link to post Share on other sites
Guest Angie Report post Posted April 6, 2011 Hi, We are glad to know that you have managed to solve your problem. Keep FusionCharting! Share this post Link to post Share on other sites
Abk092 Report post Posted May 14, 2011 Hi Angshu, I am getting the same problem. setChartAttribute doesn't work with Fusioncharts.js which we got with fusionwidgets enterprise . I need to dynamically change the color of chart based on a value . Surprisingly it started working when i replaced it with FusionCharts.debug.js but then , with fusionwidgets i have to use realtimecharts, so FusionCharts.debug.js renders duplicate charts ( I seriously have no idea why, I am using a java wrapper though) and creates problem in using feedData method for realtime update. Please help as in following area : 1. How do I change a chartAttribute like bgcolor, caption in fusionwidgets, using fusionchart.js .it has to be done dynamically not by providing xml again. (I get the error as this.setAttribute is not an attribute, i am using RealTimeArea.swf) 2.if I use fusioncharts.debug.js , it renders chart id as 'chartobject-1' not the id as i give. So i m unable to get ids , which i will be generating and keeping track of in my application. Ultimate solution would be point #1. Thanks a lot in advance. Share this post Link to post Share on other sites
Sanjukta Report post Posted May 16, 2011 Hi, FusionCharts.js/FusionCharts.debug.js which is present in FusionCharts.v3.2.x or PowerCharts v3.2.1 pack is a newly built JavaScript class to load and add various functionality to charts in FusionCharts and PowerCharts 3.2.x packs. However, since, FusionWidgets pack is not yet 3.2, it retains the old FusionCharts.js which was taken from FusionCharts v3.1.1. Hence, the difference. However, FusionWidgets can be loaded using the latest js provided in FusionCharts/PowerCharts v3.2.1 without any issue. But, so far the use of JavaScript API is concerned, you need to stick to the API of FusionWidgets. Hope this helps. Share this post Link to post Share on other sites
Abk092 Report post Posted May 16, 2011 Many Thanks Sanjukta , That means , I can not use Fusionwidgets for something like http://www.fusioncharts.com/docs/JavaScript/JS_ChangeChartProperties.html ? Because when I am doing so, I get an Error in JS saying that setChartAttribute is not a method. can you please verify and let me know, if this is really a case. I will have to look for other options of updating the chart, which totally negates the dynamic beaviour of fusionwidgets. Your post above was a geat help in understanding things.. Thanks Again. Share this post Link to post Share on other sites
Sanjukta Report post Posted May 16, 2011 Hi, You are welcome. But I am afraid, FusionWidgets does not support the "setChartAttribute" function, as of now. However, glad to let you know that various new attributes, functions and features would be supported by the next upgraded version of FusionWidgets, i.e, FusionWidgets v3.2. We are unable to commit any timeline for this as we are working on it. We shall keep you updated on the advancement. Thank you for your continued patience and patronage. Share this post Link to post Share on other sites
Abk092 Report post Posted May 16, 2011 Ok, Thanks. This was helpful. Share this post Link to post Share on other sites
Sanjukta Report post Posted May 17, 2011 Hi, You are welcome! Thank you for your continued patience and patronage. Share this post Link to post Share on other sites