pub trait ChartTooltipRenderer {
    fn draw_tooltip(&self, cx: &mut Cx, config: &ChartConfig<'_>, pos: Vec2);
}
Expand description

Renders a tooltip’s content

Implement this trait to render the elements that are shown inside a tooltip. The tooltip’s background and current element indicator (small triangle) are not rendered by this function.

See ChartTooltipConfig for comments about size and other settings for tooltips.

Required methods

Draw the tooltip’s content

Use pos to position the elements that need to be rendered.

TODO(Hernan): Add support for boxes and other layout mechanisms.

Implementors