flex 如何实现时间序列的曲线图

fgthy 2010-10-28 02:06:10

请问,flex 如何实现像jfreechar中的时间序列曲线图,就是能安比例实现时间点。
...全文
167 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
leemiki 2010-10-29
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 fgthy 的回复:]
下了个api 小弟感谢了。
[/Quote]

我个人觉得碰到问题应该先求助API,解决不了再上论坛,能更效率的解决问题!!

呵呵!多看看API吧,最好的学习资料
fgthy 2010-10-29
  • 打赏
  • 举报
回复
下了个api 小弟感谢了。
leemiki 2010-10-28
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 fgthy 的回复:]
不会啊,大哥,给个例子嘛
[/Quote]
。。。。。API上不就有例子

根据需求设置下LineSeries的form属性

me_kankan 2010-10-28
  • 打赏
  • 举报
回复
flex 官方实例=============》

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top"
horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0" viewSourceURL="srcview/index.html">

<mx:Script>
<![CDATA[

import mx.collections.ArrayCollection;

[Bindable]
private var expensesAC:ArrayCollection = new ArrayCollection( [
{ Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
{ Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
{ Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
{ Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
{ Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
]]>
</mx:Script>

<mx:Panel title="LineChart Control" layout="horizontal" color="0xffffff" borderAlpha="0.15" width="600" height="240"
paddingTop="10" paddingRight="5" paddingBottom="10" paddingLeft="5" horizontalAlign="center">

<mx:LineChart id="linechart" color="0x323232" height="100%"
showDataTips="true" dataProvider="{expensesAC}">

<mx:horizontalAxis>
<mx:CategoryAxis categoryField="Month"/>
</mx:horizontalAxis>

<mx:series>
<mx:LineSeries yField="Profit" form="curve" displayName="Profit"/>
<mx:LineSeries yField="Expenses" form="curve" displayName="Expenses"/>
<mx:LineSeries yField="Amount" form="curve" displayName="Amount"/>
</mx:series>
</mx:LineChart>

<mx:Legend dataProvider="{linechart}" color="0x323232"/>

</mx:Panel>
</mx:Application>
fgthy 2010-10-28
  • 打赏
  • 举报
回复
不会啊,大哥,给个例子嘛
leemiki 2010-10-28
  • 打赏
  • 举报
回复
LineChart这个组件就可以实现!示例API上都有

4,328

社区成员

发帖
与我相关
我的任务
社区描述
多媒体/设计 Flex
社区管理员
  • Flex
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