1 Reply Latest reply on May 19, 2009 10:14 PM by _Natasha_

    Change the Axis Labels of a Chart



      The Chart-Series are generate through AS (Multiple PlotSeries and 1 LineSeries). I managed to Update the Visuell Areas (in this example to manipulate Vertical Axis (minimum/maximum values to be shown).

      No I have 3 Questions about to manipulate this Chart with AS3:

      1. I would like to remove nearly all "Ticks" and "Labels" from the Axis. At the End only the min/max and 0-Label-Value on the vertical Axis should be displayed. And on the vertical Axis, I would like only to have the min/max-Label and 100-Value.
      2. The Chart-Lines (in the Screen above) only 2 Lines should be visible. v-Axis = 100 and x-Axis=0 (just as a Cross over the Chart)
      3. The Linear Serie (just a Value of a Funktion like x=y*2) should have no Tooltip if you go MouseOver-it. And the Legend of this Serie should not be displayed in the Legend. How can I delete the Legend, and how can I preserve a DataTip over this LineSerie?


      Hopefully you did understand my bad english.


      Thanks for any Tips



        • 1. Re: Change the Axis Labels of a Chart
          _Natasha_ Level 4


          1. IAxis interface have labelFunction (see docs for details and parameters for it). You can check the value to be labeled and return empty string if you don't want to show this value in axis. Axis you get from chart.getAxis(name). But there is not any warranty that always 0 will be shown. You showl implement your own IAxis to show only specific values. (Or search it in internet)

          2. You should remove all these grid lines and create CartasianDataCanvas this lines at 0 and 100 and put it to annotationElements of the chart.

          3. If you don't want to see all data from chart in Legend you should create an array with legend data only from serieses you want to see. Chart has a property legendData from all serieses. You can filter this array or create new array with legendData from serieses you want to see. And set this array as a dataProvider to Legend.


          Hope, this helpful.