ScalePow<Y> class
final
Pow scales
Power (“pow”) scales are similar to linear scales, except an exponential transform is applied to the input domain value before the output range value is computed.
Each range value y can be expressed as a function of the domain value x: y = mx^k + b, where k is the exponent value. Power scales also support negative domain values, in which case the input value and the resulting output value are multiplied by -1.
- Implemented types
-
- Scale<
X, Y>
- Scale<
Constructors
-
ScalePow.new({List<
num> domain = const [0, 1], required List<Y> range, required Interpolate<Y> interpolate}) -
Constructs a new pow scale with the specified
domain
,range
andinterpolate
, theexponent
1, andclamp
ing disabled. -
ScalePow.sqrt({List<
num> domain = const [0, 1], required List<Y> range, required Interpolate<Y> interpolate}) -
Constructs a new pow scale with the specified
domain
,range
andinterpolate
, theexponent
0.5, andclamp
ing disabled.
Properties
- clamp ↔ bool
-
Whether or not the scale currently clamps values to within the
range
.getter/setter pairinherited -
domain
↔ List<
num> -
The scale's domain that specifies the input values.
getter/setter pairinherited
- exponent ↔ num
-
The scale's exponent.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
interpolate
↔ Interpolate<
Y> -
The scale’s
range
interpolator factory.getter/setter pairinherited -
range
↔ List<
Y> -
The scale's range that specifies the output values.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unknown ↔ Y?
-
The output value of the scale for null (or double.nan) input values.
getter/setter pairinherited
Methods
-
call(
num? x) → Y? -
Given a value from the
domain
, returns the corresponding value from therange
.inherited -
copy(
) → ScalePow< 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