Skip to the page
TACTILE UI

Kit part · Charts

Plot

Line charts drawn as light on glass, or as ink on a panel: gridlines faint, two traces at most, a red line for now.

Element
<svg>
Needs
kit.css
Rules
plot.rules.md · 4
Finishes
Aluminium · Graphite · Porcelain · Black
Volumes
Tactile · Quiet
On this page
  1. Variants
  2. Every state, at once
  3. API
  4. Markup
  5. Accessibility
  6. How it’s built
  7. Rules
  8. Related parts
01

Variants

03600:0012:0024:00
One trace
03600:0012:0024:00
Two traces, no fill
03600:0012:0024:00
Ink on a panel
02

Every state, at once

Both finishes, side by side. Hover, pressed and focus are forced with .is-hover, .is-down and .is-focus; checked and disabled are real.

Aluminium

PartWhole dayUp to now
Glass
03600:0012:0024:00
03600:0012:0024:00

Graphite

PartWhole dayUp to now
Glass
03600:0012:0024:00
03600:0012:0024:00
03

API

NameKindValuesWhat it does
.tui-plotclasson <svg>Block, full width, height from the viewBox.
.gridclass<line>Gridlines in --tui-rule.
.axisclass<text>Scale figures, 10px, in --tui-ink-3.
.traceclass<path>The main line: 1.75px, round joins, in --tui-ink (glows on glass).
.trace--2class<path>The second line, dashed 3 3, in --tui-ink-3.
.fillclass<path>The area under the main trace, at 7–8%.
.nowclass<line>The present, in --tui-red.
role="img" · aria-labelattributerequiredSay the peaks: “Solar peaked at 5.4 kW at 13:00.”
04

Markup

<svg class="tui-plot" viewBox="0 0 640 240" role="img"
     aria-label="Solar and house use today. Solar peaked at 5.4 kW at 13:00.">
  <line class="grid" x1="34" x2="632" y1="8" y2="8"/>
  <text class="axis" x="26" y="12" text-anchor="end">6</text>
  <path class="fill" d="…"/>
  <path class="trace trace--2" d="…"/>   <!-- house, dashed -->
  <path class="trace" d="…"/>            <!-- solar -->
  <line class="now" x1="420" x2="420" y1="8" y2="216"/>
</svg>

Needs kit.css only, no script. How to install the kit.

05

Accessibility

  • Give the SVG role="img" and an aria-label that carries the values a sighted reader would take from it.
  • The second trace differs by dash as well as tone.
06

How it’s built

Plain SVG with five classes; the kit colours them through tokens, so the same plot prints in ink on a panel and in light inside glass. You draw the paths: the kit has no charting engine and does not pretend to. The dashboard template has a twenty-line example.

07

Rules

plot.rules.mdIn the brain

No more than two lines on one plot (one solid, one dashed) and the present marked in red.

4 rules in this file, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.

08
03600:0012:0024:00

Glass

Dark display glass for plots and live readouts, whatever the finish around it. Everything printed inside it is lit.

Latency p95182ms

Readout

A printed label over a value: key figures, with the unit small and the change in words.

Reel 342:10
Mixed0:30

Table

Rows of data with printed column labels, figures right-aligned in columns, and status in lamps with words.

Docs
Finish
Volume