Labeler
struct · ferroui-livecharts · v0.5.0
struct Labeler
The label of a value (the source's Func<double, string>), shared by the snapshots of an axis.
Two labelers are equal when they are the same function.
Members
new
fn new(labeler: impl Fn(f64) -> String + 'static) -> Self
label
fn label(self: &Self, value: f64) -> String
The label of a value.
date_time
fn date_time(formatter: impl Fn(DateTime) -> String + 'static) -> Self
The labeler of a DateTimeAxis: the value as the date of its ticks (AsDate), formatted
by formatter.
date_time_format
fn date_time_format(format: impl Into<String>) -> Self
A date labeler with a .NET date and time format string, in the conventions of the current
culture (date.ToString(format)); an invalid format labels nothing.
time_span
fn time_span(formatter: impl Fn(SignedDuration) -> String + 'static) -> Self
The labeler of a TimeSpanAxis: the value as the interval of its ticks (AsTimeSpan),
formatted by formatter.
time_span_format
fn time_span_format(format: impl Into<String>) -> Self
An interval labeler with a .NET TimeSpan format string (span.ToString(format)); an
invalid format labels nothing.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherClonePartialEqDebug
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.