0

I have a graph with nodes and edges and I want to display them. Isn't there any function which, given this graph, displays it without me to give exact coordinates?

Phate
  • 6,066
  • 15
  • 73
  • 138

1 Answers1

2

yes, you can use the auto layout http://jgraph.github.io/mxgraph/docs/js-api/files/layout/mxCompactTreeLayout-js.html this url construct a compact tree layout.

var layoutMgr = new mxLayoutManager(graph);
    layoutMgr.getLayout = function(cell) {
    return layout;
};
Ares
  • 36
  • 1