Markdown radar chart maker
Make a radar chart to compare a few things across the same set of axes. Name the spokes, then give each curve one number per axis in a Mermaid block.
Mermaid radar chart syntax
A radar chart is a title, a set of axes and one or more curves. The axes are the spokes around the wheel. Each curve gives one number per axis, in the same order as the axes. Here is each piece you can write.
Basic radar
Start with radar-beta. List the axes with axis as a comma separated set of id["Label"] spokes. Add a curve with curve and one value per axis inside braces.
You write
radar-beta
axis speed["Speed"], power["Power"], range["Range"], skill["Skill"]
curve hero["Hero"]{80, 90, 70, 85}
You get
Several curves
Add more curve lines to overlay values on the same axes. Give each curve a label so the legend can name it.
You write
radar-beta
title Skill comparison
axis speed["Speed"], power["Power"], range["Range"], skill["Skill"]
curve hero["Hero"]{80, 90, 70, 85}
curve rival["Rival"]{60, 75, 85, 70}
You get
Set the scale
Add max and min to fix the range of the rings. Values then read against the same scale on every axis.
You write
radar-beta
title Coverage
axis a["Docs"], b["Tests"], c["Speed"]
curve now["Now"]{6, 4, 8}
max 10
min 0
You get
Cheat sheet
| Write this | You get |
|---|---|
radar-beta | Start a radar chart |
title Text | Name the chart |
axis id["Label"], id2["Label2"] | Define the spokes, in order |
curve id["Label"]{1, 2, 3} | A curve with one value per axis |
max 100 | Set the outer ring value |
min 0 | Set the centre value |