Sign in to follow this  
bhalperin

Custom error message

Recommended Posts

I have an ASP.Net applications and a Http Handler (.ashx) file that generates XML for a chart. This .ashx file is the dataURL attribute of the chart file. I'm using JavaScript to create the chat object and call the .ashx file.

The ashx handler is doing some work including retrieveing data from a database and constructs the XML string eventually returned.

If there is a failure while the ashx does its job, for instance failing to contact the database, I would like the .ashx handler to return an XML string to the JavaScript caller so it will be displayed inside the frame allocated for the chart, just like the default message "Error in loading data" is displayed at times.

Does FC include and attribute to the <graph> element that can do that? For example:

<graph errmsg="My custom error message"... >

Share this post


Link to post
Share on other sites

It would be great to be able to insert a ChartNoDataText custom message in the XML.

 

 

 

When the user change the state of a graph and there is no data, we could send a specific message on why this is happening instead of the generic one ("No data to display" or a personalized version).

 

 

 

Even if we use the JS event (FC_NoDataToDisplay), we still can

Share this post


Link to post
Share on other sites

Hi Rajroop,

 

 

 

when the JS event FC_NoDataToDisplay fires, I have no clue why there is no data because nothing is passed back to the function except the chart id.

 

 

 

I see 2 possibilities to solve this and they could be used both:

 

 

 

- allow the ChartNoDataText to be set in the XML

 

- allow a "JSparam" element to be set in the XML that would be passed back to the JS events. This element could contains a string of text or JSON that the function could use to customize his behavior on the fly.

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello :),

 

 

 

Thank you for your suggestions. We'll duly look into this. :)

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
Sign in to follow this