This is a migrated thread and some comments may be shown as answers.

LinearGauge with logarithmic scale

1 Answer 67 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 27 Aug 2015, 02:34 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 01 Sep 2015, 11:43 AM
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.

Regards,
Sia
Telerik
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
Tags
Gauges
Asked by
Andreas
Top achievements
Rank 1
Answers by
Sia
Telerik team
Share this question
or