Closed luxzeitlos closed 4 years ago
This is indeed a bug. Likely the set of equations I picked for the "vert" layout is not actually consistent. Can you post either the graph that caused it, or more preferably a minimum throwing example?
I think it happens as soon I pass two totally independent nodes. So this is the minimal example I could find that throws:
const hierarchy = dagHierarchy();
let b = { id: '2', children: [] };
let a = { id: '1', children: [] };
const dag = hierarchy(a, b);
const sug = sugiyama();
sug.coord(coordVert());
sug(dag)
Yeah, that makes sense. Unfortunately support for unconnected DAGs is only half there. If you need to use coordVert, you should manually break them up.
The only real appropriate fix is to break them up into connected dags, run coordVert, then paste them back together. I'll keep this post open as a reminder to do that, but in the meantime, just break the dag appart manually.
This is ultimately a duplicate of #43 which I think better captures the intent. I'm actively working on this, so hopefully this will be resolved soon.
Duplicate of #43
I get