Trendline refers to a straight or curved line that is superimposed on the chart to inform the user about the direction of the data or the trend. It helps in predicting the future values.
You can use the Add method of the ITrendlines interface to create a new trendline for a specific series. You need to bind the trend line to a data source, set other relevant properties and add it to the Series collection.
Following is the list of various trendline types supported in the Spread WPF charts:
Trendline Type | Description |
Linear | Linear trendline is the straight line that most closely approximates the data in the chart. The data is linear, if the data pattern resembles a line. |
Polynomial | Polynomial trendlines are curved lines that are used with fluctuating data. They are useful for analyzing gains or losses over a large data set. |
Logarithmic | Logarithmic trendline is a best-fit curved line that is most useful when the rate of change in the data increases or decreases quickly and then levels out. |
MovingAverage | Moving Average trendline is used to smooth out variations in data to show a trend clearly. It uses the average value of a specific amount of data as a point in the trendline. |
Power | Power trendline Power trendline is a curved line that is best used with data sets that compare measurements that increase at a specific rate. |
Exponential | Exponential trendline is a curved line that is most useful when data values rise or fall at increasingly higher rates. You cannot create an exponential trend line if your data contains zero or negative values. |
Refer to the following example code to add trendlines.