ScaleBase Class

Base class for RadzenChart scales.

Inheritance

Object

ScaleBase

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public abstract class ScaleBase

Constructors

ScaleBaseLink to this section

Base class for RadzenChart scales.

Declaration
protected ScaleBase()

Properties

InputLink to this section

Gets or sets the input.

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

IsLogarithmicLink to this section

Gets a value indicating whether this scale uses logarithmic tick stepping. When true, the tick loop uses multiplicative stepping (idx *= step) instead of additive (idx += step).

Declaration
public bool IsLogarithmic { get; }
Property Value
Type Description
boolGets a value indicating whether this scale uses logarithmic tick stepping. When true, the tick loop uses multiplicative stepping (idx *= step) instead of additive (idx += step).

OutputLink to this section

Gets or sets the output.

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

OutputSizeLink to this section

Gets the size of the output.

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

PaddingLink to this section

Gets or sets the padding.

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

RoundLink to this section

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 to this section

Gets or sets the step.

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

Methods

ComposeLink to this section

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 to this section

Fits the scale within the distance.

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

FormatTickLink to this section

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 to this section

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 to this section

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 to this section

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 to this section

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

TickValuesLink to this section

The values at which axis ticks are rendered. The default implementation enumerates Int32) uniformly; scales with non-uniform intervals (e.g. calendar months) override it.

Declaration
public virtual IEnumerable<double> TickValues(int distance)
Parameters
Type Name Description
int distance The desired distance between ticks in pixels.
Returns
Type Description
IEnumerable<double>

TicksLink to this section

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 to this section

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 🗙