1 Reply Latest reply on Oct 15, 2010 1:02 AM by vpxav

    LineChart and dateTimeAxis => Time Axis labels are inverted

    vpxav Level 1

      Hello everyone,

      I'm receiving this date format from a XML file: YYYY-MM-DD HH:MM:SS


      I would like to display this in a chart but I only need the YYYY-MM


      So, I found this function:


      import mx.controls.DateField;
      private function createDate(dateString:String):Date {
           var newDate:Date;
           return newDate;




      and here is my lineChart:


      <mx:LineChart id="linechart" showDataTips="true" dataProvider="{frequence}">               
                <mx:DateTimeAxis title="Time" alignLabelsToUnits="false" parseFunction="createDate"/>
                <mx:LinearAxis baseAtZero="{checkBox.selected}" />
                <mx:LineSeries xField="ows_Date" yField="ows_Taux"
                     form="curve" displayName="Taux de fréquence:" showDataEffect="{interpolateIn}" />


      My chart displays the data correctly and in the right order (older to the left, newer to the right) but as you can see below, the time labels are inverted (older to the right and newer to the left)  while the displayed chart is not.


      Can anyone please help me?

      Thanks in advance!