You should initialize the TreeLayout after adding vertices to the chart, I tried this and it worked for me.
You should do something like the following: (note that this is the 1 year old code that I had, you may find that it is a bit outdated)
Layout<GraphVertex, GraphEdge> layout;
GraphVertex Is a class that represents the vertex in a graph, GraphEdge represents edges on your graph.
Darth plagueis
source share