ScaleBase Class

Base class for RadzenChart scales.

Inheritance

Object

ScaleBase

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public abstract class ScaleBase

Constructors

ScaleBaselink

Base class for RadzenChart scales.

Declaration
protected ScaleBase()

Properties

Inputlink

Gets or sets the input.

Declaration
public ScaleRange Input { get; set; }
Property Value
Type Description
ScaleRangeGets or sets the input.

Outputlink

Gets or sets the output.

Declaration
public ScaleRange Output { get; set; }
Property Value
Type Description
ScaleRangeGets or sets the output.

OutputSizelink

Gets the size of the output.

Declaration
public double OutputSize { get; }
Property Value
Type Description
doubleGets the size of the output.

Paddinglink

Gets or sets the padding.

Declaration
public double Padding { get; set; }
Property Value
Type Description
doubleGets or sets the padding.

Roundlink

Gets or sets a value indicating whether this ScaleBase is round.

Declaration
public bool Round { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this ScaleBase is round.

Steplink

Gets or sets the step.

Declaration
public object Step { get; set; }
Property Value
Type Description
objectGets or sets the step.

Methods

Composelink

Composes the specified selector.

Declaration
public virtual Func<TItem, double> Compose(Func<TItem, double> selector)
Parameters
Type Name Description
Func<TItem, double> selector The selector.
Returns
Type Description
Func<TItem, double>

Fitlink

Fits the scale within the distance.

Declaration
public virtual void Fit(int distance)
Parameters
Type Name Description
int distance The distance.

FormatTicklink

Formats the tick value.

Declaration
public abstract string FormatTick(string format, object value)
Parameters
Type Name Description
string format The format.
object value The value.
Returns
Type Description
stringSystem.String.

IsEqualTolink

Determines whether the specified scale is equal to the current one.

Declaration
public bool IsEqualTo(ScaleBase scale)
Parameters
Type Name Description
ScaleBase scale The scale.
Returns
Type Description
booltrue if the scales are equal; otherwise, false.

NiceNumberlink

Returns a "nice" number (closest power of 10).

Declaration
public double NiceNumber(double range, bool round)
Parameters
Type Name Description
double range The range.
bool round Wether to round.
Returns
Type Description
double

Resizelink

Resizes the scale to the specified values.

Declaration
public virtual void Resize(object min, object max)
Parameters
Type Name Description
object min The minimum.
object max The maximum.

Scalelink

Converts the specified value to a value from this scale with optional padding.

Declaration
public abstract double Scale(double value, bool padding)
Parameters
Type Name Description
double value The value.
bool padding Whether to apply padding.
Returns
Type Description
double

Tickslink

Calculates the number of ticks with the specified distance.

Declaration
public abstract ValueTuple<double, double, double> Ticks(int distance)
Parameters
Type Name Description
int distance The distance.
Returns
Type Description
ValueTuple<double, double, double>

Valuelink

Returns a value from the scale.

Declaration
public abstract object Value(double value)
Parameters
Type Name Description
double value The value.
Returns
Type Description
object
An error has occurred. This app may no longer respond until reloaded. Reload 🗙