views:

1424

answers:

2

Hi

I want to set Maximum and minimum value for X axis in bar chart in flex action script 3 file.

Following line in working in MXML file but I want these code in actionscript 3.

can anybody change this into Actionscript 3.

thanks..

A: 

You can do the following:

var vAxis:LinearAxis = new LinearAxis();
vAxis.maximum = 100;
vAxis.minimum = 0;

This won't guarantee a label but it will keep the axis at a fixed size.

slashnick
A: 

In MXML

<mx:ColumnChart ...>
    <mx:verticalAxis>
        <mx:LinearAxis id="vAxis"
                 minimum="0" 
                 maximum="100" />
    </mx:verticalAxis>
</mx:ColumnChart>

For actionscript see slashnick's answer.

ethyreal