Chart

Shows numbers over time or by bucket.

Type

  • Calls

    Calls
    DayCalls
    Oct 1412
    Oct 2438
    Oct 3401
    Oct 4466
    Oct 5520
    Oct 6498
    Oct 7471
    Oct 8530
    Oct 9562
    Oct 10548
    Oct 11601
    Oct 12587
    Oct 13640
    Oct 14655

    linedefault

  • Runs by hour

    Runs by hour
    HourPassedFailed
    09:00422
    10:00511
    11:00480
    12:00604
    13:00729
    14:00663
    15:00581
    16:00702
    17:00646
    18:00551
    19:00490
    20:00402

    bar

  • Runs per day: up from 12 to 41, low 12, high 41
    PointRuns per day
    Point 112
    Point 218
    Point 315
    Point 422
    Point 519
    Point 626
    Point 724
    Point 831
    Point 928
    Point 1035
    Point 1133
    Point 1241

    sparkline

  • Runs, last 30 days
    BucketRunsStatus
    Sep 18Passed
    Sep 215Passed
    Sep 311Passed
    Sep 418Passed
    Sep 514Warning
    Sep 610Passed
    Sep 70None
    Sep 80None
    Sep 99Passed
    Sep 1016Passed
    Sep 1112Passed
    Sep 128Passed
    Sep 1315Failed
    Sep 1411Passed
    Sep 1518Passed
    Sep 1614Passed
    Sep 1710Passed
    Sep 1817Passed
    Sep 1913Passed
    Sep 209Passed
    Sep 2116Passed
    Sep 2212Warning
    Sep 238Passed
    Sep 2415Passed
    Sep 2511Passed
    Sep 2618Passed
    Sep 2714Passed
    Sep 2810Passed
    Sep 2917Passed
    Sep 3013Passed

    status

Series

  • Calls

    Calls
    DayCalls
    Oct 1412
    Oct 2438
    Oct 3401
    Oct 4466
    Oct 5520
    Oct 6498
    Oct 7471
    Oct 8530
    Oct 9562
    Oct 10548
    Oct 11601
    Oct 12587
    Oct 13640
    Oct 14655

    onedefault

  • Reply time

    Reply time
    Dayp50p95
    Oct 10.8s2.1s
    Oct 20.8s2.2s
    Oct 30.8s2.0s
    Oct 40.8s2.4s
    Oct 50.8s2.6s
    Oct 60.8s2.3s
    Oct 70.8s2.2s
    Oct 80.8s2.5s
    Oct 90.8s2.9s
    Oct 100.8s2.6s
    Oct 110.7s2.3s
    Oct 120.8s2.5s
    Oct 130.7s2.2s
    Oct 140.7s2.1s

    two

  • Runs by model

    Runs by model
    Dayglaze-largeglaze-smallglaze-mini
    Oct 132018090
    Oct 2340160110
    Oct 3310200100
    Oct 4360190120
    Oct 5390170140
    Oct 6370210130
    Oct 7350230150
    Oct 8400220160

    three

  • Runs by outcome

    Runs by outcome
    HourPassedFailed
    09:00422
    10:00511
    11:00480
    12:00604
    13:00729
    14:00663
    15:00581
    16:00702
    17:00646
    18:00551
    19:00490
    20:00402

    status

Frame

  • Runs by outcome

    Last 12 hours

    Runs by outcome
    HourPassedFailed
    09:00422
    10:00511
    11:00480
    12:00604
    13:00729
    14:00663
    15:00581
    16:00702
    17:00646
    18:00551
    19:00490
    20:00402

    carddefault

  • Runs by outcome

    Runs by outcome
    HourPassedFailed
    09:00422
    10:00511
    11:00480
    12:00604
    13:00729
    14:00663
    15:00581
    16:00702
    17:00646
    18:00551
    19:00490
    20:00402

    plain

  • Runs per day: up from 12 to 41, low 12, high 41
    PointRuns per day
    Point 112
    Point 218
    Point 315
    Point 422
    Point 519
    Point 626
    Point 724
    Point 831
    Point 928
    Point 1035
    Point 1133
    Point 1241

    none

States

  • Reply time

    Loading Reply time

    loading

  • Reply time

    Reply time
    Dayp50p95
    No runs yet

    empty

  • Reply time

    Query timed out

    error

Usage

When to use it
Use
A number over time a person reads for its shape: calls per day, latency per hour.
Use
Counts per bucket, with failures stacked on top: runs by hour by outcome.
Use
A trend beside a number (sparkline), or the health of the last 30 days at a glance (status).
Not for
One number and its change; write the label and the number in the type roles.
Not for
Exact values a person compares or copies. Use Table.
Not for
How far one task got. Use Progress.
Not for
When each step of one run started and how long it took. Use Timeline.

