DateTimeAxis - set Label to display Date + Time
- by Jay
Hi,
Is there a way in flex 3 chart component to display both the date and time using horizontal DateTimeAxis?
Currently the DateTimeAxis element has an attribute dataunits which allows to set the value to any of "milliseconds|seconds|minutes|hours|days|weeks|months|years" but I want to display the label as "2009/09/15 06:00:00" which includes the day and the time too.
Here is the sample that i'm using 
  
  
[Bindable]
 public var deck:ArrayCollection = new ArrayCollection([
    {date:"2009-09-15 06:00:00", close:42.71},
    {date:"2009-09-16 06:15:00", close:42.99}
 ]);
 public function myParseFunction(s:String):Date {
   var sDate = s.substring(0,s.indexOf(" "));
   var sTime = s.substring(s.indexOf(" "));
   var aDate = sDate.split("-");
   var aTime = sTime.split(":");
   return new Date(aDate[0],(aDate[1]*1-1),aDate[2],aTime[0],aTime[1],aTime[2],0);
 }
]]
  
   
     
        
           
        
        
           
        
     
     
  
Thanks in advance.