pub struct EnhancedAxis {Show 15 fields
pub id: AxisId,
pub name: Option<String>,
pub label: Option<String>,
pub orientation: AxisOrientation,
pub position: ExtendedAxisPosition,
pub position_offset: f32,
pub min: Option<f64>,
pub max: Option<f64>,
pub scale: ScaleType,
pub ticks: TickConfig,
pub style: AxisStyle,
pub visible: bool,
pub link: AxisLink,
pub auto_range: bool,
pub range_padding: f64,
}Expand description
Enhanced axis configuration with all options.
Fields§
§id: AxisIdUnique identifier.
name: Option<String>Optional name for the axis (used for lookup by name).
label: Option<String>Axis label displayed alongside the axis.
orientation: AxisOrientationAxis orientation (horizontal or vertical).
position: ExtendedAxisPositionPosition of the axis.
position_offset: f32Offset from the standard position (for stacked axes).
min: Option<f64>Minimum value (None = auto from data).
max: Option<f64>Maximum value (None = auto from data).
scale: ScaleTypeScale type for value transformation.
ticks: TickConfigTick configuration.
style: AxisStyleVisual style.
visible: boolWhether the axis is visible.
link: AxisLinkAxis linking configuration.
auto_range: boolWhether to auto-range based on data.
range_padding: f64Padding to add around auto-ranged data (as a fraction).
Implementations§
Source§impl EnhancedAxis
impl EnhancedAxis
Sourcepub fn x_secondary() -> Self
pub fn x_secondary() -> Self
Create a secondary X axis (top).
Sourcepub fn y_secondary() -> Self
pub fn y_secondary() -> Self
Create a secondary Y axis (right).
Sourcepub fn custom(id: u32, name: impl Into<String>) -> Self
pub fn custom(id: u32, name: impl Into<String>) -> Self
Create a custom axis with the specified ID and name.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Set the axis label.
Sourcepub fn with_range(self, min: f64, max: f64) -> Self
pub fn with_range(self, min: f64, max: f64) -> Self
Set the axis range.
Sourcepub fn with_scale(self, scale: ScaleType) -> Self
pub fn with_scale(self, scale: ScaleType) -> Self
Set the scale type.
Sourcepub fn with_position(self, position: impl Into<ExtendedAxisPosition>) -> Self
pub fn with_position(self, position: impl Into<ExtendedAxisPosition>) -> Self
Set the position.
Sourcepub fn with_offset(self, offset: f32) -> Self
pub fn with_offset(self, offset: f32) -> Self
Set the position offset.
Sourcepub fn with_ticks(self, ticks: TickConfig) -> Self
pub fn with_ticks(self, ticks: TickConfig) -> Self
Set the tick configuration.
Sourcepub fn with_tick_count(self, count: usize) -> Self
pub fn with_tick_count(self, count: usize) -> Self
Set tick count.
Sourcepub fn with_style(self, style: AxisStyle) -> Self
pub fn with_style(self, style: AxisStyle) -> Self
Set the style.
Sourcepub fn with_visible(self, visible: bool) -> Self
pub fn with_visible(self, visible: bool) -> Self
Set visibility.
Sourcepub fn auto_ranged(self, padding: f64) -> Self
pub fn auto_ranged(self, padding: f64) -> Self
Enable auto-ranging with the specified padding.
Trait Implementations§
Source§impl Clone for EnhancedAxis
impl Clone for EnhancedAxis
Source§fn clone(&self) -> EnhancedAxis
fn clone(&self) -> EnhancedAxis
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EnhancedAxis
impl Debug for EnhancedAxis
Auto Trait Implementations§
impl Freeze for EnhancedAxis
impl RefUnwindSafe for EnhancedAxis
impl Send for EnhancedAxis
impl Sync for EnhancedAxis
impl Unpin for EnhancedAxis
impl UnsafeUnpin for EnhancedAxis
impl UnwindSafe for EnhancedAxis
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more