FusionWidgets allow to update your gauge data simply by specifying it in the XML. All you need to do is provide an URL for your application, which acts as a streaming-data source. Also, you need to specify the time interval in which to update your gauges. By performing these two simple things, your gauges will automatically update to reflect real-time data.
The following code creates a simple widget application that updates its data from a web page in every 3 seconds. The data source provides data in FusionWidgets streaming-data format. You can learn more about streaming-data format in the "Streaming-data Format" section.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:fw="com.fusionwidgets.components.*">
<fw:FusionWidgets FCChartType="Cylinder" FCDataXML="{dataXML}"/>
<mx:Script>
<![CDATA[
[Bindable]
private var dataXML:String = "<chart upperLimit='100' lowerLimit='0' tickMarkGap='5' " +
"numberSuffix='%25' refreshInterval='3' " +
"dataStreamURL='http://www.fusioncharts.com/widgets/gallery/DataProviders/Cylinder.asp'>" +
"<value>32</value>" +
"</chart>";
]]>
</mx:Script>
</mx:Application>
In the above code, we have specified the refreshInterval and dataStreamURL attributes, which specify the update cycle time and the data source respectively. The data is fetched automatically from the URL provided and refreshes in every 3 seconds.