This is an independent community resource about Dia. We are not affiliated with the GNOME Dia project.
How to Draw Sequence Diagrams in Dia
A sequence diagram shows how objects interact over time: participants across the top, time flowing downward, and messages as horizontal arrows between lifelines. Dia’s UML sheet is strongest for class diagrams — for sequence diagrams, the reliable approach in every Dia version is to build them from basic shapes. This tutorial shows that method; it works identically in v0.97.2 on Windows, Mac and Linux.
What You Need
- Dia installed (download here)
- A new diagram: File > New, and set the sheet dropdown to UML (for class-diagram objects) — you will mostly use basic shapes from the toolbox for the sequence layout itself
Step-by-Step: A Login Sequence Diagram
We will model a simple login flow: User → LoginForm → AuthService → Database.
Step 1 — Place the participants
Select the Box tool and draw one box per participant across the top of the canvas: User, LoginForm, AuthService, Database. Double-click each box to edit its label. Space the boxes evenly — you can select all four and use Arrange > Align to distribute them.
Step 2 — Draw the lifelines
Select the Line tool. Draw a vertical line downward from the bottom-center connection point of each box. With the line selected, open its properties and set the line style to dashed — this is the standard lifeline notation. Extend each lifeline to the same bottom level.
Step 3 — Add messages
Select the Line tool again, but this time set an arrow head on the end (line properties > arrow). Draw horizontal arrows between lifelines, top to bottom in chronological order:
- User → LoginForm: “submitCredentials()”
- LoginForm → AuthService: “authenticate(user, pass)”
- AuthService → Database: “queryUser()”
- Database → AuthService: dashed arrow back, “userRecord” (dashed = return message)
- AuthService → LoginForm: dashed arrow, “authToken”
Convention: solid arrow heads = synchronous calls, open arrow heads = asynchronous messages, dashed lines = return messages. Double-click each arrow to add its label above the line.
Step 4 — Add activation bars
An activation bar (the thin rectangle showing an object is busy processing) is just a narrow Box with white fill placed over the lifeline, spanning the messages it handles. Draw one over AuthService‘s lifeline covering messages 2–5, and a shorter one over Database covering message 3–4.
Step 5 — Add fragments (alt/opt)
For conditional logic, draw a large Box with no fill around a group of messages and label its top-left corner, e.g. alt [valid credentials] / else [invalid] separated by a dashed horizontal line. This is the manual equivalent of UML combined fragments.
Step 6 — Export
File > Export > choose SVG for documents or PNG for slides. See our high-quality export guide for DPI and vector tips.
Tips for Readable Sequence Diagrams
- Keep messages strictly top-to-bottom chronological — never draw a later message above an earlier one.
- Use Arrange > Align to keep lifelines parallel and message arrows perfectly horizontal.
- For complex flows, split into two diagrams rather than cramming 20 messages onto one canvas.
- Want to learn UML properly? A structured online course (e.g. on Coursera or Udemy) covers sequence, class and state diagrams systematically — worth it if this is for a degree or a job.
Frequently Asked Questions
Does Dia have built-in sequence diagram templates?
No dedicated template. The UML sheet is class-diagram focused; sequence diagrams are built manually as shown above. The method works in every Dia version.
How do I draw a self-message (object calling itself)?
Draw a short horizontal arrow from the lifeline that loops back to the same lifeline, with a small activation bar — the standard notation.
How do I show an object being destroyed?
End its lifeline with a large X (two crossed lines) at the point of destruction.
Can I copy a sequence diagram into Word?
Yes — export as PNG (or EMF on Windows) and insert it. For crisp printing, export SVG and convert.
