DesignLinearScale class

A number line: min at start, max at end.

DesignLinearScale.nice(min: 3, max: 97, start: 300, end: 0)
Inheritance

Constructors

DesignLinearScale({required double min, required double max, required double start, required double end, int? divisions})
A scale from min to max exactly.
const
DesignLinearScale.nice({required double min, required double max, required double start, required double end, int tickCount = 5, bool includeZero = false, int? divisions})
A scale widened to whole ticks: min and max out to the nearest multiples of a 1, 2 or 5 × 10ⁿ step that gives about tickCount ticks, and to 0 when includeZero. A single value widens by one each way. With divisions, the scale covers the data in exactly that many equal intervals, rounding the span up to 1, 2, 2.5 or 5 × 10ⁿ.
factory

Properties

divisions → int?
The exact number of equal intervals, or null to choose whole-number steps for the tick count requested by ticks.
final
end → double
The position of the greatest value.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
max → double
The greatest value.
final
min → double
The least value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
start → double
The position of the least value (left, or right when the scale runs right to left; the bottom of a y scale).
finalinherited

Methods

invert(double position) → double
The value at position.
override
map(double value) → double
The position of value.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ticks(DesignLocalizations localizations, {int count = 5}) → List<DesignScaleTick>
About count ticks across the scale, labelled for localizations.
override
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited