Creating TrendLines

Creating TrendLines at Design Time

TrendLines can be created at design time using the TrendLine Collection Editor. Using the collection editor, you may add, modify and remove trend lines. For more information on the TrendLine Collection Editor, see TrendLine Collection Editor.

Creating TrendLines Programmatically

To create a TrendLine programmatically, create instance of TrendLine object and set its properties. The TrendLine can be created using its constructor or AddNewTrendLine.TrendLinesCollection() method of TrendLinesCollection.

The following code adds a red TrendLine to ChartGroup(0) of the Chart:

      Visual Basic

      C#

This topic illustrates the following:

The red trend line connects the first and last data points.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.