MS Charts图像注释锚定到数据点 [英] MS Charts image annotation anchor to data points
问题描述
我使用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屋!