Skip to main content

ChartCommands.SetDateTimeAxisUnitCommand Property

Specifies the command that defines a date-time unit used to aggregate series values.

Namespace: DevExpress.Xpf.Charts

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

NuGet Package: DevExpress.Wpf.Charts

Declaration

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

Property Value

Type Description
ICommand<ChartIntervalItem>

A date-time item used to aggregate series data.

Remarks

The following example shows how to use SetDateTimeAxisUnitCommand to aggregate data by a half-year:

<dxc:ChartControl x:Name="chart">
    <!--...-->
</dxc:ChartControl>
<dx:SimpleButton VerticalAlignment="Bottom" Width="150" Height="40" Content="Aggregate by Half-Year" 
                  Command="{Binding Commands.SetDateTimeAxisUnitCommand, ElementName=chart}">
    <dx:SimpleButton.CommandParameter>
        <dxc:ChartIntervalItem MeasureUnit="Month" MeasureUnitMultiplier="6"/>
    </dx:SimpleButton.CommandParameter>
</dx:SimpleButton>
See Also