pub struct ChartBuilder { /* private fields */ }Expand description
Immediate-mode builder for charts.
Implementations§
Source§impl ChartBuilder
impl ChartBuilder
Sourcepub fn new(width: u32, height: u32, x_style: Style, y_style: Style) -> Self
pub fn new(width: u32, height: u32, x_style: Style, y_style: Style) -> Self
Create a chart builder with widget dimensions.
Sourcepub fn legend(&mut self, position: LegendPosition) -> &mut Self
pub fn legend(&mut self, position: LegendPosition) -> &mut Self
Set legend position.
Sourcepub fn line(&mut self, data: &[(f64, f64)]) -> &mut DatasetEntry
pub fn line(&mut self, data: &[(f64, f64)]) -> &mut DatasetEntry
Add a line dataset.
Sourcepub fn scatter(&mut self, data: &[(f64, f64)]) -> &mut DatasetEntry
pub fn scatter(&mut self, data: &[(f64, f64)]) -> &mut DatasetEntry
Add a scatter dataset.
Sourcepub fn bar(&mut self, data: &[(f64, f64)]) -> &mut DatasetEntry
pub fn bar(&mut self, data: &[(f64, f64)]) -> &mut DatasetEntry
Add a bar dataset.
Sourcepub fn build(self) -> ChartConfig
pub fn build(self) -> ChartConfig
Build the final chart config.
Trait Implementations§
Source§impl Clone for ChartBuilder
impl Clone for ChartBuilder
Source§fn clone(&self) -> ChartBuilder
fn clone(&self) -> ChartBuilder
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 moreAuto Trait Implementations§
impl Freeze for ChartBuilder
impl RefUnwindSafe for ChartBuilder
impl Send for ChartBuilder
impl Sync for ChartBuilder
impl Unpin for ChartBuilder
impl UnsafeUnpin for ChartBuilder
impl UnwindSafe for ChartBuilder
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