Adobe Flex

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.

One thought on “Adobe Flex : DataProvider to a Charting Series

  1. Two year old post, but this still seems to be the same. It also appears to me that troubleshooting charts is insanely difficulty in Flex Builder. If you pass a series a data provider, and it doesn’t graph anything, there isn’t an easy way to figure out what’s going wrong.

    Quite annoying.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s