Skip to content

DocsCharts BSankey

PT

Charts B

Sankey

Flow from sources to targets, with thickness proportional to volume.

data-u="sankey"Family B

Example

Sankey chart

Flows colored by source, from work to deliverables. Hover a source or target to isolate its flows.

Installation

Just this chart, with the core and the tokens:

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

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-sankey

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.
unitstringhValue suffix.
sourcesarrayno defaultSource names (matrix rows).
destsarrayno defaultTarget names (matrix columns).
footLstringno defaultLabel for the left tile.
footRstringno defaultLabel for the right tile.
periodsarrayno defaultList of {label, matrix}. matrix[source][target].
periodnumber0Index of the period that opens selected.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
chart svgrole="img" and aria-label"Label: flow from sources to targets".
period listrole="listbox", role="option"Opens with aria-expanded and marks the option in aria-selected.

Keyboard

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