graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
graph LR
A[Rectangle] --> B(Round edges)
B --> C((Circle))
C --> D{Diamond}
D --> E>Flag]
E --> F[/Parallelogram/]
graph TD
A[Start] --> B[Process]
B --> C[End]
style A fill:#e1f5fe
style B fill:#fff3e0
style C fill:#e8f5e8
sequenceDiagram
participant A as Alice
participant B as Bob
A->>B: Hello Bob!
B-->>A: Hello Alice!
sequenceDiagram
participant U as User
participant S as System
participant D as Database
U->>S: Login Request
activate S
S->>D: Validate User
D-->>S: User Valid
S-->>U: Login Success
deactivate S
Note over U,S: User is now logged in
classDiagram
class Animal {
+String name
+int age
+makeSound()
}
class Dog {
+String breed
+bark()
}
Animal <|-- Dog
classDiagram
class BankAccount {
+String owner
+Decimal balance
-String accountNumber
#validateTransaction()
+deposit(amount)
+withdraw(amount)
}
class SavingsAccount {
+Float interestRate
+calculateInterest()
}
BankAccount <|-- SavingsAccount
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
PRODUCT ||--o{ LINE-ITEM : "ordered in"
erDiagram
CUSTOMER {
int customer_id PK
string first_name
string last_name
string email
}
ORDER {
int order_id PK
int customer_id FK
date order_date
decimal total_amount
}
CUSTOMER ||--o{ ORDER : places
gantt
title Project Timeline
dateFormat YYYY-MM-DD
section Planning
Requirements :done, req, 2024-01-01, 2024-01-10
Design :active, design, 2024-01-08, 2024-01-20
section Development
Frontend :frontend, 2024-01-15, 30d
Backend :backend, 2024-01-20, 25d
stateDiagram-v2
[*] --> Idle
Idle --> Running : start
Running --> Paused : pause
Running --> Stopped : stop
Paused --> Running : resume
Paused --> Stopped : stop
Stopped --> Idle : reset
stateDiagram-v2
[*] --> Active
state Active {
[*] --> Processing
Processing --> Validating
Validating --> Processing
Processing --> Complete
}
Active --> Inactive : timeout
Inactive --> Active : restart