Handling errors using FusionCharts JavaScript class | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. For sample with detailed description read Debugging your Charts > Using JavaScript page, 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 Library provides two more error events.
You can listen to the above events globally or on a per-chart basis. For sample implementation and explanations read Debugging your Charts > Using JavaScript page. Other than the debug mode of individual FusionCharts SWFs, the 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); For details of this debug mode, sample code snippets and explanations read Debugging your Charts > Using JavaScript page. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The table below contains the list of Error codes and the description of each error. [@SB: How and where to use these I need example scenario and example code]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||