initialize="setStartLabelLocation()">
import mx.collections.ArrayCollection;
[Bindable]
public var expenses:ArrayCollection = new ArrayCollection([
{Month:"Jan", Income:2000, Expenses:1500},
{Month:"Feb", Income:1000, Expenses:200},
{Month:"Mar", Income:1500, Expenses:500}
]);
private function setStartLabelLocation():void {
cs1.setStyle("labelPosition", "inside");
cs2.setStyle("labelPosition", "inside");
}
private function changeLabelLocation():void {
var pos:String = cs1.getStyle("labelPosition");
if (pos == "inside") {
pos = "outside";
} else {
pos = "inside";
}
cs1.setStyle("labelPosition", pos);
cs2.setStyle("labelPosition", pos);
}
showDataTips="true">
categoryField="Month" />
displayName="Income" />
displayName="Expenses" />
click="changeLabelLocation()" />