Skip to content
satin

Line chart

One metric over a period as a smooth line, with the value of the hovered point.

Orders

2,335+8.4%

Oct 26 – Nov 1, 2026 · vs previous period

Installation

Terminal
npm i @uisatin/ui
Import
import { LineCard } from '@uisatin/ui/line-chart'

About 50.8 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.

First time with Satin? Set it up once, styles and fonts included, with the installation guide.

API Reference

The LineCard component is a wrapper around the div element with the title and a period Select, the KPI with its change and the range, then the line. Arrow keys move along the points once the plot has focus. smoothPath(points) from @uisatin/ui/line-chart returns the monotone curve the line is drawn with, as an SVG path, for custom charts and sparklines.

PropTypeDefault
title
string
—
range
string
—
data
ChartDatum[]
—
total
string
—
change
string
—
periods
string[]string[][]
—
value
string
—
onPeriodChange
(period) => void
—
unit
string
—
area
boolean
false
labelEvery
number
—
formatValue
(value) => string
—
reducedMotion
boolean
—
highlight
number
—

Accessibility

The card is role="figure" labelled by its title. The plot is one tab stop, a role="group" named "title, 12 points" (chartPoints in SatinLabels). Focusing it picks the last point, and a polite live region reads the picked point as "label: value". The line and axes are hidden.

KeyAction
TabFocuses the plot and picks the last point.
←or→Picks the previous or next point; stops at the ends.