ManualDateTimeScaleOptions.AggregateFunction Property

Gets or sets the function that is used to aggregate date-time axis data when one of the AxisX2D.DateTimeScaleOptions, AxisX3D.DateTimeScaleOptions, or RadarAxisX2D.DateTimeScaleOptions properties is set to ManualDateTimeScaleOptions.

Namespace: DevExpress.Xpf.Charts

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


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

Property Value

Type Description

An AggregateFunction enumeration value.


The image below shows date-time data aggregation in the Manual scale mode using the Maximum function.



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

To disable date-time data aggregation, set the AggregateFunction property to AggregateFunction.None.

To learn more, see Data Aggregation.


This example demonstrates how to use the manual date-time scale options of the X-axis.

Data aggregation is enabled automatically for the date-time scale on the X-axis in both automatic and manual scale options.

When the AxisX2D.DateTimeScaleOptions property is set to ManualDateTimeScaleOptions, you can define the ManualDateTimeScaleOptions.GridAlignment, ManualDateTimeScaleOptions.MeasureUnit and ManualDateTimeScaleOptions.AggregateFunction properties manually.

To use the automatic date-time scale options, set the AxisX2D.DateTimeScaleOptions property to AutomaticDateTimeScaleOptions, and select the appropriate AutomaticDateTimeScaleOptions.AggregateFunction.

To prevent the axis scale from being divided into intervals (and thus prevent chart data from being aggregated), set the ManualDateTimeScaleOptions.AggregateFunction property to None.

        Title="MainWindow" Height="400" Width="525">
            <dxc:XYDiagram2D >
                    <dxc:AxisX2D GridLinesMinorVisible="True" GridLinesVisible="True">
                            <dxc:ManualDateTimeScaleOptions AggregateFunction="Maximum" AutoGrid="False"
                                                            GridAlignment="Year" MeasureUnit="Month" 
                                                            GridSpacing="3" GridOffset="1"/>
                <dxc:LineSeries2D DataSource="{Binding Path=Rate}" 
                                  ArgumentDataMember="Argument" ValueDataMember="Value"  />
See Also