Skip to main content

chart

Function chart 

Source
pub fn chart(
    ui: &mut Ui,
    chart: &Chart<'_>,
    bars: &[Bar<'_>],
    palette: &Palette,
    style: &WidgetStyle,
) -> Response
Expand description

A chart, as bars standing on a shared axis.

The webview’s drawing rather than the terminal’s: this renderer paints into a rectangle it asks for, so columns cost it nothing and are what a reader expects of a chart. makeover-tui lays its bars down instead, because a terminal has rows to spend and cells to draw with; both are honest answers to the same description and neither is the other’s fallback.

§The axis is the caller’s height and the description’s maximum

WidgetStyle::chart_height says how tall the figure stands and Chart::most says what a full bar means, which is the same split --chart-height and --most make in the stylesheet. An axis of zero draws its bars at nothing rather than dividing by it.

Bar::note is not painted. There is nowhere to put it without a hover surface this crate does not own, and the reading is the fact worth the room.