Bar List
A top-N ranking: a label over a bar scaled to the biggest value, the formatted value and its share of the total. Sorted from the biggest value, rendered on the server and themed by the design tokens.
Part of @tectra-ng/charts (npm install @tectra-ng/charts, also included in tectra-ng).
Basic
Pass items with a label and a value in any order. The list sorts them, scales each bar to the biggest value and shows the percent of the total; zero values are left out.
Links
A row with link (and optional queryParams) becomes a router link: it gets a hover background and a focus ring, and Tab moves between the linked rows.
Limit
limit keeps only the biggest rows (10 by default). The percent is still the share of the whole total, so the visible rows may add up to less than 100%.
Value format
valueFormat formats the values: number (default), integer, compact (12.4K), percent or your own function. Numbers follow the tectra locale.
Loading and empty
loading shows skeleton rows; a list with no positive values says "No data" in the tectra locale.
Design tokens
dt sets the tokens of one list — the barList group of the chart tokens: row height, gaps, bar colour and radius, text colours.
Pass through
pt adds classes and styles to the parts: root, list, item, row, track, bar, label, value, percent, empty, skeleton.