Charts

A collection of simple HTML-based chart components for visualizing data.


Histogram

Displays a series of numeric values as vertical bars scaled relative to the highest value. Supports click interactions, tooltips, and compact or expanded layouts.

Source

Props

NameDefaultType
datanumber[]
Array of numeric values to render as bars
height32number
Height of each bar cell in pixels
gap'xs'xxs xs s m l xl xxl xxxl number
Spacing between bars
expandfalseboolean
Stretches bars to fill the full width of the container
compactfalseboolean
Reduces the width of each bar for a denser appearance

Events

If you attach any of these listeners, the component automatically adds hover interactions.

NamePayloadDescription
cellClickindex: numberEmitted when a bar is clicked, with its data index
clickEmitted when clicking the histogram container

Slots

NamePropsDescription
tooltipvalue, index, highestValueCustom tooltip content shown when hovering a bar