Versions Compared

Key

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

Graphviz diagrams provide a simple and easy way to add customized diagrams into your Jira issue. As a user, you can create Graphviz diagrams dynamically either by using simple DOT language or an attachment with DOT code. You can save the diagram as an attachment, and preview, edit, or remove your diagrams based on your project requirements.

This page explains how to manage Graphviz diagrams in a Jira issue.

Create Graphviz diagram

To create a Graphviz diagram in a Jira issue:

  1. Navigate to the intended issue in which you want to create a diagram.
  2. Click Graphviz from the menu options to see the Graphviz for Jira section in the new Jira issue view.
  3. Click Graphviz from the menu options again or Add a Graphviz diagram in the Graphviz for Jira section to navigate section to navigate to the Graphviz Diagrams for Jira window for further edits.
    Image Modified
  4. Add your settings in the Graphviz Diagrams for Jira window:
    Image Added
    • Create diagram from: Lists the following options to create the diagram from:
      • Create a new diagram from scratch: Select this option to to generate a new diagram by entering DOT syntax in the window
      • Import an existing diagram from an attachment:

    Image Removed
    • Graphviz source attachment: Lists the DOT files
      • Select this option to display a diagram based on an attachment containing DOT syntax.
    • Content (Displayed only when Create a new diagram from scratch is selected): Text area where you specify the DOT language. Enter the intended text or simple expression that defines the diagram.
      For example: Enter the following simple DOT code:

      Code Block
      digraph {
      	A -> B -> C;
      	B -> D;
      	D -> B [color=blue];
      }

      This results in the following output:
      Image Added
      For more example diagram types and DOT codes, refer to Graphviz diagram types

    • Graphviz source attachment (Displayed only when Import an existing diagram from an attachment is selected): Lists the files attached to the issue. Select an attachment from the available list only when you want to create a diagram using the code in this specific attachment. By default, the value is set to None.
      Refer to this example for more details.Graphviz output attachment name: Name of the output attachment. Enter a name to be assigned to the attachment that is the output of the DOT code specified. This attachment is attached to the issue and can be downloaded.
    • Layout: Lists the available diagram layouts. Select a value from the available list to render the diagram in the specified layout.
      • dot (default) - hierarchical or layered drawings for directed graphs
      • neato - spring model layouts for undirected graphs

      • twopi - radial layouts for graphs

      • circo - circular layouts for graphs

      • fdp - spring model layouts for undirected graphs
        For some example layouts, refer to Graphviz diagram layouts.
    • Content: Text area where you specify the DOT language. Enter the intended text or simple expression that defines the diagram.
      For example: Enter the following simple DOT code:

      Code Block
      digraph {
      	A -> B -> C;
      	B -> D;
      	D -> B [color=blue];
      }

      This results in the following output:
      Image Removed
      For more example diagram types and DOT codes, refer to Graphviz diagram types

    Click Preview to
    • Graphviz output attachment name: Name of the output attachment. Enter a name to be assigned to the attachment that is the output of the DOT code specified. This attachment is attached to the issue and can be downloaded.
  5. Click the Preview (Image Added) icon on the top right corner of the Content field to preview the diagram before saving the settings.

    Note

    Notice that any :

    • This option is available only when Create a new diagram from scratch is selected.
    • Any errors in the specified code are listed
    below the Preview button
    • to the right of the window as displayed in the GIF in step 4.


  6. Click Save to save the settings and navigate back to the issue to view the output diagram or or click Cancel to cancel creating diagrams.

    Note

    Notice that any errors in the specified code are listed in listed in the Graphviz for Jira section of the issue.


Info

Step 2 and 3 refer to the new Jira issue view. In the old Jira issue view, replace step 2 and 3 with the following step:

Click Add a Graphviz diagram as shown in the following image to navigate to the to the Graphviz Diagrams for Jira window for further edits:


Edit or delete Graphviz diagram

To edit or delete a Graphviz diagram associated with an issue:

  1. Navigate to the intended Jira issue.
  2. In the Graphviz for Jira section of the issue, look for icons below icons below the Graphviz diagram:
    Image RemovedImage Added
    • Click the edit (Image Modified) icon to edit the respective settings in the Graphviz Diagrams for Jira window.
    • Click the delete (Image Modified) icon delete the diagram.

For more information on Graphviz usage details, refer to Graphviz resources.