Skip to main content

render_footprint

Function render_footprint 

Source
pub fn render_footprint(
    painter: &Painter,
    mapping: &ChartMapping,
    bars: &[Bar],
    flow: &Footprint,
    config: &FootprintConfig,
)
Expand description

Draws visible footprint bars, bounded by the visible bar range and clipped to mapping.rect.

For the chart widget use crate::widget::Chart::show_footprint to keep cells below its legend and cursor. Standalone hosts supply their pane mapping and source bars. Use only time-based bars whose timestamps lie inside their aggregation slots. Text layout uses egui’s galley cache; rows below the minimum height never request a layout. Row bands extend half an instrument tick below their first tick and above their last tick, including grouped rows. Fractional volumes below 100 retain up to three decimals; nonzero magnitudes below 0.001 use scientific notation. Only display grouping runs during painting. Cells under a point wide are too narrow to read and are skipped before looking up executions. A price spine occupies a separate gutter to the left of each bar: the opening tick points left, the closing tick right, and the colour follows price direction.