Mega Code Archive
Change the label alignment for the vertical and horizontal axes
import mx.collections.ArrayCollection;
[Bindable]
public var expenses:ArrayCollection = new ArrayCollection([
{month:"Jan", profit:20, expenses:15, amount:145},
{month:"Feb", profit:1, expenses:2, amount:60},
{month:"Mar", profit:15, expenses:5, amount:3}
]);
[Bindable]
private var aligns:Array = ["center", "left", "right"];
[Bindable]
private var aligns2:Array = ["center", "top", "bottom"];
private function toggleLabelAlignment(s:String):void {
if ( s == 'hor' ) {
myHAR.setStyle("labelAlign", cb1.selectedItem);
} else if ( s == 'ver' ) {
myVAR.setStyle("labelAlign", cb2.selectedItem);
}
}