Skip to content
ArcadiaDesign
The median response time over a month, on a scale that starts at a round value above zero.

TSX

A line shows how a measure changed over time: response times, a queue's length, a rate. When the amount under it matters, such as requests served, use an area; when each row is a total of its own, such as tokens a day, use bars. Never draw a line across names that have no order.

Every series is drawn at one weight, 2px, with round joins and caps, and nothing on it fades: the newest value is the one read most. A line may start on a round value above zero, and then its value axis stays at every width.

Examples

Curves

monotone by default: it passes through every row and never shows a value the data never had.

monotone: a measure that varies between its rows
straight: a count per month
step: seats in use, a level that holds

straight for counts and sparse rows, step for a level that holds until it changes.

Two series

One scale in one unit; a second unit is a second plot on the same rows, never a second axis. The legend names each line, and the card reads both on a row.

Crossing zero

The zero rule turns solid where the values cross it, and the line keeps its one colour on both sides: the sign is its place, never its colour.

States

A gap

A missing row breaks the line, never bridged and never drawn to zero. A value between two gaps is a dot.

No reading on four days: the line breaks at each, and September 19 stands alone.

One point and all zero

One row is a dot at its value, never a line to a neighbour it does not have. Zero is data: a series of zeros lies on the baseline of a scale from 0 to 1.

One row
All zero

Too many rows

When there are more rows than the plot can show apart, bin them to a coarser period before they reach the chart, and say so in its label: per week instead of per day.

The chart draws every row it is given.

Each line adds its label, its first and last value and the change to its chart's name: "Response time per day: 30 days; Median from 129ms to 111ms, down 14%; 95th percentile from 262ms to 245ms, down 6.5%". With a single series the chart's label names it. A series that goes below zero gives no change, since a percentage of a signed value says nothing.

With Readout the plot is a slider over its rows, and its value text reads every line on the row, in full: "Tue, Oct 6: Median 111ms, 95th percentile 245ms". A missing value reads "no data".

Line

labelrequired
string
The series' name.
valuesrequired
readonly (number | null | undefined)[]
A value per row of x; null is a gap.
colorrequired
string
The paint of the slot its entity owns: chartColor(1).
curve
"monotone" | "straight" | "step"Default "monotone"
straight for counts and sparse rows, step for a level that holds until it changes.