Axis
struct · ferroui-livecharts · v0.5.0
struct Axis
Members
namelabelsmin_limitmax_limitmin_stepmin_separatorsforce_stepunit_widthinvertedvisibleshow_separator_linespositiontext_sizelabels_rotationlabels_densitylabels_anglecustom_separatorslabels_paddinglabels_colorseparators_colorlogarithmic_basepaddinglabelerlabels_backgrounddate_timetime_spanlabels_padding_orticklabel
name
name: String
labels
labels: Vec<String>
min_limit
min_limit: Option<f64>
max_limit
max_limit: Option<f64>
min_step
min_step: f64
min_separators
min_separators: u32
force_step
force_step: bool
unit_width
unit_width: f64
inverted
inverted: bool
visible
visible: bool
show_separator_lines
show_separator_lines: bool
position
position: AxisPosition
text_size
text_size: f64
labels_rotation
labels_rotation: f64
labels_density
labels_density: f64
labels_angle
labels_angle: f64
Absolute angular position, in degrees, of radial-axis labels.
custom_separators
custom_separators: Vec<f64>
Explicit axis separators; an empty list uses automatically calculated ticks.
labels_padding
labels_padding: Option<f64>
Padding around each label, in FerroUI logical pixels. None takes the default of the
chart family: CARTESIAN_LABELS_PADDING (the source theme's Padding of Cartesian
axes) or POLAR_LABELS_PADDING (the LabelsPadding of a source polar axis).
labels_color
labels_color: ferroui_base::media::Color
separators_color
separators_color: ferroui_base::media::Color
logarithmic_base
logarithmic_base: Option<f64>
padding
padding: f64
labeler
labeler: Option<crate::labelers::Labeler>
The label of a value (Labeler); None takes the native number format. The labels
win over it, as in the source's GetActualLabeler.
labels_background
labels_background: Option<ferroui_base::media::Color>
The background of the labels of a polar axis (LabelsBackground); None takes the
source's white (POLAR_LABELS_BACKGROUND) and a transparent colour draws none.
date_time
fn date_time(unit: SignedDuration, formatter: impl Fn(DateTime) -> String + 'static) -> Self
A DateTimeAxis: its unit width and minimum step are the ticks of unit, and it labels
the date of a value (AsDate) with formatter.
time_span
fn time_span(unit: SignedDuration, formatter: impl Fn(SignedDuration) -> String + 'static) -> Self
A TimeSpanAxis: its unit width and minimum step are the ticks of unit, and it labels
the interval of a value (AsTimeSpan) with formatter.
labels_padding_or
fn labels_padding_or(self: &Self, default: f64) -> f64
The label padding, or the given family default when none is set.
tick
fn tick(self: &Self, size: Size, orientation: AxisOrientation, labels: Size, min: f64, max: f64) -> AxisTick
Extensions.GetTick of a Cartesian axis: the nice step for the given bounds (the axis
limits win over them) in a control of the given size, with the label size measured by
the host. Zero-width bounds take 15% of the maximum as their range, as the source does.
label
fn label(self: &Self, value: f64) -> String
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneDebugStructuralPartialEqPartialEqDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.