Table of Contents

Class ScaleBase

Namespace
Radzen.Blazor
Assembly
Radzen.Blazor.dll

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

selector Func<TItem, double>

The selector.

Returns

Func<TItem, double>

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 int

The distance.

FormatTick(string, object)

Formats the tick value.

public abstract string FormatTick(string format, object value)

Parameters

format string

The format.

value object

The value.

Returns

string

System.String.

IsEqualTo(ScaleBase)

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

public bool IsEqualTo(ScaleBase scale)

Parameters

scale ScaleBase

The 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

range double

The range.

round bool

Wether to round.

Returns

double

Resize(object, object)

Resizes the scale to the specified values.

public virtual void Resize(object min, object max)

Parameters

min object

The minimum.

max object

The maximum.

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

value double

The value.

padding bool

Whether to apply padding.

Returns

double

Ticks(int)

Calculates the number of ticks with the specified distance.

public abstract (double Start, double End, double Step) Ticks(int distance)

Parameters

distance int

The distance.

Returns

(double Start, double End, double Step)

Value(double)

Returns a value from the scale.

public abstract object Value(double value)

Parameters

value double

The value.

Returns

object