Macro spacegraph


Create a graphical overview of wiki pages in a Confluence space.


All parameters are optional.

spaceKey of space to create image for. Current space will be used if empty.

Title of page that will be treated as root.
Only its descendants will be shown in graph.

  • @self  the current page will be used
  • pagetitle
  • spacekey:pagetitle (parameter space will be ignored)

Number of levels descendents will be shown.
0 means only root pages
1 show only direct children of root pages
2 ....


Color of nodes either as

(available since 5.4.2)

nodeFontsizeFontsize to be used in graph.
directionTB - Top to bottom
LR - Left to right (default)

Displays metadata created with Metadata Plugin

  • @all to show all metadata
  • comma separated list of metadata keys to show

(available since 5.3.1)


PNG (default)

SVG (beta)

exportNameThe graph will be stored as attachment if exportName is given.

true = Enable debugging.


  • PNG images do not contain links to the pages that are displayed in the graph

Security Considerations

The spacegraph macro shows only pages which are visible for the current user.
However, if exportName is given, the image will be created as an attachment. This image contains all pages, which were visible to the user who viewed the page when the attachment was created.

Sample Images

Graph of complete spaceGraph restricted to depth 2Root page defined

Graph with direction top to bottom

Metadata are shown below page title

Sample Code


Macro Browser

spacegraph macro in macro browser