All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ChartCalculatedField.Expression Property

Gets or sets an expression the calculated field uses to evaluate its values.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v20.1.dll

Declaration

public string Expression { get; set; }
Public Property Expression As String

Property Value

Type Description
String

A string that represents an expression written in Criteria Language.

Examples

The following example shows how to create a calculated field and then use this field as a data source for a series. The field's values are calculated by the following expression: [Time.Seconds] * [Velocity].

<dxc:ChartControl x:Name="chartControl">
    <dxc:ChartControl.DataContext>
        <local:ChartViewModel/>
    </dxc:ChartControl.DataContext>
    <dxc:ChartControl.CalculatedFields>
        <dxc:ChartCalculatedField FieldName="Displacement" 
                                  Expression="[Time.Seconds] * [Velocity]" 
                                  FieldType="Double"/>
    </dxc:ChartControl.CalculatedFields>
    <dxc:XYDiagram2D>
        <dxc:SplineSeries2D DisplayName="Series" 
                            DataSource="{Binding DataPoints}"
                            ArgumentDataMember="Time"
                            ValueDataMember="Displacement" 
                            CrosshairLabelPattern="{}{Displacement:f1}" 
                            MarkerVisible="True"/>
        ...
    </dxc:XYDiagram2D>
</dxc:ChartControl>

Implements

DevExpress.XtraReports.Native.ICalculatedField.Expression
See Also