Skip to main content

draw_x_axis

Function draw_x_axis 

Source
pub fn draw_x_axis(
    scale: &dyn Scale,
    coord: &dyn Coord,
    theme: &Theme,
    plot_area: &Rect,
    canvas: &Rect,
    backend: &mut dyn DrawBackend,
) -> Result<(), RenderError>
Expand description

Draw the X axis: ticks, labels, and title.

canvas is the full SVG viewport (not just the panel): B3-1’s outer- label fit drops a label whose tick has scrolled off it, and shifts a label bbox that crosses it back inside, unless theme.axis_text_x_fit is AxisLabelFit::Clip (the 0.21 behaviour — no correction). Ticks and gridlines are drawn regardless.