The FCErrorEvent is an event which is triggered when an error occurs while rendering/manipulating a chart/widget using FusionCharts for Flex component. This allows you to determine the errors and take measures to 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.events.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, following warning will be dispalyed: