DataLabel Property Example

This example adds a trendline to the specified series in the chart workspace, sets the font for the data label to bold, and causes the trendline to display only its equation (the R-squared value is not displayed).

Set trndline = ChartSpace1.Charts(0).SeriesCollection(0).Trendlines.Add
trndline.DataLabel.Font.Bold = True
trndline.IsDisplayingRSquared = False