siwel_nerrad

Members
  • Content count

    1
  • Joined

  • Last visited

Everything posted by siwel_nerrad

  1. Retrieve Chart Data

    Hi, I have bound a powerchart to some XML and it displays the chart fine. What I now want to do is to retrieve the current XML data back from the chart but I cannot seem to get this working. I have viewed the online demo at http://www.fusioncharts.com/Demos/ScatterReturn/Default.html and that is what I want to achieve, but when I download the source it doesn't work. I am programming this in ASP.net 2.0 and C# using masterpages and here is my code: <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script language="JavaScript" src="<%=Request.ApplicationPath %>/Javascript/FusionCharts.js"></script> <script language="JavaScript"> /** * readXMLFromChart() method is called when the user pressed the * button to return XML data */ function test() { //Get a reference to our chart var ourChart = getChartFromId("SelectChart"); //Get the data from chart var xmlRtn = ourChart.getXMLData(); //Show it to user in alert box. alert(xmlRtn); } </script> <table width='98%' border ='0' cellspacing='0' cellpadding='3' align='center'> <tr> <td valign='top' class ='text' align='center'> <div id="chartdiv" align="center"> FusionCharts. </div> <script type="text/javascript"> var chart = new FusionCharts("DragNode.swf", "SelectChart", "550", "400", "0", "1"); chart.setDataXML("<%=XmlFC %>"); chart.render("chartdiv"); </script> </td> </tr> <tr> <td> <input id="Button1" type="button" value="button" onclick="test();" /> </td> </tr> </table> </asp:Content> Any suggestions??