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 This property 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 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 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 method returns the value of an attribute specified by the parameter.
FCGetCSVData():String   This method returns tha widget data as a CSV string.
FCGetSignature():String   This method returns the version of the widget being used.
FCGetXMLData():String   This method returns the XML data of the widget as a string.
FCExportChart(type:String, fileName:String):void type: String
fileName: String
This method 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.
 

Events

Event Name       Description
FCClickEvent This event is triggered when the user clicks on a dataplot which has 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 has loaded and before rendering starts.
FCErrorEvent The event is triggered when an error is generated
FCExported This event is generated after the completetion of the image export process.
FCDataLoadedEvent The event is dispatched after the widget data is loaded. The event is independent of the data source viz. FCData, FCDataXML, FCDataURL.
FCDataLoadErrorEvent This event is dispatched if 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 element, without any additional data is detected.