Struct tui::widgets::Sparkline [] [src]

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

Widget to render a sparkline over one or more lines.

Examples

Sparkline::default()
    .block(Block::default().title("Sparkline").borders(border::ALL))
    .data(&[0, 2, 3, 4, 1, 4, 10])
    .max(5)
    .style(Style::default().fg(Color::Red).bg(Color::White));

Methods

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

Trait Implementations

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

Returns the "default value" for a type. Read more

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

Draws the current state of the widget in the given buffer. That the only method required to implement a custom widget. Read more

Helper method to quickly set the background of all cells inside the specified area.

Helper method that can be chained with a widget's builder methods to render it.