Class ScaleBase
Base class for RadzenChart scales.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public abstract class ScaleBase
Constructors
ScaleBase()
Base class for RadzenChart scales.
Declaration
protected ScaleBase()
Properties
Input
Gets or sets the input.
Declaration
public ScaleRange Input { get; set; }
Property Value
Type | Description |
---|---|
ScaleRange | The input. |
Output
Gets or sets the output.
Declaration
public ScaleRange Output { get; set; }
Property Value
Type | Description |
---|---|
ScaleRange | The output. |
OutputSize
Gets the size of the output.
Declaration
public double OutputSize { get; }
Property Value
Type | Description |
---|---|
double | The size of the output. |
Padding
Gets or sets the padding.
Declaration
public double Padding { get; set; }
Property Value
Type | Description |
---|---|
double | The padding. |
Round
Gets or sets a value indicating whether this ScaleBase is round.
Declaration
public bool Round { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Step
Gets or sets the step.
Declaration
public object Step { get; set; }
Property Value
Type | Description |
---|---|
object | The step. |
Methods
Compose<TItem>(Func<TItem, double>)
Composes the specified selector.
Declaration
public virtual Func<TItem, double> Compose<TItem>(Func<TItem, double> selector)
Parameters
Type | Name | Description |
---|---|---|
Func<TItem, double> | selector | The selector. |
Returns
Type | Description |
---|---|
Func<TItem, double> |
Type Parameters
Name | Description |
---|---|
TItem | The type of the t item. |
Fit(int)
Fits the scale within the distance.
Declaration
public virtual void Fit(int distance)
Parameters
Type | Name | Description |
---|---|---|
int | distance | The distance. |
FormatTick(string, object)
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 |
---|---|
string | System.String. |
IsEqualTo(ScaleBase)
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 |
---|---|
bool |
|
NiceNumber(double, bool)
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 |
Resize(object, object)
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. |
Scale(double, bool)
Converts the specified value to a value from this scale with optional padding.
Declaration
public abstract double Scale(double value, bool padding = false)
Parameters
Type | Name | Description |
---|---|---|
double | value | The value. |
bool | padding | Whether to apply padding. |
Returns
Type | Description |
---|---|
double |
Ticks(int)
Calculates the number of ticks with the specified distance.
Declaration
public abstract (double Start, double End, double Step) Ticks(int distance)
Parameters
Type | Name | Description |
---|---|---|
int | distance | The distance. |
Returns
Type | Description |
---|---|
(double Start, double End, double Step) |
Value(double)
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 |