bloxa

Line Chart

FREE

Smooth or straight lines with a hover tooltip, dots and toggleable series.

Installation

Terminal
npx @bloxa/cli add line-chart
# or: npx shadcn@latest add @bloxa/line-chart

Packages installed automatically: motion

Examples

Lines with dots

Hover for values; click the legend to hide or show a series.

API reference

Every component also accepts the props of the element it renders.

LineChart

PropTypeDefaultDescription
dashedstring[][]Series drawn dashed without fill (averages, targets).
dataobject[]—Rows.
indexstring—Key for x-axis labels.
categoriesstring[]—Numeric series keys to draw.
labelsRecord<string, string>—Display names for series.
colorsstring[]—Series colors; the first is the theme accent.
valueFormatter(value) => string—Value format; defaults to localized numbers.
heightnumber260Height in px; width follows the container.
showLegend / showGrid / showXAxis / showYAxis / showTooltipbooleantrueToggle parts.
curve"smooth" | "linear""smooth"Curve.
showDotsbooleanfalseDots.