DateTimeTickFormatter class
A TickFormatter that formats date/time values based on minimum difference between subsequent ticks.
This formatter assumes that the Tick values passed in are sorted in increasing order.
This class is setup with a list of formatters that format the input ticks at
a given time resolution. The time resolution which will accurately display
the difference between 2 subsequent ticks is picked. Each time resolution
can be setup with a TimeTickFormatter
, which is used to format ticks as
regular or transition ticks based on whether the tick has crossed the time
boundary defined in the TimeTickFormatter
.
- Implemented types
Constructors
-
DateTimeTickFormatter(DateTimeFactory dateTimeFactory, {Map<
int, TimeTickFormatter> ? overrides}) -
Creates a DateTimeTickFormatter that works well with time tick provider
classes.
factory
- DateTimeTickFormatter.uniform(TimeTickFormatter formatter)
-
Creates a DateTimeTickFormatter that formats all ticks the same.
factory
-
DateTimeTickFormatter.withFormatters(Map<
int, TimeTickFormatter> formatters) -
Creates a DateTimeTickFormatter that formats ticks with
formatters
.factory - DateTimeTickFormatter.withoutTime(DateTimeFactory dateTimeFactory)
-
Creates a DateTimeTickFormatter without the time component.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
format(
List< DateTime> tickValues, Map<DateTime, String> cache, {num? stepSize}) → List<String> -
Formats a list of tick values.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited