Pixel rectangle the chart body occupies, plus the overall scene bounds. Margins around the plot area host title, axis labels, legend.
Modulegranite-0.7.4.0GHC2021
Granite.Render.Chrome
Backend-agnostic chart chrome: axes, title, legend. Each helper returns a list of primitive Marks.
- 4 types
- 7 values
- Packagegranite-0.7.4.0
- Exports11
- LanguageGHC2021
- LicenceMIT
- SourceChrome.hs
Inputs that grow the plot margins beyond the theme defaults. marExtraBottom
enlarges the bottom margin (for rotated x-labels) and marLeftWanted requests a
left margin (to fit long y-labels / the rotated labels' leftward reach); both
fall back to the defaults when 0/small.
Constructors
How the bottom (x) axis labels are laid out, plus the extra margins that choice needs. Decided exactly once per chart so margin sizing and the actual label rendering can never disagree (the bug when each recomputed the policy from a slightly different plot width). XLabelMode is threaded to axesMarks; alExtraBottom/alLeftWanted feed computePlotBox.
Constructors
What a panel's x-axis renderer should do. XFixed carries the
chart-global decision verbatim (single panel). XLocalNoRotate lets a faceted
panel pick upright/thin from its own width, but never rotate — rotation needs a
per-cell margin reservation the facet layout doesn't make.
The mode for axes that never rotate their labels (polar; also the faceted default).
Decide the bottom-axis label policy and the margins it needs, in one pass.
A wide left label grows the left margin (up to ~42% of the scene); rotated
bottom labels also reach down (bottom margin) and left (left margin) by
sin 45° of their width. Faceted charts never rotate, so they reserve no extra
bottom margin.
A trained scale's in-domain tick labels, in break order.