mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-24 02:37:05 +02:00
Update README.md
Added an image example of a sequence diagram
This commit is contained in:
38
README.md
38
README.md
@@ -8,18 +8,46 @@ Ever wanted to simplify documentation and avoid heavy tools like Visio when expl
|
|||||||
This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.
|
This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.
|
||||||
|
|
||||||
The code below would render the following image
|
The code below would render the following image
|
||||||
|
<table>
|
||||||
```
|
<tr><td>
|
||||||
|
<pre>
|
||||||
graph TD;
|
graph TD;
|
||||||
A-->B;
|
A-->B;
|
||||||
A-->C;
|
A-->C;
|
||||||
B-->D;
|
B-->D;
|
||||||
C-->D;
|
C-->D;
|
||||||
```
|
</pre>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
would render this lovely chart:
|
would render this lovely chart:
|
||||||
|
|
||||||

|
<img src='http://www.sveido.com/mermaid/img/ex1.png' alt='Example 1'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<pre>
|
||||||
|
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!
|
||||||
|
</pre>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
would render this lovely chart:
|
||||||
|
|
||||||
|
<img src='http://www.sveido.com/mermaid/img/seq1.png' alt='Example 2'>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
A page with a live example can be seen [here](http://www.sveido.com/mermaid/demo/html/web.html). You can also look at mermaid in action using [jsbin](http://jsbin.com/faxunexeku/1/edit?html,output). If you want a live demo, there is an editor provided in the mermaid project or you can simply look at this [great editor](http://danielmschmidt.github.io/mermaid-demo/)
|
A page with a live example can be seen [here](http://www.sveido.com/mermaid/demo/html/web.html). You can also look at mermaid in action using [jsbin](http://jsbin.com/faxunexeku/1/edit?html,output). If you want a live demo, there is an editor provided in the mermaid project or you can simply look at this [great editor](http://danielmschmidt.github.io/mermaid-demo/)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user