Update docs/random_docs/Mermaid.md

This commit is contained in:
2024-03-02 21:03:11 +00:00
parent 1006491f36
commit 4e96fde413

View File

@@ -419,46 +419,45 @@ sequenceDiagram;
A->>B: Request;
B->>A: Response;
```
### Gantt Chart
Visualizes project schedules.
## Gantt Chart
```mermaid
gantt;
title A Gantt Diagram;
section Section;
A task: a1, 2022-01-01, 30d;
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2022-01-01, 30d
```
### Class Diagram
Shows structure of a system by modeling its classes, attributes, operations, and relationships.
## Class Diagram
```mermaid
classDiagram;
Class01 <|-- AveryLongClass : Cool;
Class03 *-- Class04;
classDiagram
Class01 <|-- AveryLongClass : Inheritance
Class03 *-- Class04 : Association
Class05 .. Class06 : Aggregation
Class07 --|> Class08 : Composition
```
### State Diagram
Represents state transitions in a system.
## State Diagram
```mermaid
stateDiagram;
[*] --> Still;
Still --> [*];
stateDiagram-v2
[*] --> Active
Active --> Inactive
Active --> [*]
```
### Pie Chart
## Pie Chart
Visualizes numerical proportions.
Pie charts are not supported in some versions of Mermaid. If your renderer supports them, the syntax usually looks like this, but it's less commonly used and might not work in all environments:
```mermaid
pie;
"Dogs": 386;
"Cats": 85;
pie
title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rabbits" : 15
```
## Styling