This example shows how to perform a custom regression analysis against scatter series points generated from a data table and how to display the Line of Best Fit as illustrated on the image below.
-
Create a point series and bind it to a data source. This series' data is to be analyzed.
-
Add a line series that will be used to display the Line of Best Fit.
-
Create a method that uses a custom formula to perform the regression analysis against the first series' points. The method should calculate data points used to plot the line series.
-
In the ChartControl.BoundDataChanged event handler, call the newly created method for the analyzed series (Series 1).
Note that you can also use built-in Regression Lines.
- Indicators - This topic contains a list of built-in technical indicators that ship with the DevExpress Charts for WinForms.
- How to display a regression line for a series
- How to add a Trend Line to a chart
- How to draw Fibonacci Arcs, Fans and Retracement for a Stock series
(you will be redirected to DevExpress.com to submit your response)