Skip to content

DocsCharts BHeatmap

PT

Charts B

Heatmap

Intensity per day in a grid, with week, month and year tabs.

data-u="heatmap"Family B

Example

Heatmap

Grid of rounded cells in five accent levels. The tabs switch the granularity with a transition and each cell has a hover tip.

Installation

Just this chart, with the core and the tokens:

curl -fsSL unslop.leallabs.dev/i | sh -s add heatmap

Dependency Pulls in b-shell (shell for B charts). The installer downloads it and puts it in the right order.

The full card from the example, as HTML ready to paste:

curl -fsSL unslop.leallabs.dev/i | sh -s add chart-heatmap

Family B: shell u-chartb-card > the data-u with the u-chartb-panel class, then div.u-chartb-copy with h3 and p.

Props

They go in data-u-props, as JSON. Each item in periods becomes an option in the picker and the chart animates from the old data to the new.

PropTypeDefaultWhat it does
labelstringno defaultSmall label at the top of the card.
nounstringcontributionsWord for the count.
tabsarray[Semanal, Mensal, Anual]Granularity tabs.
tabnumber0Tab it opens on.
activitystringno defaultTitle of the activity bar.
periodsarrayno defaultList of {label, total, delta, seed, stats: [{v, l}]}. The cells come from seed: it's a visual pattern, not per-day data. All with the same number of stats.
periodnumber0Index of the period that opens selected.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
tabsrole="tablist", role="tab", aria-selectedWeekly, Monthly and Yearly.
period listrole="listbox", role="option"Opens with aria-expanded and marks the option in aria-selected.
gridaria-hidden="true"The cells are decoration. Total and stats stay in text.

Keyboard

KeyDoes
Left and right arrowschange the tab
Enter or Spaceopens the period list
Up and down arrowsmoves through the options
Esccloses without changing
Tabcloses and moves focus on

Events and API

No public events. The period change happens inside the card.

Type to search. Arrows pick, Enter opens.