Idealism is what precedes experience; cynicism is what follows...

Thursday, October 04, 2007

Adobe Flex : DataProvider to a Charting Series

I have found that when setting the series for a charting component in Adobe Flex 2.0 it is important to remember that it does not respond correctly to anything except an instance of Array, this means that you can not use any members from the Collection package directly, you can off course still use the ArrayCollection.toArray() when setting the dataProvider property.
However, another spurious thing to consider when working with the dataprovider of a Series item, you can not use the methods of the dataProvider if you want the Chart to respond to the build-in-databinding mechanisms, e.g. even though you know that the dataProvider property points to an Array, you can not use the Array.push() to add a new member of data dataProvider - you are forced to set the entire Series.dataProvider property every time you want to force a build-in-databinding-triggered-update on the Chart component.

These small quirks are not included in the documentation.

No comments:

My Network