Linear Scale Overview

LinearScale is used to control the overall layout of tick marks, tick labels, indicators, and ranges, as well render an optional scale bar.

Telerik UI for WPF Ninja image

The Linear Scale is part of Telerik UI for WPF, a professional grade UI library with 160+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Scale Bar

The scale bar is rendered by the LinearScale element as a continuous band between top and bottom of the gauge. The scale bar is also used as a basis for the placement of child elements, such as the tick marks.

The height of the scale bar is controlled by the RelativeHeight property for the RadVerticalLinearGauge and the width of the scale bar is controlled by the RelativeWidth property for the RadHorizontalLinearGauge respectively. This value should be between 0 and 1 and is relative to the height of the container which contains this scale.

The location of the scale is controlled with the RelativeX and RelativeY properties.

The thickness of the scale bar is controlled by the StartWidth and EndWidth properties.

By default, the values start from the minimum value and move to the maximum value. It is possible to reverse this direction by setting the IsReversed property to true:

WPF RadGauge Reversed

The default distribution for a linear scale is RegularDistribution. When the scale has logarithmic distribution, it might be of type ClassicLogarithmicDistribution or RangeLogarithmicDistribution. When the IsLogarithmic property is set to true, base 10 is used for the logarithmic scale by default. To modify the base of the logarithmic scale, set the LogarithmicBase property accordingly:

WPF RadGauge LogarithmicBase

The scale elements like tick mark, label or indicator can have dynamically changed tooltip associated with it. This behavior is controlled by TootipFormat property which can be set at the correspondent property element:

<telerik:RadHorizontalLinearGauge Grid.Column="2" Width="250" Height="100" telerik:StyleManager.Theme="Windows8"> 
    <telerik:HorizontalLinearScale Min="0" Max="100" 
                         MajorTickTooltipFormat="{}{Value|F0} current value"> 

WPF RadGauge Major Tick Tooltip Format

The only parameter is passed to the tooltip format string is value at the element location.

In this article