pub struct Axis { /* private fields */ }Expand description
An axis struct that represents an axis along a dimension of the chart.
Implementations§
Source§impl Axis
impl Axis
Sourcepub fn new_top_axis<'a, T: ToString>(
scale: &'a dyn Scale<T>,
chart: &Chart<'a>,
) -> Self
pub fn new_top_axis<'a, T: ToString>( scale: &'a dyn Scale<T>, chart: &Chart<'a>, ) -> Self
Create a new axis at the top of the chart.
Sourcepub fn new_right_axis<'a, T: ToString>(
scale: &'a dyn Scale<T>,
chart: &Chart<'a>,
) -> Self
pub fn new_right_axis<'a, T: ToString>( scale: &'a dyn Scale<T>, chart: &Chart<'a>, ) -> Self
Create a new axis to the right of the chart.
Sourcepub fn new_bottom_axis<'a, T: ToString>(
scale: &'a dyn Scale<T>,
chart: &Chart<'a>,
) -> Self
pub fn new_bottom_axis<'a, T: ToString>( scale: &'a dyn Scale<T>, chart: &Chart<'a>, ) -> Self
Create a new axis at the bottom of the chart.
Sourcepub fn new_left_axis<'a, T: ToString>(
scale: &'a dyn Scale<T>,
chart: &Chart<'a>,
) -> Self
pub fn new_left_axis<'a, T: ToString>( scale: &'a dyn Scale<T>, chart: &Chart<'a>, ) -> Self
Create a new axis to the left of the chart.
Sourcepub fn set_axis_label(&mut self, label: String)
pub fn set_axis_label(&mut self, label: String)
Set axis label.
Sourcepub fn set_tick_label_rotation(&mut self, rotation: isize)
pub fn set_tick_label_rotation(&mut self, rotation: isize)
Set tick label rotation.
Sourcepub fn set_tick_label_format(&mut self, format: &str)
pub fn set_tick_label_format(&mut self, format: &str)
Set the label format.
Auto Trait Implementations§
impl Freeze for Axis
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnwindSafe for Axis
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