TrendLine.ExtrapolateToNegativeInfinity Property
Specifies whether the Trend Line is extrapolated to negative infinity.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v24.1.dll
NuGet Package: DevExpress.Wpf.Charts
Declaration
Property Value
Type | Description |
---|---|
Boolean |
|
Remarks
The chart automatically extrapolates the Trend Line to infinity (beyond the point’s argument in the positive direction of the axis). You can also extrapolate the Trend Line to negative infinity or limit the Trend Line to its points.
Set the TrendLine.ExtrapolateToInfinity property to false
to limit the Trend Line to the point.
Set the ExtrapolateToNegativeInfinity
property to true
to extrapolate the Trend Line to negative infinity.
Example
The example below illustrates the stock chart with the ExtrapolateToNegativeInfinity
property set to true
. The chart extrapolates the current Trend Line beyond the start and end point’s arguments.
The following markup shows how to add the Trend Line to the chart:
<Window x:Class="Stock2DChart.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
xmlns:local="clr-namespace:Stock2DChart"/>
<dxc:ChartControl Name="chartControl1">
<dxc:XYDiagram2D>
<dxc:StockSeries2D ArgumentScaleType="DateTime"
DataSource="{Binding Data}"
ArgumentDataMember="Date"
OpenValueDataMember="Open"
HighValueDataMember="High"
LowValueDataMember="Low"
CloseValueDataMember="Close">
<!--region #Trend Line-->
<dxc:StockSeries2D.Indicators>
<dxc:TrendLine x:Name="trendLine1"
Argument1="1/2/2019"
Argument2="1/4/2019"
ValueLevel1="High"
ValueLevel2="High"
ExtrapolateToNegativeInfinity="True" />
</dxc:StockSeries2D.Indicators>
<!--endregion #Trend Line-->
</dxc:StockSeries2D>
</dxc:XYDiagram2D>
</dxc:ChartControl>
Refer to the following topic for more information: Trend Lines.