Back to Devexpress

Axis2D.ResolveOverlappingOptions Attached Property

wpf-devexpress-dot-xpf-dot-charts-dot-axis2d-724b3cef.md

latest4.8 KB
Original Source

Axis2D.ResolveOverlappingOptions Attached Property

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

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

See GetResolveOverlappingOptions(AxisLabel) and SetResolveOverlappingOptions(AxisLabel, AxisLabelResolveOverlappingOptions).

Returns

TypeDescription
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:

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.

xaml
<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:

MemberDescription
AxisLabelResolveOverlappingOptionsSettings that allow you to modify axis labels’ position to prevent overlapping labels.
Axis2D.ResolveOverlappingOptionsGets or sets the settings that allow you to avoid overlapping axis labels.
AxisLabelResolveOverlappingOptions.AllowHideGets or sets the value that indicates whether to hide axis labels to prevent overlapping labels.
AxisLabelResolveOverlappingOptions.AllowRotateSpecifies the value that indicates whether to rotate axis labels.
AxisLabelResolveOverlappingOptions.AllowStaggerGets or sets the value that indicates whether to stagger axis labels to avoid overlapping labels.
AxisLabelResolveOverlappingOptions.MinIndentGets 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

Axis Labels

Axis2D Class

Axis2D Members

DevExpress.Xpf.Charts Namespace