DesignLinearScale class
A number line: min at start, max at end.
DesignLinearScale.nice(min: 3, max: 97, start: 300, end: 0)
- Inheritance
-
- Object
- DesignScale
- DesignLinearScale
Constructors
- DesignLinearScale({required double min, required double max, required double start, required double end, int? divisions})
-
A scale from
mintomaxexactly.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:
minandmaxout to the nearest multiples of a 1, 2 or 5 × 10ⁿ step that gives abouttickCountticks, and to 0 whenincludeZero. A single value widens by one each way. Withdivisions, 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
countticks across the scale, labelled forlocalizations.override -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited