pub struct BarChart<'a> { /* private fields */ }
Expand description
Display multiple bars in a single widgets
§Examples
BarChart::default()
.block(Block::default().title("BarChart").borders(Borders::ALL))
.bar_width(3)
.bar_gap(1)
.bar_style(Style::default().fg(Color::Yellow).bg(Color::Red))
.value_style(Style::default().fg(Color::Red).add_modifier(Modifier::BOLD))
.label_style(Style::default().fg(Color::White))
.data(&[("B0", 0), ("B1", 2), ("B2", 4), ("B3", 3)])
.max(4);
Implementations§
Source§impl<'a> BarChart<'a>
impl<'a> BarChart<'a>
pub fn data(self, data: &'a [(&'a str, u64)]) -> BarChart<'a>
pub fn block(self, block: Block<'a>) -> BarChart<'a>
pub fn max(self, max: u64) -> BarChart<'a>
pub fn bar_style(self, style: Style) -> BarChart<'a>
pub fn bar_width(self, width: u16) -> BarChart<'a>
pub fn bar_gap(self, gap: u16) -> BarChart<'a>
pub fn bar_set(self, bar_set: Set) -> BarChart<'a>
pub fn value_style(self, style: Style) -> BarChart<'a>
pub fn label_style(self, style: Style) -> BarChart<'a>
pub fn style(self, style: Style) -> BarChart<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BarChart<'a>
impl<'a> RefUnwindSafe for BarChart<'a>
impl<'a> Send for BarChart<'a>
impl<'a> Sync for BarChart<'a>
impl<'a> Unpin for BarChart<'a>
impl<'a> UnwindSafe for BarChart<'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