mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

Flowchart with vertical and horizontal arrows

Open altomani opened this issue 1 year ago • 3 comments

I could not figure how to produce a chart like the one below:

A->B is vertical, B->C horizontal, and A->C diagonal.

Is this kind of shape already supported in mermaid?

 ┌───┐
 │ A │
 └─┬─┘
   │  \
   │   \
   │    \
   │     \
   ▼      V
 ┌───┐     ┌───┐
 │ B ├────>┤ C │
 └───┘     └───┘

altomani avatar Apr 17 '23 12:04 altomani

Mermaid does not provide granular control of placement of nodes.

It seems like this is by design and this design decision should be noted in the documentation.

fulldecent avatar Apr 22 '23 16:04 fulldecent

It would be great to have even a tiny bit of control over placement, e.g., to force nodes to be placed on the same level such as in OP's example.

e-pet avatar Aug 18 '23 17:08 e-pet

It could be as simple as adding another control character which signals to ignore a connection for placement:

§ B --> C

where § would be the example for such a control character.

wobbba avatar Apr 18 '24 14:04 wobbba