Skip to main content

ChartAggregationMethod Enum

Lists values that specify how to aggregate series points.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public enum ChartAggregationMethod

Members

Name Description
Auto

For most series types, the Average function is automatically applied.
For Range Area and Range Bar series types, the Range function is used.
For Stock and Candlestick series types, the Financial function is used.

Average

Calculates the average value for a selected numeric or date-time interval.

Min

Calculates the minimum value for a selected numeric or date-time interval.

Max

Calculates the maximum value for a selected numeric or date-time interval.

Count

Calculates the number of non-null values for a selected numeric or date-time interval.

Sum

Calculates the summary for a selected numeric or date-time interval.

Financial

Use this function for Stock and Candlestick series types.
The function aggregates financial data for a selected interval into a single high-low-open-close data point:

  • 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 open value of the first data point;
  • the close value equals the close value of the last data point.
Range

Use this function for Range Area and Range Bar series types.
The function calculates the range of values for a selected numeric or date-time interval.

Related API Members

The following properties accept/return ChartAggregationMethod values:

Remarks

Use the ChartAggregationMethod enumeration value to specify an aggregation method for data aggregation.

@using Chart.Data

<DxChart Data="@SalesData">
    <DxChartLineSeries Name="2017"
                        Filter="@((SaleInfo s) => s.Date.Year == 2017)"
                        ArgumentField="@(s => s.Date)"
                        ValueField="@(s => s.Amount)">
        <DxChartAggregationSettings Enabled="true" Method="ChartAggregationMethod.Sum" />
    </DxChartLineSeries>
    <DxChartZoomAndPanSettings ArgumentAxisZoomAndPanMode="ChartAxisZoomAndPanMode.Both"
                               ValueAxisZoomAndPanMode="ChartAxisZoomAndPanMode.Pan" />
    <DxChartScrollBarSettings ArgumentAxisScrollBarVisible="true"
                              ArgumentAxisScrollBarPosition="ChartScrollBarPosition.Top" />
</DxChart>

@code {
    IEnumerable<SaleInfo> SalesData;

    protected override async Task OnInitializedAsync() {
        SalesData = await Sales.GetSalesAsync();
    }
}
See Also