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

Serious crossing of icon lines (class diagram) #1305

Open mnlin0905 opened 4 years ago

mnlin0905 commented 4 years ago

image

The whole thing looks chaotic

jgreywolf commented 4 years ago

Can you provide a link that shows the diagram definition in the live editor so that I can look at this in better detail? The image is a bit fuzzy

mnlin0905 commented 4 years ago
classDiagram

    class A {

    }
    A --|> D

    class B {

    }

    class C {

    }

    class D {

    }

    class E {
    }

    class F {
    }

    class G {
    }

    class H {
    }

    class I {
    }
    I --|> O
    I --|> H
    I --|> J

    class J {
    }

    class K {
    }

    class L {
    }
    L --|> N
    L --|> K

    class M {
    }

    class N {
    }

    class O {
    }

    class P {

    }
    P ..|> N
    P ..|> A
    P ..|> O
    P ..|> I
    P ..|> M
    P ..|> K
    P ..|> B
    P ..|> E
    P ..|> H

like this

mermaid-diagram-20200316093413

mnlin0905 commented 4 years ago

Can you provide a link that shows the diagram definition in the live editor so that I can look at this in better detail? The image is a bit fuzzy

11

jgreywolf commented 4 years ago

A couple of comments.. More of an FYI than anything.

I was playing around a little bit to see what moving items would do, and this is one of the diagrams I ended up with. Still has a lot of line crossing.

I will continue to investigate to see if we can improve anything on our side for the placement, but majority of this is handled by the layout engine directly.

mnlin0905 commented 4 years ago

A couple of comments.. More of an FYI than anything.

  • If you define a relationship between classes, you do not need to also define those classes separately. Unless you are going to add members using the {} format, of course.
  • The order that items are added to within the diagram definition will change the positioning slightly.

I was playing around a little bit to see what moving items would do, and this is one of the diagrams I ended up with. Still has a lot of line crossing.

I will continue to investigate to see if we can improve anything on our side for the placement, but majority of this is handled by the layout engine directly.

Thank you very much

vintprox commented 4 years ago

I get very disturbing image