Currently the only work around I have is to remove the LegendItem's from the Legend and add new ones, such as:
var item:LegendItem = null; var newItem:LegendItem = null; for (var i:int = chartLegend.numChildren -1; i >= 0; i--) { item = chartLegend.getChildAt(i) as LegendItem; if ( item == null ) { continue; } newItem = new LegendItem(); newItem.label = item.label; newItem.setStyle("fill", fillFunction( chartSeries.items[i], i )); chartLegend.removeChildAt( i ); chartLegend.addChildAt( newItem, i ); } Maybe this is a bug, since it appears that the LegendItem "fill" property doesn't update in the UI. --- In flexcoders@yahoogroups.com, "cwicky99" <[EMAIL PROTECTED]> wrote: > > I am trying to allow the user to select the color of the LegendItem. > However, when I try and set the LegendItem "fill" style it doesn't > change in the UI. > > I event tried: > > legendItem.setStyle("fill", new SolidColor(0xFF00FF)); > legendItem.invalidateDisplayList(); > > ...but it has no effect. I can call: > > legendItem.setStyle("color", new SolidColor(0xFF00FF)); > > and the text associated with the LegendItem changes, but I can't seem > to change the fill color during runtime. > > Any ideas or suggestions? >