MSCHART 折线图注释位置
我想知道是否有人可以帮助我在 MShart 控件中使用注释。 我有一个折线图,在该图表中的某些数据图中我有注释。
RactangleAnnotation a = new RectangleAnnotation();
a.AnchorDataPoint = chart.Series["series1"].Points[i];
这会将注释放置在折线图上数据值所在的位置。 我需要的是显示此注释(可能在图表顶部),并从 myh 注释到 dataValue 绘制一条线。
这可能吗?
Im wondering if anyone could help me with annotations im using in my MShart control.
I have a line chart, at certain data plots within this chart I have annotations.
RactangleAnnotation a = new RectangleAnnotation();
a.AnchorDataPoint = chart.Series["series1"].Points[i];
This places the annotation on my linechart at the position the data value is.
What I need is to display this annotation, possibly at the top of my chart, and draw a line from myh annotation to the dataValue.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以获取图表控件中的绘制事件并使用 DrawLine 函数。以下是如何获取绘制事件:
http://weblogs.asp.net/stevewellens/archive/2008/12/03/custom-annotate-your-charts.aspx
You can get at the paint events in the Chart Control and use the DrawLine function. Here's how to get at the paint events:
http://weblogs.asp.net/stevewellens/archive/2008/12/03/custom-annotate-your-charts.aspx
您可能还想查看 CalloutAnnotation。它提供了一个文本输入区域并绘制了指向数据点的箭头。以下是示例文件的链接:
http://archive.msdn .microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418
You might also want to take a look at the CalloutAnnotation. It provides a text entry area and draws an arrow to your data point. Here's an link to the sample files:
http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418