Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxPieChartSeries<T, TArgument, TValue>.SummaryMethod Property

Specifies the method that calculates summaries for points with the same argument value.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public Func<IEnumerable<TValue>, TValue> SummaryMethod { get; set; }

#Property Value

Type Description
Func<IEnumerable<TValue>, TValue>

A method defined by the Func<IEnumerable<T>, T> signature. For example, Sum(IEnumerable<Int32>)

#Remarks

The Chart component can use a summary method to group data. This method calculates summaries for points with the same argument value, and the chart shows the resulting values as series points. This feature allows you to decrease the number of visible points and to optimize chart performance.

Note that the chart calculates summaries when it loads data and does not re-calculate them when users zoom the chart.

Data Summaries

The following example aggregates the number of visible points with the same argument value. The SummaryMethod property specifies the Sum function for this aggregation.

<DxPieChart Data="@SalesData">
    <DxPieChartSeries T="SaleInfo"
                      TArgument="string"
                      TValue="double"
                      ValueField="si => si.Amount"
                      ArgumentField="si => si.Region"
                      SummaryMethod="Enumerable.Sum">
    </DxPieChartSeries>
    <DxChartLegend Position="RelativePosition.Outside" />
</DxPieChart>

@code {
    IEnumerable<SaleInfo> SalesData;

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

Chart Line Series

See Also