Handling errors using FusionCharts JavaScript Class | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FusionWidgets XT uses FusionCharts JavaScript Class that takes care of all the products of the FusionCharts XT Suite including FusionWidgets XT. FusionCharts JavaScript Class provides an effective mechanism to debug charts. Errors can be debugged using one of the following methods:
Let us see below how each can be implemented: Listening to data-error related events using simple events model The chart itself can raise one of three data related errors listed below:
You can listen to these events and take necessary steps as per the requirement you have. Listening to data-error related events using advanced events registration model Using advanced event registration model, you can also listen to the events listed above. The event types or event names for the above mentioned events are NoDataToDisplay, DataLoadError, DataXMLInvalid. Additionally, FusionCharts JavaScript Class provides two more error events.
You can listen to the above events globally or on a per-chart basis. Other than the debug mode of individual FusionCharts SWFs, the FusionCharts JavaScript Class has its own debugMode as well. This allows users to watch the chart’s JavaScript activities and debug charts accordingly. To enable the JavaScript debugMode, you need to write the following lines of code: FusionCharts.debugMode.enabled(true); FusionCharts.debugMode.outputTo(console.log); |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The table below contains the list of Error codes and the description of each error.
|