| Charting Labels > Attaching and Positioning Chart Labels > Attaching the Chart Label by Data Point and Y Value |
The two methods, attaching the ChartLabel by data coordinate and attaching the ChartLabel by data point, can be combined so that a ChartLabel is attached to a location whose X-coordinate is specified by a data point and whose Y-coordinate is specified by a chart value. Note that this method is not supported in Pie charts.
To attach the ChartLabel by data point and Y value, set the AttachMethod property to AttachMethodEnum.DataIndexY, and then under the AttachMethodData object set the GroupIndex, SeriesIndex, PointIndex, and Y properties.
To write code in Visual Basic
To write code in C#
In this example, the ChartLabel location is specified as follows:
![]() |
Note: This method is not supported in Pie charts. |
For more information on how to attach the chart label by data point at design time see, Attach by Data Index.