pub struct StackedBar {
pub point: Point,
pub fractions: HashMap<String, f64>,
pub is_negative: bool,
/* private fields */
}Fields§
§point: PointThe (x, y) points for the bar
fractions: HashMap<String, f64>The percentage makeup of the bar. For all
k, v in fractions v1 + v2 + v3 + .. = 1.0
is_negative: boolIs true of all points within the bar are negative
Implementations§
Source§impl StackedBar
impl StackedBar
pub fn from_point(point: impl Into<Point>, is_negative: bool) -> Self
pub fn restore(&mut self)
pub fn get_fractions(&self) -> &HashMap<String, f64>
pub fn get_point(&self) -> &Point
Sourcepub fn remove_section(&mut self, section: impl Into<String>)
pub fn remove_section(&mut self, section: impl Into<String>)
Effectively removes the contribution of specified section from the stacked bar if it exists
Sourcepub fn add_section(&mut self, section: impl Into<String>)
pub fn add_section(&mut self, section: impl Into<String>)
Effectively re-adds the contribution of specified section to the stacked bar if it exists
Trait Implementations§
Source§impl Clone for StackedBar
impl Clone for StackedBar
Source§fn clone(&self) -> StackedBar
fn clone(&self) -> StackedBar
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 moreSource§impl Debug for StackedBar
impl Debug for StackedBar
Source§impl PartialEq for StackedBar
impl PartialEq for StackedBar
impl StructuralPartialEq for StackedBar
Auto Trait Implementations§
impl Freeze for StackedBar
impl RefUnwindSafe for StackedBar
impl Send for StackedBar
impl Sync for StackedBar
impl Unpin for StackedBar
impl UnwindSafe for StackedBar
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