Class ScaleBase
Base class for RadzenChart scales.
public abstract class ScaleBase
- Inheritance
-
ScaleBase
- Inherited Members
Constructors
ScaleBase()
protected ScaleBase()
Properties
Input
Gets or sets the input.
public ScaleRange Input { get; set; }
Property Value
- ScaleRange
The input.
Output
Gets or sets the output.
public ScaleRange Output { get; set; }
Property Value
- ScaleRange
The output.
OutputSize
Gets the size of the output.
public double OutputSize { get; }
Property Value
- double
The size of the output.
Padding
Gets or sets the padding.
public double Padding { get; set; }
Property Value
- double
The padding.
Round
Gets or sets a value indicating whether this ScaleBase is round.
public bool Round { get; set; }
Property Value
- bool
true
if round; otherwise,false
.
Step
Gets or sets the step.
public object Step { get; set; }
Property Value
- object
The step.
Methods
Compose<TItem>(Func<TItem, double>)
Composes the specified selector.
public virtual Func<TItem, double> Compose<TItem>(Func<TItem, double> selector)
Parameters
Returns
Type Parameters
TItem
The type of the t item.
Fit(int)
Fits the scale within the distance.
public virtual void Fit(int distance)
Parameters
distance
intThe distance.
FormatTick(string, object)
Formats the tick value.
public abstract string FormatTick(string format, object value)
Parameters
Returns
- string
System.String.
IsEqualTo(ScaleBase)
Determines whether the specified scale is equal to the current one.
public bool IsEqualTo(ScaleBase scale)
Parameters
scale
ScaleBaseThe scale.
Returns
- bool
true
if the scales are equal; otherwise,false
.
NiceNumber(double, bool)
Returns a "nice" number (closest power of 10).
public double NiceNumber(double range, bool round)
Parameters
Returns
Resize(object, object)
Resizes the scale to the specified values.
public virtual void Resize(object min, object max)
Parameters
Scale(double, bool)
Converts the specified value to a value from this scale with optional padding.
public abstract double Scale(double value, bool padding = false)
Parameters
Returns
Ticks(int)
Calculates the number of ticks with the specified distance.
public abstract (double Start, double End, double Step) Ticks(int distance)
Parameters
distance
intThe distance.
Returns
Value(double)
Returns a value from the scale.
public abstract object Value(double value)
Parameters
value
doubleThe value.