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
70.52k stars 6.3k forks source link

Organizational Charts #1360

Open AlphaJack opened 4 years ago

AlphaJack commented 4 years ago

Is your feature request related to a problem? Please describe. I'm trying to write a simple organizational chart/organigram using the graph diagram, but I feel the lack of these features:

  1. option to add a same level node even if it's only linked to another node. In this case one should decide the side where it appears. The option should be left/right in my situation, but it can be before/after to ensure graph LR or graph RL compatibily. In the example below I'm referring to the nodes "Staff Centrali" and "Amministrazione". A similar feature was requested in #637
  2. option to force the links to not use diagonal lines, useful with invisible nodes which have style NODE width:0

Describe the solution you'd like Adding these features to the graph diagram should be enough for most organigrams

Describe alternatives you've considered I tried to replicate the image below with Mermaid, this is the code.

Additional context organizational-chart

putzwasser commented 1 year ago

+1

An option to make the connecting more edgy/hard and not curved would be nice, too

kimptoc commented 1 year ago

Guess you can do something crude with flowchart


  Head---Lead
  Head---Lead1

  subgraph team1

  Lead---sub1
  Lead---sub2
  end

  subgraph team2

  Lead1---sub3
  Lead1---sub4
  end

image

jgreywolf commented 1 year ago

I think it might end up being a little easier/better to create a new diagram type

phdreyer commented 1 year ago

If you go for a new diagram type. It would be great to have the option to add an attribute to the node, especially for the people's names.

 --------------
|      CEO     |   
|   John Doe   |  
 --------------

Thanks

obstschale commented 1 year ago

I'm not sure if this is over the top. We have a organigramm with all employee names. So new employees see who is where.

So @phdreyer 's idea is great, but I would like to see the option to add the whole team.

omervk commented 1 year ago

This would be great. I would also add that allowing for a person's headshot, position, etc. would be very useful. Moreover, there are sometimes "dotted lines" in organization, which should not affect structure and positioning 🤔

undying commented 9 months ago

I use flow diagram to draw org charts, but the main problem is that matrix diagrams turn out very poorly in it. Therefore, if there is a class for drawing org charts, then it would be very cool.

daethnir commented 7 months ago

Been watching this since it was created, but formally adding my +1 to wanting a proper org chart type.

dicaeffe commented 7 months ago

If you go for a new diagram type. It would be great to have the option to add an attribute to the node, especially for the people's names.

 --------------
|      CEO     |   
|   John Doe   |  
 --------------

Cool, something like the thing you can do with stateDiagram. The result would be:

stateDiagram-v2
    state "CEO" as ceo
    state "T. H. Eboss" as ceo
    ceo --> devmngr
    ceo --> admmngr
    ceo --> law

    state "Dev. Manager" as devmngr
    state "Alice" as devmngr
    devmngr --> dev

    state "Development Team" as dev
    state "Bob" as dev
    state "Charles" as dev
    state "David" as dev
    state "Eveline" as dev

    state "Adm. Manager" as admmngr
    state "Florence" as admmngr
    admmngr --> adm

    state "Administration Team" as adm
    state "Grace" as adm
    state "Holt" as adm
    state "Ivan" as adm

    state "Lawyer" as law
    state "John" as law