Jack Hunter Report post Posted May 9, 2012 I can't feed real time data on chart bay using the javascript method feedData(). The example shown in docmentation doesn't work. The method feedData() isn't recognized. There is not any running example on docs. Do someone has used this feature? Please, tell me how to. Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted May 10, 2012 Hi, The Real Time data feeding to the chart using FusionCharts JavaScript API is working fine from our end. Please have a look to the attached sample. In this example the HTML button Click will call the JavaScript function where, random data is generated and fed to the chart. Hope this helps! RealTime Chart Using JS API.zip Share this post Link to post Share on other sites
shamasis Report post Posted May 11, 2012 I can't feed real time data on chart bay using the javascript method feedData(). The example shown in docmentation doesn't work. The method feedData() isn't recognized. There is not any running example on docs. Do someone has used this feature? Please, tell me how to. Hey... did you check whether the chart has completely rendered before calling feedData? feedData should ideally be called after the chart's "rendererd" event is fired. Share this post Link to post Share on other sites
Jack Hunter Report post Posted May 11, 2012 Hi, The Real Time data feeding to the chart using FusionCharts JavaScript API is working fine from our end. Please have a look to the attached sample. In this example the HTML button Click will call the JavaScript function where, random data is generated and fed to the chart. Hope this helps! Hi, Sashibhusan... I'm very tanks for your help.I had tested this sample application, but it didn't worked here. The chart rendered successfully, however the method doesn't work. I'm debugging with firebug tool and it shows a message error like "chartRef.feedData is not a function". It's being curious... It must be a detail I'm not finding out. I've tested on mozila and IE navigators. So, let's see what I can do. If you discover something, please tell me. Thanks a lot. Share this post Link to post Share on other sites
Jack Hunter Report post Posted May 11, 2012 Hey... did you check whether the chart has completely rendered before calling feedData? feedData should ideally be called after the chart's "rendererd" event is fired. Hi, shamasis... Yeah, the chart rendered successfully, but the method doesn't work. And yeah, I'm calling the method after the chart has been rendered.However, I'm tanks for your help. Share this post Link to post Share on other sites
shamasis Report post Posted May 14, 2012 Hi, shamasis... Yeah, the chart rendered successfully, but the method doesn't work. And yeah, I'm calling the method after the chart has been rendered.However, I'm tanks for your help. Hey... one more basic check: If you are using Flash renderer, did you try ensuring that you have correct Flash Global Security Settings? Try: http://goto.fusioncharts.com/flash-global-security-settings-guide Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted May 14, 2012 Hi, Could you please check if the chart has rendered successfully or not, before updating the data by using JavaScript function "feedData();"? Please change the code as per the reference code provided below: function feedDataToChart(){ var chartRef = FusionCharts("myChartId"); var currDate = new Date(); var label= currDate.getHours() + ":" + currDate.getMinutes() + ":" + currDate.getSeconds(); var randomValue = Math.floor(Math.random()*500)/100 + 30; var strData = "&label=" + label + "&value=" + randomValue; function FC_Rendered("myChartId"){ chartRef.feedData(strData); } else{ alert("The Chart has not rendered. Unable to feed data."); } return; } Hope this helps! Share this post Link to post Share on other sites
Jack Hunter Report post Posted May 16, 2012 Yeah, I got it! I switched from flash to JavaScript rendering mode. Like in http://docs.fusioncharts.com/widgets/Contents/FirstChart/UsingPureJS.html#force Voila. Tanks my fiends... Tanks for your heps. Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted May 17, 2012 Hi, I am glad to hear that your issue has been resolved. Share this post Link to post Share on other sites