Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Automatic layout without node position

+1 vote
Hi all. I was testing this great library, trying to convert an old project made with another one. In this project I didn't specify nodes size and position, letting the library doing it automatically.

I have seen that there are several demos (for example Demo.yFiles.Graph.IncrementalHierarchicGrouping and Demo.yFiles.Graph.Folding) , but in all of them it seems that nodes are defined in agraphml file containing their coordinates and other stuff to.

In fact, if I populate the graph with code like the CreateInitialModelGraph method of Demo.yFiles.Graph.Folding demo:

// create some nodes and groups
      INode g0 = groupedGraph.CreateGroupNode();
      INode g1 = groupedGraph.CreateGroupNode(g0);
      INode c1 = groupedGraph.CreateNode(g0);
      INode c2 = groupedGraph.CreateNode(g0);
      INode c3 = groupedGraph.CreateNode(g1);
      INode c0 = graph.CreateNode();

      // create some edges
      graph.CreateEdge(c1, c2);
      graph.CreateEdge(c0, g0);
      graph.CreateEdge(c0, c1);
      graph.CreateEdge(c2, c0);
      graph.CreateEdge(c2, c3);
      graph.CreateEdge(g1, c0);

I get every nodes in the same position.

Is there any way to automatic layout nodes withous specifying their position and size?

Thanks
closed with the note: Not a yEd question.
asked Nov 24, 2016 in Help by brasio (130 points)
closed Nov 24, 2016 by thomas.behr

1 Answer

0 votes

This forum is for yEd questions only. For questions regarding one of the yFiles programming libraries, please contact yWorks support by mail. (Please include your yWorks customer or evaluator ID in your mail when doing so.)

answered Nov 24, 2016 by thomas.behr [yWorks] (125,380 points)
Imprint | Privacy Policy