Pallav

Better javascript callbacks?

Recommended Posts

We really need a better javascript callback system from FusionCharts. FC_Rendered() is finicky and causing many headaches. What I'd really like to see is something like this:

 

 

 


var myChart = new FusionCharts({

settings_file:"somesettings.xml",

dataURL:"data.xml",

id:"mySpiffyChart",

width:500,

height:400,

onInit:{

	animation:true,

	callback: function() {

		alert("this chart is has inited!");

	}

},

onReload:{

	animation:false,

	callback: function() {

		alert("this chart is has reloaded!");

	}

}

});

 

 

 

That way I can have as many charts as I need and each one can have it's own callback instead of everyone sharing FC_Rendered()

 

 

 

Does that make sense? Thoughts?

 

 

 

Thanks,

 

brian

Share this post


Link to post
Share on other sites

Brian,

 

 

 

I'm afraid you cannot do that. But in FC_Rendered(strDOMId), we pass the DOMId of each chart as a parameter. So, internally you could just put an if-then or switch-case to redirect the load to different methods.

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