Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.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