This page last changed on Mar 01, 2007 by david.soul@atlassian.com.

Spacegraph Macro

Usage: {spacegraph:space key}
Description: Displays a chart of the pages in a space and their connections.
Example:
{spacegraph:ds}
Input: optional space key, defaults to space of current page.
Output: A chart of the space.
Bundled with Confluence?: Yes

This macro requires that GraphViz is installed. You should perform the default installation for your operating system. See the Enable The Flowchart Macro for Graphviz configuration information.

For details on composing diagrams, see the GraphViz Documentation.

This macro is shipped with Confluence as source, to use it you need to build the 'graphviz' plugin. To do this, you need to install ant and run the command:

ant -Dlibrary=graphviz install

from the plugins directory.

The links of the spacegraph macro are not correctly generated. Theres always a /confluence/ path after the server address even if the baseurl is http://server.com

private void addPage(StringBuffer buf, String spaceKey, String pageTitle, String prefix)
    {
        String label = (prefix + pageTitle).replaceAll(" +", "\\\\n");
        buf.append("\"").append(prefix).append(pageTitle)
                .append("\" [URL=\"/confluence/display/" + spaceKey + "/" + GeneralUtil.urlEncode(pageTitle) + "\", label=\"" + label + "\"];");
    }
Posted by phil at Jun 16, 2005 06:55

Thanks for pointing that out Philip! It will be fixed in 1.4.2

Posted by tom@atlassian.com at Jun 16, 2005 18:59

Is this bundled with 1.4.2? I don't see this macro!

Posted by at Aug 05, 2005 10:51

You need to build the graphviz plugin – I've revised the documentation above.

Posted by tom@atlassian.com at Aug 07, 2005 23:47

Wonder if we can get an example here:

Unknown macro: {spacegraph}
Posted by refux at Aug 21, 2005 09:02

Followed the instructions but get an error -
Any ideas? Would be nice to see an example  

Posted by mark.page@gmail.com at Feb 28, 2006 08:47

How about saying what error you received . There is a pre-build jar attached to Flowchart Macro and some discussions of other errors.

Posted by bob.swift@lakeviewtech.com at Feb 28, 2006 09:55

Apologies Bob, my post was pretty poor.

I meant to say that the I had the same error Refux (above). I have since resolved it though.

Thanks for the interest though

Posted by mark.page@gmail.com at Mar 20, 2006 13:21

Forgive the cross post from the flowchart plugin page: I was getting an error that the macros could not find the dot executable. What I did to fix this, on Fedora Core 4, was:

1. In the config file /opt/confluence/plugins/graphviz/src/etc/graphviz.properties, specify the path to dot, which in my case was /usr/bin/dot

2. Recompile the plugin using Ant, from the plugins directory

3. Restart confluence and test

Works just fine now.

FYI,
Rick Cogley
Tokyo Japan

Posted by rick.cogley@esolia.co.jp at Dec 19, 2006 23:01
Document generated by Confluence on Mar 22, 2007 20:55