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

DataMemberSummaryFunction Class

The base class for summary functions that aggregate values that the specified data source member provides.

Namespace: DevExpress.Xpf.Charts

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

NuGet Package: DevExpress.Wpf.Charts

#Declaration

public abstract class DataMemberSummaryFunction :
    SummaryFunctionBase

#Remarks

Use the DataMemberSummaryFunction.ValueDataMember property to specify the data member that provides values to be aggregated.

#Example

The example demonstrates how to apply AverageSummaryFunction to aggregate data points.

Use the following API members to configure the summary function options:

Member Description
Series.Summary Gets or sets the series data point summarization settings.
Summary Stores the series data point summarize options.
Summary.Function Specifies the summary function that calculates data point values.
AverageSummaryFunction The summary function that calculates the average of data point values.
DataMemberSummaryFunction.ValueDataMember Gets or sets the data source field that provides data to be aggregated.
<Window.DataContext>
    <local:ChartViewModel/>
</Window.DataContext>
<Grid>
    <dxc:ChartControl>
        <dxc:XYDiagram2D SeriesItemsSource="{Binding SaleSeries}">
            <dxc:XYDiagram2D.SeriesItemTemplate>
                <DataTemplate>
                    <dxc:PointSeries2D DataSource="{Binding Values}"
                                       ArgumentDataMember="Category"
                                       ValueDataMember="Value">
                        <!-- Configure the summary function options. -->
                        <dxc:PointSeries2D.Summary>
                            <dxc:Summary>
                                <dxc:Summary.Function>
                                    <dxc:AverageSummaryFunction ValueDataMember="Value"/>
                                </dxc:Summary.Function>
                            </dxc:Summary>
                        </dxc:PointSeries2D.Summary>
                        <!--...-->
                        <dxc:PointSeries2D.Label>
                            <dxc:SeriesLabel Visible="True" TextPattern="Average: ${V}M" 
                                             dxc:MarkerSeries2D.Angle="90" ResolveOverlappingMode="JustifyAroundPoint"/>
                        </dxc:PointSeries2D.Label>
                    </dxc:PointSeries2D>
                </DataTemplate>
            </dxc:XYDiagram2D.SeriesItemTemplate>
            <dxc:XYDiagram2D.AxisX>
                <dxc:AxisX2D TickmarksMinorVisible="False"/>
            </dxc:XYDiagram2D.AxisX>
            <dxc:XYDiagram2D.AxisY>
                <dxc:AxisY2D Interlaced="False">
                    <dxc:AxisY2D.WholeRange>
                        <dxc:Range dxc:AxisY2D.AlwaysShowZeroLevel="False"/>
                    </dxc:AxisY2D.WholeRange>
                    <dxc:AxisY2D.Label>
                        <dxc:AxisLabel TextPattern="${V}M"/>
                    </dxc:AxisY2D.Label>
                </dxc:AxisY2D>
            </dxc:XYDiagram2D.AxisY>
        </dxc:XYDiagram2D>
        <dxc:ChartControl.Titles>
            <dxc:Title Content="Product Sales" HorizontalAlignment="Center" FontSize="14"/>
        </dxc:ChartControl.Titles>
    </dxc:ChartControl>
</Grid>

#Inheritance

Object
DevExpress.Xpf.Charts.NotifyPropertyChangedObject
See Also