Rules

8 rules
Never
Give a series a colour to tell it apart; leave it ink, and let the second take ink at 60% and the third dashed on their own. Because colour means status in Glaze, so a blue or purple series reads as a state, and a fourth hue is a legend lookup on every glance.
Must
Set status: 'fail', 'warn' or 'ok' only on a series that is that outcome, and stack it on the plain ink series. Because the failure bar then pops in coral against ink, and a green Passed series next to it would take the eye off the failures.
Must
Give every Chart a label that says what and over when: "Runs, last 30 days". Because it names the frame, the point group a keyboard tabs into and the data table a screen reader reads.
Must
Pass unit="duration" (ms) or unit="count" with raw numbers instead of formatting values yourself. Because the axis, tooltip and table then share one unit from the largest value, so 950ms and 1.2s never sit on one axis.
Must
Pass loading, error with onRetry, and empty to the Chart; never swap it for a spinner or a paragraph. Because the chart holds its height and shows its own shape while it loads, so the page does not jump when the data lands.
Never
Put a frame="card" Chart inside a Card; use frame="plain" there, or let the chart be the card. Because a card around a card is two edges where one closes the group.
Should
Start a count's axis at zero (the default) and pass zero={false} only for values far from zero, like latency percentiles. Because a bar or a count line cut above zero makes a 5% change look like a doubling.
Should
Leave the legend on for more than one series and off for one; the title already names a single series. Because the legend is the only key to which ink step is which, and a one-entry legend repeats the title.

State order

4 states, highest first
1
loading
2
error
3
empty
4
ready

Accessibility

5 checks
Each x value is a button named with its values ("Oct 4: Calls 466"), one tab stop for the group, arrow keys between them.
Every chart carries its data as a table for a screen reader, an empty one too; table adds a visible copy behind a switch.
Ink lines and bars are 11.9:1 and 5.5:1 on paper; a third series repeats a step dashed rather than dropping under 3:1.
Colour is never the only sign: a status series is named in the legend and tooltip, a status bucket in its cell's name.
The legend's buttons are toggles with aria-pressed; loading sets aria-busy and an error is a status region.

Keyboard

4 keys
Tab
Enters the chart at its last point, then the legend.
Arrow keys
Move between points and show each in the tooltip; Shift moves seven.
Home / End
Go to the first or last point.
Escape
Hides the tooltip.

Edge cases

7 edge cases
Missing value
A gap in the line, no bar, and None in the tooltip and table.
One point
A small square at the plot's centre.
Many x labels
They thin out to every nth so none overlaps; the last always shows.
Narrow card
The plot shrinks to fit and the labels thin; the height stays.
Right to left
x runs from the right, the y axis sits on the right and the arrow keys follow the screen.
Dark theme
Ink flips to near-white, the second step with it; status colours take their dark values.
Forced colors
Lines and bars draw in CanvasText; dashes and hollow bars keep series apart.

API

14 props
type
'line' | 'bar' | 'sparkline' | 'status'
label
string
data
ChartRow[] | (number | null)[] | StatusBarBucket[]
xKey, config
string, ChartConfig
frame
'card' | 'plain' | 'none' default 'card'
title, description, actions
ReactNode
unit
'duration' | 'count'
height
number default 200
loading, error, onRetry, retrying, empty
boolean, ReactNode, () => void, boolean, ReactNode
legend, table, defaultHidden
boolean, boolean, string[]
curve, area, zero
'monotone' | 'linear' | 'step', boolean, boolean default 'monotone', false, true
stacked
boolean default false
status, variant, end, interactive
ChartStatus, 'line' | 'bar', boolean, boolean default , 'line', true, false
noun, range, onBucketClick
[string, string], [ReactNode, ReactNode] | false, (bucket, i) => void

Tokens

21 tokens
--ink
#050505
--ink-60
rgb(5 5 5 / 0.60)
--text-1
rgb(5 5 5 / 0.80)
--text-2
rgb(5 5 5 / 0.60)
--text-inverse
#ffffff
--ok
#2c9a59
--warn
#d98a0b
--fail
#e35e49
--line-faint
rgb(5 5 5 / 0.06)
--line
rgb(5 5 5 / 0.10)
--line-strong
rgb(5 5 5 / 0.45)
--hover
rgb(5 5 5 / 0.06)
--field
#efefef
--paper
#ffffff
--shell
#f1f1f0
--type-caption
400 12px/1.35 var(--font-sans)
--type-label-sm
500 12px/1.35 var(--font-sans)
--radius-tag
6px
--control-sm
26px
--stale
0.6
--z-overlay
50

Install

For your coding agent

GitHub

Please star me pookie

141

A new design system every week

Leave your email before you copy the prompt.