Skip to content

DocsCharts ACombo

PT

Charts A

Combo

Bars on one axis and a rate line on the other, volume and conversion together.

data-u="combo"Family A

Example

Combo chart

Bars on one axis and a conversion line on the other, so volume and rate read together on one screen.

Installation

Just this chart, with the core and the tokens:

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

No dependency The chart file already brings its own shell.

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

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

Family A: shell u-chart-card > u-chart-panel > the data-u, then h3.u-chart-title and p.u-chart-desc.

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.
barsobjectno default{label} of the bar series.
lineobjectno default{label} of the line, in %.
periodsarrayno defaultList of {label, delta, labels, bars, line}.
periodnumber0Index of the period that opens selected.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
chart svgrole="img" and aria-label"Label by month".
period togglerole="radiogroup", role="radio"Current period in aria-checked.
period listrole="listbox", role="option"Opens with aria-expanded and marks the option in aria-selected.

Keyboard

KeyDoes
Left and right arrowschange the period in the toggle
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.