[]
Represents the collection of trend lines for a specific chart ISeries.
Use this interface to add, access, and iterate the ITrendline objects associated with a series. A trendline can be used to show the data trend for the series and can then be configured through the returned ITrendline object. series and can then be configured through the returned ITrendline object.
public interface ITrendlines : IEnumerable<ITrendline>, IEnumerable
Public Interface ITrendlines
Inherits IEnumerable(Of ITrendline), IEnumerable
worksheet.Range["A1:B5"].Value = new object[,] {
{"Item", "Sales"}, {"Jan", 10}, {"Feb", 15}, {"Mar", 18}, {"Apr", 24}
};
IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 200, 30, 300, 300);
shape.Chart.SeriesCollection.Add(worksheet.Range["A1:B5"], RowCol.Columns, true, true);
ISeries series = shape.Chart.SeriesCollection[0];
ITrendlines trendlines = series.Trendlines;
ITrendline trendline = trendlines.Add();
trendline.Type = TrendlineType.Linear;
| Name | Description |
|---|---|
| Count | Gets the number of ITrendline objects in this collection. Use this property to determine how many trendlines are currently associated with the parent series. |
| 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. |
| Parent | Gets the ISeries object that owns this trendline collection. Use this property to access the parent series after obtaining an ITrendlines collection from a chart series. |
| Name | Description |
|---|---|
| Add() | Creates a new trendline and adds it to this collection. Use this method to create a trendline for the parent series and then configure the returned ITrendline object. |