Back to Devexpress

ContinuousTimeSpanScaleOptions Class

wpf-devexpress-dot-xpf-dot-charts-99985b0b.md

latest6.4 KB
Original Source

ContinuousTimeSpanScaleOptions Class

Contains settings for an axis with a continuous time-span scale.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class ContinuousTimeSpanScaleOptions :
    TimeSpanScaleOptionsBase
vb
Public Class ContinuousTimeSpanScaleOptions
    Inherits TimeSpanScaleOptionsBase

The following members return ContinuousTimeSpanScaleOptions objects:

Remarks

You can use an ContinuousTimeSpanScaleOptions object to specify the following properties:

When an x-axis scale is continuous, you cannot aggregate data and specify an axis measurement unit.

You can configure the following parameters for continuous axes:

The grid alignment and grid spacing are automatically calculated when the AutoGrid property is enabled.

Example

This example shows how to configure a continuous time-span scale options of an x-axis.

xaml
<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TimeSpanExample"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" 
        x:Class="TimeSpanExample.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Window.DataContext>
        <local:ChartViewModel/>
    </Window.DataContext>
    <Grid>
        <dxc:ChartControl>
            <dxc:XYDiagram2D>
                <dxc:XYDiagram2D.AxisX>
                    <dxc:AxisX2D>
                        <dxc:AxisX2D.TimeSpanScaleOptions>
                            <dxc:ContinuousTimeSpanScaleOptions GridAlignment="Hour" 
                                                                GridSpacing="3" 
                                                                AutoGrid="False"/>
                        </dxc:AxisX2D.TimeSpanScaleOptions>
                    </dxc:AxisX2D>
                </dxc:XYDiagram2D.AxisX>
                <!-- Other diagram settings. -->
            </dxc:XYDiagram2D>
        </dxc:ChartControl>
    </Grid>
</Window>

Related API:

MemberDescription
AxisX2D.TimeSpanScaleOptionsGets or sets options of the time-span scale used by the argument axis.
ContinuousTimeSpanScaleOptionsContains settings for an axis with a continuous time-span scale.
ContinuousTimeSpanScaleOptions.GridAlignmentGets or sets the time-span measurement unit that defines the alignment of grid lines and axis labels.
ContinuousTimeSpanScaleOptions.GridSpacingGets or sets a value that specifies the distance between major tickmarks and grid lines.
ContinuousTimeSpanScaleOptions.AutoGridGets or sets a value that specifies whether the GridSpacing and GridAlignment property values are automatically calculated.

Inheritance

Object DispatcherObject DependencyObject Freezable ChartDependencyObject ScaleOptionsBase TimeSpanScaleOptionsBase ContinuousTimeSpanScaleOptions

See Also

ContinuousTimeSpanScaleOptions Members

Axis Scale Types

DevExpress.Xpf.Charts Namespace