Skip to main content
All docs
V25.1
  • ChartCommands.SetDateTimeAxisPeriodCommand Property

    A command that specifies the on-screen data range.

    Namespace: DevExpress.Xpf.Charts

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

    NuGet Package: DevExpress.Wpf.Charts

    Declaration

    public ICommand<ChartIntervalItem> SetDateTimeAxisPeriodCommand { get; set; }

    Property Value

    Type Description
    ICommand<ChartIntervalItem>

    A chart date-time interval.

    Remarks

    The following code shows how to use SetDateTimeAxisPeriodCommand to set a chart visual range to one year.

    <dxc:ChartControl x:Name="chart">
        <!--...-->
    </dxc:ChartControl>
    <dx:SimpleButton VerticalAlignment="Bottom" Width="100" Height="50" Content="Show Last Year Data" 
                     Command="{Binding Commands.SetDateTimeAxisPeriodCommand, ElementName=chart}">
        <dx:SimpleButton.CommandParameter>
            <dxc:ChartIntervalItem MeasureUnit="Year" MeasureUnitMultiplier="1"/>
        </dx:SimpleButton.CommandParameter>
    </dx:SimpleButton>
    
    See Also