FusionCharts for Flex > Widget API Reference > Individual Widget API

 

Properties

Property Name Description
FCChartType With the help of this property you can select a widget (gauge/chart) type to be used. The list of all available widget types is given in List of Widgets page within the 'Introduction' chapter.
FCDataURL Using this property you can provide the path to your external XML file.
FCDataXML It enables you to pass the entire widget XML as string.
FCDebugMode This attribute lets you open the debug window, showing information pertaining to the rendered widget. It takes either of the two value - true or false. If it is set to true, the debug window will open up. The default value is false.
FCFolder This attribute sets the folder where the widget SWF files are kept. By default, FusionCharts for Flex component assumes that the widgets are present in fusionwidgets folder in src folder or the folder where the application MXML files is present. But, the developer can always decide to keep the widget SWF files in a different folder. The value of this attribute would be a path relative to the Application MXML file's folder.
Example: "." - when the widget SWF files resides in the same folder as the Application MXML file.
myWidgets - when widgets SEF files will be in a folder named myWidgets inside the Application MXML file's folder.
resources\widgets - widgets are in widgets folder inside resources folder. The resources folder is placed in folder where Application MXML file is present.
 

Methods

Method Name Parameters Description
FCSetDataURL
(dataURL:String):void
dataURL:String This function updates widget XML from a file and then renders the widget. The URL of the file is passed as String parameter - dataURL.
FCSetDataXML
(strXML:Sting):void
strXML:String This function updates widget XML from a string and renders the widget. The XML is passed as a String parameter - strXML.
FCRender():void   This function renders a widget. It can also update a widget after new widget data is set using FCData(), FCSetDataXML(), FCSetDataURL() methods or using FCDataURL, FCDataXML properties.
FCPrintChart():void   This function prints the widget.
FCGetAttribute
(attributeName:String):String
attributeName:String This function returns the value of an attribute specified by the parameter.
FCGetCSVData():String   This function returns widget data as a CSV string.
FCGetSignature():String   This function returns the version of the widget being used.
FCGetXMLData():String   This function returns the XML data of the widget as a string.
FCExportChart(type:String, fileName:String):void type: String
fileName: String
This function calls the widget export routine for saving the widget as PDF/image. Parameters may be passed to override the export parameters initially specified by the XML.
FCFeedData(strData:String):void strData:String This method feeds real-time data to widget using Flex. The data has to be in the same format as provided by real-time data provider page.
FCGetData(dialIndex:Number):Number dialIndex:Number This method returns data of the given dial index on the widget.
FCGetDataForId(dialId:String):Number dialId:String

This method returns data of the given dial using its defined ID. The ID of the dial is defined in XML using:
<dial ... id='XYZ' ...>

FCSetData(dialIndex:Number, value:Number):void dialIndex:Number, value:Number This method sets the data for the given dial index on the widget.
FCSetDataForId(dialId:String, value:Number):void dialId:String, value:Number

This method returns data of the given dial using its defined ID. The ID of the dial is defined in XML using:
<dial ... id='XYZ' ...>

FCStopUpdate():void   This method stops the widget from self-updating itself.
FCRestartUpdate():void   If you've stopped the update of the widget, you can resume the update with the help of this method.
FCClearLog():void   This method clears all data in the message logger.
FCHideLog():void   This method hides the message logger data.
FCShowLog():void   This method shows the message logger data.
FCShowAnnotation
(annotationId:String):void
annotationId:String This method shows the annotation with the specified identifier.
FCHideAnnotation
(annotationId:String):void
annotationId:String This method hides the annotation and the specified identifier.
 

Events

Event Name       Description
FCClickEvent This event is triggered when a user clicks on a dataplot which containing a link attribute that starts with S-.
FCRenderEvent This event is triggered when the widget has rendered completely.
FCLoadEvent This event is triggered after the widget data is loaded and before rendering starts.
FCErrorEvent The event is triggered when an error is generated.
FCExported This event is generated after completetion of the image export process.
FCDataLoadedEvent The event is dispatched after the widget data is loaded. It is independent of the data source viz. FCData, FCDataXML, FCDataURL.
FCDataLoadErrorEvent This event is dispatched when the widget fails to load data. Generally caused due to invalid or empty data sources.
FCDataXMLInvalidEvent This event is generated if the data source does not conform to FusionCharts XML.
FCNoDataToDisplayEvent This event is triggered when a dataset consisting of just the root elements, without any additional data is detected.
FCChartUpdatedEvent The event is dispatched every time the widget data is updated in real-time.
FCAlertEvent This event is generated when the alert manager raises an alert. The event is triggered only if the callFlex attribute is activated.
FCMessageEvent This event is generated when a message is received by the message logger. The event is triggered only if the messageGoesToFlex attribute is activated.