Thanks for asking. Yes, I do use the refresh() function. here is part of my
code.
[Bindable]
private var allBuildLog:ArrayCollection = new ArrayCollection();
public function updateMachine(eP:Event):void {
allBuildLog.filterFunction = filterM;
allBuildLog.refresh();
}
public function filterM(item:Object):Boolean{
var result:Boolean=false;
if (item.machine == machine.selectedItem.toString()) {
result = true;
}
return result;
}
<mx:BarChart id="myChart"
dataProvider="{allBuildLog}" height="100%" width="100%"
paddingRight="5" paddingLeft="5"
showDataTips="true"
type="overlaid"
>
<mx:verticalAxis >
<mx:CategoryAxis displayName="Machine" title="Machine"
categoryField="machine"/>
</mx:verticalAxis>
<mx:horizontalAxis >
<mx:DateTimeAxis displayName="Date" title="Date"
dataUnits="seconds" labelUnits="hours"
displayLocalTime="true" parseFunction="createDate" />
</mx:horizontalAxis>
</mx:BarChart>
<mx:VBox height="54" horizontalAlign="center">
<mx:Label text="Machine" fontWeight="bold"/>
<mx:ComboBox id="machine" width="109" dataProvider="{allMachine}"
change="updateMachine(event)"></mx:ComboBox>
</mx:VBox>
hq.
----- Original Message ----
From: bobignacio <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, May 14, 2007 2:38:01 PM
Subject: [flexcoders] Re: Barchart display issue with ArrayCollection and
filterfunction
Have you tried to "refresh()" the ArrayCollection after you used the
filterFunction?
myArrayCollection. refresh() ;
And how about posting your source code...
--- In [EMAIL PROTECTED] ups.com, "haiqing7" <[EMAIL PROTECTED] .> wrote:
>
>
> In my barchart project, when I use filterfunction to filter my Chart's
> dataprovidor- -An ArrayCollection through ComboBox, if there is only one
> object left in that AC, the first element of the object won't be shown
> in my chart. when I try to debug it, I do see the correct filter result.
> even more, if there are more than one objects left in AC, all data
> display correctly. could anyone help out?
>
> thanks,
> hq.
>