Blair, You would be filtering (or sorting) the ListCollectionView used as a data provider, and not the chart itself, so this should work regardless of how you're displaying it. You can update the filterFunction property on a ListCollectionView (I believe you may also need to call refresh()--you should check the docs I linked to earlier), and a new subset of items will be visible to the user, without having to make another call to the server. The filterFunction just determines whether each object is "visible" to the ListCollectionView itself (if not, it's filtered out, hence the name filterFunction). You can set the filterFunction on the ArrayCollection that you get back from the server, since an ArrayCollection is a ListCollectionView. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
-----Original Message----- From: Blair Cox <[EMAIL PROTECTED]> Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Charts - How to filter dataprovider by date? Date: Thu, 23 Oct 2008 09:28:03 -0300 Hi Maciek, Still new at this, so I’ll answer the best I can. The chart is getting it’s data from a RemoteObject using amfPHP. I have an arraycollection and result handler – pretty basic stuff. It appears to accomplish what I need it to, I’m sure there are more elegant means. I’m investigating the filterFunction. Most of the blogs speak of sorting a datagrid, though a chart should function the same way, yes? I would prefer to perform the sorting/filtering, whatever the correct term is, within Flex rather than require a PHP script to pull specific data from the database. The user will eventually use all the data available in the table, so there is no reason why it should be available up-front, then simply sorted. Thanks, -- Blair ________________________________________________________________________ From: Maciek Sakrejda <[EMAIL PROTECTED]> Organization: Truviso Reply-To: <flexcoders@yahoogroups.com> Date: Wed, 22 Oct 2008 09:01:00 -0700 To: <flexcoders@yahoogroups.com> Subject: Re: [flexcoders] Charts - How to filter dataprovider by date? It's not clear how your data is bound to the chart, but it sounds like you need a filterFunction: http://livedocs.adobe.com/flex/3/langref/mx/collections/ListCollectionView.html#filterFunction If you post more about your data flow, maybe we can give you more details. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com