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

AutomaticNumericScaleOptions Class

Contains settings for a numeric axis data when its scale mode is automatic.

Namespace: DevExpress.Xpf.Charts

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

Declaration

public class AutomaticNumericScaleOptions :
    NumericScaleOptionsBase

Remarks

An object of the AutomaticNumericScaleOptions type is returned by the AxisX2D.NumericScaleOptions, AxisX3D.NumericScaleOptions, and CircularAxisX2D.NumericScaleOptions properties.

In the Automatic scale mode, the Chart control automatically defines the most optimal unit of measure for an axis based on the input data, the current chart control size and the zoom level.

Data for each interval on the X-axis is aggregated using the function specified by the AutomaticNumericScaleOptions.AggregateFunction property. Although by default, aggregate function is set to Average, it can be changed to Minimum, Maximum, Sum, etc.

To learn more, see Data Aggregation.

Example

This code snippet shows how to access the automatic numeric scale options for the X-axis scale and specify the aggregate function. The automatic options allow the chart control to automatically define the optimal unit of measure for an axis based on the input data, and the zoom level.

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" 
        x:Class="WpfApplication19.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>

        <dxc:ChartControl>
            <dxc:XYDiagram2D>
                <dxc:XYDiagram2D.AxisX>
                    <dxc:AxisX2D>
                        <dxc:AxisX2D.NumericScaleOptions>
                            <dxc:AutomaticNumericScaleOptions AggregateFunction="Maximum" />
                        </dxc:AxisX2D.NumericScaleOptions>
                    </dxc:AxisX2D>
                </dxc:XYDiagram2D.AxisX>              
            </dxc:XYDiagram2D>          
        </dxc:ChartControl>
    </Grid>
</Window>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AutomaticNumericScaleOptions class.

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.

See Also