pub fn paint_bars<P: Points + ?Sized>(
canvas: &mut Canvas<'_>,
plot: &Plot,
bars: &P,
interval: f64,
style: BarStyle,
color: impl Fn(usize) -> Color,
)Expand description
Draws bars across plot as columns from zero to each y, clipped to its area;
interval is the distance between two bars in x units, and color gives each bar’s
color by index (to color volume by its candle’s direction, say).
Bars that land on the same left edge (more bars than pixels) are merged into one, in the
color of the tallest, so a frame costs at most one rectangle per bar and per pixel
column. Bars whose y is not finite are skipped. Allocation-free.