On DataLoadError do not render chart

Recommended Posts

Trying to do something simple: If there is a dataloaderror then don't render the chart.

Something like:

function FC_DataLoadError(DOMId){

if (DOMId=="chart1Id"){

//don't render 



The end result should be an empty DIV when there is an error and a chart rendered in the DIV when everything is good.  I'm no javascript jockey but it looks to me that the chart has to render before the dataload error function can be called.  When it renders, the flash movie with the "data load error" is displayed and takes up a 300px X 250px space.  I want there to be nothing in the div on error if possible.


Share this post

Link to post
Share on other sites





1. Load the chart 1x1 pixel or say 5x5.




2. Trap the event




3. If DataLoadError remove the chart instance from the parent div by setting innerHTML = ""




4. If successful , when no error events are trapped & FC_Rendered() get the XML from the chart by chart.getXML()




5. Render the chart again (with actual size) using this XML as dataXML in the same DIV where the small chart is present. This will replace the old chart with a new chart.

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