Skip to content

dumbbell ​

Use to compare two values per category on one scale: before and after, plan and actual, two years. One row = one value: x category, series names the pair (required, exactly two values; the first seen is "from", the second "to"), y number. Keep input row order. The first value is a hollow dot, the second a filled dot, and the signed change prints at the right. A missing value leaves one dot and no rule. A repeated category/series pair → E_DUP_KEY. A third series value → E_UNKNOWN_FIELD. Negatives are fine.

Do not use for more than two values per category (bar grouped or line) or for a single value (bar).

x category · y number · series required, exactly two values

Rules. Keep row order. The first series value seen is drawn hollow, the second filled, joined by a rule; the signed change prints at the right. A missing value is a gap (one dot, no rule). A third value or no series → E_UNKNOWN_FIELD. An empty series cell → E_MISSING_VALUE. A repeated category/series pair → E_DUP_KEY.

Example ​

chart
markvis: 2
type: dumbbell
title: Every line got faster after the signal upgrade
unit: min
x: line
y: minutes
series: period

line,period,minutes
Red,before,41
Red,after,36
Gold,before,39
Gold,after,35
Blue,before,33
Blue,after,31
Green,before,24
Green,after,23
Every line got faster after the signal upgrade dumbbell chart. Every line got faster after the signal upgrade. x=line. y=minutes. series=period. unit=min. 8 rows. Every line got faster after the signal upgradeEvery line got faster after the signal upgrade · min RedRed GoldGold BlueBlue GreenGreen 20 25 30 35 40 45 before after -5 -4 -2 -1
Every line got faster after the signal upgrade
lineperiodminutes
Redbefore41
Redafter36
Goldbefore39
Goldafter35
Bluebefore33
Blueafter31
Greenbefore24
Greenafter23

When the block is wrong ​

The rows stay, with one line that names the error.

chart
markvis: 2
type: dumbbell
title: Three periods
x: line
y: minutes
series: period

line,period,minutes
Red,before,41
Red,after,36
Red,later,34
lineperiodminutes
Redbefore41
Redafter36
Redlater34

E_UNKNOWN_FIELD: dumbbell needs exactly two period values (got 3)

Generated from packages/types/dumbbell/ and the type's row in SPEC.md.

0.0.13 lives under legacy/