Skip to main content
A newer version of this page is available. .

MaxSummaryFunction Class

The summary function that shows the maximum value.

Namespace: DevExpress.Xpf.Charts

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Charts, DevExpress.Wpf.Charts

Declaration

public class MaxSummaryFunction :
    MinSummaryFunction

Remarks

Assign a Summary object to the Series.Summary property to summarize data point values.

Then assign a MaxSummaryFunction object to the Summary.Function property.

Specify the ValueDataMember property to define a data source field that provides data to be aggregated.

For numerical and date-time x-axis scales, the function aggregates data point values for each interval specified by the MeasureUnit (NumericSummaryOptions.MeasureUnit or DateTimeSummaryOptions.MeasureUnit) property.

In addition to the MaxSummaryFunction, the Chart Control provides the following summary functions:

Example

The example demonstrates how to apply MaxSummaryFunction 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.
MaxSummaryFunction The summary function that shows the maximum value.
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:MaxSummaryFunction ValueDataMember="Value"/>
                                </dxc:Summary.Function>
                            </dxc:Summary>
                        </dxc:PointSeries2D.Summary>
                        <!--...-->
                        <dxc:PointSeries2D.Label>
                            <dxc:SeriesLabel Visible="True" TextPattern="Max: ${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