jami

How To Reload Chart?

Recommended Posts

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now