Skip to main content

hit_test_candles

Function hit_test_candles 

Source
pub fn hit_test_candles<F>(
    click_pos: Pos2,
    bars: &[Bar],
    visible_range: Range<usize>,
    coords: &ChartMapping,
    price_to_y: F,
    config: &HitTestConfig,
) -> Option<SeriesHitResult>
where F: Fn(f64) -> f32,
Expand description

Hit test candles to find which bar was clicked.

Uses the same coordinate system as the chart renderer (right-to-left).