LinearGauge with logarithmic scale

2 posts, 0 answers
  1. Andreas
    Andreas avatar
    1 posts
    Member since:
    May 2014

    Posted 27 Aug 2015 Link to this post

    Is it possible with your controls to build a LinearGauge with a logarithmic scale and logarithmic tickmarks?


  2. Sia
    Sia avatar
    735 posts

    Posted 01 Sep 2015 Link to this post

    Hello Andreas,

    Both radial and linear scales support Distribution property which specifies values distribution along the scale (linear, logarithmic, etc). This property is defined in the GraphicScale class and has type of IValueDistribution interface. It converts real scale value (given as value between the Min and the Max of the scale) to a value in the [0...1] interval which represents relative position along the scale and vice versa.

    Currently there are three basic implementations of this interface:

    1. Regular – the default distribution which is represented by a linear function. It corresponds to the default behavior of our gauge scale.

    2. Range logarithmic – a distribution which maps logarithmic function on any value range (i.e. tick marks have close values at the beginning of the range and more distant values at the end of the range). For example, if a scale has as minimum -10 and maximum 100,  this distribution produces labels -10, -8, 0, 23, 100.

    3. Classic logarithmic – a distribution which represents the classic meaning of a logarithmic scale. In contrast to the range logarithmic distribution it can be used with positive numbers only. For example, if a scale has as minimum 1 and as maximum 100 this distribution produces labels 1, 3, 10, 32, 100.

    Please check the attached project for reference.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top