AutomaticNumericScaleOptions.AggregateFunction Property

Gets or sets the function that is used to aggregate numeric axis data when one of the AxisX2D.NumericScaleOptions, AxisX3D.NumericScaleOptions, or CircularAxisX2D.NumericScaleOptions properties is set to AutomaticNumericScaleOptions.

Namespace: DevExpress.Xpf.Charts

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

Declaration

public AggregateFunction AggregateFunction { get; set; }
Public Property AggregateFunction As AggregateFunction

Property Value

Type Description
AggregateFunction

An AggregateFunction enumeration value.

Remarks

The image below shows numeric data aggregation in the Automatic scale mode using the default Average function.

AutomaticNumeric_AverageFunction

NOTE

The AggregateFunction property is set to AggregateFunction.Average by default.

To disable numeric data aggregation, set the AggregateFunction property to AggregateFunction.None.

To learn more, see Data Aggregation.

Examples

This code snippet shows how to access the automatic numeric scale options for the X-axis scale and specify the aggregate function. The automatic options allow the chart control to automatically define the optimal unit of measure for an axis based on the input data, and the zoom level.

<Window
        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" 
        x:Class="WpfApplication19.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>

        <dxc:ChartControl>
            <dxc:XYDiagram2D>
                <dxc:XYDiagram2D.AxisX>
                    <dxc:AxisX2D>
                        <dxc:AxisX2D.NumericScaleOptions>
                            <dxc:AutomaticNumericScaleOptions AggregateFunction="Maximum" />
                        </dxc:AxisX2D.NumericScaleOptions>
                    </dxc:AxisX2D>
                </dxc:XYDiagram2D.AxisX>              
            </dxc:XYDiagram2D>          
        </dxc:ChartControl>
    </Grid>
</Window>
See Also