jami Report post Posted March 30, 2013 I click a button to chang chart by javascript sending paramenter, but it fail. Is red word wrong? <script type="text/javascript"> function get_chart_type() { var oldChart = FusionCharts("myChartId"); var newChart = oldChart.clone({swfUrl:"./FusionCharts/MSColumn2D.swf", setXMLUrl:escape("BS.php?brokerid=1360&stockid=1101") }); newChart.render("chartContainer"); } </script> it is ok when initial loading. --------------------------- <body> -------------------------------------------- <div id="chartContainer">FusionCharts2 will load here!</div> <script type="text/javascript"> var myChart2 = new FusionCharts( "./FusionCharts/MSColumn2D.swf", "myChartId", "950", "300", "0", "0" ); myChart2.setXMLUrl(escape("BS.php?brokerid=1360&stockid=1101")); myChart2.render("chartContainer"); </script> Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted April 1, 2013 Hi Jami, While creating a duplicate FusionCharts JavaScript object using "clone()" method, you can only pass the chart settings with updated values, to override the existing settings of the source chart. So, could you please provide the data URL in the "dataSource" parameter and "dataFormat" as "xmlurl" inside the "clone()" method, to override the updated chart data? For more information on "FusionCharts JavaScript API - Functions > FusionCharts Constructor > chart Parameters", please follow the link below: http://docs.fusioncharts.com/charts/contents/?JavaScript/API/Methods.html Hope this helps! Share this post Link to post Share on other sites