mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-02 02:24:20 +01:00
Merge branch 'develop' into timeline
* develop: (45 commits) Showcase section to the docs - keepings docs up to date (#4055) bugfix: add missing d3 curves to flowchart and docs fix(deps): update dependency dagre-d3-es to v7.0.8 build(pre-commit): cache eslint in pre-commit build(lint): cache eslint with strategy content Update cypress/integration/rendering/sequencediagram.spec.js feat(er): allow leading underscore for attributes name ci(lint): show nice error on lint failure chore: add moment to dependencies Update docs Update mindmap.md chore: remove moment-mini docs(readme-ch): fix twitter link build(lint): cache prettier on `pnpm run lint` fix: moment-mini default exporter docs(readme): update broken twitter badge test(er): improve tests on multiple key constraints Fixes Typo, remove console.log doc(er): add documentation on multiple key constraints feat(er): allow multiple constraints on attributes ...
This commit is contained in:
@@ -71,6 +71,44 @@
|
||||
</pre>
|
||||
<hr />
|
||||
|
||||
<pre class="mermaid">
|
||||
erDiagram
|
||||
"HOSPITAL" {
|
||||
int id PK
|
||||
int doctor_id PK, FK
|
||||
string address UK
|
||||
string name
|
||||
string phone_number
|
||||
string fax_number
|
||||
}
|
||||
</pre
|
||||
>
|
||||
<hr />
|
||||
|
||||
<pre class="mermaid">
|
||||
erDiagram
|
||||
CAR ||--o{ NAMED-DRIVER : allows
|
||||
CAR {
|
||||
string registrationNumber PK
|
||||
string make
|
||||
string model
|
||||
string[] parts
|
||||
}
|
||||
PERSON ||--o{ NAMED-DRIVER : is
|
||||
PERSON {
|
||||
string driversLicense PK "The license #"
|
||||
string(99) firstName "Only 99 characters are allowed"
|
||||
string lastName
|
||||
string phone UK
|
||||
int age
|
||||
}
|
||||
NAMED-DRIVER {
|
||||
string carRegistrationNumber PK, FK
|
||||
string driverLicence PK,FK
|
||||
}
|
||||
MANUFACTURER only one to zero or more CAR : makes
|
||||
</pre>
|
||||
|
||||
<script src="./mermaid.js"></script>
|
||||
<script type="module">
|
||||
mermaid.initialize({
|
||||
|
||||
@@ -128,6 +128,22 @@
|
||||
</pre>
|
||||
<hr />
|
||||
|
||||
<pre class="mermaid">
|
||||
sequenceDiagram
|
||||
box lightgreen Alice & John
|
||||
participant A
|
||||
participant J
|
||||
end
|
||||
box Another Group very very long description not wrapped
|
||||
participant B
|
||||
end
|
||||
A->>J: Hello John, how are you?
|
||||
J->>A: Great!
|
||||
A->>B: Hello Bob, how are you ?
|
||||
</pre
|
||||
>
|
||||
<hr />
|
||||
|
||||
<script src="./mermaid.js"></script>
|
||||
<script>
|
||||
mermaid.initialize({
|
||||
|
||||
@@ -161,12 +161,19 @@
|
||||
First --> Second
|
||||
First --> Third
|
||||
|
||||
state First {
|
||||
state "the first composite" as First {
|
||||
[*] --> 1st
|
||||
1st --> [*]
|
||||
state innerFirst {
|
||||
state "1 in innerFirst" as 1st1st
|
||||
1st2nd: 2 in innerFirst
|
||||
[*] --> 1st1st
|
||||
1st1st --> 1st2nd
|
||||
%% 1st2nd --> 1st
|
||||
}
|
||||
1st --> innerFirst
|
||||
innerFirst --> 2nd
|
||||
}
|
||||
state Second {
|
||||
[*] --> 2nd
|
||||
2nd --> [*]
|
||||
}
|
||||
state Third {
|
||||
|
||||
Reference in New Issue
Block a user