MS Charts图像注释锚定到数据点 [英] MS Charts image annotation anchor to data points

查看:64
本文介绍了MS Charts图像注释锚定到数据点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MSDN图表表示实时数据.我已将图像锚定到特定的数据点.当数据更新时,我希望注释随数据点一起向后移动.

ImageAnnotation img = new ImageAnnotation();
img.AnchorDataPoint = chart1.Series ["Series1"].Points [i];
img.Image =" img.png" ;;
img.AnchorAlignment = ContentAlignment.TopCenter;
img.AnchorOffsetY = 1;

 ImageAnnotation img= new ImageAnnotation();
img.AnchorDataPoint = chart1.Series["Series1"].Points[i];
img.Image = "img.png";
img.AnchorAlignment = ContentAlignment.TopCenter;
img.AnchorOffsetY = 1;

chart1.Annotations.Add(img);

chart1.Annotations.Add(img);


推荐答案

嗨Abey19,

Hi Abey19,

谢谢您在这里发布.

对于您的问题,请尝试以下代码.

For your question, please try the following code.

     ImageAnnotation img = new ImageAnnotation();
            img.X = 5;
            img.Y = 5;
            img.AllowMoving = true;
            img.Image = @"C:\Users\v-wezan\Desktop\Qimage\1.png";
            chart1.Annotations.Add(img);

您可以将图像移到您喜欢的地方.

You could move the image to the place which you like.

我希望这会有所帮助.

最好的问候,

温迪


这篇关于MS Charts图像注释锚定到数据点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