In This Topic
The Attached By Data Index command item gets the DataIndex member of the AttachMethodEnum and sets the value of the Label.AttachMethod property in the Label. It attaches the label to a specific data point on the plot area of the chart. The GroupIndex, PointIndex, and SeriesIndex properties can be specified. The following steps show how to attach the label using this method:
- Select an existing Chart label and select the Attached By Data Index item from its drop-down menu.
- Click on the Properties button of the Label toolbar and observe the following in its Edit labels editor:
- The AttachMethod is now set to DataIndex since the Attached by Data Index item was chosen.
- Expand the AttachMethodData object. Notice that the Point Index and Series Index properties each have a value associated with it. This is because the DataIndex attachment method attaches the labels by the data point. The GroupIndex value of 0 represents the ChartGroup0, the PointIndex value of 1 represents the second data point on the series, and the SeriesIndex value of 2 represents the third series on the chart.
The following image illustrates the two observations:
- If you would like the label to represent a different data point then change the PointIndex and SeriesIndex properties in the Edit labels editor. For example, let's say we would like the label on series1, point3. In the Edit labels editor we change the SeriesIndex value to 1 and the PointIndex value to 3. The label appears on the series1, point3.
See Also