mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
chore: Reorder fields in examples
This commit is contained in:
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic System Architecture',
|
||||
isDefault: true,
|
||||
code: `architecture-beta
|
||||
group api(cloud)[API]
|
||||
|
||||
@@ -18,7 +19,6 @@ export default {
|
||||
db:L -- R:server
|
||||
disk1:T -- B:server
|
||||
disk2:T -- B:db`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic Block Layout',
|
||||
isDefault: true,
|
||||
code: `block-beta
|
||||
columns 1
|
||||
db(("DB"))
|
||||
@@ -21,7 +22,6 @@ columns 1
|
||||
ID --> D
|
||||
C --> D
|
||||
style B fill:#969,stroke:#333,stroke-width:4px`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
'Visualize software architecture using the C4 model (Context, Container, Component, Code)',
|
||||
examples: [
|
||||
{
|
||||
title: 'Internet Banking System Context',
|
||||
isDefault: true,
|
||||
code: `C4Context
|
||||
title System Context diagram for Internet Banking System
|
||||
@@ -41,7 +42,6 @@ export default {
|
||||
BiRel(SystemAA, SystemE, "Uses")
|
||||
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
|
||||
Rel(SystemC, customerA, "Sends e-mails to")`,
|
||||
title: 'Internet Banking System Context',
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -6,6 +6,7 @@ export default {
|
||||
description: 'Visualize class structures and relationships in object-oriented programming',
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic Class Inheritance',
|
||||
isDefault: true,
|
||||
code: `classDiagram
|
||||
Animal <|-- Duck
|
||||
@@ -28,7 +29,6 @@ export default {
|
||||
+bool is_wild
|
||||
+run()
|
||||
}`,
|
||||
title: 'Basic Class Inheritance',
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic ER Schema',
|
||||
isDefault: true,
|
||||
code: `erDiagram
|
||||
CUSTOMER ||--o{ ORDER : places
|
||||
ORDER ||--|{ ORDER_ITEM : contains
|
||||
@@ -30,7 +31,6 @@ export default {
|
||||
int quantity
|
||||
float price
|
||||
}`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -6,6 +6,7 @@ export default {
|
||||
description: 'Visualize flowcharts and directed graphs',
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic Flowchart',
|
||||
isDefault: true,
|
||||
code: `flowchart TD
|
||||
A[Christmas] -->|Get money| B(Go shopping)
|
||||
@@ -13,7 +14,6 @@ export default {
|
||||
C -->|One| D[Laptop]
|
||||
C -->|Two| E[iPhone]
|
||||
C -->|Three| F[fa:fa-car Car]`,
|
||||
title: 'Basic Flowchart',
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -6,6 +6,7 @@ export default {
|
||||
description: 'Visualize project schedules and timelines',
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic Project Timeline',
|
||||
isDefault: true,
|
||||
code: `gantt
|
||||
title A Gantt Diagram
|
||||
@@ -16,7 +17,6 @@ export default {
|
||||
section Another
|
||||
Task in sec :2014-01-12 , 12d
|
||||
another task : 24d`,
|
||||
title: 'Basic Project Timeline',
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic Git Flow',
|
||||
isDefault: true,
|
||||
code: `gitGraph
|
||||
commit
|
||||
branch develop
|
||||
@@ -22,7 +23,6 @@ export default {
|
||||
commit
|
||||
checkout main
|
||||
merge feature`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -6,8 +6,8 @@ export default {
|
||||
description: 'Visualize work items in a Kanban board',
|
||||
examples: [
|
||||
{
|
||||
isDefault: true,
|
||||
title: 'Kanban Diagram',
|
||||
isDefault: true,
|
||||
code: `---
|
||||
config:
|
||||
kanban:
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic Mindmap',
|
||||
isDefault: true,
|
||||
code: `mindmap
|
||||
root((mindmap))
|
||||
Origins
|
||||
@@ -24,7 +25,6 @@ export default {
|
||||
Tools
|
||||
Pen and paper
|
||||
Mermaid`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'TCP Packet',
|
||||
isDefault: true,
|
||||
code: `---
|
||||
title: "TCP Packet"
|
||||
---
|
||||
@@ -28,7 +29,6 @@ packet-beta
|
||||
144-159: "Urgent Pointer"
|
||||
160-191: "(Options and Padding)"
|
||||
192-255: "Data (variable length)"`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,11 +7,11 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic Pie Chart',
|
||||
isDefault: true,
|
||||
code: `pie title Pets adopted by volunteers
|
||||
"Dogs" : 386
|
||||
"Cats" : 85
|
||||
"Rats" : 15`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -6,6 +6,7 @@ export default {
|
||||
description: 'Visualize items in a 2x2 matrix based on two variables',
|
||||
examples: [
|
||||
{
|
||||
title: 'Product Positioning',
|
||||
isDefault: true,
|
||||
code: `quadrantChart
|
||||
title Reach and engagement of campaigns
|
||||
@@ -21,7 +22,6 @@ export default {
|
||||
Campaign D: [0.78, 0.34]
|
||||
Campaign E: [0.40, 0.34]
|
||||
Campaign F: [0.35, 0.78]`,
|
||||
title: 'Product Positioning',
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Student Grades',
|
||||
isDefault: true,
|
||||
code: `---
|
||||
title: "Grades"
|
||||
---
|
||||
@@ -19,7 +20,6 @@ radar-beta
|
||||
max 100
|
||||
min 0
|
||||
`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Energy Flow',
|
||||
isDefault: true,
|
||||
code: `---
|
||||
config:
|
||||
sankey:
|
||||
@@ -82,7 +83,6 @@ Tidal,Electricity grid,9.452
|
||||
UK land based bioenergy,Bio-conversion,182.01
|
||||
Wave,Electricity grid,19.013
|
||||
Wind,Electricity grid,289.366`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,12 +7,12 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Basic Sequence',
|
||||
isDefault: true,
|
||||
code: `sequenceDiagram
|
||||
Alice->>+John: Hello John, how are you?
|
||||
Alice->>+John: John, can you hear me?
|
||||
John-->>-Alice: Hi Alice, I can hear you!
|
||||
John-->>-Alice: I feel great!`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -6,6 +6,7 @@ export default {
|
||||
description: 'Visualize events and milestones in chronological order',
|
||||
examples: [
|
||||
{
|
||||
title: 'Project Timeline',
|
||||
isDefault: true,
|
||||
code: `timeline
|
||||
title History of Social Media Platform
|
||||
@@ -14,7 +15,6 @@ export default {
|
||||
: Google
|
||||
2005 : YouTube
|
||||
2006 : Twitter`,
|
||||
title: 'Project Timeline',
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,6 +7,7 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'My Working Day',
|
||||
isDefault: true,
|
||||
code: `journey
|
||||
title My working day
|
||||
section Go to work
|
||||
@@ -16,7 +17,6 @@ export default {
|
||||
section Go home
|
||||
Go downstairs: 5: Me
|
||||
Sit down: 5: Me`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
@@ -7,13 +7,13 @@ export default {
|
||||
examples: [
|
||||
{
|
||||
title: 'Sales Revenue',
|
||||
isDefault: true,
|
||||
code: `xychart-beta
|
||||
title "Sales Revenue"
|
||||
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
||||
y-axis "Revenue (in $)" 4000 --> 11000
|
||||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
||||
line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]`,
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
} satisfies DiagramMetadata;
|
||||
|
Reference in New Issue
Block a user