pub struct AxisLayout { /* private fields */ }Expand description
Generates tick positions and formatted labels for a continuous axis.
Implementations§
Source§impl AxisLayout
impl AxisLayout
pub fn new(position: AxisPosition) -> Self
pub fn bottom() -> Self
pub fn left() -> Self
pub fn right() -> Self
pub fn tick_count(self, count: usize) -> Self
pub fn formatter(self, fmt: NumberFormatter) -> Self
Sourcepub fn generate_continuous_ticks(
&self,
domain: (f64, f64),
range: (f64, f64),
) -> Vec<TickMark>
pub fn generate_continuous_ticks( &self, domain: (f64, f64), range: (f64, f64), ) -> Vec<TickMark>
Generate tick marks for a continuous scale. Takes the scale’s domain and range, generates ticks, maps them to positions.
Sourcepub fn generate_band_ticks(
&self,
labels: &[String],
range: (f64, f64),
) -> Vec<CategoryTickMark>
pub fn generate_band_ticks( &self, labels: &[String], range: (f64, f64), ) -> Vec<CategoryTickMark>
Generate tick marks for a band/category scale.
pub fn position(&self) -> AxisPosition
Auto Trait Implementations§
impl Freeze for AxisLayout
impl RefUnwindSafe for AxisLayout
impl Send for AxisLayout
impl Sync for AxisLayout
impl Unpin for AxisLayout
impl UnsafeUnpin for AxisLayout
impl UnwindSafe for AxisLayout
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