在chart上加入一条指示线

简介: 原文 http://hi.baidu.com/fuwei_bj/item/7e576410e970683db831801a                                     as代码: private function handleMouseMove(e:MouseEvent):void    {          linesCanvas.

原文 http://hi.baidu.com/fuwei_bj/item/7e576410e970683db831801a

<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 >

as代码:

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;

    }

private function handleMouseOut(e:MouseEvent):void
{
 linesCanvas.removeAllChildren(); 
}

目录
相关文章
|
存储 编解码 安全
Opus从入门到精通(二):编解码器使用
opus_encoder_get_size()返回编码器状态要求的大小。注意,这段代码的未来版本可能改变大小,所以没有assuptions应该对它做出。编码器状态在内存中总是连续,复制它只要一个浅拷贝就足够了。使用opus_encoder_ctl()接口可以改变一些编码器的参数设置。所有这些参数都已有缺省值,所以只在必要的情况下改变它们。
2022 0
无影云电脑使用感受
简单谈谈无影云电脑使用的感受
1191 1
无影云电脑使用感受
|
SQL Oracle 关系型数据库
【MySQL异常】1093 - You can‘t specify target table ‘daily_job‘ for update in FROM clause
【MySQL异常】1093 - You can‘t specify target table ‘daily_job‘ for update in FROM clause
524 0
node-sass 安装失败 rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libs
检查一下有没有配置python2.7环境变量 npm install -g node-gyp npm install --global --production windows-build-tools(通过管理员打开) npm i -g node-sass
651 1
|
机器学习/深度学习 传感器 人工智能
深度学习之自主学习和任务规划
基于深度学习的自主学习和任务规划,是指通过深度学习算法使人工智能(AI)系统能够自主地从环境中学习,并根据特定的目标和任务,规划出有效的解决方案。
531 3
|
人工智能 程序员 开发者
新手指南: 微软Copilot国内能用吗?
微软Copilot 是由 GitHub 和 OpenAI 联合开发的一款 AI 结对编程工具,它就像一位经验丰富的程序员,在你编写代码时提供实时的代码建议和补全。Copilot 基于 OpenAI 的 Codex 模型,该模型经过了数十亿行公开代码的训练,能够理解多种编程语言和框架。
|
存储 缓存 监控
优化Elasticsearch 索引设计
优化Elasticsearch 索引设计
240 5
|
Linux
PXE+Kickstart实现rocky9批量自动装机
使用PXE+Kickstart实现rocky9批量自动装机
2621 0
|
编解码
ffmpeg奇偶场帧Interlace progressive命令和代码处理
ffmpeg奇偶场帧Interlace progressive命令和代码处理
575 0
ffmpeg奇偶场帧Interlace progressive命令和代码处理