The DateTimeAxis uses the built in ECMAScript Date parsing function to convert strings to dates. So if your dates are in a different format, you need to provide your own parsing function. Ely.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of munkydung Sent: Monday, February 26, 2007 10:26 AM To: [email protected] Subject: [flexcoders] Re: broken: stacked AreaChart when using horizontal DateTimeAxis wow, that was totally it. thanks! I was under the impression that Flex was interpreting my date values just fine as it rendered appropriate values in my third example, but I guess we have to be explicit about it. Mike --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Mark" <[EMAIL PROTECTED]> wrote: > > I was having the same problem and found from the help files I needed > to make sure my dates were coming in as dates, so there's a > parseFunction I needed to add, like this: > > <mx:horizontalAxis> > <mx:DateTimeAxis labelUnits="months" dataUnits="days" > displayLocalTime="true" parseFunction="myParseFunction" /> > </mx:horizontalAxis> > > //function > 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. > var newDate:Date = new Date(a[0],a[1],a[2]); > return newDate; > } > > Hope it helps >

