Back to Devexpress

RateOfChange Class

wpf-devexpress-dot-xpf-dot-charts-d2335210.md

latest3.8 KB
Original Source

RateOfChange Class

A Rate of Change indicator.

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class RateOfChange :
    SeparatePaneIndicatorWithPoints
vb
Public Class RateOfChange
    Inherits SeparatePaneIndicatorWithPoints

Remarks

The Rate of Change indicator looks as follows:

The Chart Control uses the following formula to calculate the indicator’s values:

  • CurrentValue - A current point value at the given value level (the default value is Close ).
  • Value - A point value at the given value level (the default value is Close ).
  • n - The PointsCount property’s value. The default value is 14.

Example

This example shows how to create a Rate of Change indicator, configure its parameters, and display it in a separate pane.

xaml
<dxc:ChartControl x:Name="chart">
    <dxc:XYDiagram2D>
        <dxc:StockSeries2D x:Name="financialSeries ...>
            <dxc:StockSeries2D.Indicators>
                <dxc:RateOfChange                
                    PointsCount="14"
                    ValueLevel="Close"
                    LegendText="Rate of Change"
                    ShowInLegend="True"
                    DisplayName="RoC"
                    CrosshairEnabled="True"
                    AxisY="{Binding ElementName=rocYAxis}"
                    Pane="{Binding ElementName=rocPane}"
                    Legend="{Binding ElementName=rocLegend}" 
                    CrosshairLabelPattern="{}{I}: {V:f3}"/>
            </dxc:StockSeries2D.Indicators>
        </dxc:StockSeries2D>
        <dxc:XYDiagram2D.Panes>
            <dxc:Pane x:Name="rocPane"/>
        </dxc:XYDiagram2D.Panes>
        <dxc:XYDiagram2D.SecondaryAxesY>
            <dxc:SecondaryAxisY2D x:Name="rocYAxis"/>
        </dxc:XYDiagram2D.SecondaryAxesY>
    </dxc:XYDiagram2D>
    <dxc:ChartControl.Legends>
        <dxc:Legend x:Name="rocLegend" DockTarget="{Binding ElementName=rocPane}" HorizontalPosition="Left"/>
    </dxc:ChartControl.Legends>
</dxc:ChartControl>

Implements

ILegendVisible

Inheritance

Show 13 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ChartElementBase ChartElement Indicator SeparatePaneIndicator DevExpress.Xpf.Charts.SeparatePaneIndicatorWithPoints RateOfChange

See Also

RateOfChange Members

DevExpress.Xpf.Charts Namespace