Rahul44 Report post Posted February 8, 2013 I was trying to follow your example but only the first data show its not actually switching the data. I am using FusionChart 3.1.1 not sure what the name of it is and i tried the following code .. <script LANGUAGE="JavaScript"> function updateChart(domId){ updateChartXML(domId,"<graph><set name='A' value='30' color='D64646' /><set name='B' value='51' color='AFD8F8' /></graph>"); this.document.frmUpdate.btnUpdate.disabled = true; } </SCRIPT> <div id="chart1div"> FusionCharts </div> <script language="JavaScript"> var chart1 = new FusionCharts("/FusionCharts/Optix/Column2D.swf", "chart1Id", "100%", "350"); chart1.setDataXML("<graph><set name='A' value='10' color='D64646' /><set name='B' value='11' color='AFD8F8' /></graph>"); chart1.render("chart1div"); </script> <form name='frmUpdate'> <input type='button' value='Change Data' onClick="javaScript:updateChart('chart1Id');" name='btnUpdate'> </form> Its giving me object expected error .. Can you pls advise .. Or can you suggest another way to change data in a fusion chart on the client side .. Share this post Link to post Share on other sites
Guest Sumedh Report post Posted February 11, 2013 Hi Rahul, Welcome to FusionCharts Forum! Sincere apologies for delayed response. Could you please try it out using the latest version of FusionCharts XT? Recently, we have released FusionCharts XT v3.3.0. It has many bug fixes and improvements. Also, it provides powerful JavaScript API for more customization as compared to FusionCharts v3.1.1 Please find the attached illustration for your reference. Hope this helps! UpdateChart_Data.zip Share this post Link to post Share on other sites
Rahul44 Report post Posted February 11, 2013 Hi Sumedh, Unfortunately my hands are tied for the update. If you can help me with a solution for that version that woudl have been great.. Thank you .. Thank you for your help Rahul. Hi Rahul, Welcome to FusionCharts Forum! Sincere apologies for delayed response. Could you please try it out using the latest version of FusionCharts XT? Recently, we have released FusionCharts XT v3.3.0. It has many bug fixes and improvements. Also, it provides powerful JavaScript API for more customization as compared to FusionCharts v3.1.1 Please find the attached illustration for your reference. Hope this helps! Share this post Link to post Share on other sites
Guest Sumedh Report post Posted February 12, 2013 Hi Rahul, Please find attached illustration with FusionCharts v3.1.1 files. Hope this helps! UpdateChart_Data.zip Share this post Link to post Share on other sites
Rahul44 Report post Posted February 14, 2013 (edited) Hi sumedh, Thank you so much for your help that worked ..sorry to bother you again ..so how can i have a link to get back to the old data ?? I mean i know i can another function with same old data to link back to that function but is there a better way ..like when i am in the second chart a back link to go back ? Thank you sumedh. Hi Rahul, Please find attached illustration with FusionCharts v3.1.1 files. Hope this helps! Edited February 14, 2013 by Rahul44 Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted February 15, 2013 Hi Rahul, As you have mentioned, you would need to update the chart again with the old data to get back the original chart. However, instead of passing the old data again to the "setDataXML()" method, you can get the chart XML by "getXML()" method and store it in a JavaScript variable, just before updating the chart and onClick of "Back" button you can update the chart with that saved data. Please find the modified "test.html" attached here, for your reference. Hope this helps! test.html Share this post Link to post Share on other sites
Sanjukta Report post Posted February 15, 2013 Hi, Hi sumedh, Thank you so much for your help that worked ..sorry to bother you again ..so how can i have a link to get back to the old data ?? I mean i know i can another function with same old data to link back to that function but is there a better way ..like when i am in the second chart a back link to go back ? Thank you sumedh. Please note that FusionCharts XT supports a special type of Drill-down called LinkedCharts that natively provides a "Back" button to go back to parent child from where you have drilled-down to the child chart. Ref.- http://www.fusioncharts.com/demos/features/#linkedcharts-for-easy-drill-down http://docs.fusioncharts.com/charts/contents/?FirstChart/LinkedCharts.html In case you wish to achieve the same feature on the chart in FusionCharts v3.1.1, this is natively not possible. However, you can always wrote your own piece of code to call the function to go back to the previous chart at your end, as per your requirement. Hope this helps. Share this post Link to post Share on other sites
Rahul44 Report post Posted February 18, 2013 Hi Sashibhusan, Thank you for that .. that is exactly what i was looking for .. Thank you for your help..Take care Rahul Hi Rahul, As you have mentioned, you would need to update the chart again with the old data to get back the original chart. However, instead of passing the old data again to the "setDataXML()" method, you can get the chart XML by "getXML()" method and store it in a JavaScript variable, just before updating the chart and onClick of "Back" button you can update the chart with that saved data. Please find the modified "test.html" attached here, for your reference. Hope this helps! Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted February 19, 2013 Hi Rahul, We are glad to hear that the solution was helpful to you. Happy FusionCharting! Share this post Link to post Share on other sites