Back to Devexpress

ScaleGridOptionsBase.AggregateFunction Property

corelibraries-devexpress-dot-xtracharts-dot-scalegridoptionsbase-44faf81b.md

latest6.7 KB
Original Source

ScaleGridOptionsBase.AggregateFunction Property

Gets or sets the value indicating the aggregate function that should be used to relieve data.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

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

Property Value

TypeDescription
AggregateFunction

The value indicating the aggregate function that should be used to relieve data.

|

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.

| | Sum |

Aggregates data by calculating the summary 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.

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

| | Custom |

Aggregates data using the custom CustomAggregateFunction calculator.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the AggregateFunction property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

asp-net-web-forms-web-chart-control-create-drill-down-chart/CS/DrillDownChart/WebForm1.aspx.cs#L29

csharp
diagram.AxisX.DateTimeScaleOptions.ScaleMode = ScaleMode.Automatic;
    diagram.AxisX.DateTimeScaleOptions.AggregateFunction = AggregateFunction.Sum;
}

winforms-chart-draw-a-custom-legend-marker-for-a-series/CS/CustomDrawingSample/Form1.cs#L49

csharp
if (diagram != null) {
    diagram.AxisX.DateTimeScaleOptions.AggregateFunction = AggregateFunction.Sum;
    diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Year;

winforms-chart-draw-a-custom-series-marker-in-the-crosshair/CS/CustomDrawCrosshairSample/Form1.cs#L47

csharp
if (diagram != null) {
    diagram.AxisX.DateTimeScaleOptions.AggregateFunction = AggregateFunction.Sum;
    diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Year;

winforms-charts-use-automatic-date-time-scale-modes-of-an-axis/CS/DateTimeAggregation/Form1.cs#L148

csharp
void SetAxisXAggregateFunction(AggregateFunction aggregateFunction) {
    AxisX.DateTimeScaleOptions.AggregateFunction = aggregateFunction;
}

asp-net-web-forms-web-chart-control-create-drill-down-chart/VB/DrillDownChart/WebForm1.aspx.vb#L30

vb
diagram.AxisX.DateTimeScaleOptions.ScaleMode = ScaleMode.Automatic
    diagram.AxisX.DateTimeScaleOptions.AggregateFunction = AggregateFunction.Sum
End If

winforms-chart-draw-a-custom-legend-marker-for-a-series/VB/CustomDrawingSample/Form1.vb#L53

vb
If diagram IsNot Nothing Then
    diagram.AxisX.DateTimeScaleOptions.AggregateFunction = AggregateFunction.Sum
    diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Year

winforms-chart-draw-a-custom-series-marker-in-the-crosshair/VB/CustomDrawCrosshairSample/Form1.vb#L52

vb
If diagram IsNot Nothing Then
    diagram.AxisX.DateTimeScaleOptions.AggregateFunction = AggregateFunction.Sum
    diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Year

winforms-charts-use-automatic-date-time-scale-modes-of-an-axis/VB/DateTimeAggregation/Form1.vb#L130

vb
Private Sub SetAxisXAggregateFunction(ByVal aggregateFunction As AggregateFunction)
    AxisX.DateTimeScaleOptions.AggregateFunction = aggregateFunction
End Sub

See Also

ScaleGridOptionsBase Class

ScaleGridOptionsBase Members

DevExpress.XtraCharts Namespace