Skip to end of banner
Go to start of banner

How to nest a macro within Graphviz

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

Description

This article illustrates how you can nest a macro that generates a dot code within Graphviz macro (in this case, the Graph macro), to create a diagram. 

Steps

  1. Create a new page.
  2. Enter {graph and select the flowchart macro. Alternatively, from the toolbar at the top, click Insert more content > Other macros > Flowchart macro. 

    In this example, we nest the macro body within the Graph Macro.

      3. Nest the macro body or the sample Source code within the flowchart macro as shown below:  

 


4. Enable Render wiki markup macros in body.

               

      5. Click Save to publish the page.

For Diagraphs and Space graphs, you will have to nest macros that generate diagraph commands.

Source

{beanshell} 
out.println("A -- B");
out.println("B -- C");
out.println("C -- A");
out.println("D -- B");
out.println("D -- C");
{beanshell}

Diagram



  • No labels