Count: Integer;
The Count property returns the number of trend lines.
This example assumes that there is the Chart object of the IChart type.
Sub TrendLine;
Var
Chart: IChart;
Count: Integer;
Trends: IChartTrendLines;
Begin
Trends := Chart.Series.Item(0).TrendLines;
Count := Trends.Count;
End Sub TrendLine;
After executing the example, the Count variable stores the number of trend lines.
See also: