# Usage

## Mermaid UML Diagrams

> **Please make sure the Jira Server can connect to** [**https://app-nwtmwlxsha-uk.a.run.app**](https://app-nwtmwlxsha-uk.a.run.app/). **We use this Web Service to render the diagrams.**

This app renders Mermaid UML diagrams inside Jira Wiki Editor. The Mermaid UML content must be wrapped inside the **{uml}…{uml}** macro. **For Jira 7+, the macros have to be used in Text mode and not Visual mode**.

Mermaid (<https://mermaid-js.github.io/mermaid/#/>) allows you to define UML diagrams in plain-text format just like Markdown. For a live editor to draft your diagrams, please try <https://mermaidjs.github.io/mermaid-live-editor>.

As an example, after the app is installed, please paste the following text into Issue Description:

```
{uml}
sequenceDiagram
    participant Alice
    participant Bob
    Alice->>John: Hello John, how are you?
    loop Healthcheck
        John->>John: Fight against hypochondria
    end
    Note right of John: Rational thoughts <br />prevail!
    John-->>Alice: Great!
    John->>Bob: How about you?
    Bob-->>John: Jolly good!
{uml}
```

**For Jira 7+, the macros have to be used in Text mode and not Visual mode**.

![Mermaid UML Diagrams and Graphviz Diagrams for Jira](https://fulstech.files.wordpress.com/2020/06/image-1.png?w=985)

All Mermaid UML content will be rendered as below.

![Mermaid UML Diagrams and Graphviz Diagrams for Jira](https://fulstech.files.wordpress.com/2020/06/image-2.png?w=927)

## Graphviz Diagrams

This app renders Graphviz diagrams inside Jira Wiki Editor. The Graphviz content must be wrapped inside the **{graphviz}…{graphviz}** macro. **For Jira 7+, the macros have to be used in Text mode and not Visual mode**.

As an example, after the app is installed, please paste the following text into Issue Description:

```
{graphviz}
graph {
  a -- b;
  b -- c;
  a -- c;
  d -- c;
  e -- c;
  e -- a;
}
{graphviz}
```

**For Jira 7+, the macros have to be used in Text mode and not Visual mode**.

![Mermaid UML Diagrams and Graphviz Diagrams for Jira](https://fulstech.files.wordpress.com/2017/09/jira-graphviz-21.png)

All Graphviz content will be rendered as below.

![Mermaid UML Diagrams and Graphviz Diagrams for Jira](https://fulstech.files.wordpress.com/2017/09/jira-graphviz-3.png)

## Examples

### Flowchart

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUs_oJC5DKeT_xwaTh%2Fimage.png?alt=media\&token=94e6b7d1-77b2-4ee6-9eea-00fe0fbbfc71)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUsTB67Zzejr2H4_ix%2Fimage.png?alt=media\&token=ae87cf01-b1ca-4500-9827-9034d97fc5d5)

### Sequence diagram

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUt7A6iSpie9PjLF-i%2Fimage.png?alt=media\&token=e746b422-fef0-4368-bd7b-a252265ac363)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUtBY2X0MnGmhJKOLL%2Fimage.png?alt=media\&token=0206ec30-8687-4f53-89b5-6111c666c5da)

### Class diagram

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUtPxZdjWnLtLgMDOa%2Fimage.png?alt=media\&token=a307986f-5002-4e89-b6f4-0980bb59cabb)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUtUk8BHzvDUht9xnn%2Fimage.png?alt=media\&token=28e3105a-112b-4ee1-93a1-2203ab2d2096)

### State diagram

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUufn7vwHI3fiuKHaA%2Fimage.png?alt=media\&token=7cd1529b-370b-4054-8d29-7ab298145c7b)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUumhDeQZ2kQxTo1Fn%2Fimage.png?alt=media\&token=4937594d-ea49-4c09-b719-f19c712e6bc5)

### Entity Relationship diagram

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUvh77jxn3mARGgUs_%2Fimage.png?alt=media\&token=15a9ac1e-aa21-41d2-9e17-cb2dd26509cc)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUvpdC914gXn4hqarl%2Fimage.png?alt=media\&token=da011787-5a84-49aa-befd-169c77b5d13c)

### User Journey

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUwDTjvsSHr9eax5Pj%2Fimage.png?alt=media\&token=7241a393-80f8-45d5-8d4f-23c76dcea25c)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUw2SBrfqtDtpA1qwA%2Fimage.png?alt=media\&token=276f7c3b-5df0-44d4-a579-8ac0662781d4)

### Gantt chart

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUwPRZIOUt2hEouqs9%2Fimage.png?alt=media\&token=c4c63822-488f-488a-8447-3c112c0d9745)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUxZGa1aXEX2ofWSzw%2Fimage.png?alt=media\&token=adf9c251-3348-42fe-bcd5-08200a776351)

### Pie chart

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUxi6MQEgwoEVhbI9_%2Fimage.png?alt=media\&token=16851619-4086-425a-a931-005e8daff9e6)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkUxneKvSlit2HRyFkX%2Fimage.png?alt=media\&token=1abdc564-c7d1-4239-b088-baa03cc09308)

### Graphviz

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkV-HNYNfQL2UGqPWwV%2Fimage.png?alt=media\&token=5a9b9cc4-fbea-4c7a-85c0-cdc0458f125c)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUqSU20h9QeWFSdumV%2F-MkV-N7fwU-m-YhHdb6V%2Fimage.png?alt=media\&token=0a19e492-6846-4e52-a25b-62ac3dccfcd1)
