在折线图上显示日期时间
我需要创建显示日期时间点的折线图,例如:
public var stockDataAC:ArrayCollection = new ArrayCollection( [ {date: "2005,7,27,22,15,30", close: 41.71}, {date: "2005,7,27,22,16,30", close: 42.21}, {date: "2005,7,27,22,17,30", close: 42.11}, {date: "2005,7,27,22,18,30", close: 42.71}, {date: "2005,7,27,23,22,30", close: 42.99}, {date: "2005,7,27,23,24,30", close: 48.99}, {date: "2005,7,27,23,25,30", close: 49} ]); public function myParseFunction(s:String):Date { // Get an array of Strings from the comma-separated String passed in. var a:Array = s.split(","); // Create the new Date object. Subtract one from // the month property because months are zero-based in // the Date constructor. var newDate:Date = new Date(a[0],a[1],a[2],a[3],a[4],a[5],0); return newDate; } ......
如何使折线图显示标签/轴,如下所示:27/7/2005 22:15:30?
I need to create LineChart that display datetime points, for example:
public var stockDataAC:ArrayCollection = new ArrayCollection( [ {date: "2005,7,27,22,15,30", close: 41.71}, {date: "2005,7,27,22,16,30", close: 42.21}, {date: "2005,7,27,22,17,30", close: 42.11}, {date: "2005,7,27,22,18,30", close: 42.71}, {date: "2005,7,27,23,22,30", close: 42.99}, {date: "2005,7,27,23,24,30", close: 48.99}, {date: "2005,7,27,23,25,30", close: 49} ]); public function myParseFunction(s:String):Date { // Get an array of Strings from the comma-separated String passed in. var a:Array = s.split(","); // Create the new Date object. Subtract one from // the month property because months are zero-based in // the Date constructor. var newDate:Date = new Date(a[0],a[1],a[2],a[3],a[4],a[5],0); return newDate; } ......
how do I make the a line chart display lables/axis like this :27/7/2005 22:15:30?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您正在尝试执行 DateTimeAxis示例,但已修改。您需要将数据单位设置为“秒”。
It looks like you are trying to do the DateTimeAxis example, but modified . You will want to set the dataunits to "seconds".