pub struct Chart<'a> { /* private fields */ }
Expand description
Chart represents a single document with one or more views, axes and a title. It will also contain grid and legend in the future.
Implementations§
Source§impl<'a> Chart<'a>
impl<'a> Chart<'a>
Sourcepub fn view_width(&self) -> i32
pub fn view_width(&self) -> i32
Get chart width that can be used for views.
Sourcepub fn view_height(&self) -> i32
pub fn view_height(&self) -> i32
Get chart height that can be used for views.
Sourcepub fn set_margin_top(self, margin_top: i32) -> Self
pub fn set_margin_top(self, margin_top: i32) -> Self
Set chart top margin.
Sourcepub fn set_margin_bottom(self, margin_bottom: i32) -> Self
pub fn set_margin_bottom(self, margin_bottom: i32) -> Self
Set chart bottom margin.
Sourcepub fn set_margin_left(self, margin_left: i32) -> Self
pub fn set_margin_left(self, margin_left: i32) -> Self
Set chart left margin.
Sourcepub fn set_margin_right(self, margin_right: i32) -> Self
pub fn set_margin_right(self, margin_right: i32) -> Self
Set chart right margin.
Sourcepub fn set_height(self, height: i32) -> Self
pub fn set_height(self, height: i32) -> Self
Set chart height.
Sourcepub fn set_axis_top_band(self, scale: BandScale) -> Self
pub fn set_axis_top_band(self, scale: BandScale) -> Self
Set BandScale for top axis.
Sourcepub fn set_axis_top_linear(self, scale: LinearScale) -> Self
pub fn set_axis_top_linear(self, scale: LinearScale) -> Self
Set LinearScale for top axis.
Sourcepub fn set_axis_bottom_band(self, scale: BandScale) -> Self
pub fn set_axis_bottom_band(self, scale: BandScale) -> Self
Set BandScale for bottom axis.
Sourcepub fn set_axis_bottom_linear(self, scale: LinearScale) -> Self
pub fn set_axis_bottom_linear(self, scale: LinearScale) -> Self
Set LinearScale for bottom axis.
Sourcepub fn set_axis_left_band(self, scale: BandScale) -> Self
pub fn set_axis_left_band(self, scale: BandScale) -> Self
Set BandScale for left axis.
Sourcepub fn set_axis_left_linear(self, scale: LinearScale) -> Self
pub fn set_axis_left_linear(self, scale: LinearScale) -> Self
Set LinearScale for left axis.
Sourcepub fn set_axis_right_band(self, scale: BandScale) -> Self
pub fn set_axis_right_band(self, scale: BandScale) -> Self
Set BandScale for right axis.
Sourcepub fn set_axis_right_linear(self, scale: LinearScale) -> Self
pub fn set_axis_right_linear(self, scale: LinearScale) -> Self
Set LinearScale for right axis.
Sourcepub fn set_axis_top_label(self, label: &str) -> Self
pub fn set_axis_top_label(self, label: &str) -> Self
Set label for top axis.
Sourcepub fn set_axis_bottom_label(self, label: &str) -> Self
pub fn set_axis_bottom_label(self, label: &str) -> Self
Set label for bottom axis.
Sourcepub fn set_axis_left_label(self, label: &str) -> Self
pub fn set_axis_left_label(self, label: &str) -> Self
Set label for left axis.
Sourcepub fn set_axis_right_label(self, label: &str) -> Self
pub fn set_axis_right_label(self, label: &str) -> Self
Set label for right axis.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Chart<'a>
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