Error handling in chart, data provider, and value label components

Version: 9.0

Chart components, data provider components, and the value label control can all trigger an error event. When they trigger this event, they pass an object to the event. You can handle the error in different ways: you can use a MessageBar control, for example, or you can write to a console log.

This JavaScript example from page code writes an error object from an AreaChart control to a console log:

RequestResponse
this.AreaChart.on("error", function (errorObject) {
  console.log(errorObject);
});

This errorObject contains two mandatory properties, name and message, and an optional property called response:

  • Name

    This property identifies the kind of error, for example, info, warning, or error.

  • Message

    This is typically the error message itself.

  • Response

    If the error is spawned by an AJAX call to a DataProvider, this is the response.

Do you have some feedback for us?

If you have suggestions for improving this article,