The FCErrorEvent is a FusionCharts event which is triggered when an error occurs. This allows you to realize the errors as well as counter them.
In the following code we catch the FCErrorEvent event using an event listener, named errorHandler. The errorHandler alerts the error parameter. However, for practical cases you may counter the error, or further process the error to generate custom messages.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="com.fusioncharts.components.*" initialize="initApp()">
<ns1:FusionCharts id="FC1" FCChartType="Column3D" FCDataURL="Data.xml"/>
<mx:Script>
<![CDATA[
import com.fusioncharts.components.FCEvent;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
private function initApp():void
{
FC1.addEventListener("FCErrorEvent",errorHandler);
}
private function errorHandler(e:FCEvent):void
{
Alert.show(e.param);
}
]]>
</mx:Script>
</mx:Application>
If the above code is run in a JavaScript disabled browser, it will generate the following warning: