Skip to main content
All docs
V25.1
  • SeriesPoint3DDataSourceAdapter.CalculatedFields Property

    Returns a collection of calculated fields.

    Namespace: DevExpress.Xpf.Charts

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

    NuGet Package: DevExpress.Wpf.Charts

    Declaration

    public ChartCalculatedFieldCollection CalculatedFields { get; }

    Property Value

    Type Description
    ChartCalculatedFieldCollection

    A collection that stores calculated fields.

    Remarks

    Calculated fields allow you to evaluate values based on an expression and use them as a data source for series arguments,values, tooltips, crosshair labels, and so on.

    To add a calculated field to a Chart3D Control, add a ChartCalculatedField object to the adapter’s CalculatedFields collection and specify its parameters.

    Example

    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: [X] * [Y].

    <dxc:Chart3DControl AspectRatio="1 1 0.5">
        <dxc:Chart3DControl.DataContext>
            <local:ChartViewModel/>
        </dxc:Chart3DControl.DataContext>
        <dxc:Series3DStorage>
            <dxc:Series3D DisplayName="Series" 
                          CrosshairLabelPattern="X: {X:f1}&#x0a;Y: {Y:f1}&#x0a;Value: {V}">
                <dxc:Series3D.View>
                    <dxc:Point3DSeriesView/>
                </dxc:Series3D.View>
                <dxc:SeriesPoint3DDataSourceAdapter DataSource="{Binding DataPoints}" 
                                                    XArgumentDataMember="X" 
                                                    YArgumentDataMember="Y" 
                                                    ValueDataMember="Value">
                    <dxc:SeriesPoint3DDataSourceAdapter.CalculatedFields>
                        <dxc:ChartCalculatedField Expression="[X]*[Y]" 
                                                  FieldName="Value" 
                                                  FieldType="Double"/>
                    </dxc:SeriesPoint3DDataSourceAdapter.CalculatedFields>
                </dxc:SeriesPoint3DDataSourceAdapter>
            </dxc:Series3D>
        </dxc:Series3DStorage>
    </dxc:Chart3DControl>
    
    See Also