从数据库中读取数据,在flex中通过线性图表显示,怎么去表示数据源问题 10
privatefunctionqueryResult(event:ResultEvent):void{ff=event.resultasArrayCollection;}...
private function queryResult(event:ResultEvent):void{
ff = event.result as ArrayCollection;
}
接收返回来的数组对象 字段包括 血压值和日期
血压 日期
100 2010-01-02
200 2010-01-03
300 2010-01-04
我该如何去添加这个显示呢
Bindable] public var chartDP:Array = [
{day:'Monday2',xueya:ff.getItemAt(0).xueya},
{day:'Tuesday2',xueya:ff.getItemAt(1).xueya},
];
<mx:Canvas label="LineChart" width="100%">
<mx:LineChart dataProvider="{chartDP}" showDataTips="true" width="100%">
<mx:horizontalAxis>
<mx:CategoryAxis
categoryField="day"/>
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:LinearAxis baseAtZero='{false}' autoAdjust="{true}" />
</mx:verticalAxis>
<mx:series>
<mx:LineSeries yField="xueya" displayName="温度"/>
</mx:series>
</mx:LineChart>
</mx:Canvas> 展开
ff = event.result as ArrayCollection;
}
接收返回来的数组对象 字段包括 血压值和日期
血压 日期
100 2010-01-02
200 2010-01-03
300 2010-01-04
我该如何去添加这个显示呢
Bindable] public var chartDP:Array = [
{day:'Monday2',xueya:ff.getItemAt(0).xueya},
{day:'Tuesday2',xueya:ff.getItemAt(1).xueya},
];
<mx:Canvas label="LineChart" width="100%">
<mx:LineChart dataProvider="{chartDP}" showDataTips="true" width="100%">
<mx:horizontalAxis>
<mx:CategoryAxis
categoryField="day"/>
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:LinearAxis baseAtZero='{false}' autoAdjust="{true}" />
</mx:verticalAxis>
<mx:series>
<mx:LineSeries yField="xueya" displayName="温度"/>
</mx:series>
</mx:LineChart>
</mx:Canvas> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询