RegressionLine Class
Represents a Regression Line indicator.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
Declaration
Related API Members
The following members return RegressionLine objects:
Remarks
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.
Example
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.
((StockSeriesView)chartControl1.Series[0].View).Indicators.Add(myLine);
// Customize the regression line's appearance.
myLine.LineStyle.DashStyle = DashStyle.DashDot;
myLine.LineStyle.Thickness = 2;
myLine.Color = Color.Crimson;