Charting Labels > Attaching and Positioning Chart Labels |
When defining a ChartLabel, it is necessary to specify how to attach it to the chart and where to position it relative to its attachment point.
The attachment method chosen depends on what the ChartLabel is going to be used for. The attachment method takes an AttachMethodEnum value with four possible values: Coordinate, DataCoordinate, DataIndex, and DataIndexY.
ChartLabels can be attached to a chart in one of four ways:
The following image illustrates the ChartLabel attachment methods:
The following list explains each attachment method for the ChartLabels:
Use the AttachMethod property of the Label class to set the attachment method, and the properties of the AttachMethodData class to set the attachment point. These properties can be accessed programmatically through the Label class or at design time through the Labels Collection editor or the Edit Labels designer. For more information on setting the ChartLabel methods at design time using Chart's Smart Designer, see Attaching and Positioning Chart Labels.