Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 Graph macro. 

    Noteinfo

    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 Graph macro as shown below:  

 Image RemovedImage Added

4. Enable Render wiki markup macros in body.

           

Image Removed

Image Added    

     

5. Click Save to publish the page.

note
Info

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

Diagram


Source

{
groovy
beanshell}
println '
out.println("A --
> B' println 'B -> C' println 'C -> A' println 'D -> B' println 'D -> C' {groovy}
 D");
out.println("B -- C");
out.println("C -- A");
out.println("D -- C");
out.println("C -- E");
out.println("B -- E");
{beanshell} 

Diagram

Image Added