码迷,mamicode.com
首页 > 移动开发 > 详细

Dev ChartControl鼠标移动显示坐标点

时间:2015-05-29 08:35:55      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:

his.chartIRC_RATES.MouseMove += new MouseEventHandler(chartIRC_RATES_MouseMove);

 

        ToolTipController toolTipController = new ToolTipController();
        /// <summary>
        /// 鼠标显示节点坐标
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void chartIRC_RATES_MouseMove(object sender, MouseEventArgs e)
        {
            ChartHitInfo hitInfo = chartIRC_RATES.CalcHitInfo(e.Location);
            StringBuilder builder = new StringBuilder();
            if (hitInfo.SeriesPoint != null)
            {
                builder.AppendLine(" X: " + hitInfo.SeriesPoint.Argument+"D");
                builder.AppendLine(" Y: " + string.Format("{0:f4}", Convert.ToDouble(hitInfo.SeriesPoint.Values[0]) * 100) + "%");
              
            }
            toolTipController.ShowHint(builder.ToString(), chartIRC_RATES.PointToScreen(e.Location));
        }

Dev ChartControl鼠标移动显示坐标点

标签:

原文地址:http://www.cnblogs.com/jlf19881031/p/4537636.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!