Hello,

I have a requirement to be able to put special images as legend item 
renderers.
I was able to achieve this with code like:

<mx:Legend>
   <mx:LegendItem label="Lorem" legendMarkerRenderer="@Embed
('simpleline_legend1.gif')" />
...

However, I need to be able to do this dynamically in actionscript using 
something similar to whats described in:

http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=LiveDocs_Book_Parts&file=charts_intro_108_06.html

I am unable to figure out how I can assign an array of legendItem 
objects to the legend

The Legend doc says I can define an array of legenditems for the legend 
        
http://livedocs.adobe.com/flex/201/langref/mx/charts/Legend.html

but I am missing how?

I do not see any property or method to add legenditems to the legend, 
and if I try to assign the legend to an array of legenditem objects, it 
doesnt like it. I am probably missing something basic but unable to 
figure out - hence the post.

Also, while I am at this, whats the best way to replicate the @embed 
behavior in actionscript?

Thanks for help
Vijay


Reply via email to