New to Telerik UI for WPF? Download free 30-day trial

Axis Smart Labels

The RadChartView suite supports couple smart mechanisms which control the axis labels generation.

  • SmartLabelsMode: If enabled this feature tells the chart to recalculate the actual step of its axis automatically in order to prevent the axis' labels from overlapping one another. The recalculation logic is executed on update of the chart's layout (like resizing).
  • IsStepRecalculationOnZoomEnabled: If enabled this feature controls if the axis should recalculate the actual step it uses when the chart gets zoomed.

By default both mechanisms are disabled.

Using the Smart Labels Mode

You can enable the smart labels mode by setting the SmartLabelsMode property of the axis.

    <telerik:LinearAxis SmartLabelsMode="SmartStep"/> 
The SmartLabelMode property is of type AxisSmartLabelsMode enum and it defines the algorithm which should be used for generating the labels. The enumeration expose the following properties:
  • None (default value): Do not attempt to avoid overlapping labels
  • SmartStep: The axis will choose a step (or a tick interval) in such a way that labels don’t overlap
  • SmartStepAndRange: The axis will choose a step and range in such a way that labels don’t overlap

    This mode is supported only by the LinearAxis and the LogarithmicAxis.

The following picture demonstrates the different modes.


Disable the Step Recalculation on Zoom

The chart axis major step is automatically recalculated on zoom. To disable this, set the IsStepRecalculationOnZoomEnabled property of the axis to False.

    <telerik:LinearAxis IsStepRecalculationOnZoomEnabled="False"/> 
The following picture demonstrates this feature:


This mechanism is supported only by the chart's numeric axes.

See Also

In this article