pub struct Chart<'a> { /* private fields */ }
Expand description
Controls the drawing.
Implementations§
source§impl<'a> Chart<'a>
impl<'a> Chart<'a>
sourcepub fn new_with_y_range(
width: u32,
height: u32,
xmin: f32,
xmax: f32,
ymin: f32,
ymax: f32
) -> Self
pub fn new_with_y_range( width: u32, height: u32, xmin: f32, xmax: f32, ymin: f32, ymax: f32 ) -> Self
Creates a new Chart
object with fixed y axis range.
§Panics
Panics if width
is less than 32 or height
is less than 3.
sourcepub fn nice(&mut self)
pub fn nice(&mut self)
Prints canvas content with some additional visual elements (like borders).
pub fn figures(&mut self)
Trait Implementations§
source§impl<'a> AxisBuilder<'a> for Chart<'a>
impl<'a> AxisBuilder<'a> for Chart<'a>
source§fn x_axis_style(&'a mut self, style: LineStyle) -> &'a mut Chart<'_>
fn x_axis_style(&'a mut self, style: LineStyle) -> &'a mut Chart<'_>
Specifies the style of x-axis.
source§fn y_axis_style(&'a mut self, style: LineStyle) -> &'a mut Chart<'_>
fn y_axis_style(&'a mut self, style: LineStyle) -> &'a mut Chart<'_>
Specifies the style of y-axis.
source§impl<'a> ColorPlot<'a> for Chart<'a>
impl<'a> ColorPlot<'a> for Chart<'a>
source§fn linecolorplot(
&'a mut self,
shape: &'a Shape<'_>,
color: RGB8
) -> &'a mut Chart<'_>
fn linecolorplot( &'a mut self, shape: &'a Shape<'_>, color: RGB8 ) -> &'a mut Chart<'_>
Draws a line chart of points connected by straight line segments using the specified color
source§impl<'a> LabelBuilder<'a> for Chart<'a>
impl<'a> LabelBuilder<'a> for Chart<'a>
source§fn x_label_format(&mut self, format: LabelFormat) -> &mut Self
fn x_label_format(&mut self, format: LabelFormat) -> &mut Self
Specifies a formater for the x-axis label.
source§fn y_label_format(&mut self, format: LabelFormat) -> &mut Self
fn y_label_format(&mut self, format: LabelFormat) -> &mut Self
Specifies a formater for the y-axis label.
source§impl<'a> TickDisplayBuilder<'a> for Chart<'a>
impl<'a> TickDisplayBuilder<'a> for Chart<'a>
source§fn y_tick_display(&mut self, density: TickDisplay) -> &mut Self
fn y_tick_display(&mut self, density: TickDisplay) -> &mut Self
Specifies the density of y-axis tick labels
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Chart<'a>
impl<'a> !Send for Chart<'a>
impl<'a> !Sync for Chart<'a>
impl<'a> Unpin for Chart<'a>
impl<'a> !UnwindSafe for Chart<'a>
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