Charts
The chart family renders a real chart shape rather than a node diagram. The
header is chart <type>, or a bare pie / radar, where <type> is one of
bar line area scatter pie donut radar (column and xychart map to bar,
doughnut to donut).
chart bar
title: Quarterly revenue
y-axis: USD (k)
categories: Q1, Q2, Q3, Q4
Revenue : 100, 150, 120, 180
Profit : 20, 30, 25, 40
Two input modes#
- With
categories:(the category-axis labels), eachName : v1, v2, …row is a series whose values line up with the categories. - Without
categories:, eachLabel : valuerow is a category, the pie or single-series form.
pie
title: Traffic by source
Search : 386
Direct : 210
Social : 85
Referral : 40
Directives and flags#
Directives: title:, x-axis: (alias x:), y-axis: (alias y:), and
categories: (aliases axis:, labels:). Bare flags: stacked, horizontal,
showValues (aliases values, showData).
chart bar
title: Headcount by team
stacked
showValues
categories: Eng, Sales, Ops
Full-time : 24, 12, 8
Contract : 6, 4, 3
Chart types#
chart line
title: Weekly active users
x-axis: Week
categories: W1, W2, W3, W4, W5
This year : 40, 52, 61, 70, 82
Last year : 35, 38, 44, 50, 55
chart area
title: Storage used
categories: Jan, Feb, Mar, Apr
Free : 40, 35, 30, 20
Paid : 60, 70, 85, 110
radar
title: Skill assessment
categories: Speed, Power, Range, Control, Stamina
Player A : 80, 70, 60, 90, 75
Player B : 60, 85, 80, 55, 90
chart donut
title: Market share
Us : 42
Rivals : 33
Others : 25
A horizontal bar chart ranks survey answers, longest first.
chart bar
title: Favourite editor
horizontal
showValues
categories: VS Code, Vim, JetBrains, Emacs, Other
Responses : 512, 214, 188, 96, 61