ScaleSequential<Y> class
final
Sequential scales
Sequential scales are similar to linear scales, but the input domain and output range always have exactly three elements.
Sequential scales are typically used for a color encoding; see also
d4_scale_chromatic.
These scales do not expose ScaleContinuousNumberExtension.invert and
ScaleLinear.interpolate
methods. There are also ScaleSequentialLog,
ScaleSequentialPow, ScaleSequentialSymlog, and ScaleSequentialQuantile
variants of sequential scales.
- Implemented types
- Implementers
- Available extensions
Constructors
-
ScaleSequential({List<
num> ? domain, required Y interpolator(num)}) -
Constructs a new sequential scale with the specified
domain
andinterpolator
function.
Properties
- clamp ↔ bool
-
getter/setter pairinherited
-
domain
↔ List<
num> -
The scale's domain that specifies the input values.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- interpolator ↔ Y Function(num)
-
The scale’s interpolator.
getter/setter pairinherited
-
range
↔ List<
Y> -
See
ScaleLinear.range
.getter/setter pairinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unknown ↔ Y?
-
getter/setter pairinherited
Methods
-
call(
num? x) → Y? -
Given a value from the domain, returns the corresponding value from the
range.
inherited
-
copy(
) → ScaleSequential< Y> -
Returns an exact copy of this scale.
override
-
nice(
[num count = 10]) → void -
Extends the domain so that it starts and ends on nice round values.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
tickFormat(
[num count = 10, String? specifier]) → String Function(num) -
Returns a
number format
function suitable for displaying a tick value, automatically computing the
appropriate precision based on the fixed interval between tick values.
inherited
-
ticks(
[num count = 10]) → List< num> -
Returns approximately count representative values from the scale’s
domain.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited