Skip to content

DocsCharts CScatter

PT

Charts C

Scatter

Points by category, with the legend isolating one and a tip per point.

data-u="scatter"Family C

Example

Scatter

Tickets by time to resolution, colored by category. Hover a legend category to isolate it, or a point to see the details.

Installation

Just this chart, with the core and the tokens:

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

Dependency Pulls in a-chartc (shell for C 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-scatter

Family C: shell u-chartc-card > u-chartc-panel > the data-u, then h3.u-chartc-title and p.u-chartc-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.
unitstringhX axis suffix.
xmaxnumber48End of the X axis.
categoriesarrayno defaultList of {label}.
periodsarrayno defaultList of {label, delta, data}. data[category] is a list of [x, y], with y from 1 to 5.
periodnumber0Index of the period that opens selected.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
chart svgrole="img" and aria-label"Label by category".
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.