In my opinion,

You should use a List of some object defined by you.

Then you create a correspondent object in ActionScript , put it in
ArrayCollection and use its attributes in your chart as you wish.

If you want to build something more generic I believe that you will have
more trouble, but if you have available time...

It's all up to you.

HTH,

PS


On Wed, Apr 15, 2009 at 10:03 AM, netdeep <deep...@chartertn.net> wrote:

>
>
>
> I posted a few weeks back about how to create a chart dataprovider in Java
> to pass to Flex and the response I got back was to use Maps. I got
> sidetracked with other aspects of the code and now that I'm trying to code
> it, I am really drawing a blank. How would you create the following
> dataprovider in Java without using a custom object (i.e., the next data
> structure may have more or less elements than this one and I would need to
> use generic names for each data pair)?
>
> public var expenses:ArrayCollection = new ArrayCollection([
> {Month:"Jan", Profit:2000, Expenses:1500},
> {Month:"Feb", Profit:1000, Expenses:200},
> {Month:"Mar", Profit:1500, Expenses:500}
> ]);
>
>  
>



-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/

Reply via email to