This content has been marked as final. Show 6 replies
Do I need to put it into an XMLList before I can read it in the Chart?
Is anyone here familiar with charting?
Best practice would be to use a bindable variable for your data provider in the ColumnChart that gets set in a result handler the same way you've been provided examples before. Also, like you've seen and used before in your TreeMap app, an attribute within an XML element is referred to with an @. Note also the <mx:horizontalAxis> that was added to your code.
Thanks a lot VarioPegged,
No I didn't realize that the @ was required to refer to an XML element. I've only done two flex Apps so far, the Treemap is using some borrowed code I found online (written by Josh Tynjala) and the other project I did involved directly binding XML results to a Datagrid, which did not require directly referring to any of the elements (and had no @). I thought the @ was simply part of the field names.
I actually had already made my field bindable.
I missed this ampersand and apparently, other significant things. Once my basic familiaritiy with Flex is a bit more solid I should be able to make a more valuable contribution to this forum. I'm sorry if I seem a little dense.
I have tried these suggestions and I'm still not seeing any data, I'll continue to try different things and consult my Flex books.
Not a problem. I try to help where possible, but sometimes it's most beneficial to research these problems yourself. There's so much good information in the Flex documentation.
To get back to your problem, make sure that when you assign the result to your dp that you specify it as something like this (because you're handling E4X XML, your result is already at sector, so don't refer to it again):
dp = event.result.company;
Thanks Vario! That was the last piece of the puzzle, I was referring to event.result.sector.company.
I see so many new people on this forum, there must be a lot of people moving into Flex. Hopefully I'll begin to be able to help with the very simple things soon, I already have once or twice.
Meanwhile I agree there is also a wealth of good examples online, I have been using them quite a bit. By contrast, I've bought five (expensive!) Flex books and I'm somewhat disappointed, while each is good it seems each lacks certain important features, so I really have to rely on all of them. Most disappointing is the official Flex documentation itself, because it seems very informative but it lacks an index for some strange reason.