Animating Relationships with Flow
IntermediateRun moving dashes or dots along a relationship's line, and let a value switch the flow on and set its speed.
Flow animation makes a relationship move: dashes or dots run along the line, for example goods moving between warehouses or energy flowing into a plant.
Turn it on for a relationship type
- Select the Relationship Type in the Model Navigator.
- In the Properties panel, open Display → Flow animation.
- Set Flow to On, then choose:
- Pattern: Dashes or Dots
- Direction: Source → target or Target → source
- Speed: 1 is the normal pace. Higher is faster, lower is slower.
Let the data drive the flow
Rules in the same Display section can change the flow depending on a relationship's own property values. Suppose a ships relationship has a rate property:
- Click + Add rule and add a condition: rate greater than 0.
- Under Then, set Flow to On.
- Set Speed from to rate. The speed then grows with the value: rate × the base speed, between 0.1 and 10.
With the base flow left off, the line stays still while the rate is 0, starts moving when it goes above 0 and gets faster the higher it is. Rules are tried in order and the first matching one applies.
The uses relationship type in the C4 template: dashes from source to target, and a rule that switches the flow on and takes its speed from traffic.
On one diagram only
Right-click a relationship on the diagram and choose Display… to change its flow on that diagram alone. Fields left at From type keep the type's setting.
Where it moves, and where it doesn't
- It moves on diagrams, in the Reader and on published sites.
- Exports stay still: SVG, PDF and images show a normal line.
- If your device is set to reduce motion, the pattern is shown but doesn't move.
- In simulations, a relationship's flow uses its own stored values. It doesn't yet change as you step through a run.
This content was written collaboratively with AI.