Skip to main content

ManualDateTimeScaleOptions Class

Contains settings for a date-time axis data when its scale mode is manual.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v23.1.dll

NuGet Package: DevExpress.Wpf.Charts


public class ManualDateTimeScaleOptions :


An object of the ManualDateTimeScaleOptions type is returned by the AxisX2D.DateTimeScaleOptions, AxisX3D.DateTimeScaleOptions, and RadarAxisX2D.DateTimeScaleOptions properties.

In this mode, the ManualDateTimeScaleOptions.GridAlignment and ManualDateTimeScaleOptions.MeasureUnit properties are available. These properties allow you to define the output format of date-time values shown by the axis labels.

For instance, you can use the ManualDateTimeScaleOptions.MeasureUnit property to determine the detail level for date-time values (e.g., Millisecond, Second, Minute, Hour, Day, etc.).

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

To learn more, see Data Aggregation.


This example demonstrates how to use the manual date-time scale options of the X-axis.

Data aggregation is enabled automatically for the date-time scale on the X-axis in both automatic and manual scale options.

When the AxisX2D.DateTimeScaleOptions property is set to ManualDateTimeScaleOptions, you can define the ManualDateTimeScaleOptions.GridAlignment, ManualDateTimeScaleOptions.MeasureUnit and ManualDateTimeScaleOptions.AggregateFunction properties manually.

To use the automatic date-time scale options, set the AxisX2D.DateTimeScaleOptions property to AutomaticDateTimeScaleOptions, and select the appropriate AutomaticDateTimeScaleOptions.AggregateFunction.

To prevent the axis scale from being divided into intervals (and thus prevent chart data from being aggregated), set the ManualDateTimeScaleOptions.AggregateFunction property to None.

View Example

        Title="MainWindow" Height="400" Width="525">
            <dxc:XYDiagram2D >
                    <dxc:AxisX2D GridLinesMinorVisible="True" GridLinesVisible="True">
                            <dxc:ManualDateTimeScaleOptions AggregateFunction="Maximum" AutoGrid="False"
                                                            GridAlignment="Year" MeasureUnit="Month" 
                                                            GridSpacing="3" GridOffset="1"/>
                <dxc:LineSeries2D DataSource="{Binding Path=Rate}" 
                                  ArgumentDataMember="Argument" ValueDataMember="Value"  />

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


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