mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.75k stars 6.08k forks source link

Use swimlanes in flowchart diagram #2028

Open marcpre opened 3 years ago

marcpre commented 3 years ago

I would like to create a flowchart, which has swimlanes.

Find below an example.

Exam

After reading the documentation I couldn`t find this functionality. I found this issue #551, which was automatically closed.

Any suggestions how to integrate this feature or add it to mermaid if it does not exist?

I appreciate your replies!

rstockm commented 2 years ago

That would be awesome, given that no framework used by CodiMD/HedeDoc offers swimlanes.

rognales commented 2 years ago

That would mermaidjs as perfect diagram-as-a-code

jeffdoolittle commented 2 years ago

Any traction on this? Seems like a perfect fit for the project.

eshafoshaf commented 2 years ago

Up vote!

itsthejoker commented 2 years ago

This basically the only type of diagram I make and was the first thing I looked for with the github announcement. +1 from me.

initdotd commented 2 years ago

+1 and both vertical and horizontal lanes would be incredible!

napei commented 2 years ago

You can possibly achieve a halfway solution with subgraphs https://mermaid-js.github.io/mermaid/#/flowchart?id=subgraphs Definitely a feature worth having, +1.

gicellamare commented 2 years ago

+1

LeDuble commented 2 years ago

+1

iot-crazy commented 2 years ago

Searching for this feature brought me straight here, so +1 from me too!

brightblueray commented 2 years ago

+1

bytesex commented 2 years ago

+1

gledsoneduardo commented 2 years ago

+1

cndoit18 commented 2 years ago

+1

ToastShaman commented 2 years ago

+1

tobiasny commented 2 years ago

+1

tamanobi commented 2 years ago

+1

dhtek commented 2 years ago

+1

paulofgccunha commented 2 years ago

+1

shun528 commented 2 years ago

+1

naoki914 commented 2 years ago

+1

bytesex commented 2 years ago

Hello dear, Would it be somehow possible to have this issue assigned on someone?)

eddya101 commented 1 year ago

+1

kelynch commented 1 year ago

+1

sabrasosimis commented 1 year ago

+1

jonathh21 commented 1 year ago

+1

ChickenHarry commented 1 year ago

+1

chungminhtu commented 1 year ago

+1

asidelnik commented 1 year ago

+1

MichaelCombs28 commented 1 year ago

+1

blakenan-bellese commented 1 year ago

+1

MatejMarecek commented 1 year ago

+1

tirsomartinezreyes commented 1 year ago

+1

sindunuragarp commented 1 year ago

+1

awetomate commented 1 year ago

+1

atkawa7 commented 1 year ago

Checkout actdiag for example no how this could be acchieved http://blockdiag.com/en/actdiag/demo.html svgviewer-output

r0b5t4 commented 1 year ago

Git graphs can achieve a limited swimlane-esque appearance now.

kevinjanada commented 1 year ago

+1

totorofly commented 1 year ago

+1

AquiGorka commented 1 year ago

This would be awesome, I am actually not using mermaid because of the lack of it :(

kayewrobleski commented 1 year ago

+1

carlseverson commented 1 year ago

+1 from me as well. Would love to have this.

anilsehgal-onscale commented 1 year ago

+1

czeumer commented 1 year ago

+1

smoreau-tj commented 1 year ago

+1

Rob-Holland commented 1 year ago

+1, I find this relevant to my interests 🙃

vincentbuit commented 1 year ago

+1

cdcharlebois commented 1 year ago

+1

gwax commented 1 year ago

Please do not leave comments merely to show your approval (e.g. "+1") because it sends a notification to everyone subscribed to the Issue, which crowds out meaningful discussion.

If you are interested in following the discussion, click the "Subscribe" button in the notifications section at the right.

If you would like to show your interest / approval for the Issue, Click the "👍" reaction emoji on the initial Issue comment.

latetedemelon commented 1 year ago

What are the tasks for this one? My intial thoughts were:

  1. Extend the grammar: Modify the grammar to support swimlanes by introducing new keywords like swimlane and end, and allowing users to define lanes within swimlanes.
    graph TD  
      swimlane A  
        A1-->A2  
      end  
      swimlane B  
        B1-->B2  
      end  
  1. Create a swimlane class: Create a new class to represent swimlanes. This class should handle the rendering of swimlanes, lanes, and their contents. The swimlane class should be able to hold an array of lanes and store any other relevant attributes, such as the width, height, and position of the swimlane.
  2. Update the parser: Modify the parser to recognize the new swimlane-related keywords and create swimlane objects accordingly. The parser should populate the swimlane objects with their respective lanes and nodes.
  3. Update the layout engine: Modify the layout engine to account for swimlanes when calculating node positions. Swimlanes should have their own boundaries, and nodes within them should be positioned according to the boundaries of their containing lanes. Additionally, swimlanes should be stacked either horizontally or vertically, based on user preference.
  4. Update the renderer: Modify the renderer to draw swimlanes and their contents. The renderer should support drawing swimlane boundaries, lane labels, and nodes within the lanes. It should also handle connections between nodes in different lanes or swimlanes.
  5. Update the documentation