Class LinearScale
Namespace: VelloSharp.Charting.Scales
Assembly: VelloSharp.Charting.dll
Projects numeric values using a linear mapping.
public sealed class LinearScale : IScale<double>, IScale
Inheritance
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
LinearScale(double, double, bool)
public LinearScale(double start, double end, bool clampToDomain = true)
Parameters
start
double
end
double
clampToDomain
bool
LinearScale(Range<double>, bool)
public LinearScale(Range<double> domain, bool clampToDomain = true)
Parameters
clampToDomain
bool
Properties
ClampToDomain
Gets a value indicating whether inputs are clamped to the domain when projected.
public bool ClampToDomain { get; }
Property Value
Domain
Gets the scale domain range.
public Range<double> Domain { get; }
Property Value
DomainType
Gets the underlying domain value type.
public Type DomainType { get; }
Property Value
Kind
Gets the scale family.
public ScaleKind Kind { get; }
Property Value
Methods
Project(double)
Projects the provided value into normalized unit space (0..1).
public double Project(double value)
Parameters
value
double
Returns
TryProject(double, out double)
Attempts to project the provided value into unit space without throwing.
public bool TryProject(double value, out double unit)
Parameters
value
double
unit
double
Returns
Unproject(double)
Converts a normalized unit value back into domain space.
public double Unproject(double unit)
Parameters
unit
double