Struct tui::widgets::BarChart[][src]

pub struct BarChart<'a> { /* fields omitted */ }

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

impl<'a> BarChart<'a>[src]

pub fn data(self, data: &'a [(&'a str, u64)]) -> BarChart<'a>[src]

pub fn block(self, block: Block<'a>) -> BarChart<'a>[src]

pub fn max(self, max: u64) -> BarChart<'a>[src]

pub fn bar_style(self, style: Style) -> BarChart<'a>[src]

pub fn bar_width(self, width: u16) -> BarChart<'a>[src]

pub fn bar_gap(self, gap: u16) -> BarChart<'a>[src]

pub fn bar_set(self, bar_set: Set) -> BarChart<'a>[src]

pub fn value_style(self, style: Style) -> BarChart<'a>[src]

pub fn label_style(self, style: Style) -> BarChart<'a>[src]

pub fn style(self, style: Style) -> BarChart<'a>[src]

Trait Implementations

impl<'a> Clone for BarChart<'a>[src]

impl<'a> Debug for BarChart<'a>[src]

impl<'a> Default for BarChart<'a>[src]

impl<'a> Widget for BarChart<'a>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.