myusername Report post Posted November 25, 2008 I use fusionChart in IE7 , sometimes display the wrong output from updatechart by using ajax to replace xml file complete => wrong => code : function updateChart(xmlData){ if(isIE){ var chart = new FusionCharts("/static/swf/MSArea.swf", "chart_display", "208", "180", "0", "0"); }else{ var chart = new FusionCharts("/static/swf/MSArea.swf", "chart_display", "100%", "100%", "0", "0"); } chart.setDataXML(xmlData); chart.render("graph"); } xmlData is xml file from ajax request Please help me!, thank you. [email protected] Share this post Link to post Share on other sites
FusionCharts Support Report post Posted November 25, 2008 Hi, If you have already renderd a chart before AJAX PostBack, why pain yourself/browser to re-load the chart again. You can just use setDataXML() to update an existing chart. Just you would need to render the chart once: var chart = new FusionCharts("/static/swf/MSArea.swf", "chart_display", "208", "180", "0", "1"); NOTE the "1" at the end which would allow JavaScript to update chart later on. Now, in your update chart code simply write: getChartFromId("chart_display").setDataXML(xmlData); or if you have received the response text in URLEncoded form : getChartFromId("chart_display").setDataXML(unesape(xmlData)); Share this post Link to post Share on other sites
myusername Report post Posted November 25, 2008 I use this code : getChartFromId("chart_display").setDataXML(xmlData); to update xml of chart but it 's not render the new one. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted November 27, 2008 Hi, You would need to render the chart ONCE bofore you can update it. Please Code accordingly. Share this post Link to post Share on other sites