Venn diagrams in Confluence

A Venn diagram shows sets as circles and what they share where the circles overlap.

Last updated

When to use it

Use a Venn diagram to explain overlap: what unit, integration and end-to-end tests each cover, which skills two roles share, where two products compete. Two or three sets read well; more than that becomes hard to follow.

Example

This is the code of the Testing strategy template: three test levels with what each covers alone and together.

venn-beta
  title Testing strategy
  set Unit
    text U1["Domain logic"]
  set Integration
    text I1["Database queries"]
  set EndToEnd["End-to-end"]
    text E1["Critical user flows"]
  union Unit,Integration["API contract"]
  union Unit,Integration,EndToEnd["Payment flow"]

Vellnar Diagrams draws it like this:

Change a line and the diagram changes with it. Nobody needs the original drawing file, because there is none: the code is the diagram.

Add it to a Confluence page

  1. Edit a Confluence page and type /mermaid where the diagram should go.
  2. Select Mermaid diagram. The editor opens with the template list.
  3. Pick a template, or choose Start blank and paste the code above. The preview follows every keystroke.
  4. Choose Save. The diagram appears on the page.

The documentation covers the editor, the settings and the exports.

Templates

The Templates button in the editor has one Venn diagram ready to use:

  • Testing strategy: Three test levels with what each covers alone and together.

Syntax

The code of a Venn diagram starts with venn-beta. The Mermaid documentation describes every element of the syntax. Vellnar Diagrams draws it with Mermaid 12.3; if a line has an error, the editor marks the line and keeps the last valid diagram on screen.

More

  • Mermaid in Confluence: how diagrams as code work in a page, and every diagram type.
  • Security: the app asks for no permissions and sends nothing outside Atlassian.