This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.

Graphviz Plugin

Description | Graphviz Resources | Macros | Dependencies | Version History | Open Issues


Name Graphviz Plugin
Vendor Atlassian Software Systems and other contributors (Website)
Authors Bob Swift, Atlassian
Homepage http://confluence.atlassian.com/display/CONFEXT/Graphviz+Plugin
Issue Management http://developer.atlassian.com/jira/browse/GVIZ
Continuous Integration n/a
Categories Content Macros
Most Recent Version 1.1.0
Availability Confluence v2.4.2 to v2.10
State Stable
Support Unsupported Plugins
License Freeware / Open Source (BSD)
Price Free
Release Docs http://confluence.atlassian.com/display/CONFEXT/Graphviz+Plugin
Java API Docs n/a
Download Source http://svn.atlassian.com/svn/public/contrib/confluence/graphviz-plugin/trunk/
Download JAR graphviz-plugin-1.1.0.jar
JVM requirements Java 1.4 and above
Installation requirements Confluence Repository Client
or upload from Confluence's administration console.
Cannot be installed in /WEB-INF/lib

Description

Macros to display graphs based on Graph Visualization Software (Graphviz) and the DOT language

Graphviz Resources

Macros

Dependencies

Graphviz on Windows

  1. Download and run the Windows installer
    • Defaults to install in C:\Program Files\Graphviz2.16 or similar
    • Automatically adds this to your Windows path
    • Confirm that you can run dot.exe from a newly opened command line
  2. Restart Confluence
  3. Verify it works by creating a page with a simple flowchart macro like:
    {flowchart} 
    A -> B
    {flowchart}
    
    If you get errors about not finding dot.exe
    1. Download the plugin jar file
    2. Unzip the jar to a temporary directory
    3. Edit the graphviz.properties file
      • Replace dot.candidate.paths setting with something like (yes, use forward slashes ):
        dot.candidate.paths=c:/PROGRA~1/Graphviz2.16/bin/dot.exe
        
    4. Zip all files in the temporary directory to create a new jar file
    5. Uninstall the graphviz plugin and re-install your customized version
    6. GVIZ-1 will make this easier

Graphviz on Linux, OS X or Unix

  1. Install the graphviz.rpm, the graphviz-graphs.rpm, and the graphviz-gd.rpm packages
  2. Open the directory GraphViz is installed under and confirm the path
  3. Login as the user who runs Confluence or starts the Confluence service
  4. Append the path to the bin directory of GraphViz to the 'Path' variable

Version History

Version Date Author Notes
1.1.0 15-Jul-2007 Bob Swift release notes
1.0.0 01-Jul-2007 Bob Swift initial release
Previous history

This is a package of the Graphviz macros developed by Atlassian that have been available for a long time. Previous to the availability of this package, the plugin had to be built from the distribution. The package also includes the Graph-from-table Macro that was previously packaged in the obsolete Scripting and External Content Macros.

  • 1.1.0
    When: 15-Jul-2007
    Who: Bob Swift
    What:

Open Issues

Labels

