IChartTrendLines.Add

Syntax

Add(TrendType: ChartTrendType): IChartTrendLine;

Parameters

TrendType. Type of a created trend.

Description

The Add method adds a trend line of the specified type for a data series.

Example

This example assumes that there is the Chart object of the IChart type.

Sub TrendLine;
Var
    Chart: IChart;
    Trend: IChartTrendLine;
Begin
    Trend := Chart.Series.Item(
0).TrendLines.Add(2 As ChartTrendType);
    Trend.ForwardForecastLength := 
3 As Integer;
    Trend.UseAutomaticText := 
False;
    Trend.Text := 
"trend line 0";
End Sub TrendLine;

After executing the example a data series will have a trend line of exponential type.

See also:

IChartTrendLines