pub struct ChartConfig {
pub title: String,
pub x_label: String,
pub y_label: String,
pub lower_is_better: bool,
pub width: u32,
pub height: u32,
}Expand description
Chart configuration.
Fields§
§title: StringChart title.
x_label: StringX-axis label.
y_label: StringY-axis label.
lower_is_better: boolWhether lower Y values are better (affects axis direction).
width: u32Chart width in pixels.
height: u32Chart height in pixels.
Implementations§
Source§impl ChartConfig
impl ChartConfig
Sourcepub fn new(title: impl Into<String>) -> Self
pub fn new(title: impl Into<String>) -> Self
Creates a new chart configuration with the given title.
Sourcepub fn with_x_label(self, label: impl Into<String>) -> Self
pub fn with_x_label(self, label: impl Into<String>) -> Self
Sets the X-axis label.
Sourcepub fn with_y_label(self, label: impl Into<String>) -> Self
pub fn with_y_label(self, label: impl Into<String>) -> Self
Sets the Y-axis label.
Sourcepub fn with_lower_is_better(self, lower_is_better: bool) -> Self
pub fn with_lower_is_better(self, lower_is_better: bool) -> Self
Sets whether lower Y values are better.
Sourcepub fn with_dimensions(self, width: u32, height: u32) -> Self
pub fn with_dimensions(self, width: u32, height: u32) -> Self
Sets the chart dimensions.
Trait Implementations§
Source§impl Clone for ChartConfig
impl Clone for ChartConfig
Source§fn clone(&self) -> ChartConfig
fn clone(&self) -> ChartConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChartConfig
impl Debug for ChartConfig
Auto Trait Implementations§
impl Freeze for ChartConfig
impl RefUnwindSafe for ChartConfig
impl Send for ChartConfig
impl Sync for ChartConfig
impl Unpin for ChartConfig
impl UnwindSafe for ChartConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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