HN2new | past | comments | ask | show | jobs | submitlogin

Elk (Eclipse Layout Kernel) is a very good package solving that, you might want to check it's Javascript port https://github.com/kieler/elkjs


I'd briefly come across Elk, but couldn't tell how it was better than what I was using. The examples I could find all showed far simpler graphs than what we had, and nothing that seemed to address the problems we had, but maybe I should give it another look, because I've kinda lost faith that dagre is going to do what we need.

If I can explain briefly what our issue is: we've got a really complex graph, and need to show it in a way that makes it easy to understand. That by itself might be a lost cause already, but we need it fixed. The problem is that our graph has cycles, and dagre is designed for DAGs; directed acyclic graphs. Fortunately it has a step that removes cycles, but it does that fairly randomly, and that can sometimes dramatically change the shape of the graph by creating unintentional start or end nodes.

I had a way to fix that, but even with that, it's still really hard to understand the graph. We need to cut it up into parts, group nodes together based on shared properties, and that's not something dagre does at all. I'm currently looking into cola with its constraints. But I'll take another look at elk.


Our graphs are hierarchical, can contain cycles, too and have a bunch of directed subgraphs. We reach 500 nodes with 20k ports and 10k edges and "getting the graph" is still possible but takes a bit of practice. Cycle breaking is okish for us, because there is a strong asymmetry between many "forward" and much less "backwards" edges that makes the heuristics succeed often.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: