Class ScaleBase
Base class for RadzenChart scales.
Inheritance
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public abstract class ScaleBase : object
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 |
---|---|
System.Double | The size of the output. |
Padding
Gets or sets the padding.
Declaration
public double Padding { get; set; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.Boolean |
|
Step
Gets or sets the step.
Declaration
public object Step { get; set; }
Property Value
Type | Description |
---|---|
System.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, System.Double> | selector | The selector. |
Returns
Type | Description |
---|---|
Func<TItem, System.Double> |
Type Parameters
Name | Description |
---|---|
TItem | The type of the t item. |
Fit(Int32)
Fits the scale within the distance.
Declaration
public virtual void Fit(int distance)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | distance | The distance. |
FormatTick(String, Object)
Formats the tick value.
Declaration
public abstract string FormatTick(string format, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | format | The format. |
System.Object | value | The value. |
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.Boolean |
|
NiceNumber(Double, Boolean)
Returns a "nice" number (closest power of 10).
Declaration
public double NiceNumber(double range, bool round)
Parameters
Type | Name | Description |
---|---|---|
System.Double | range | The range. |
System.Boolean | round | Wether to round. |
Returns
Type | Description |
---|---|
System.Double |
Resize(Object, Object)
Resizes the scale to the specified values.
Declaration
public virtual void Resize(object min, object max)
Parameters
Type | Name | Description |
---|---|---|
System.Object | min | The minimum. |
System.Object | max | The maximum. |
Scale(Double, Boolean)
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 |
---|---|---|
System.Double | value | The value. |
System.Boolean | padding | Whether to apply padding. |
Returns
Type | Description |
---|---|
System.Double |
Ticks(Int32)
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 |
---|---|---|
System.Int32 | distance | The distance. |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Double, System.Double, System.Double> |
Value(Double)
Returns a value from the scale.
Declaration
public abstract object Value(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Object |