pub struct AxisConfig {
pub label: Option<String>,
pub scale: Scale,
pub range: Option<(f64, f64)>,
pub tick_count: usize,
pub tick_labels: Option<Vec<String>>,
pub visible: bool,
pub inverted: bool,
}Expand description
Configuration for a single axis.
Fields§
§label: Option<String>Axis label (e.g., “Epoch”, “Loss”).
scale: ScaleScale type.
range: Option<(f64, f64)>Manual range override (min, max). None = auto-scale.
tick_count: usizeTarget number of ticks.
tick_labels: Option<Vec<String>>Custom tick labels (overrides auto-generated labels).
visible: boolWhether to show the axis line.
inverted: boolWhether to invert the axis direction.
Implementations§
Source§impl AxisConfig
impl AxisConfig
Sourcepub fn tick_count(self, count: usize) -> Self
pub fn tick_count(self, count: usize) -> Self
Set the target tick count.
Sourcepub fn tick_labels(self, labels: Vec<String>) -> Self
pub fn tick_labels(self, labels: Vec<String>) -> Self
Set custom tick labels.
Trait Implementations§
Source§impl Clone for AxisConfig
impl Clone for AxisConfig
Source§fn clone(&self) -> AxisConfig
fn clone(&self) -> AxisConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AxisConfig
impl Debug for AxisConfig
Auto Trait Implementations§
impl Freeze for AxisConfig
impl RefUnwindSafe for AxisConfig
impl Send for AxisConfig
impl Sync for AxisConfig
impl Unpin for AxisConfig
impl UnsafeUnpin for AxisConfig
impl UnwindSafe for AxisConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more