Vijaya_FC Report post Posted April 26, 2011 Hi, I am trying to get the data back from the chart using getXMLData function using V3 free version. Its throwing error "getDataXML is not defined. Please help me in resolving this issue Thanks, Vijaya Share this post Link to post Share on other sites
Guest Angie Report post Posted April 26, 2011 Hi, Please try this link: http://www.fusioncharts.com/docs/?JavaScript/JS_DataBackFromChart.html Hope this helps. Share this post Link to post Share on other sites
Vijaya_FC Report post Posted April 26, 2011 (edited) Hi, I tried the example in the above said link: http://www.fusioncha...kFromChart.html But its throwing the error: FusionCharts("myChartId").getDataAsCSV is not a function Code: <html> <head> <title>Getting CSV data from chart</title> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"> var myChart = new FusionCharts( "FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "0" ); myChart.setXMLData("<chart><set label='A' value='10' /><set label='B' value='11' /></chart>"); myChart.render("chartContainer"); </script> <input onclick = "alert(FusionCharts('myChartId').getDataAsCSV())" type="button" value="Get CSV Data from chart"> </body> </html> Edited April 26, 2011 by Vijaya_FC Share this post Link to post Share on other sites
Guest Angie Report post Posted April 26, 2011 Hi, Please enable the registerwithJS parameter to "1" to communicate between FusionCharts and JavaScript. For ex: var myChart = new FusionCharts( "FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" ); Hope this helps. Share this post Link to post Share on other sites
Vijaya_FC Report post Posted April 26, 2011 Hi, Tried with the suggested change, var myChart = new FusionCharts( "/FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" ); But no luck. am still getting the same error registerwithJS parameter is for paid version right? I am using the free version. Thanks, Vijaya Share this post Link to post Share on other sites
Guest Angie Report post Posted April 26, 2011 Hi, I am afraid, FusionCharts free does not support the registerWithJS parameter, at this time. You would need to upgrade to FusionCharts v 3.2. Hope this helps. Share this post Link to post Share on other sites
Vijaya_FC Report post Posted April 26, 2011 I am using @version 3.2.1-release free version to try with the features supported in v3.2 before going for the licensed version. Is getDataAsCSV() is not supported in free version? Thanks, Vijaya Share this post Link to post Share on other sites
Guest Angie Report post Posted April 26, 2011 Hi, Please make sure that you are using the latest FusionCharts.js, highcharts.js and jquerymin.js file available in the charts folder of download package. For more details, please visit the link: http://www.fusioncharts.com/docs/?FirstChart/FirstChart.html Awaiting for your reply. Share this post Link to post Share on other sites
Vijaya_FC Report post Posted April 26, 2011 (edited) Hi, I am using the latest FusionCharts.js and I am not using highcharts.js and jquerymin.js In rails - Views : _test.html.erb 1.render_chart_html: <html> <head> <title>Getting data from chart</title> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <%str_xml = "<chart><set label='A' value='10' /><set label='B' value='11' /></chart>"%> <div id="test"> <% render_chart_html "/FusionCharts/Column3D.swf", '', str_xml,"myChart", 800, 400, false do-%> <% end -%> </div> <input onclick = "alert(FusionCharts('myChart').getChartData('xml'))" type="button" value="Get Data from chart"> </body> </html> Its rendering the chart, but on clicking the "Get data from chart" its throwing the error - FusionCharts("myChart") is undefined 2.render_chart <html> <head> <title>Getting data from chart</title> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <%str_xml = "<chart><set label='A' value='10' /><set label='B' value='11' /></chart>"%> <div id="test"> <% render_chart "/FusionCharts/Column3D.swf", '', str_xml,"myChart", 800, 400, false,false do-%> <% end -%> </div> <input onclick = "alert(FusionCharts('myChart').getChartData('xml'))" type="button" value="Get Data from chart"> </body> </html> Its not rendering the chart, But its displaying the text "Chart" 3. JavaScript function <html> <head> <title>Getting CSV data from chart</title> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"> var myChart = new FusionCharts( "/FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" ); myChart.setXMLData("<chart><set label='A' value='10' /><set label='B' value='11' /></chart>"); myChart.render("chartContainer"); </script> <input onclick = "alert(FusionCharts('myChartId').getChartData('xml'))" type="button" value="Get Data from chart"> </body> </html> Its working fine. Its getting the data in xml format So why its not working using helper methods? Edited April 26, 2011 by Vijaya_FC Share this post Link to post Share on other sites
Everton Report post Posted May 10, 2011 I'm having the same problem I can not get the last change in the x and y axes Share this post Link to post Share on other sites
Guest Angshu Report post Posted May 11, 2011 Hi, Welcome to FusionCharts Forum! First of all, we would like to thank you for showing interest in FusionCharts. Could you please send us a screenshot or the entire code to look into the issue? Awaiting for your response. Share this post Link to post Share on other sites