Skip to content

Theming

View as Markdown

The chart is styled with plain CSS and reads eight variables. Set any of them on :root, or on an element around the chart, and leave the rest.

:root {
--rt-font: 'Inter', sans-serif;
--rt-ink: #1d2433;
--rt-retention: #e4e7ec;
}
VariableDefaultUsed for
--rt-fontinheritAll text in the chart. By default it takes your page’s font.
--rt-ink#162033Text, axis lines, the outline of a selected layer.
--rt-ink-soft#56627aAxis labels and the key.
--rt-surface#ffffffThe gap under the dashed edge of an unlimited layer. Match your page background.
--rt-rule#e8ebf0Grid lines behind the tower and the rule above the key.
--rt-quote-outline var(--rt-ink) Dashed outline for reinsurer-viewpoint quotes and indications.
--rt-retention#d5d9dfThe cedant’s retention.
--rt-loss#b3261eThe loss wash and its flag.

The same chart with a warmer palette and a serif font:

.my-portal {
--rt-font: Georgia, 'Times New Roman', serif;
--rt-ink: #3b2f1e;
--rt-ink-soft: #7a6a52;
--rt-rule: #ece5d6;
--rt-retention: #e2dccb;
--rt-loss: #a1440b;
}
Tower
Retention 20%
Retention 20%
Second excess, 5M xs 5M per claim
Loss 6.2M
kept by the cedant signed firm orderWidth is share of the risk, height is amount.

Layer fills are not CSS variables, because they depend on the data. Layers of one contract share a colour, and colours are handed out in the order contracts first appear, from a set of ten pale fills chosen to keep dark text readable.

To fix a layer’s colour, send display.colorOverride with that layer in your request:

{
"layerName": "First excess",
"layerType": "XOL",
"display": { "colorOverride": "#ffe0b2" }
}

With <TowerChart /> you can go further and pass your own fills map.

Layer labels are drawn in --rt-ink on pale fills, so the chart reads best on a light surface. On a dark page, put the chart in a light card rather than inverting the ink colour. That is what this site does.

The chart fills the width of its container. Set its height with the height prop. Towers of one risk sit side by side and wrap when there is less than about 280 pixels each.