microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.35k stars 304 forks source link

Help with layout #262

Open kinahawi opened 3 years ago

kinahawi commented 3 years ago

I'm building an app to create entity relationship diagrams from data in a model. I'd like to have the nodes in the diagram spread out from each other in a rough spiral pattern around a central node. I've tried several different layouts with various parameter settings. I've attached some files showing the actual results vs the desired results. Any suggestions? In the samples, the hexagons are relations and the rectangles are the entities. Thanks in advance!

ER Diagram Simple desired ER Diagram Simple ER Diagram

ER Diagram desired

levnach commented 3 years ago

Have you tried MDS layout?

Sent from a phone


From: kinahawi notifications@github.com Sent: Wednesday, September 30, 2020 10:09:45 AM To: microsoft/automatic-graph-layout automatic-graph-layout@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [microsoft/automatic-graph-layout] Help with layout (#262)

I'm building an app to create entity relationship diagrams from data in a model. I'd like to have the nodes in the diagram spread out from each other in a rough spiral pattern around a central node. I've tried several different layouts with various parameter settings. I've attached some files showing the actual results vs the desired results. Any suggestions? In the samples, the hexagons are relations and the rectangles are the entities. Thanks in advance!

[ER Diagram desired]https://user-images.githubusercontent.com/46299899/94717126-deb0dd80-031d-11eb-8177-32058568b447.png [ER Diagram Simple desired]https://user-images.githubusercontent.com/46299899/94717128-df497400-031d-11eb-9dd4-0cb71afbdc82.png [ER Diagram Simple]https://user-images.githubusercontent.com/46299899/94717129-df497400-031d-11eb-951f-efd340d15451.png [ER Diagram]https://user-images.githubusercontent.com/46299899/94717130-df497400-031d-11eb-94ec-bb5650df30ce.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/automatic-graph-layout/issues/262, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJAYZ4AD7IAZGIPERE565TSINQ5TANCNFSM4R7LJB4A.

kinahawi commented 3 years ago

I thought I had tried them all, but must have messed up. MDS is giving me what I'm looking for. Thanks so much for the help!!

FYI - I usually use the layout setting tool on the viewer to help find the right algorithm and settings, but I find now that I can't because every time I change a setting, I can no longer close the dialog.

AdmiralSnyder commented 2 years ago

@kinahawi did you set the layout programmatically? if so, can you point me to how you did it? thanks

levnach commented 2 years ago

Have a look at project UsingMDSLayoutSample .