This content has been marked as final. Show 4 replies
"sig_UVA" <email@example.com> wrote in message
>I am looking through the graphing components that come with Flex and they
> straightforward. However, all of the examples use arrays as the data
> where calculations have already been performed. Data is rarely stored in
> database that way, so I am wondering how users here obtain those types of
> values to put into their graphs.
> The database I am using to store this data (Quickbase) is only capable of
> serving up the XML in a flat structure. How would I perform calculations
> this data? Should I create an new array by looping through the existing
> collection? In Ruby, I've used hashes before, with the index being the
> value on
> which you group. I didn't think this was efficient though.
I've never heard of a database that doesn't understand SQL.
They abstract that kind of access from the user. Instead they have a report builder that is capable of returning the data as XML, but only flat data; no summaries or groupings.
You could convert the returned flat structure to an IHierarchicalData type. Have you played with groupingCollections or hierarchicalData + hierarchicalDataView? If not, there's a ton of posts out there about converting XML to hierarchical data for dislaying in the advancedDataGrid. Even if you're not using the ADG and need charting stuff instead, most of the posts are related to converting flat data to hierarchical data for the data grid so google that.