pub struct AxisLayout {
pub index: usize,
pub kind: AxisType,
pub scale: Scale,
pub ticks: Vec<AxisTick>,
pub side: AxisSide,
pub offset: f64,
pub label_space: f64,
pub name: Option<String>,
pub name_space: f64,
pub show: bool,
pub labels: Vec<AxisTick>,
pub label_interval: usize,
}Expand description
The layout of one axis.
Fields§
§index: usizeThe index of the axis in the option.
kind: AxisTypeThe kind of the axis.
scale: ScaleThe scale the axis maps with.
ticks: Vec<AxisTick>The ticks of the axis.
side: AxisSideThe side of the grid the axis sits on.
offset: f64The pixel position of the axis’ line, perpendicular to the axis.
label_space: f64The space the axis’ labels need, perpendicular to the axis.
name: Option<String>The name of the axis.
name_space: f64The space the axis’ name needs, perpendicular to the axis.
show: boolWhether the axis is drawn.
labels: Vec<AxisTick>The labels of the axis.
label_interval: usizeHow many ticks pass between two labelled ones.
A category axis with a thousand categories cannot show a thousand labels: they would overlap into a smear. The interval is the number of ticks between two labels, so that the labels are far enough apart to be read.
Implementations§
Source§impl AxisLayout
Inherent implementation of AxisLayout.
impl AxisLayout
Inherent implementation of AxisLayout.
Sourcepub fn position_of(&self, value: f64) -> f64
pub fn position_of(&self, value: f64) -> f64
Source§impl AxisLayout
impl AxisLayout
pub fn get_index(&self) -> usize
pub fn get_mut_index(&mut self) -> &mut usize
pub fn set_index(&mut self, val: usize) -> &mut Self
pub fn get_kind(&self) -> AxisType
pub fn get_mut_kind(&mut self) -> &mut AxisType
pub fn set_kind(&mut self, val: AxisType) -> &mut Self
pub fn get_scale(&self) -> &Scale
pub fn get_mut_scale(&mut self) -> &mut Scale
pub fn set_scale(&mut self, val: Scale) -> &mut Self
pub fn get_ticks(&self) -> &Vec<AxisTick>
pub fn get_mut_ticks(&mut self) -> &mut Vec<AxisTick>
pub fn set_ticks(&mut self, val: Vec<AxisTick>) -> &mut Self
pub fn get_side(&self) -> AxisSide
pub fn get_mut_side(&mut self) -> &mut AxisSide
pub fn set_side(&mut self, val: AxisSide) -> &mut Self
pub fn get_offset(&self) -> f64
pub fn get_mut_offset(&mut self) -> &mut f64
pub fn set_offset(&mut self, val: f64) -> &mut Self
pub fn get_label_space(&self) -> f64
pub fn get_mut_label_space(&mut self) -> &mut f64
pub fn set_label_space(&mut self, val: f64) -> &mut Self
pub fn get_name(&self) -> Option<String>
pub fn try_get_name(&self) -> Option<String>
pub fn get_mut_name(&mut self) -> &mut Option<String>
pub fn set_name(&mut self, val: Option<String>) -> &mut Self
pub fn get_name_space(&self) -> f64
pub fn get_mut_name_space(&mut self) -> &mut f64
pub fn set_name_space(&mut self, val: f64) -> &mut Self
pub fn get_show(&self) -> bool
pub fn get_mut_show(&mut self) -> &mut bool
pub fn set_show(&mut self, val: bool) -> &mut Self
pub fn get_labels(&self) -> &Vec<AxisTick>
pub fn get_mut_labels(&mut self) -> &mut Vec<AxisTick>
pub fn set_labels(&mut self, val: Vec<AxisTick>) -> &mut Self
pub fn get_label_interval(&self) -> usize
pub fn get_mut_label_interval(&mut self) -> &mut usize
pub fn set_label_interval(&mut self, val: usize) -> &mut Self
Trait Implementations§
Source§impl Clone for AxisLayout
impl Clone for AxisLayout
Source§impl Debug for AxisLayout
impl Debug for AxisLayout
Source§impl PartialEq for AxisLayout
impl PartialEq for AxisLayout
impl StructuralPartialEq for AxisLayout
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