Skip to main content

Axis2D.ResolveOverlappingOptions Attached Property

Specifies the settings that define how to resolve overlapping axis labels.

Namespace: DevExpress.Xpf.Charts

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

NuGet Package: DevExpress.Wpf.Charts

Declaration

Returns

Type Description
AxisLabelResolveOverlappingOptions

An AxisLabelResolveOverlappingOptions object.

Remarks

The Chart Control provides the Resolve Overlapping algorithm that rotates, staggers and hides axis labels when they are too long and do not have enough space to display all the information. You can use the Resolve Overlapping options to configure this algorithm. Axis labels overlap when the Resolve Overlapping options are disabled.

The following animation shows how the Resolve Overlapping algorithm works:

WPF_ResolveOverlappingAxisLabels

The following XAML demonstrates how to use AxisLabelResolveOverlappingOptions to configure the Resolve Overlapping algorithm’s options:

Tip

A complete sample project is available in the DevExpress Code Examples database at https://supportcenter.devexpress.com/ticket/details/t316624/chart-for-wpf-how-to-configure-resolve-overlapping-for-axis-labels.

<dxc:XYDiagram2D.AxisX>
    <dxc:AxisX2D>
        <dxc:AxisX2D.DateTimeScaleOptions>
            <dxc:ManualDateTimeScaleOptions MeasureUnit="Hour"
                        GridAlignment="Hour"
                        GridSpacing="6"
                        AutoGrid="False" />
        </dxc:AxisX2D.DateTimeScaleOptions>
        <dxc:AxisX2D.Label>
            <dxc:AxisLabel TextPattern="{}{A:dd/MM HH:mm}">
                <dxc:Axis2D.ResolveOverlappingOptions>
                    <dxc:AxisLabelResolveOverlappingOptions AllowHide="True"
                                AllowRotate="True"
                                AllowStagger="True"
                                MinIndent="5" />
                </dxc:Axis2D.ResolveOverlappingOptions>
            </dxc:AxisLabel>
        </dxc:AxisX2D.Label>
    </dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>

You can use the following properties to configure the Resolve Overlapping algorithm’s options:

Member Description
AxisLabelResolveOverlappingOptions Settings that allow you to modify axis labels’ position to prevent overlapping labels.
Axis2D.ResolveOverlappingOptions Gets or sets the settings that allow you to avoid overlapping axis labels.
AxisLabelResolveOverlappingOptions.AllowHide Gets or sets the value that indicates whether to hide axis labels to prevent overlapping labels.
AxisLabelResolveOverlappingOptions.AllowRotate Specifies the value that indicates whether to rotate axis labels.
AxisLabelResolveOverlappingOptions.AllowStagger Gets or sets the value that indicates whether to stagger axis labels to avoid overlapping labels.
AxisLabelResolveOverlappingOptions.MinIndent Gets or sets the minimum indent between adjacent axis labels when an overlap resolution algorithm is applied to them.

Note

The AllowRotate and AllowStagger properties only affect labels of a horizontal 2D XY Diagram axis (an arguments x-axis or values y-axis when XYDiagram2D.Rotated is enabled).

See Also