Skip to content
DocsChartsLineLast updated Nov 2, 2026

Line

One value, read as a trend. Sample data: P95 latency, us-east, last 24 hours.

Open in
P95 latency, us-eastP95 time to first token in us-east, hourly over the last 24 hours: 1.30 s now, peak 1.45 s, low 0.85 s.1.8 S1.2 S0.6 S000:0006:0012:0018:00NOW
P95 latency, us-east
HourP95
00:000.90 s
01:001.10 s
02:000.95 s
03:001.20 s
04:000.85 s
05:001.00 s
06:001.30 s
07:001.05 s
08:001.15 s
09:000.90 s
10:001.25 s
11:001.40 s
12:001.10 s
13:001.00 s
14:001.35 s
15:001.20 s
16:000.95 s
17:001.10 s
18:001.45 s
19:001.15 s
20:001.05 s
21:001.30 s
22:001.20 s
Now1.30 s
P95 latency, us-eastP95 time to first token in us-east, hourly over the last 24 hours: 1.30 s now, peak 1.45 s, low 0.85 s.1.8 S1.2 S0.6 S000:0006:0012:0018:00NOW
P95 latency, us-east
HourP95
00:000.90 s
01:001.10 s
02:000.95 s
03:001.20 s
04:000.85 s
05:001.00 s
06:001.30 s
07:001.05 s
08:001.15 s
09:000.90 s
10:001.25 s
11:001.40 s
12:001.10 s
13:001.00 s
14:001.35 s
15:001.20 s
16:000.95 s
17:001.10 s
18:001.45 s
19:001.15 s
20:001.05 s
21:001.30 s
22:001.20 s
Now1.30 s

Installation

  1. 1

    Set up the registry once

    This chart is free in Hearth and MIT licensed: no token. Add @chartory to components.json once (the URL alone, no headers), or skip this when another chart is already installed.

    Installation guide
  2. 2

    Add the chart

    One command adds the Line component to your project.

    npx shadcn add @chartory/line
  3. 3

    Use it

    Pass your rows. The props are the Figma properties.

    usage.tsx
    import { Line }  from "@/components/chartory/line"<Line  data={p95Latency}  size="m"/>

Props

<Line>

Every prop but data is a Figma property with the same name and values.

PropTypeDefault
data: The chart's data. The tables below list every field.LineDataRequired
size: The size class. Each one is laid out again from the data."xs" | "s" | "m" | "l""m"
color: The data colour of the primary marks (data/primary)."cat-1" | "cat-2" | "cat-3" | "cat-4""cat-1"

LineData

The data prop: one object for the whole chart.

PropTypeDefault
vals: The values, in order.number[]Required
min: The bottom of the value scale.numberRequired
max: The top of the value scale.numberRequired
ticks: The axis tick labels.string[]Required
xl: The x axis labels, by index.Record<number, string>Required
yW?: The width of the y axis label column, in px.number36
smooth?: Draws the line as a curve.booleanfalse
area?: The fill under the line."flat" | "gradient"—
dots?: Which points get a dot.number[] | "all"—
end?: Labels the last point.booleanfalse
tip?: The highlighted point: index and label.LineTip—

LineTip

The tip object.

PropTypeDefault
i: The index of the item it belongs to.numberRequired
text: The label as shown.stringRequired

The data as a JSON Schema: schemas/line.json

Line chart: a React and Figma chart in four sizes

What does a line chart show?

A line chart joins one value over time, so the eye reads its direction before its numbers. Rises, drops and flat runs show up at once. Use it for latency, prices, sign-ups or any single measure that changes continuously.

Chartory ships it as a Figma component and a React component with the same name. The code installs from the shadcn registry with one command and lands in your project as a file you own.

What is the Line component?

It is one <Line> component. Its props are the Figma properties with the same names and values, and the props table above lists them. The data is one value per point in time.

Sizes XS, S, M and L re-lay the chart out from the data instead of scaling it, so labels stay readable at every size.

When should I use it?

  • Is time on the x axis? Yes means the line fits.
  • Is it one series? Yes means the line fits.
  • Is the direction enough on its own? Yes means the line fits.

When does another type fit better?

  • No time, just items side by side. Use Bars instead.
  • Several series share the axis. Use Multi-line chart instead.
  • The amount, not only the trend. Use Area chart instead.

Line chart questions

Installing, data, Figma and plans.

  • Yes. It installs through the shadcn registry with the shadcn CLI, and the file lands in your project.

Stay in the loop

New charts, by email.

Get an email when new chart types and releases ship.

Unsubscribe any time.