is it possible to append chart custom components dynamically into Vgroup in flex?

57 Views Asked by At

I'm trying to append chart custom components to Vgroup. is this possible ? any ideas guys ?

1

There are 1 best solutions below

0
On

Well you can add any form of visual objects to a VGroup using the "addElement" function.

Assuming you have some MXML defining the VGroup and eventually this VGroup has some MXML content, in order to programatically add further items to this, all you need to do, is to give the VGroup an id attribute and then to add elements the following way:

var dynamicElement:DisplayObject = new MyCoolChartObject();
myVgroup.addElement(dynamicElement);

Perhaps this article from Adobe will make things clearer: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf62b90-7fe9.html