mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

Align flowchart items in LR layout

Open olastor opened this issue 2 years ago • 3 comments

Hi, I am trying to use mermaid for a graph, but cannot figure out if

  1. it's possible to left align the boxes which that are on the same "depth of the tree" (e.g. "Image Risks" and "Registry Risks" and the one's below). They're right now centered.
  2. it's possible to make all arrows start from the same position (e.g. for the leftmost box so that they come out of the middle of the right edge)

Thanks!

Screenshot (11)

Graph in live editor

olastor avatar Jun 16 '22 18:06 olastor

Hi! Unfortunately that is not possible. Perhaps it should be possible to set a fixed width of a node.

knsv avatar Aug 20 '22 12:08 knsv

Hi! Unfortunately that is not possible. Perhaps it should be possible to set a fixed width of a node.

Thanks for the clarification. A fixed width would be valid workaround, I guess.

olastor avatar Aug 23 '22 11:08 olastor

You can do This with HTML Tags :

Tips1["<p style='width:250px;height:25px;margin:0px;'>centered</p>"]
Tips2["<p style='width:250px;height:25px;margin:0px;text-align:right'>right align</p>"]
Tips3["<p style='width:250px;height:25px;margin:0px;text-align:left'>left align</p>"]

olivierduquenoy avatar Nov 30 '22 17:11 olivierduquenoy