SeriesCollection(1).Trendlines(1).Type = xlMovingAvg Trendlines(1) is the first trendline added to the series, and Trendlines(Trendlines.Count) is the last one added. The index number denotes the order in which the trendlines were added to the series. If the series has no trendline, this example will fail. The following example changes the trendline type for the first series in embedded chart one on worksheet one. Use Trendlines ( index), where index is the trendline index number, to return a single TrendLine object. Trendlines.Add type:=xlLinear, name:="Linear Trend" Worksheets("sheet1").ChartObjects(1).Chart.SeriesCollection(1) _ The following example adds a linear trendline to the first series in embedded chart one on Sheet1. Use the Add method to create a new trendline and add it to the series. MsgBox Charts(1).SeriesCollection(1).Trendlines.Count The following example displays the number of trendlines for series one on Chart1. Use the Trendlines method of the Series object to return the Trendlines collection. A trendline shows the trend, or direction, of data in a series. RemarksĮach Trendline object represents a trendline in a chart. A collection of all the Trendline objects for the specified series.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |