[flexcoders] Dynamic Variables in Flex 3

2009-01-16 Thread akn_carnage
Hi everyone,

I have this requirement where i have a dashboard display containing
many line charts. I fetch the data for each of the charts from the
database. I can have any number of charts so i need to create many
number of array collections depending on the size of the result and
use each array collection as the data provider of one of the graphs.

How can i do this since i don't know the number of array collections i
need to create before hand? Can i create them during runtime?

Please help me..

Thanks,
Anil



RE: [flexcoders] Dynamic Variables in Flex 3

2009-01-16 Thread Tracy Spratt
Store the ArrayCollections in some structure, like an associative
array/Object/hashmap, or an Array, or a Dictionary.  With an assoc.
array, you use bracket notation to add the Acs as properties.

 

var acTemp = new ArrayCollection(myArray)

_oDataProviders[myArrayName] = acTemp;

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of akn_carnage
Sent: Friday, January 16, 2009 4:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamic Variables in Flex 3

 

Hi everyone,

I have this requirement where i have a dashboard display containing
many line charts. I fetch the data for each of the charts from the
database. I can have any number of charts so i need to create many
number of array collections depending on the size of the result and
use each array collection as the data provider of one of the graphs.

How can i do this since i don't know the number of array collections i
need to create before hand? Can i create them during runtime?

Please help me..

Thanks,
Anil