This is a migrated thread and some comments may be shown as answers.

[Solved] Overlay error message on chart control

5 Answers 130 Views
Chart for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shahnaz
Top achievements
Rank 1
Shahnaz asked on 16 May 2013, 06:28 AM
Is it possible to overlay an error message on the chart control when a network call to retrieve the series data fails/times out?

Thanks in advance.
Shahnaz.

5 Answers, 1 is accepted

Sort by
0
Accepted
Martin Yankov
Telerik team
answered on 16 May 2013, 01:11 PM
Hi Shahnaz,

Yes, it is possible to track network call errors trough the DataSource.error event. You can set the handler to visualize an element containing the error message or another error text.

You can find attached a project with an example of the problem.

Here is a short description of what is in the example:
  • In the HTML, there is a wrapper element for the chart and a div that will contain the error message.
  • In the CSS, the error message div is hidden and is absolutely positioned relatively to the wrapper.
  • The RadChart control is initialized in the js part with a DataSource linked to an invalid url for the purposes of the example.
  • The error event handler is attached on initialization. It populates the error message div and sets it to visible.

Here is also a link to the DataSource events documentation for further info on the error event properties.
http://www.telerik.com/help/windows-8-html/datasource-events.html

Regards,
Martin Yankov
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Shahnaz
Top achievements
Rank 1
answered on 17 May 2013, 05:35 PM
Thanks for the quick response Martin. I was thinking that there would be something built into the chart control itself that would automatically show that message without me having to add an extra div and overlay it myself. But this works too. I had multiple charts on my page, so I had to play around with the CSS to position it correctly. Thanks again for the response and the approach.

Shahnaz.
0
Zeeshan
Top achievements
Rank 1
answered on 11 Jul 2013, 01:59 PM
This information is not helpful for me. Anyone else to share your idea with us
0
Zeeshan
Top achievements
Rank 1
answered on 11 Jul 2013, 02:00 PM
This information is not helpful for me. Anyone else to share your idea with us
0
Martin Yankov
Telerik team
answered on 11 Jul 2013, 03:43 PM
Hello Zeeshan,

 
Please specify what part of the provided information you have problems with and I will gladly provide further explanation on it. Also, could you descirbe the specific problem you are facing, so we can suggest a solution to it.

Regards,
Martin Yankov
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Chart for HTML
Asked by
Shahnaz
Top achievements
Rank 1
Answers by
Martin Yankov
Telerik team
Shahnaz
Top achievements
Rank 1
Zeeshan
Top achievements
Rank 1
Share this question
or