Version

Axis Label Layout Behaviors

In applications which generate charts of variable size and content, it is important that axis labels can make the proper adjustments to fit in the space that is available to them.

Shows 2D Column Chart with the Axis Labels adjusted to show long text as the labels.

The most effective way to do this is to have a prescribed set of rules determining how labels should be laid out. Behaviors like font scaling, text wrapping, rotation, and text clipping will be used until the labels can be laid out clearly in the available space.

The AxisLabelAppearanceBase.Layout property defines how such behaviors are applied. This property exposes an appearance object with the following properties; which are describe in the subsequent sections.

Behavior

This enumeration allows you to set the mode of the axis label layout. The following modes are available:

  • AxisLabelLayoutBehaviors.Auto — This is the recommended mode. The layout algorithm is automatically selected. Axis label collisions will not occur if there is reasonable space available to display them.

In Visual Basic:

Imports Infragistics.UltraChart.Shared.Styles
...
Me.UltraChart1.Axis.X.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto

In C#:

using Infragistics.UltraChart.Shared.Styles;
...
this.ultraChart1.Axis.X.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto;
  • AxisLabelLayoutBehaviors.None — Labels will not be prevented from overlapping or colliding.

  • AxisLabelLayoutBehaviors.UseCollection — The BehaviorCollection will be used to determine the layout algorithm (see the following section).

Behavior Collection

The BehaviorCollection property will be used as the set of rules needed to generate an axis label layout algorithm. This option allows for maximum customization, but will require the most effort from the application developer. For more information, see Using the Behavior Collection.

Padding

This property can be used to add space between the axis and labels. The value should be expressed in pixels.

Note
Note

This property is ignored if the Behavior property is set to None.