mie131085 Report post Posted October 15, 2012 (edited) Hi there, just some question here. is this the right way in accessing the XMLdata inside the fusionchart object? what im trying to achieve is accessing the object fusionchart xmldata that is generated by the server. e.g. step 1 : server sending the chartobject to the client side <?php // serverside programming // generate fusionchart object on the clientside echo renderChart("Charts/column3d.swf", "", "<chart><set label='dummy data' value='10000'/></chart>", "myFirst", 400, 300, false, true); ?> Step 2 : on client side, the output will be as in the following format : <!-- START Code Block for Chart myFirst --> <div id="myFirstDiv">Chart</div> <script type="text/javascript" ><!-- // Instantiate the Chart if ( FusionCharts("myFirst") && FusionCharts("myFirst").dispose ) FusionCharts("myFirst").dispose(); var chart_myFirst = new FusionCharts( { "swfUrl" : "Charts/column3d.swf", "width" : "400", "height" : "300", "renderAt" : "myFirstDiv", "dataFormat" : "xml", "id" : "myFirst", "dataSource" : "<chart><set label='dummy data' value='10000'/></chart>" } ).render(); // --></script> <!-- END Script Block for Chart myFirst --> STEP 3 : question that i wanna ask is regarding on this part. <script type="text/javascript"> // On javascript // accessing object var myFusionObject = FusionCharts('myFirst'); // accessing fusionchart xmldata var myXMLData = myFusionObject.flashVars.dataXML; </script> is it wise for me to accessing the dataXML thru flashvars? as i can access the xmldata thru IE but didn't seem to find any other solution in accessing the dataXML on other browser (mozilla, opera, etc) . hope someone here can help me out on this one as i'm trying to make the chart compatible with other browsers as well thru javascript Edited October 15, 2012 by mie131085 Share this post Link to post Share on other sites
FusionCharts Support Report post Posted October 15, 2012 Hi, FusionCharts XT provides a plathora of JavaScript functions to make your life easier. For your case, you can use getXMLData() function to get the chart's XML. CODE: <script type="text/javascript"> // On javascript // accessing object var myFusionObject = FusionCharts('myFirst'); // accessing fusionchart xmldata var myXMLData = myFusionObject.getXMLData(); </script> The again, there are other ways. For more information please read: FusionCharts XT Documentation > FusionCharts and JavaScript > Getting Data back from chart [EDIT] Plus, it is not wise to use flashvars. Share this post Link to post Share on other sites