Back to Devexpress

AutomaticTimeSpanScaleOptions.AggregateFunction Property

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

latest3.8 KB
Original Source

AutomaticTimeSpanScaleOptions.AggregateFunction Property

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

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

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

Property Value

TypeDescription
AggregateFunction

An aggregate function that applies to series points.

|

Available values:

NameDescription
None

The aggregate function is not applied.

| | Average |

Aggregates data by calculating the average value for a selected numeric or date-time interval.

| | Minimum |

Aggregates data by calculating the minimum value for a selected numeric or date-time interval.

| | Maximum |

Aggregates data by calculating the maximum value for a selected numeric or date-time interval.

| | Sum |

Aggregates data by calculating the summary for a selected numeric or date-time interval.

| | Count |

Aggregates data by calculating the number of non-null values for a selected numeric or date-time interval.

| | Histogram |

Aggregates data by calculating the number of all points for a selected numeric or date-time interval.

| | Financial |

Aggregates financial data for a selected interval into a single high-low-open-close data point, so that the high value equals the highest value of all data points in this interval; the low value equals the lowest value of all data points; the open value equals the value of the first data point and the close value equals the value of the last data point.

| | Custom |

Aggregates data using the custom CustomAggregateFunction calculator.

|

Remarks

When the AggregateFunction property is not specified, the Chart uses the Average function:

When the AggregateFunction is set to None , series points are grouped by their arguments and an arithmetic operation is not applied to data:

Example

This code snippet shows how to access the automatic date time scale options for the x-axis scale and specify the aggregate function.

xaml
<dxc:ChartControl>
    <dxc:XYDiagram2D>
        <!--. . .-->
        <dxc:XYDiagram2D.AxisX>
            <dxc:AxisX2D>
                <dxc:AxisX2D.TimeSpanScaleOptions>
                    <dxc:AutomaticTimeSpanScaleOptions AggregateFunction="Sum"/>
                </dxc:AxisX2D.TimeSpanScaleOptions>
            </dxc:AxisX2D>
        </dxc:XYDiagram2D.AxisX>
    </dxc:XYDiagram2D>
</dxc:ChartControl>

See Also

AutomaticTimeSpanScaleOptions Class

AutomaticTimeSpanScaleOptions Members

DevExpress.Xpf.Charts Namespace