Skip to content

Latest commit

 

History

History
166 lines (86 loc) · 4.21 KB

diagram-types.md

File metadata and controls

166 lines (86 loc) · 4.21 KB

Diagram Types

<-Home

PlantUML auto-detects the diagram type based on the first unique item in the code. See https://plantuml.com/commons#6dd346f9babe70c8 for diagram type examples that show what keywords or symbols trigger auto-detection of diagram type.

Contents

Activity Diagram
C4 Model Diagrams
Class Diagram
Component Diagrams
Deployment Diagrams
Gantt Charts
Mind Map
Mind Map of Tasks
Sequence Diagrams
Use Case Diagram

Activity Diagram

(source PlantUML code)

Note: auto-detect activity diagram type by lines that start with : and end with ;

C4 Model Context Diagram

C4 Model Context Diagram

(source PlantUML code)

C4 Model Container Diagram

C4 Model Container Diagram

(source PlantUML code)

C4 Model Component Diagram

C4 Model Component Diagram

(source PlantUML code)

Class Diagram

(source PlantUML code)

Note: auto-detect of class diagram type by use of line type:

  • <|--
  • *--
  • o--
  • ..
  • --

Component Diagram

(source PlantUML code)

This isn't strictly a UML Deployment Diagram, but is similar:

Deployment-Like Diagram

(source PlantUML code)

Example Gantt chart:

Gantt Chart

(source PlantUML code)

Mind map diagrams are a great way to quickly break a problem or concept down into smaller parts.

Here is a simple example:

Mind Map Simple

(source PlantUML code)

Here we create a Mind Map to track tasks, with visual tags for urgent and completed:

Mind Map of Tasks

(source PlantUML code)

Sequence diagrams present ordered events that occur between participants (actors) over time (which runs top-to-bottom)

Here is a simple example:

Sequence Simple

(source PlantUML code)

There are multiple types of participant that can be used to trigger a sequence diagram, as per the types in the example below:

Sequence Participants

(source PlantUML code)

The order that that participants is declared determines their order left to right in the diagram, and the order of the events is the order top to bottom

Here is the same diagram, but with simpler set-up code, thanks to use of a theme:

Sequence Participants

(source PlantUML code)

Another example showing setting colours etc:

Sequence Another Example

(source PlantUML code)

Use Case Diagram Example

(source PlantUML code)