How I Group The Team's Node in One Square

Jun 4, 2010 at 11:34 PM
Dear Tony, How i group the same Types Of Vertices In to Square In ELement Host ... Please Tell me that because i want to Show The Different Team Interaction With Each Team Vertices In A Square ... Regards, Mustafa Ali
Jun 5, 2010 at 5:29 PM
Edited Jun 5, 2010 at 5:34 PM


Do you mean a square or a grid?  If you mean a grid, you can tell the NodeXLControl in your initialization code to use a GridLayout instead of its default FruchtermanReingoldLayout:

nodeXLControl1.Layout = new Microsoft.NodeXL.Layouts.GridLayout();

If you mean a square, then NodeXL doesn't provide a layout class to do that.  You would have to create your own SquareLayout class, which wouldn't be very difficult.  To create a new layout class, the easiest thing to do is derive from the Microsoft.NodeXL.Layouts.AsyncLayoutBase class and implement its LayOutGraphCore() method.  That method is given a graph rectangle, and its sole task is to set the IVertex.Location property on all of the graph's vertices.  The simplest example of a derived class that does this is the RandomLayout class.

-- Tony