Skip to main content

RegressionLine Class

Represents a Regression Line indicator.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v22.2.dll

NuGet Package: DevExpress.Charts


public class RegressionLine :

The following members return RegressionLine objects:


The settings exposed via the RegressionLine class define the functionality of regression lines - one of the set of analytical tools provided by XtraCharts.

The RegressionLine objects reside in the IndicatorCollection returned by the XYDiagram2DSeriesViewBase.Indicators property.

A series can have an unlimited number of Regression Lines that correspond to any SingleLevelIndicator.ValueLevel.

For more information, see Regression Lines.


This example demonstrates how a Regression Line can be displayed for a series of the Stock view type.

To access the series’ collection of indicators (via the XYDiagram2DSeriesViewBase.Indicators property), you should cast your series view to an appropriate type.

// Create a regression line for the Open value level.
RegressionLine myLine = new RegressionLine(ValueLevel.Open);

// Access the series collection of indicators,
// and add the regression line to it.

// Customize the regression line's appearance.
myLine.LineStyle.DashStyle = DashStyle.DashDot;
myLine.LineStyle.Thickness = 2;
myLine.Color = Color.Crimson;


See Also