pub struct Axis {
pub title: Option<String>,
pub begin_at_zero: bool,
pub min: Option<f64>,
pub max: Option<f64>,
pub prefix: Option<String>,
pub suffix: Option<String>,
pub stacked: bool,
pub hidden: bool,
}Expand description
One axis.
Fields§
§title: Option<String>§begin_at_zero: boolStart the scale at zero.
On by default for the value axis, and that is a judgement. A bar
chart whose axis starts at 95 makes a 1% difference look like a
doubling. Charts that lie usually lie here. Call Axis::zoomed when
the reading genuinely lives in a narrow band far from zero — a
temperature, a latency percentile — and the shape is the point.
min: Option<f64>§max: Option<f64>§prefix: Option<String>"Rp ", "$".
suffix: Option<String>"%", " ms".
stacked: boolImplementations§
Source§impl Axis
impl Axis
pub fn new() -> Axis
pub fn title(self, title: impl Into<String>) -> Axis
Sourcepub fn zoomed(self) -> Axis
pub fn zoomed(self) -> Axis
Let the scale start where the data does. Say why in the surrounding copy; a reader cannot see an axis they did not look at.
pub fn range(self, min: f64, max: f64) -> Axis
pub fn prefix(self, prefix: impl Into<String>) -> Axis
pub fn suffix(self, suffix: impl Into<String>) -> Axis
pub fn stacked(self) -> Axis
Trait Implementations§
impl StructuralPartialEq for Axis
Auto Trait Implementations§
impl Freeze for Axis
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnsafeUnpin 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