RealTimeArrayCollection---flex实时获取数据并以LInechart的形式显示
来源:互联网 发布:淘宝卡盟 编辑:程序博客网 时间:2024/06/11 02:31
<?xml version="1.0"?>
<!-- charts/RealTimeArrayCollection.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize=
"initTimer()">
<mx:Script><![CDATA[
import flash.utils.Timer;
import flash.events.TimerEvent;
import mx.collections.ArrayCollection;
[Bindable]
public var memoryUsage:ArrayCollection = new ArrayCollection();
public function initTimer():void {
// The first parameter in the Timer constructor
// is the interval, in milliseconds.
// The second parameter is how many times to run (0 is
// infinity).
var myTimer:Timer = new Timer(1000, 0);
// Add the listener for the timer event.
myTimer.addEventListener("timer", timerHandler);
myTimer.start();
}
public function timerHandler(event:TimerEvent):void {
var o:Object = new Object();
// Get the number of milliseconds since Flash Player started.
o.time = getTimer();
// Get the total memory Flash Player is using.
o.memory = flash.system.System.totalMemory;
trace(o.time + ":" + o.memory);
// Add new object to the ArrayCollection, which is bound
// to the chart's data provider.
memoryUsage.addItem(o);
}
]]></mx:Script>
<mx:LineChart id="chart" dataProvider="{memoryUsage}"
showDataTips="true">
<mx:horizontalAxis>
Defining chart data 1607
<mx:LinearAxis/>
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:LinearAxis minimum="5000000"/>
</mx:verticalAxis>
<mx:series>
<mx:LineSeries yField="memory"/>
</mx:series>
</mx:LineChart>
</mx:Application>
- RealTimeArrayCollection---flex实时获取数据并以LInechart的形式显示
- flex 自定义LineChart的数据字段的显示格式 dataFunction
- flex获取并显示数据
- Linux 获取摄像头数据并实时显示
- 获取当前日期时间并以LCD形式显示
- java获取一段文字的url地址并以链接的形式显示在网页上
- flex中获取并显示数据
- 基于Bmob平台进行从服务器获取图片数据(url)的操作,并以瀑布流得形式显示图片
- 以数组形式获取数据
- android 创建menu,并以ActionBar的形式显示
- Flex 中给LineChart的节点上显示数值
- 从网络端leanCloud获取上传的图片和文字并以listview的形式显示在android端
- Vue.js实现的异步获取数据并以表格形式展示内容,实现基本的增删改查操作
- 使用 jsonp获取百度搜索提示接口的数据并实时显示
- 以曲线或柱状图实时显示数据的控件
- Flex中的LineChart的使用
- Android从外部API获取json数据并以listview形式展现
- ASP+JS获取并实时显示服务器时间的代码
- Oracle中的CHAR,NCHAR,VARCHAR,VARCHAR2,NVARCHAR2
- 关于函数指针的使用
- 大整数加法
- SQL Server 使用BCP导出数据
- LinkButton 不触发事件 页面的状态栏上总是提示 "网页上有错误"
- RealTimeArrayCollection---flex实时获取数据并以LInechart的形式显示
- 我回来了
- ATL Windowing中的汇编:_stdcallthunk分析
- wap push pdu 解析
- web.xml配置解析
- 使用Silverlight Toolkit 等级控件---Rating
- PL/SQL中cursor(光标/游标)的用法
- 关于ActiveX Control开发总结 MFC篇
- debug调试时没法退出的问题