DesignBandScale class
Categories side by side (bars): count bands from start to end, paddingInner of each step between bands and paddingOuter at the ends. A value is a band's index; map gives its centre.
const DesignBandScale(count: 4, start: 0, end: 400, labels: ['Q1', 'Q2', 'Q3', 'Q4']).map(2)
- Inheritance
-
- Object
- DesignScale
- DesignBandScale
Constructors
Properties
- bandwidth → double
-
A band's width.
no setter
- count → int
-
How many bands.
final
- end → double
-
The position of the greatest value.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
labels
→ List<
String> ? -
The bands' names, for their ticks; null: their numbers from 1.
final
- paddingInner → double
-
The share of a step between two bands, 0 to 1.
final
- paddingOuter → double
-
The share of a step before the first band and after the last.
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
- step → double
-
The distance from one band's start to the next's, signed as end −
start is.
no setter
Methods
-
indexAt(
double position) → int? -
The band under
position(its padding between bands shared by its neighbours); null before the first or after the last. -
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