1 Reply Latest reply on Mar 1, 2011 5:47 AM by DaveConTech

    Removing the default Axis from a line chart

    DaveConTech

      Hi guys,

      I'm trying have a Linechart with multiple axis for each different series, if they have different units. I'm adding all of the series dynamically all of the series, so I just want to add a Axis when I have a different units.

       

      I've tried this and it simply added both Axes to the chart.

       

      private var VAxisRenderers:ArrayCollection=new ArrayCollection;

       

      var vAxis:LinearAxis=new LinearAxis;

      lineChart.verticalAxis=vAxis;

      lineSeries.verticalAxis=vAxis;

      vAxis.baseAtZero=false;

       

       

      var renderer:AxisRenderer = new AxisRenderer();

      renderer.placement = "left";

      renderer.axis=vAxis;

       

       

      VAxisRenderers.addItem(renderer);

       

      lineChart.verticalAxisRenderers=new Array;

      lineChart.verticalAxisRenderers=VAxisRenderers.toArray();

       

      Any help would be much appreciated

       

      Thanks,

      Dave