`
sjkgxf7191
  • 浏览: 252303 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

flex 在 chart上加入一条指示线

    博客分类:
  • flex
阅读更多

原文:http://www.flexer.cn/bbs/viewthread.php?tid=466&extra=page%3D1

 

<mx:AreaChart width="521" height="146" id="aChart" mouseOut="handleMouseOut(event)" mouseMove="handleMouseMove(event)">

    <mx:annotationElements>
        <mx:Canvas id="linesCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off" />
    </mx:annotationElements>

</mx:AreaChart >
 
private function handleMouseMove(e:MouseEvent):void
{

    linesCanvas.removeAllChildren();
    //creating the line
    var theLine:VRule = VRule(linesCanvas.addChild(new VRule()));
    theLine.styleName="LineOnChart";
    theLine.x = Math.round(hda[0].x)-50;
    theLine.y = 0;
    theLine.height = linesCanvas.height;

}


  • 大小: 30.1 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics