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; A->>B: Request;
B->>A: Response; B->>A: Response;
``` ```
## Gantt Chart
### Gantt Chart
Visualizes project schedules.
```mermaid ```mermaid
gantt; gantt
title A Gantt Diagram; title A Gantt Diagram
section Section; dateFormat YYYY-MM-DD
A task: a1, 2022-01-01, 30d; section Section
A task :a1, 2022-01-01, 30d
``` ```
### Class Diagram ## Class Diagram
Shows structure of a system by modeling its classes, attributes, operations, and relationships.
```mermaid ```mermaid
classDiagram; classDiagram
Class01 <|-- AveryLongClass : Cool; Class01 <|-- AveryLongClass : Inheritance
Class03 *-- Class04; Class03 *-- Class04 : Association
Class05 .. Class06 : Aggregation
Class07 --|> Class08 : Composition
``` ```
### State Diagram ## State Diagram
Represents state transitions in a system.
```mermaid ```mermaid
stateDiagram; stateDiagram-v2
[*] --> Still; [*] --> Active
Still --> [*]; 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 ```mermaid
pie; pie
"Dogs": 386; title Pets adopted by volunteers
"Cats": 85; "Dogs" : 386
"Cats" : 85
"Rabbits" : 15
``` ```
## Styling ## Styling