HORIZON HASKELLDocslts/ghc-9.14.xb2f3bfd2026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

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
datadata Margins
#

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.

Instances2Eq, Show
  • Eq MarginsDefined in granite-0.7.4.0 · Granite.Render.Chrome
  • Show MarginsDefined in granite-0.7.4.0 · Granite.Render.Chrome
datadata XLabelMode
#

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).

valueaxisLayout
  1. :: Theme
  2. -> Size
  3. -> Bool
  4. -> Bool
  5. -> [Text]
  6. -> [Text]
  7. -> AxisLayout
#

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.