pub struct Chart {
pub title: Option<String>,
pub x_axis: Axis,
pub y_axis: Axis,
pub grid: bool,
pub curves: Vec<Curve>,
}
Expand description
A single 2D-chart
Fields§
§title: Option<String>
An optional title for the plot
x_axis: Axis
§y_axis: Axis
§grid: bool
To show grid or not.
curves: Vec<Curve>
The curves in the plot
Implementations§
Source§impl Chart
impl Chart
pub fn set_xlabel(&mut self, label: &str)
pub fn set_ylabel(&mut self, label: &str)
Sourcepub fn zoom_horizontal(&mut self, amount: f64)
pub fn zoom_horizontal(&mut self, amount: f64)
Zoom horizontally.
Sourcepub fn zoom_vertical(&mut self, amount: f64)
pub fn zoom_vertical(&mut self, amount: f64)
Perform vertical zooming
Sourcepub fn pan_horizontal(&mut self, amount: f64)
pub fn pan_horizontal(&mut self, amount: f64)
Perform a bit of horizontal panning
Sourcepub fn pan_vertical(&mut self, amount: f64)
pub fn pan_vertical(&mut self, amount: f64)
Perform vertical pan motion on the plot.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chart
impl RefUnwindSafe for Chart
impl Send for Chart
impl Sync for Chart
impl Unpin for Chart
impl UnwindSafe for Chart
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