Skip to main content

render_crosshair_full

Function render_crosshair_full 

Source
pub fn render_crosshair_full(
    context: &RenderContext<'_>,
    hover_pos: Pos2,
    visible_data: &[Bar],
    price_scale: &PriceMap,
    coords: &ChartMapping,
    mode: CrosshairMode,
    style: CrosshairStyle,
    crosshair_color: Color32,
    line_width: f32,
    line_style: LineStyle,
    label_bg: Color32,
    label_text: Color32,
    chart_bottom: f32,
    axis_right: f32,
    last_price_tag: Option<Rect>,
    scale: &dyn HorizontalScale,
    bar_seconds: i64,
) -> [Option<Rect>; 2]
Expand description

Renders crosshair with full customization: style, mode, color, line width, line style

The vertical line runs down to chart_bottom, the bottom of the volume pane. The price label sits in the price axis, which ends at axis_right, over the last_price_tag it overlaps, and the time label on the time axis below chart_bottom, written by scale. Returns the rects of the price and time labels drawn.