Sankey diagrams

+1 vote
asked Mar 15, 2021 in Wanted features by Alex
A Sankey diagram is a flow diagram in which the width of the arrows is proportional to the flow rate. There are many tools to draw them but they are graphical. This would make a great addition to plantuml as the diagrams are usually data driven.
commented May 15, 2021 by The-Lu (63,920 points)

Hello A.,

Here is also similar request here:

Regards,
Th.

commented Mar 19 by boldandbusted (280 points)
Just want to drop this site here so examples of Sankey diagrams are easily seen and generated for discussion: https://sankeymatic.com/ Cheers.

1 Answer

0 votes
answered Mar 15, 2021 by The-Lu (63,920 points)

Hello A.,

- Would that be enough?

@startuml
title Bracketed line thickness
node foo
foo --> bar                 : ∅
foo -[thickness=1]-> bar1   : [1]
foo -[thickness=2]-> bar2   : [2]
foo -[thickness=4]-> bar3   : [4]
foo -[thickness=8]-> bar4   : [8]
foo -[thickness=16]-> bar5  : [16]
@enduml

See also: https://plantuml.com/en/deployment-diagram#b5f6831632fd63c1

If that can help,
Regards,
Th.

commented May 13, 2021 by awschult (360 points)

As an addition, you could probably use a preprocessor macro to change "thickness" to "flow"

EX:

@startuml
!flow = "thickness"
title Bracketed line thickness
node foo
foo --> bar                 : ∅
foo -[flow=1]-> bar1   : [1]
foo -[flow=2]-> bar2   : [2]
foo -[flow=4]-> bar3   : [4]
foo -[flow=8]-> bar4   : [8]
foo -[flow=16]-> bar5  : [16]
@enduml
...