6 Replies Latest reply on Aug 25, 2010 2:33 PM by dgeurts11

    Problems with DateTimeAxis

      OK 1st problem:
      I have one "working" graph, the parser works everything is fine, except the data spans over 3 days with readings every hour. I would like to see the hourly incrments but when a new day starts I would like to see that data as well.
      something like 22:00, 23:00, 3/22, 1:00, 2:00... 22:00, 23:00, 3/23, 1:00 and so on
      how I would think this would work is setting the minorTickUnits to hours and dataUnits to days but this doesnt work. Whatever I set to minorTicks just doesnt show up.
      few notes, I'm doing this in mxml and my data is coming from a hard-coded ArrayCollection.

      2nd problem
      i have another chart I am making from actionScript and it works fine without the DateTimeAxis here's a snip-it of the code changed

      var dta:DateTimeAxis = new DateTimeAxis();
      dta.dataUnits = "hours";
      dta.parseFunction = dateParser;
      chart.horizontalAxis = dta;

      this time the data is coming from 2 Arrays, one array is the data values fed right into the lineSeries the other array is the timestamp fed to the chart. The method works normally except in my parser. I'm using the same parser as in my aforementioned problem so I know it works; however, the string that the dataParser is getting it is the index of the time stamp, instead of the timestamp.

      example var arr:Array = [ 3:00, 4:00, 5:00, 6:00 ]
      the parser gets fed "1" instead of "4:00"

      ideas for either problem would be helpful.
        • 1. Re: Problems with DateTimeAxis
          theNOCer Level 1
          so is the 2nd problem a bug or...?
          • 2. Problems with DateTimeAxis
            theNOCer Level 1
            ok here is some more details about the 1st problem as i have still not come up with anything.

            in my code you will see my Axis and Renderer. Notice please I used mx:horizontalAxisRenderer (deprecated) instead of its replacement mx:horizontalAxisRenderers because when I put the Renderer inside mx:horizontalAxisRenderers it hangs at creation (the loading screen freezes)

            when I run this, it parses it great but no minor ticks show up at all. in fact i have never been able to get minor ticks to show ever under any circumstances

            • 3. Re: Problems with DateTimeAxis
              theNOCer Level 1
              Ok so I have submitted a bug for the 2nd problem, I'll see what happens there, but I still need help with the other problem. I don't think its a bug, I think its more I just don't know how to do it. Is there anyone out there that uses the DateTimeAxis?

              can I at least get some people to toss some ideas my way?
              • 4. Re: Problems with DateTimeAxis
                theNOCer Level 1
                Well left to my own devices I finally solved one of my problems

                if you are getting just the Index fed to your parser it is because you have not supplied a xField for you series.

                I am still having the problem of minor ticks not working. I just want to show when a new day comes along. Is that too much to ask!!!1one
                • 5. Re: Problems with DateTimeAxis

                  I am also having this problem with minor ticks :'(

                  • 6. Re: Problems with DateTimeAxis
                    dgeurts11 Level 1

                    I found that with my minorTicks if the minorTickStroke wasnt strictly defined then they wouldnt show.  Even if I would set minorTickPlacement and minorTickLength you must set minorTickStroke



                    var axisRenderer:AxisRenderer = new AxisRenderer();

                    axisRenderer.setStyle("minorTickStroke",new SolidColorStroke(0x3580c8,1,1));




                    axisRenderer.setStyle("tickStroke",new SolidColorStroke(0xbbccdd,2,1));



                    axisRenderer.axis = hAxis;