在折线图上显示日期时间

发布于 2024-08-04 02:43:03 字数 1128 浏览 10 评论 0原文

我需要创建显示日期时间点的折线图,例如:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瘫痪情歌 2024-08-11 02:43:03

看来您正在尝试执行 DateTimeAxis示例,但已修改。您需要将数据单位设置为“秒”。

It looks like you are trying to do the DateTimeAxis example, but modified . You will want to set the dataunits to "seconds".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文