Skip to main content

Class LogarithmicScale

Namespace: VelloSharp.Charting.Scales
Assembly: VelloSharp.Charting.dll

Projects numeric values using logarithmic mapping.

public sealed class LogarithmicScale : IScale<double>, IScale

Inheritance

objectLogarithmicScale

Implements

IScale<double>, IScale

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

LogarithmicScale(double, double, double, bool)

public LogarithmicScale(double start, double end, double logBase = 10, bool clampToDomain = true)

Parameters

start double

end double

logBase double

clampToDomain bool

LogarithmicScale(Range<double>, double, bool)

public LogarithmicScale(Range<double> domain, double logBase = 10, bool clampToDomain = true)

Parameters

domain Range<double>

logBase double

clampToDomain bool

Properties

ClampToDomain

Gets a value indicating whether inputs are clamped to the domain when projected.

public bool ClampToDomain { get; }

Property Value

bool

Domain

Gets the scale domain range.

public Range<double> Domain { get; }

Property Value

Range<double>

DomainType

Gets the underlying domain value type.

public Type DomainType { get; }

Property Value

Type

Kind

Gets the scale family.

public ScaleKind Kind { get; }

Property Value

ScaleKind

Methods

Project(double)

Projects the provided value into normalized unit space (0..1).

public double Project(double value)

Parameters

value double

Returns

double

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

bool

Unproject(double)

Converts a normalized unit value back into domain space.

public double Unproject(double unit)

Parameters

unit double

Returns

double