[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ITrendline.Period

Period Property

Period

Gets or sets the period for the moving-average trendline.

This property applies to a trendline whose type is MovingAvg.

Declaration
int Period { get; set; }
Property Period As Integer
Examples
worksheet.Range["A1:A4"].Value = new object[] { 10, 20, 30, 40 };
IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 360, 220);
shape.Chart.SeriesCollection.Add(worksheet.Range["A1:A4"], RowCol.Columns);
ITrendline trendline = shape.Chart.SeriesCollection[0].Trendlines.Add();
trendline.Type = TrendlineType.MovingAvg;
trendline.Period = 2;
int period = trendline.Period;