Skip to main content

render_axis_currency

Function render_axis_currency 

Source
pub fn render_axis_currency(
    ui: &mut Ui,
    axis: Rect,
    currency: &str,
    unit: Option<&str>,
    choices: &[String],
) -> (Response, Option<String>)
Expand description

Paints a currency button at the top of an axis column and returns its response and the host currency choice, if any. The host supplies available conversions and replaces the prices and instrument metadata after a choice; the renderer never converts prices. unit appends the host’s price unit without converting prices. An empty currency shows only the unit and offers no conversion menu. Pass the response rectangle to price tick occlusion.