data

LineChart

A line chart whose path draws on left-to-right on the house easing, with an optional soft area fill and per-point dots that pop as the line reaches them. Deterministic via SVG pathLength normalization.

$ npx ondajs add line-chart

LineChart

A line chart whose path draws on left-to-right on the house easing (useSceneProgress), with an optional soft gradient area fill and per-point dots that pop as the line reaches them. The draw is deterministic — it uses SVG pathLength normalization keyed off the frame, so there's no DOM measurement and frame N is reproducible. The line carries the earned accent.

Props

PropTypeDefaultNotes
datanumber[]sample seriesValues, left to right.
delaynumber0Frames before drawing.
durationnumber40Frames to fully draw.
colorstring#D96B82Line + dot color.
strokeWidthnumber4Line thickness.
width / heightnumber900 / 440Chart size.
fillbooleantrueSoft area under the line.
showDotsbooleantrueDot per data point.
placementregion or {x,y,anchor}Canvas placement.

Usage

TSX
import { LineChart } from './components/onda/line-chart/LineChart';

export const TrendScene = () => (
  <LineChart data={[12, 18, 15, 24, 22, 31, 38]} placement="center" />
);