pub fn render_alert_levels<'a>(
ui: &mut Ui,
mapping: &ChartMapping,
alerts: impl IntoIterator<Item = &'a Alert>,
color: Color32,
labels: bool,
active_only: bool,
format: impl Fn(f64) -> String,
) -> Option<Alert>Expand description
Draw price thresholds and return a replacement alert after a drag.
Supply only alerts for this pane, resolving symbol or watchlist membership in the host.
With active_only unset, triggered, disabled and expired alerts are drawn dimmed.
Call after drawing the chart, then submit the result through the host’s alerts service.
Non-price sources require the host to resolve their own pane and coordinates.
format supplies the instrument’s precision and currency for labels.