pub struct Chart {
pub title: String,
pub chart_type: ChartType,
pub categories: Vec<String>,
pub series: Vec<ChartSeries>,
pub x: u32,
pub y: u32,
pub width: u32,
pub height: u32,
}Expand description
Chart definition
Fields§
§title: String§chart_type: ChartType§categories: Vec<String>§series: Vec<ChartSeries>§x: u32§y: u32§width: u32§height: u32Implementations§
Source§impl Chart
impl Chart
Sourcepub fn new(
title: &str,
chart_type: ChartType,
categories: Vec<String>,
x: u32,
y: u32,
width: u32,
height: u32,
) -> Self
pub fn new( title: &str, chart_type: ChartType, categories: Vec<String>, x: u32, y: u32, width: u32, height: u32, ) -> Self
Create a new chart
Sourcepub fn add_series(self, series: ChartSeries) -> Self
pub fn add_series(self, series: ChartSeries) -> Self
Add a data series
Sourcepub fn category_count(&self) -> usize
pub fn category_count(&self) -> usize
Get number of categories
Sourcepub fn series_count(&self) -> usize
pub fn series_count(&self) -> usize
Get number of series
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 UnsafeUnpin 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