0 Replies Latest reply on Aug 27, 2012 11:30 AM by Joachim Thomas

    Flash Builder 4.6/ LineChart predefined unlinear y-Scale

    Joachim Thomas

      Hi!

      I'm looking for a solution to set a predefined unlinear scale to the y-axis of a linechart.

      My scale has various steps that depend on the current value that is shown in the linechart.(betting odd)

       

      value: 1-2 ; Interval = 0.01;

      value 2-3;Interval=0.02;

      value3-4;Interval=0.05;

      value4-6;Interval=0.1;

      value6-10,Interval=0.2;

      value 10-20,Interval=0.5;

      value20-30,Interval=1;

      value30-50,Interval=3;

      value50-100,Interval=5;

      value100-1000,Interval=10

       

      I've tried to set the current interval via a function

       

      setCurrentInterval(currentOdd)

      {

      if(currentOdd>=1&&currentOdd<2)

      {oddScale.interval=0.01

      }

      if(currentOdd>=2&&currentOdd<3)

      {oddScale.interva=0.02

      }

       

      }

       

      <mx:verticalAxis>

                                              <mx:LinearAxis id="oddScale"

                                                                               minimum="1"

                                                                               maximum="{max}" >

                                               </mx:LinearAxis>

      </mx:verticalAxis>

       

      This way works, but the whole y-scale depends on "interval" and all shown values are set in the same intervall. Small Intervals like 0.01 are not shown.

       

      Is there a way to predefine a unlinear y-axis scale?

       

      var odds:Array=[1,1.01,1.02.....2,2.02,2.04...3,3.05]

       

      scale:dataprovider=new ArrayCollection(odds.source)

       

      Some Ideas out there???

       

      Kind Regards

      jewtis