按照问题最后一个问题
我可以成功地创建扩展自CircleItemRenderer
或任何其他ProgrammaticSkin
ItemRenderers 的类,如下所示。
public class LSLabelCircleItemRenderer extends CircleItemRenderer
{
private var _label:Label;
public function LSLabelCircleItemRenderer():void
{
super();
_label = new Label();
}
override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
if(data != null){
var ls:LineSeries = ChartItem(data).element as LineSeries;
label.text = LineSeriesItem(data).yValue.toString();
skin.parent.addChild(label);
label.setStyle("color",ls.getStyle("fill"));
label.move(skin.x - label.getExplicitOrMeasuredWidth() / 5,skin.y - label.getExplicitOrMeasuredHeight());
}
}
}
现在我发现我找不到在哪里做同样的事情embedded-image ItemRenderer在mxml中就像下面
itemRenderer="@Embed(source='../assets/butterfly.gif')"
如何使用这种添加我的客户标签ItemRenderer
?
谢谢!