clue/graph-composer

How to tweak the layout?

schmunk42 opened this issue · 4 comments

I just played around with your phar and created a graph of my project (phundament/app).

bildschirmfoto 2013-10-21 um 19 58 16

How could I stretch or expand the nodes so that the connections become more clearly visible?
Or adjust the layout so that the nodes are distributed more into a vertical direction.

clue commented

Thanks for bringing this to my attention! The actual layouting is currently left up entirely to GraphViz. It's usually quite good at arranging smaller, hierarchical graphs, but its default layout engine ("dot") quickly fails for more complex ones (like yours). GraphViz offers a huge number of options and settings and different layout engines to influence its layouting.

However, currently, there's no easy way to pass layout options to graph-composer, I'm afraid. If you feel like hacking the source code, a good starting point would be here. You may also want to familiarize yourself with the graphviz options and perhaps checking the output of php graph-composer.phar export --format=dot.

If you find some settings that work for you, please feel invited to share them. I'd love to see them included in order to better support some of the bigger dependency graphs.

Thanks for your reply.

I also played around a little bit in the meantime. It turns out that you can use this dottoxml script to create files readable with eg. yED.

clue commented

Thanks for sharing your findings! 👍

I think it makes sense to add some native support for a GraphML export. I'll keep track of its progress in the new ticket #10.

Just a little final addon: Imported GraphML into yED and used the attached settings (Radial Layout)

phundament-ra

yed settings

.