[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ITrendlines.Item

this Property

this[int]

Gets the ITrendline object at the specified index in this collection.

Use this indexer to access an existing trendline that belongs to a chart series.

Declaration
ITrendline this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ITrendline
Parameters
Type Name Description
int index

The index of the trendline to return.

Property Value
Type Description
ITrendline

The ITrendline object at the specified index.

Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Month", "Sales"},
    {"Jan", 10},
    {"Feb", 12},
    {"Mar", 15}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
chart.SeriesCollection.Add(worksheet.Range["A1:B4"], RowCol.Columns, true, false);
ITrendlines trendlines = chart.SeriesCollection[0].Trendlines;
trendlines.Add();
ITrendline trendline = trendlines[0];