plugin plugin Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 10, 2007

    Luci says:

    I am running Confluence 2.5.4 and installed Graphviz software. But when I type i...

    I am running Confluence 2.5.4 and installed Graphviz software. But when I type in

    {flowchart}
    test->testing
    {flowchart}
    

    It shows
    flowchart: No useable executable name defined in graphviz.properties

    Am I missing something?

    Luci

    1. Jul 10, 2007

      Bob Swift says:

      Copied in the additional instructions necessary for the plugin code to locate th...

      Copied in the additional instructions necessary for the plugin code to locate the Graphviz executable - see information on this page. Sorry about that.

      1. Jul 19, 2007

        Gavin Bee says:

        FYI I had to restart confluence after getting this error and following your inst...

        FYI I had to restart confluence after getting this error and following your instructions.  I found this process confusing ...

  2. Jul 17, 2007

    S. parthasarathy says:

    Hi,  Is there documentation available on the other macros shown for t...

    Hi,

     Is there documentation available on the other macros shown for this  plugin (diagraph, graph..). Graphviz documentation is general on DOT. I am looking for the macro usage (parameters) document.

    TIA,

    Spart

    1. Jul 17, 2007

      Bob Swift says:

      No, that is missing. There are not many parameters, most of the difference has ...

      No, that is missing. There are not many parameters, most of the difference has to do with default dot usage and format differences. The graphviz macro is the most general and gives you complete control over the dot rendering.

  3. Aug 03, 2007

    Lehky, Miro says:

    I have installed the plugin and graphviz. I am able to run graphviz from the com...

    I have installed the plugin and graphviz. I am able to run graphviz from the command line, so it correct installation can be confirmed. When i add the flowchart tag to my page I get the following error.


    Renderer type: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dia dot fig hpgl imap imap_np ismap mif mp pcl pic plain plain-ext ps ps2 svg svgz vml vmlz vtx xdot
     Is thier some additional dependency?

    1. Aug 12, 2007

      Jerry Champlin says:

      I just ran into the same error message.  My problem was that I only install...

      I just ran into the same error message.  My problem was that I only installed the base graphviz rpm.  I added the graphviz-graphs rpm and everything worked as expected.

      1. Aug 14, 2007

        Lehky, Miro says:

        I just tried installing that additional rpm and still have the same problem...

        I just tried installing that additional rpm and still have the same problem.

    2. Aug 13, 2007

      Jim Dibble says:

      I am seeing a similar problem when I use either spacegraph or flowchart macros. ...

      I am seeing a similar problem when I use either spacegraph or flowchart macros.

      {spacegraph} gives me the following error:

      spacegraph: Couldn't run 'dot', make sure it is in your PATH

      {flowchart} gives me the following error:

      Renderer type: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dia dot fig hpgl imap imap_np ismap mif mp pcl pic plain plain-ext ps ps2 svg svgz vml vmlz vtx xdot

      I have verified that dot is installed in /usr/bin, and that /usr/bin is in my PATH, as read by my Confluence Tomcat server. I also installed graphviz-graphs rpm, as suggested above.

      Any ideas?

      1. Aug 16, 2007

        Jim Dibble says:

        Okay, I figured out the problem. On Linux, you must install the graphviz.rpm, th...

        Okay, I figured out the problem. On Linux, you must install the graphviz.rpm, the graphviz-graphs.rpm, and the graphviz-gd.rpm packages. Can you update the instructions above to indicate which pieces need to be installed for Unix/Linux?

        1. Aug 16, 2007

          Bob Swift says:

          Done. Thanks for figuring this out.

          Done. Thanks for figuring this out.

  4. Oct 17, 2007

    Ariel Küchler says:

    Hello I have a problem with the path to the created picture: 1. we have set the...

    Hello
    I have a problem with the path to the created picture:

    1. we have set the context of the war to /conflu/clusterB
    2. we have set the server base url to http://.../conflu/clusterB
    3. no created picture will be shown, the path contains .../clusterb/...

  5. Feb 11, 2008

    Rick Hadsall says:

    I'm on Red Hat Enterprise Linux 4.5 I am getting the: Renderer type: "png" no...

    I'm on Red Hat Enterprise Linux 4.5

    I am getting the:

    Renderer type: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dia dot fig hpgl imap imap_np ismap mif mp pcl pic plain plain-ext ps ps2 svg svgz vml vmlz vtx xdot
     error.  I installed the very latest graphviz from sources.  I have all the extra packages as if it were from RPM. 

     It is still not working for me - can Bob Swift or someone else point me in the right direction?

    Thanks!

  6. Feb 11, 2008

    Bob Swift says:

    Graphviz is coded to produce png images. Some Linux installations do not have p...

    Graphviz is coded to produce png images. Some Linux installations do not have png image support installed. Try installing libpng on your Linux server.
    (updated link to rpms).

    And follow Jim's advice from above:
    On Linux, you must install the graphviz.rpm, the graphviz-graphs.rpm, and the graphviz-gd.rpm packages

    1. Feb 11, 2008

      Rick Hadsall says:

      paehowld200:~>ls /usr/lib/*libpng* 4 lrwxrwxrwx 1 root root 19 Aug ...

      paehowld200:~>ls /usr/lib/*libpng*
      4 lrwxrwxrwx 1 root root 19 Aug 8 2007 /usr/lib/libpng12.so.0 -> libpng12.so.0.1.2.7
      152 -rwxr-xr-x 1 root root 144172 Oct 24 2006 /usr/lib/libpng12.so.0.1.2.7
      4 lrwxrwxrwx 1 root root 18 Aug 8 2007 /usr/lib/libpng.so.2 -> libpng.so.2.1.0.16
      148 -rwxr-xr-x 1 root root 142680 Oct 7 2006 /usr/lib/libpng.so.2.1.0.16
      4 lrwxrwxrwx 1 root root 17 Aug 8 2007 /usr/lib/libpng.so.3 -> libpng.so.3.1.2.7
      4 lrwxrwxrwx 1 root root 19 Aug 8 2007 /usr/lib/libpng.so.3.1.2.7 -> libpng12.so.0.1.2.7
      paehowld200:~>

      Update - decided to install yours too (to /usr/local) :

      paehowld200:/usr/local/confluence/logs>ls /usr/local/lib/*png*
      956 -rw-r-r-  1 x033124 blaze 969032 Feb 11 18:39 /usr/local/lib/libpng12.a
        8 -rwxr-xr-x  1 x033124 blaze    810 Feb 11 18:39 /usr/local/lib/libpng12.la
        4 lrwxrwxrwx  1 x033124 blaze     18 Feb 11 18:39 /usr/local/lib/libpng12.so -> libpng12.so.0.12.0
        4 lrwxrwxrwx  1 x033124 blaze     18 Feb 11 18:39 /usr/local/lib/libpng12.so.0 -> libpng12.so.0.12.0
      536 -rwxr-xr-x  1 x033124 blaze 539912 Feb 11 18:39 /usr/local/lib/libpng12.so.0.12.0
        4 lrwxrwxrwx  1 x033124 blaze     10 Feb 11 18:39 /usr/local/lib/libpng.a -> libpng12.a
        4 lrwxrwxrwx  1 x033124 blaze     11 Feb 11 18:39 /usr/local/lib/libpng.la -> libpng12.la
        4 lrwxrwxrwx  1 x033124 blaze     11 Feb 11 18:39 /usr/local/lib/libpng.so -> libpng12.so
        4 lrwxrwxrwx  1 x033124 blaze     16 Feb 11 18:39 /usr/local/lib/libpng.so.3 -> libpng.so.3.12.0
      552 -rwxr-xr-x  1 x033124 blaze 555968 Feb 11 18:39 /usr/local/lib/libpng.so.3.12.0
      paehowld200:/usr/local/confluence/logs>

      Still nothing.  I stopped and restarted Confluence too.

      1. Feb 11, 2008

        Rick Hadsall says:

        Update: When you compile from source, it includes the two files from graphviz-...


        Update: When you compile from source, it includes the two files from graphviz-gd and the 54 templates from -graphs... it's full kit.

      2. Feb 11, 2008

        Bob Swift says:

        Can you produce png images from the command line using Graphviz? If not, then it...

        Can you produce png images from the command line using Graphviz? If not, then its a graphviz installation problem. If you can, then open an issue here with any log information.

        1. Feb 11, 2008

          Rick Hadsall says:

          Hi Bob, No, I couldn't.  But I did not think it was a plugin error. ...

          Hi Bob,

          No, I couldn't.  But I did not think it was a plugin error.  So I decided to re-compile GraphViz, with the configure line as such:

          ./configure --prefix=/usr/local --with-pngincludedir=/usr/local/include/libpng12 --with-pnglibdir=/usr/local/lib

          Basically, pointing to the version of libpng you recommended that I compiled myself (as opposed to the system's in /usr/lib)... and it worked!

          So thank you for the link into libpng and the suggestions - they helped me work through it. 

  7. Feb 26, 2008

    Craig Fox says:

    Any tips for OSX on Powerpc installation. GraphVIZ 2.14.1 from http://www.ryand...

    Any tips for OSX on Powerpc installation.
    GraphVIZ 2.14.1 from http://www.ryandesign.com/graphviz/

    I get the following error:

    arning: Could not load "/usr/local/graphviz-2.14/lib/graphviz/libgvplugin_pango.4.dylib" - dlopen(/usr/local/graphviz-2.14/lib/graphviz/libgvplugin_pango.4.dylib, 9): Library not loaded: /usr/X11R6/lib/libXrender.1.dylib Referenced from: /usr/local/graphviz-2.14/lib/graphviz/libgvplugin_pango.4.dylib Reason: image not foundWarning: Could not load "/usr/local/graphviz-2.14/lib/graphviz/libgvplugin_pango.4.dylib" - dlopen(/usr/local/graphviz-2.14/lib/graphviz/libgvplugin_pango.4.dylib, 9): Library not loaded: /usr/X11R6/lib/libXrender.1.dylib Referenced from: /usr/local/graphviz-2.14/lib/graphviz/libgvplugin_pango.4.dylib Reason: image not foundRenderer type: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dot fig gd gd2 gif gtk imap imap_np ismap pdf plain plain-ext png ps ps2 svg svgz vml vmlz vrml wbmp xdot xlib

  8. Mar 06, 2008

    RakSik jungrs says:

    Hello I'm Confluence Korean user. I'm using Graphviz plugin on our Confluence(v...

    Hello I'm Confluence Korean user.

    I'm using Graphviz plugin on our Confluence(ver2.7)

    Our server environment is

    Confluence(ver2.7), 
    Graphviz plugin(Ver1.1.0)
    graphviz(Ver2.8)
    Fedora Core6,
    Tomcat5.5.23,
    Mysql5.0.27. 


    Our server is installed graphviz(Ver2.8)

    when we use

    Unknown macro: {graphviz}

    macro some problem occured.
    I write Confluenc Page with

    macro like

    Unknown macro: {graphviz}

    digraph G
    {
    node1;
    node2;
    node3;
    node1 -> node2 [label="edge_1_2"];
    node1 -> node3 [label="edge_1_3"];
    node2 -> node3 [label="edge_2_3"];
    }

    It had not problem.

    But I using Korean Hangul has Some problem

    Unknown macro: {graphviz}

    digraph G{
    node1;
    node2;
    node3;
    가[fontname="Gulim.ttc"] ;
    나[fontname="Gulim.ttc"] ;
    node1 -> node2 [label="edge_1_2"];
    node1 -> node3 [label="edge_1_3"];
    node2 -> node3 [label="edge_2_3"];
    가 -> 나
    }

    The error messge is
    Syntax Error:

    Unknown macro: { node1; node2; node3; >>> & <<< #44032;[fontname="Gulim.ttc"]; 나[fontname="Gulim.ttc"]; node1 -> node2 [label="edge_1_2"]; node1 -> node3 [label="edge_1_3"]; node2 -> node3 [label="edge_2_3"]; 가 -> 나; }

    digraph G

    Unknown macro: { node1; node2; node3; 가[fontname="Gulim.ttc"]; 나[fontname="Gulim.ttc"]; node1 -> node2 [label="edge_1_2"]; node1 -> node3 [label="edge_1_3"]; node2 -> node3 [label="edge_2_3"]; 가 -> 나; }

    and
    I create a file 'test.png' using by dot on the commad line for generate a image.
    #vi test.dot
    #add line
    digraph G{
    node1;
    node2;
    node3;
    가[fontname="Gulim.ttc"] ;
    나[fontname="Gulim.ttc"] ;
    node1 -> node2 [label="edge_1_2"];
    node1 -> node3 [label="edge_1_3"];
    node2 -> node3 [label="edge_2_3"];
    가 -> 나
    }
    #w!
    #touch test.png
    #dot -Tpng test.dot -o test.png




    It has no problem when I try to generate image file(test.png).
    but Confluence page occur syntax error and not visible

    How do I make successful using by Graphviz plugin with Confluence in Korean(Hangule)
    I can't recognize syntax error in this error messages,
    please check and fix it.

    Thanks

  9. Apr 02, 2008

    Royce Wong says:

    Great plugin! Thanks Bob. (Solaris 8, JBoss, Confluence 2.7.1)

    Great plugin! Thanks Bob. (Solaris 8, JBoss, Confluence 2.7.1)

  10. Apr 25, 2008

    Jeff Tanner says:

    Correct me if I am wrong. My problem I believe is similar as others before me. ...

    Correct me if I am wrong.

    My problem I believe is similar as others before me.

    I create a Graphviz image. Within Ubuntu, I then right click the Graphviz generated image in a Mozilla browser and save image to the 'Desktop'.
    I then try to open the generated image in the same browser, it fails and displays the following message:

    The image "*test.png" cannot be displayed, because it contains errors.

    I can save other png files not generated by Graphviz and view them later with no problems.

    One of the previous comments was to:

    re-compile GraphViz, with the configure line as such:

    ./configure --prefix=/usr/local --with-pngincludedir=/usr/local/include/libpng12 --with-pnglibdir=/usr/local/lib

    Is this the correct action for my problem?

    Thanks

    Jeff in Seattle

  11. Sep 08

    Ximon Eighteen says:

    Hi Bob, We've been running the GraphViz plugin version 1.1.0 under Confluence 2...

    Hi Bob,

    We've been running the GraphViz plugin version 1.1.0 under Confluence 2.7.3 for quite some time now without problems.

    Recently the plugin started intermittently reporting dot cannot be found errors. This was some weeks ago and at the time I checked this page and checked everything I could think of on the server, tried making the .properties file change, etc. but it didn't help and I wouldn't expect it to - graphviz was still intermittently working fine, and had been working fine for ages with no changes on the server.

    Yesterday I finally had the chance to do load testing on the server to see if that affects the plugin. Sure enough, as soon as a high load is placed on the server (in this case 100 fake users each requesting the index of a randomly chosen space and then sleeping between 1 and 60 seconds, again chosen at random) the graphviz plugin started reporting dot not found errors.

    I took a look at the source code and discovered that the dot not found error is reported and passes on the actual IOException, but that I don't know where this "ioe" exception data can be seen. I tried to build the plugin from sources (from http://svn.atlassian.com/svn/public/contrib/confluence/graphviz-plugin/trunk) to see if I could debug it but ran into problems at this error:

    confluence\extra\graphviz\SpaceGraphMacro.java:[23,40] package org.randombits.confluence.support does not exist

    This error appears to be because RandomBits.org was bought out by CustomWare.net and the plugins / libraries were rehomed. Every page using the graphviz macro failed the same way and the only way to fix it was to restart Confluence.

    So, something in the plugin is failing with an IOException, but I don't know how to see what that exception is. The source code I am referring to is in DotRunner.java here:

    catch (IOException ioe)
            {
                throw new MacroException("Couldn't run '" + verifiedDotExecutableName + "', make sure it is in your PATH", ioe);
            }
    

    Cheers,

    Ximon

    1. Sep 08

      Bob Swift says:

      It is probably a timeout on the running of the dot. Sorry, don't have time at th...

      It is probably a timeout on the running of the dot. Sorry, don't have time at the moment to deal with it. Please write up as bug.

  12. Oct 02

    Cynthia Pepper says:

    I modified the graphviz.properties file to match the installation, then used jar...

    I modified the graphviz.properties file to match the installation, then used jar.exe to create a new jar, but now confluence raises errors when I try to load the plugin.  Confluence is installed on Windows, and I'm using a personal license for testing. If anyone has suggestions I would be grateful.

  13. Oct 27

    Roberto Dominguez says:

    For people running solaris, Graphviz is included in the Solaris 10 Software Comp...

    For people running solaris, Graphviz is included in the Solaris 10 Software Companion CD 3/05 (at least). You can also download it from http://www.sun.com/software/solaris/freeware/

    I just installed it from 3/05 on a new T1000 and it worked like a charm.