ScaleTime<Y> class final Time scales

Time scales are a variant of linear scales that have a temporal domain.

Time scales implement ticks based on calendar intervals, taking the pain out of generating axes for temporal domains.

Implemented types

Constructors

ScaleTime.new({List<DateTime>? domain, required List<Y> range, required Interpolate<Y> interpolate})
Constructs a new linear scale with the specified domain, range and interpolate, and clamping disabled.

Properties

clamp bool
Whether or not the scale currently clamps values to within the range.
getter/setter pairinherited
domain List<DateTime>
The scale's domain that specifies the input values.
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(DateTime? x) → Y?
Given a value from the domain, returns the corresponding value from the range.
inherited
copy() ScaleTime<Y>
Returns an exact copy of this scale.
override
nice([Object? countOrInterval]) → 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(DateTime)
Returns a time format function suitable for displaying ticks.
inherited
ticks([Object? countOrInterval]) List<DateTime>
Returns representative dates from the scale’s domain.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

dynamic({List<DateTime>? domain, List<Object?> range = const <num>[0, 1], Interpolate<Object?> interpolate = interpolate}) ScaleTime<Object?>
number({List<DateTime>? domain, List<num> range = const [0, 1], Interpolate<num> interpolate = interpolateNumber}) ScaleTime<num>