这个示例展示了如何创建两个图像批注 —— 一个被锚定到图表 (通过指定两个以像素为单位的绝对坐标),另一个被锚定到窗格 (通过指定两个轴数值)。 要查看总说明,请参阅 批注。
为了展示如何完成此任务,我们使用类似于下列指南中所创建的图表: 课程 2 - 创建简单的非绑定图表。
把批注锚定到图表
-
单击图表的智能标记,并在操作列表中,单击 Annotations(批注)... 链接。

-
在被调用的 Annotation Collection Editor(批注集合编辑器) 中, 单击 Add(添加) 按钮,然后在“Choose Annotation Type(选择批注类型)”对话框中双击 Image Annotation(图像批注) 类型。

-
单击所创建批注的 Annotation.AnchorPoint 属性的省略号按钮。

-
然后,选择 Chart Anchor Point(图表锚定点) 类型。

-
另外,指定批注的锚定点的 X 和 Y 坐标 (以像素为单位)。 注意,这些坐标是绝对坐标,并且当图表大小被改变时也不会被改变。

-
现在,批注已经被锚定到该点,并且在指定图象 (ImageAnnotation.Image) 和位置 (Annotation.ShapePosition) 之后,图表的外观就像下面显示的那样。

把批注锚定到窗格
参阅