FusionCharts for Flex > Creating Widgets > Real-Time Capabilities > Flex API

In the previous section, we have already seen that you can update data in real-time data by specifying them in the XML attributes. Apart from that, we also give you a very flexible and robust API that allows you to manipulate data in real-time. We will introduce you to the complete real-time API in this section.

If you want to see the Flex API in action, you can visit the "Example" section.

Not all API methods stated in section may be present in all the widgets.
For more detailed API information regarding individual widgets you should visit the "API Reference > Widgets API" section.

Function Name

Parameter

Description

FCFeedData(strData:String):void strData:String This method feeds real-time data to gauge 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 the data for the given dial index on the gauge. If the gauge does not support multiple dials it won't fetch the data.
FCGetData():Number None This method returns the data for the given gauge. If the gauge supports multiple dials it won't fetch the data.
FCGetDataForId(dialId:String):Number dialId:String

This method returns the data for 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 gauge. If the gauge supports multiple dials it won't update the gauge.
FCSetData(value:Number):void value:Number This method sets the data for the given dial index on the gauge. If the gauge supports multiple dials it won't update the gauge.
FCSetDataForId(dialId:String, value:Number):void dialId:String, value:Number

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

FCStopUpdate():void None This method stops the gauge from self-updating itself.
FCRestartUpdate():void None If you've stopped the update of the gauge, you can resume the update using this method.

 

Event Name

Description

FCChartUpdated This method is triggered every time the gauge is updated.