Back to Devexpress

AutomaticTimeSpanScaleOptions Class

wpf-devexpress-dot-xpf-dot-charts-779378e6.md

latest3.4 KB
Original Source

AutomaticTimeSpanScaleOptions Class

Contains scale settings for an axis when its scale mode is automatic.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class AutomaticTimeSpanScaleOptions :
    TimeSpanAggregationScaleOptionsBase
vb
Public Class AutomaticTimeSpanScaleOptions
    Inherits TimeSpanAggregationScaleOptionsBase

Remarks

The automatic options allow the Chart Control to automatically define the optimal measurement unit for an axis based on the input data, the chart size, and the zoom level.

You can use an AutomaticTimeSpanScaleOptions object to specify the AxisX2D.TimeSpanScaleOptions, AxisX3D.TimeSpanScaleOptions, and RadarAxisX2D.TimeSpanScaleOptions properties.

The AggregateFunction property allows you to define how to summarize data on each interval defined by a measurement unit.

If predefined aggregate functions do not meet your requirements, define CustomAggregateFunction.

To learn more, see Data Aggregation.

You can change an algorithm used to calculate a measurement unit. To do this, use the AutomaticMeasureUnitsCalculator property.

Example

This code snippet shows how to access the automatic date time scale options for the x-axis scale and specify the aggregate function.

xaml
<dxc:ChartControl>
    <dxc:XYDiagram2D>
        <!--. . .-->
        <dxc:XYDiagram2D.AxisX>
            <dxc:AxisX2D>
                <dxc:AxisX2D.TimeSpanScaleOptions>
                    <dxc:AutomaticTimeSpanScaleOptions AggregateFunction="Sum"/>
                </dxc:AxisX2D.TimeSpanScaleOptions>
            </dxc:AxisX2D>
        </dxc:XYDiagram2D.AxisX>
    </dxc:XYDiagram2D>
</dxc:ChartControl>

Inheritance

Object DispatcherObject DependencyObject Freezable ChartDependencyObject ScaleOptionsBase TimeSpanScaleOptionsBase TimeSpanAggregationScaleOptionsBase AutomaticTimeSpanScaleOptions

See Also

AutomaticTimeSpanScaleOptions Members

DevExpress.Xpf.Charts Namespace