pub struct TitleBand {
pub out_margin: f32,
pub chart_title_margin: f32,
pub edge_inset: f32,
}Expand description
The margin geometry an axis title is placed inside.
A struct rather than three loose f32 parameters: they are all pixel
lengths measured along the same direction, and a positional swap between
them would move a title without failing to compile.
Fields§
§out_margin: f32The axis’ own outer margin — the band its title and tick labels share.
chart_title_margin: f32The chart title band at the top of the chart area. Only Side::Top sits
below it; the other sides ignore this.
edge_inset: f32How far this side’s axis band is pushed in from the chart-area edge by
whatever occupies the outside of that margin — today the colourbar band
(Config::colorbar_band), zero on
the other three sides. Without it the placement assumes the axis band
touches the chart edge, and a title on the colourbar’s side would be
drawn on top of the bar.