0 Replies Latest reply on Jan 28, 2010 10:27 PM by meanseanbean

    Problem showing labels on DateTimeAxis


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init();">
                  private static const minuteInMilliseconds:Number = 60*1000;

                  [Bindable] private var startDate:Date = new Date();
                  [Bindable] private var endDate:Date = new Date();
                  [Bindable] private var startVal:int = 2;
                  [Bindable] private var endVal:int;

                  private function init():void {
                      //endDate is 10 mins past startDate
                      endVal = 16;
                  <mx:LineSeries displayName="Series 1" yField=""/>
      <!--        <mx:DateTimeAxis dataUnits="minutes" minimum="{startDate}" maximum="{endDate}"/>-->
                  <mx:LinearAxis minimum="{startVal}" maximum="{endVal}" />


      If I run the above code, I get a LineChart with the Y axis from 0 through 100 and the X axis from 2 through 16.

      However, if I comment out the LinearAxis and uncomment the DateTimeAxis, the X axis comes up blank, instead of displaying minutes.

      Is this the expected behaviour? If so, how do I get it to display minutes? If not, what am I doing wrong?

      Thank you for your time and help.